The Carbon Diet goes open source
Posted by james on May 21st, 2009Well, I finally got round to it. I started developing The Carbon Diet 2 years ago (had the idea 3 years ago!), and it's finally spread it's wings and joined the world of open source.
After I'd been developing it for a few months, it became obvious that it was never going to be a commercial proposition, so it's been my intention to open it up for a very long time now. However, I was putting it off until "after I get it finished", or "after I tidy up the code", or any number of other reasons. Having a small child puts paid to all those plans, so I've finally bitten the bullet and released my dodgy code to the world as it is, warts and all.
The site is built in Rails, but it's pretty creaky. It was originally written in version 1.2 as I was learning, and a lot of the old-style controller and route code is still hanging around, waiting to be improved. I've started, but there is a long way to go to bring it up to a decent standard.
Anyway, if you use the site (or not!) and fancy improving it, now you can. Head on over to github to grab the code and join in. I hope to see you there!
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.