Last month I asked people over Twitter and on the element14 Community how you monitored your electrical usage. I was surprised to discover that a lot of people, don't. I'm not to be dissuaded when there's statistics to be had, especially when it's something close to home (oh dear, I'm resorting to puns).
So I have one of these electricity monitors:
That my electric provider gave me, turns out they're really common, except I'm having a hard time determining how to get data out of it. You see, there's an RJ45 socket on the underside of it, which it turns out, dumps serial, but I cannot discover an authoritative answer on its pinout, though it turns out there are cables you can buy that're 'pre-made' for this, apparently it's also 3v3 logic. I decided to make my own:
Part one of my troubles is, how do I work out the correct pinout? Admittedly I am a novice when it comes to using oscilloscopes (and they're too high priced for my tastes) so what's a safe hack-ey way I can go about this? (the USB device in the pic' happens to be a UART type device which usefully has pins on it).
Part two of my troubles, is how shall I handle the data it outputs? About every second, it apparently dumps out XML over serial. Something like this:
<msg> start of message
<src>CC128-v0.11</src> source and software version
<dsb>00089</dsb> days since birth, ie days run
<time>13:02:39</time> 24 hour clock time as displayed
<tmpr>18.7</tmpr> temperature as displayed
<sensor>1</sensor> Appliance Number as displayed
<id>01234</id> radio ID received from the sensor
<type>1</type> sensor Type, "1" = electricity
<ch1> sensor channel
<watts>00345</watts> data and units
</ch1>
<ch2>
<watts>02151</watts>
</ch2>
<ch3>
<watts>00000</watts>
</ch3>
</msg> end of message
I thought that perhaps I should connect it to an ArduinoArduino, or perhaps a Raspberry PiRaspberry Pi? I will need a way to do the following:
- Receive the data and ensure it is legible
- Store the data so that we can use it
- Ensure the data is stored at an accurate or relevant timestamp (apparently the device just counts from when it was turned on)
- Convert the values it gives to something that makes sense
- Present the values that its stored in ways that are useful and relevant to cost
- Such as graphs over time
The way I see this being useful, is to correlate the electricity usage with house temperature, external house temperature, and maybe further down the line link in my central heating system, so I'm creating almost a house profile, or prevent something turning on when electricity usage is high (for example, electricity is of course used when the boiler kicks in for the water pump, but I'm getting ahead of myself).
With all this in mind, does this change anyone else's mind about monitoring their electrical usage? Or perhaps someone can give me advice on where to begin with either part of this project? Or should I construct an electricity monitor out of something else entirely?
Thanks for reading!