Just to understand the big picture, let’s say you have a photon app to monitor some operation and you’d like to send a Tweet when there is a change in status. Photon can publish the event to the Particle cloud. So now I need to have a program “SendTweetOnEvent” hosted somewhere (since it needs to run 24 x 7 x 365) to subscribe to this data and on changes send the tweet. Now where would SendTweetOnEvent reside if I don’t have my own server always online to run it? I guess you can install SendTweetOnEvent on Azure. According to Azure Pricing, the smallest model is “pay as you go” and is based on a hourly rate which comes to $13 per month. So is this the minimum I am going to pay to run this application each month? The SendTweet program will basically be waiting for an event to be published to wake it up, but are we paying Azure $13 a month to have the application waiting for data to be published to wake it up to send its tweet?
For simple things like the “if this then that” operation you mentioned, why not use IFTTT? It’s literally made for those kind of things, and is free of charge.
There are other providers out there as well, which let you host simple things with some restrictions, for free. Heroku is one of them if I’m not mistaken.
Investing in a raspberry pi might also be an option. It’s a one-time thing, but gives you total control. It could even double as a media center
Depending on what you’re trying to do, you might even get away with using webhooks and call those 3th party services directly, assuming they provide an API.
if IFTTT can give you what you need, go that route, it’s free. For more control, get a droplet at Digital Ocean for $5 a month. Heroku is also good, and free if you’re running Node.js app, but the free tier requires 6hrs downtime a day. After that it’s $7 a month. AWS also has a free tier. You can get basic instances for free from them for 12 months after opening a new account, and they have some pretty reasonable small instance pricing after that, and on demand prices worth looking at.
Thingspeak has conditional Tweet and is free.
My chicken tweet their coop’s status via particle.publish and IFTTT does the “relay-tweet”.
My core picks up temps and humidity of two DHT22 (outside and inside) and compiles a simple string with all the readings. timer library updates the .publish every 15min and the IFTTT particle channel picks up the event.
In addition, I have the data-string as a variable as well and call it via my api url on the phone.
One thought about the 24/7/365: you should think about a battery shield as UPS and the fact that your wireless might go down, or the cloud has a “disconnect”. IFTTT particle channel helps to check whether your device is online.
Further, you are limited by the amount of updates and frequency of tweets. won’t matter if you do it once in a while but every time your status changes? every second? every minute? Something to consider.