Publishing CurrentCost data to the world
Posted by james on March 28th, 2009A while ago, I started hacking around with a CurrentCost real-time energy monitor. This is a very nice little device that measures your electricity use, but more importantly has a serial output on the bottom so you can get data out of it.
Well, eventually I decided that while being able to get data off the meter was nice, it would be better if I could publish it somewhere. So, I wrote a program in Ruby to do exactly that. It reads data from the meter, and sticks it on the web. I'll go into a bit more detail in a minute, but first, you can download it (and get the source code) from github.
The program operates as a system daemon, which runs in the background on your Linux box (Mac should work as well) and uploads to various places. Adding new publishers is dead easy, so if you want to publish your data somewhere else, you can easily add it.
The Carbon Diet
First up, my own site, The Carbon Diet. This uploads your daily usage history from the meter into your carbon diet account so that you don't have to take so many meter readings to get an accurate graph. This is still pretty experimental and needs more work, but it's pretty useful already. You can see how it looks on my profile.
AMEE
Next, what I think of as the important one. AMEE, if you're not aware, AMEE is a neutral aggregation platform for sharing energy data and carbon calculations (disclaimer: I work for them these days). Think OpenID for your energy identity. Anyway, we have a nice "smart meter" demo which uses my currentcost app as the data source. Every minute, it uploads into an AMEE profile, and then another app makes a nice graph of the CO2 produced. In theory, the Carbon Diet could pull that data from AMEE instead of me publishing it directly, but that's still to come.
Pachube
Another energy data sharing service is Pachube (pronounced "patch bay"). As far as I can tell, this is more geared at art and design than rigorous data, but it's fun to play with. They've done a bunch of stuff with the CurrentCost, and now my app joins the throng. My pachube feed updates every 6 seconds - every time the meter sends data out.
Finally, what would be the point of a web energy publisher if it couldn't tweet? If you really want to, you can see my minute-by-minute energy usage on Twitter by visiting @james_energy.
Twitter support in JabberStatus
Posted by james on August 7th, 2008JabberStatus was originally inspired by Twitter's facility to update your status via XMPP/Jabber. Unfortunately, Twitter's Jabber interface has been down for months now, which is rather sucky.
The solution to this? Extend JabberStatus to work for Twitter as well as Facebook. It turned out to be very easy, so it's online now. Just add twitterstatus@jabber.org to your contact list and it will talk you through the rest.
The JabberStatus code has moved to GitHub now, so you can grab it from there. The code for the CO2Updates app has also moved there.
One Hundred Months
Posted by james on August 6th, 2008I just saw the One Hundred Months campaign, and decided it was ripe for a bit of automated Twittering. So, 5 minutes hacking and we have One Hundred Months on Twitter. Code (as ever these days) is available from GitHub.
I'm amazed by what computers can do sometimes. This one seriously took me longer to publish to the world than to write.
Filtering Twitter with Pipes
Posted by james on July 10th, 2008I like Twitter. I'm not sure why, but I do. However, I don't like the fact that I can't view my friends timeline via RSS without seeing my own updates in there as well. I already know what I've written, I just want to see what other people wrote. To scratch that particular itch, over lunchtime I built a Yahoo! Pipe to filter my own updates out of my feed, and you can use it too. Check it out here.
CO2 on Twitter
Posted by james on May 7th, 2008I read this article last night, about using Twitter to make machines talk, specifically Tower Bridge. "What a fantastic idea", I thought to myself. "Maybe I can do the same thing for climate change". Also, it would be a good way to flex my Ruby muscles a little and get some "fun" coding in for the first time since Amelia was born.
So, a couple of hours of Ruby later, and we have atmospheric CO2 updates on Twitter. The code is dead simple, and can be grabbed from GitHub.