This is a brief guide to monitoring your electricity usage with a currentcost device. The devices can be bought on eBay and more info can be found at www.currentcost,com. In setting this up, I followed Paul Mutton's guide over at www.jibble.org/currentcost/. As I bought a seconnd generation device, I had to make some changes to get things working.
The hardware comes in two parts. First there is the power meter. This is an induction sensor which clamps around the live wire on your electric meter. I found information somewhat hard to find on how exactly it should be fitted. Basically it needs to go around the live wire ONLY. Which is generally the third wire from the left going into the meter.This then transmits the data to the base station, which displays the power usage and temperature. It also stores historical data. The base station can be connected to a computer using the data cable.
The CurrentCost device has a RJ45 socket on the base station and connects to the PC via a USB cable. The USB plug has an intergrated Prolific PL2303 USB to serial converter. So the device just looks like a serial device. You can point a terminal emulator at the device and it will output XML. The terminal setting depend on the model. The CurrentCost Classic (1st generation) uses 2400 8N1 and the CurrentCost Envi (2nd generation) uses 57600 8N1. Both devices simply write out XML to the serial port at regular intervals (ever five seconds) showing real time power usage and temperature. Every so often, they also dump their historical data in XML. The Classic seems to spit out XML over several lines and there is a perl script over at www.jibble.org/currentcost/ which uses a regex to extract the relivant information and feed it into a RRDtool database. As the Envi outputs the whole XML string on a single line, I wrote a perl daemon that reads lines and processes them with a XML parser. That can be downloaded from svn.bobsbasement.co.uk/currentcost/trunk/.
I didn't do anything special other than following the steps over at www.jibble.org/currentcost/ to create the RRDtool database and create the graphs. I set up a number of scripts to create graphs for days, weeks, months, etc and I redraw them by running the scripts on a cron job. If you're lazy you can just follow the same steps to get it working, though I'd recommend reading the docs over at oss.oetiker.ch/rrdtool/ for rrdtool create and rrdtool graph. It does make sense after a while.