I’ve written about my CurrentCost meter that I’m using to monitor my home electricity usage, and the small home server that I’ve set up to collect the data.
Yesterday, I decided to make a start on collecting the data. My plan was to copy what Nick had done and create a MySQL database to store the info, with a table to store a timestamp and the watt reading from the CurrentCost meter.
CREATE TABLE currentcostdl ( time TIMESTAMP DEFAULT CURRENT_TIMESTAMP, power FLOAT NOT NULL, primary key(time));
I started with Nick’s Python scripts, but didn’t get very far.
The server, a NSLU-2 (or “slug”) is running SlugOS.
The problem was that there is no python-mysqldb package in the SlugOS repositories. I did try downloading the source for it from sourceforge to build it myself, but struggled to get the dependencies I needed to make it – urllib in particular was a big pain.
I also tried the debian package but again dependencies on SlugOS got in the way.
So I gave up on that and decided to do it myself using Perl – Perl and MySQL had to be easier, right?
Erm… not so much 🙂