The instruction booklet for the CurrentCost ENVI talks about "IAMs" - Individual Appliance Monitors - but these are not commercially available yet. Time to apply a bit of ingenuity, then!
A quick survey of my house revealed a couple of obvious candidates for sub-metering, a few not-so-obvious ones, and the start of some serious brain racking on how to break into the elusive "everything else" slice of the pie.
First we need to get the data out of the CurrentCost monitor. A CurrentCost USB serial cable into my Viglen MPC-L, and a perl script reading the serial port, running through an XML parser, mapping to an appropriate pub/sub topic space and publishing over MQTT (MQ Telemetry Transport) to my home RSMB message broker.
You can see the separate "Appliances" coming from the CurrentCost, with Appliance 0 being the whole house number. Each CurrentCost transmitter has up to three "Channels", to enable a 3-phase supply to be monitored with 3 CT clamps, but we have some more ingenious uses for these channels!
This is the raw data, and although in some cases (whole house, and garage) the data is coming from the CT clamp of a standard CurrentCost transmitter, other sensors were needed to pick up some of the other feeds.
For the boiler, I used another CurrentCost transmitter, but made use of a trick which Martin Dix, Founder of CurrentCost, discovered; which is that contrary to the laws of physics <grin>, if you put a CT clamp round a cable that has Live *and* Neutral in it, and the cable is very close to the CT coil itself (down at the hinge of the clamp), then you get a small power reading when the appliance is on. It should, of course, be zero, as the "in" should cancel out the "out".
My heating boiler uses 200W when it's on, but the CurrentCost clamp shows just 18W. So I have an MQTT subscriber application, cc128mapper.pl, which looks for these "false" readings, and publishes the corrected value, as measured on the whole house CurrentCost display when the appliance turns on and off. This trick only works when the appliance uses a constant current when it's on, as we don't get a representative reading of the power reading. However, for some things it works :)
Measuring the power usage of the lights is another interesting challenge - there are no exposed separate Live and Neutral cables to put a CT clamp round. Time for a bright idea! I got a small 5volt solar panel and plugged it into one of the spare CT ports on a CurrentCost transmitter in the kitchen. The panel produces a voltage proportional to the light level, which the CurrentCost system represents as a wattage. By choosing a suitable threshold, I can detect when the lights are on, and cc128mapper publishes 480W - the total wattage of the kitchen lights - onto the kitchenlights topic.
The "base load" calculation module is currently under development, so for now I'm using a cron job to publish the late at night when we're all asleep power reading into the broker. The bathroom heater is on a cron job timer, controlled by X10, so cc128mapper subscribes to the MQTT X10 control topics and publishes the power rating of the heater into the mix whenever the heater is on.
Here's a snapshot of the topic tree for the appliance power values. This is how much each of them is using at that moment.
Another MQTT subscriber application, cc128meters.pl, subscribes to the appliance power topics above, and by measuring the time interval between readings, accumulates Watt-Seconds and hence KiloWattHours for each of the appliances.
The front-end graphing application is a perl cgi program, which uses an MQTT subscriber to retrieve the retained values from the appliance metering topics on the Message Broker. It then does a few calculations, like the percentages of the total that each appliance has contributed, and also the "everything else" slice.
I also calculate the "average wattage" (the numbers in brackets on the chart legend). This is the KWH for that appliance divided by the number of hours we've been running (also held on a retained topic). The best way to think about this number is: if it was an appliance that was always on, this is how much power it would be using; whereas in fact, it's a higher powered device but only on some of the time. Using the "£1/Watt/Year" rule of thumb, this number shows how many pounds a year that appliance costs to run.
Now we have the numbers, we carefully construct a Google Charts URL to create a GIF image of a pie chart with labels, colours, legend, etc. The cgi-bin program returns HTML with this embedded image URL in it, which your browser requests from Google and the image appears. Magic :)
I've been doing whole house monitoring for more than four years now - this breakthrough really takes home energy monitoring to the next level. Now I'm thinking of novel ways to break into that "everything else" slice to separate-out more pie slices.
Andy Stanford-Clark 11-Mar-09