So - one trivial script (reusing much of the code for my MQTT variant) you get https://gist.github.com/1903259. The only minor niggle was working out how to prepend the minimum extra json content (version and datastreams) as I'd not used the json libs before. (Hmm yet another github toy - embeddable gists with syntax highlighting. Nice) Update now I have 24h worth of data - plot attached
Saturday, 25 February 2012
apcupsd via Python to Pachube
In python, the 'default' URL accessing toolkit (urllib2) doesn't support PUT, however I've discovered requests which a) does and b) is in Fedora. So one apt-get install python-requests.noarch and you're off.
So - one trivial script (reusing much of the code for my MQTT variant) you get https://gist.github.com/1903259. The only minor niggle was working out how to prepend the minimum extra json content (version and datastreams) as I'd not used the json libs before. (Hmm yet another github toy - embeddable gists with syntax highlighting. Nice) Update now I have 24h worth of data - plot attached
So - one trivial script (reusing much of the code for my MQTT variant) you get https://gist.github.com/1903259. The only minor niggle was working out how to prepend the minimum extra json content (version and datastreams) as I'd not used the json libs before. (Hmm yet another github toy - embeddable gists with syntax highlighting. Nice) Update now I have 24h worth of data - plot attached
Energy metering update
This is an update to my previous post ( https://blog.elwell.au/2024/09/tomznhiking-dds238-2-rs485-energy-meter.html ) as I've swapped o...
-
There seem to be several branded versions of this cheap 2 unit wide energy meter available online from the regular stores. I have a 'tom...
-
Since there's no european satellite stream of Nasa TV it means you have to watch a streamed version over here. Also I'd like to w...
-
During the trials of concerto at CERN, I wanted to make the text fields a bit more dynamic like say following a specific twitter feed. This...
1 comment:
You could also use httplib2. We do Puts in the audrey agent (github.com/aeolusproject/audrey/). It uses the oauth library which uses httplib2 as the underlying http lib.
Post a Comment