Alright, after reading up a bit I found a way to get Indigo variable data into Cosm automagically. Now, this may not be pretty or particularly efficient even, but it does the job and is fairly easy to adjust.
The variable values get sent to Cosm using an AppleScript that gets triggered by Indigo any time that particular variable has any change. The script sits inside its own file rather than inside Indigo to avoid slowing down Indigo should anything go wrong.
I modified the AppleScript found here
http://community.cosm.com/node/1399.
- Code: Select all
property MyKey : "YOUR KEY HERE"
property FeedId : "YOUR FEED ID HERE"
property DataStream : "YOUR DATASTREAM ID HERE"
tell application "IndigoServer"
set tvPower to value of variable "tvPower"
set TheCommand to "curl -m 5 --request PUT --data " & tvPower & " --header \"X-PachubeApiKey: " & MyKey & "\" http://api.pachube.com/v2/feeds/" & FeedId & "/datastreams/" & DataStream & ".csv"
do shell script TheCommand
end tell
In this instance I wanted to track power consumption of my TV (using an iMeter Solo), which is where the "tvPower" variable comes from. You want to replace any instance of tvPower with the name of your variable.
The end result?
A live chart tracking whatever the hell you want.
And since Cosm can display multiple datastreams in 1 chart, you can create 1 line displaying your region's temperature from NOAA, and another line displaying indoor temperature from your thermostat, giving you an at-a-glance comparison.
Happy charting!