I’ve had a Current Cost EnviR domestic electricity meter for a couple of years; it was given to me be the electricity company as part of an effort to reduce energy usage. Several people have connected these meters to Linux computers; I have connected mine to a Raspberry Pi.
The hardware is two parts: a sensor clamps around the live wire going into the main distribution board, and a small mains-powered display wirelessly receives readings. Mine has a serial port, and came with a USB-to-serial cable adapter. Connecting over serial (e.g. with screen
or minicom
), the device writes out a line of XML every 6 seconds, like this:
<msg><src>CC128-v1.29</src><dsb>00776</dsb><time>20:18:30</time><tmpr>25.0</tmpr><sensor>0</sensor><id>00077</id><type>1</type><ch1><watts>00496</watts></ch1></msg>
Various people have already written some code to read from the device and put the output in some kind of database. I found some code on Github and modified it to write to an RRDtool round robin database. My code on GitHub.
Last five minutes
Last fifteen minutes
Last hour
Last day
Longer-period graphs have been excluded from this example.
The temperature sensor on the power meter seems unreliable.
Last week