It seems that there are new services to push your data to every week! One of those has been around for a while and is now called Xively. You may have known it when it was Cosm, or Pachube. Let's set it up to log and graph our data.
If you haven't already, go to https://xively.com/signup/ and create a free developer account.
After you are set up and logged in, Click the DEVELOP tab, and +Add Device.
Give your device a name, a description, and then choose a privacy setting. For now, choose Private Device as we will be working with API keys.
Click Add Device.
Fill out the channel information.
To type the degree symbol "°":
On a Mac type: Shift+Option+8 for the degree symbol
On a PC numeric keypad type: Alt+0176.
(or just copy and paste the character above!)
Save the channel.
If you like, you can set a Location, and Metadata.
You'll need to enter three items from your Xively account into the agent code. Under the API Keys panel in your Xively developer workbench, copy the entire auto-generated API Key, and paste it inside the quotes for the API-Key variable at the top of the agent Xively code. Then find the Feed ID above the API Key, and copy and paste it to its variable. Lastly, type or paste the name of your channel into the Channel_ID variable. My channel was named "Thermocouple". This section of code looks like:
API_Key <- "YOUR API KEY"; //Type your Xively API Key
Feed_ID <- "YOUR FEED ID" //Type your Feed ID
Channel_ID <- "YOUR CHANNEL ID"; //Type your Channel ID
The Xively API Key sections looks like this:
agent.send("Xively", farenheit); //Uncomment this line to send Xively data
Build and Run your code, and you should see something like this:
2013-09-04 22:44:21 UTC+4: [Status] Device booting
2013-09-04 22:44:21 UTC+4: [Status] Device configured to be "MAX31855"
2013-09-04 22:44:21 UTC+4: [Device] 24.5°C
2013-09-04 22:44:21 UTC+4: [Device] 76.1°F
2013-09-04 22:44:21 UTC+4: [Agent] { "id": "Thermocouple", "current_value": 76.1 }
Nice! You are sending thermocouple data to Xively!
Now, what if you wanted to monitor this data on your iPhone or iPad? Search for an app called Pitchfork in the App Store. This app was created to work with the Electric Imp and Xively. Find the Xively Data panel, and enter the settings for your API key, Feed and Channel into the app. Now, everytime you open that panel, the app will subscribe to your feed and update every time there is new data. The app allows you to configure a single feed with up to two channels. Now you can keep an eye on your temperature from anywhere! When you are comfortable with Xively, take a look at Triggers. You can set triggers for each channel to enable actions on events. For more fun, take a look at Zapier.com. You can hook Xively triggers to Zapier "Zaps" and perform all kinds of cool actions. |