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
Too many buttons
I have a standard ham licence (VK7HPC) and am currently poking at a Retevis RT95 (same as the Anytone AT-778UV). As I'd like to use it ...

-
Those of you who follow my twitter stream will have noticed that I managed to 'lose' my home machine today. It was online and activ...
-
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...
-
Many years ago we lived in the Old Manse in Waternish, Skye. If you look on the maps, you'll spot that unlike nearly all the other house...
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