CurrentCost

Free, 2nd hand, data collection hardware

I'm giving away some of the data collection hardware I used for UK-DALE. Details here.

Current Cost and EDF EcoManager RF protocol docs are back online :)

Back in 2012, a few of us hacker folks chipped away at reverse-engineering the radio protocols for Current Cost and EDF EcoManager electricity meters. We kept our notes on a github wiki. Then Current Cost asked us to take those docs down. But, today, Current Cost very kindly allowed us to put the docs back online! Specifically, these two docs are now back online:

Have fun :)

Dimmers and sparse-sampling home energy monitors don't mix

I have been recording the power consumption of my whole home using two systems: a Current Cost CT clamp and my home-brew "sound card power meter". The latter samples my home's voltage and current waveforms at 44.1kHz and calculates the apparent and active power once a second.

Most of the time, the signal from the Current Cost CT clamp and my SCPM agree remarkably well.

One situation where the two systems disagree wildly is when our kitchen ceiling lights are on. These lights consist of 10 x 10W Philips dimmable LEDs driven by a cheap TRIAC dimmer. Here's a graph showing a time period where the lights start off, then turn on, and then turn off again. The Current Cost reports a rapidly varying power consumption. The SCPM, on the other hand, reports a very steady power consumption. I have also plotted the mains voltage to demonstrate that the mains voltage wasn't doing anything odd during this period:

What's going on? Why does the Current Cost think the kitchen light's power consumption wobbles up and down wildly?

Summary of my energy monitoring code

This is just a quick summary of the code I've been working on recently. The ultimate aim of all the code is to measure the whole-house electricity consumption and the consumption of individual appliances as cost-effectively as possible.


  • rfm_edf_ecomanager - C++ code for running on a Nanode (an Arduino clone with easy wireless support and networking). This code allows the Nanode to talk directly to multiple Current Cost whole-house sensors (CC TXs) as well as to multiple EDF Transmitter Plugs (CC TRXs). This code aims to capture data from the sensors as reliably as possible. For example, it learns when each CC TX is due to transmit and ensures that it stops polling the CC TRXs for a short window of time around the CC TX's ETA. You talk to the Nanode over the serial port. You can send simple commands. It sends data back to the PC in a simple JSON format.
  • rfm_ecomanager_logger - A Python script for communicating with the rfm_edf_ecomanager Nanode system. rfm_ecomanager_logger provides a command-line tool for "pairing" sensors with the logging system; assigning human-readable names to those sensors and then logging the data in a REDD-formatted form. Again, the emphasis is on reliable logging. It attempts to restart the Nanode if it dies. It goes to quite a lot of effort to make sure we correctly time stamp data (which is surprisingly difficult, especially given that the Nanode doesn't have a real time clock).
  • babysitter - A Python module for "babysitting" a logging system. Sends an email if a sensor dies or if rfm_ecomanager_logger fails. Also sends a "heartbeat" email once a day with some stats and a graph produce by powerstats:
  • powerstats - Produce stats and graphs from REDD-formatted power data. Mainly used for checking the health of sensors.
  • snd_card_power_meter - System for recording voltage and current waveforms at 96 khz, 20 bit per channel using a PC's sound card. Saves down-sampled high frequency data and also calculates real power and apparent power.

Also, I wrote a long guide to setting up a complete logging system which uses all the code listed above and is based on a small, low-cost, low-power Intel Atom system running Ubuntu Server.

How accurate is an EDF individual appliance monitor?

To try to get a feel for how accurate the EDF transmitter plug is, I simultaneously recorded our washing machine using a WattsUp meter, an EDF transmitter plug and an EDF whole-house transmitter. The WattsUp samples once a second, the EDF devices sample about once every 6 seconds. (data was collected from the EDF devices using my Nanode code and my logging script). Here are the results (click on the image for a larger version):

Watts Up versus EDF IAM versus whole house

And here's the same data but this time the EDF IAM and WattsUp are laid on top of each other. I'm happy that the EDF device is of comparable accuracy to the WattsUp, at least in this experiment:

Watts Up versus EDF IAM

One thing I need to investigate a little more is that occasionally the EDF IAM appears to give a reading which is above the theoretical max wattage an appliance can draw (13 amps x 230 volts = 2990 watts). This doesn't appear to be an RF corruption issue (because the checksum is OK). I guess it's possible that our washing machine does sometimes draw too much (but for a short enough time to mean the fuse doesn't blow). I was hoping to capture an "overload" event in the data capture I did for the graphs above but unfortunately it didn't occur. If I get time I might try recording more WattsUp signals from our washing machine.

I've just ordered another 10 EDF IAMs. When these arrive (in about 10 days) I will have a total of 14 EDF IAMs. I'll run these for a week or so. If these check out OK then I'll probably order another 15 to get to a total of 30 to monitor every appliance in my home.

DIY EcoManager Nanode code is feature-complete!

Hurray! At long, LONG last the embedded C++ code for my DIY EcoManager is feature-complete! It's hard to believe that it's been a full two months since I started on this mission to build a DIY Current Cost receiver. Back then I thought it'd only take a couple of weeks! The last two months have been spent writing over 3,000 lines of C++, scratching my head lots over the EcoManager protocol and how to use the RFM12b wireless module. Oh, and blowing up my laptop of course. And I've met some really smart folks who are trying to do similar projects; without whom I honestly wouldn't have been able to get this project done. I've also really gotten into using the wiki and issue tracker features on github: the integration between commits, the issue tracker and the wiki is great.

The next step is to write a Python script to log the data coming from the Nanode and keep track of which IAMs are connected to which appliance. And then either build an Open Energy Monitor to measure both real and reactive power for my whole house, or pester Ecotricity to get me on their smart meter trial.

And then, once I've got all my data logging kit quietly collecting data, I'll finally be able to get cracking with my "proper" work of doing smart meter disaggregation!

Deleted Current Cost protocol documents - UPDATED: Docs are back!

Update 5/1/2016: CurrentCost have kindly allowed me to put these docs back onto the GitHub wiki! The post below is just kept for posterity's sake...

I'm really sorry but I'm afraid I've had to remove the Current Cost protocol details from the GitHub wiki for my rfm_edf_ecomanager project.

Current Cost got in touch a little while ago. (My blog had showed up on one of their Google Alerts). They were very friendly and were genuinely interested in the work I had been doing. But they did request that I delete two wiki pages which describe the workings of the Current Cost protocols (reverse engineered by a group of us). So I have deleted those two pages.

The open-source advocate in me did consider defiantly keeping the documentation online. But I think the pragmatic, diplomatic and polite option is to comply with Current Cost's wishes. To start with, they have been very friendly (they haven't served me with a formal take-down notice or anything like that). And the smart metering world appears to be quite small so it would be a big mistake to annoy one of the major players! To be honest, I'm somewhat relieved that we're allowed to keep the code online.

rfm_edf_ecomanager code now works with the Arduino IDE

Just a very quick update: my rfm_edf_ecomanager C++ AVR code now should compile within the Arduino IDE.

Current Cost and EDF EcoManager RF protocols almost fully decoded

Thanks to the enormous help of Graham Murphy, Matt Thorpe and Paul Cooper, the wiki pages for the EDF EcoManager RF protocol and the Current Cost RF protocol are nearing completion. Of course, jump in if you have anything to add. Anyone with a github account can contribute.

And my EDF EcoManager C++ AVR code is ticking along. Still some distance from being usable "in the field" but getting there.

One quick random thought: for those of us who have been tinkering with the Current Cost RF protocol, it appeared rather odd that the data is "manchesterised". It occurred to me this afternoon that we can take advantage of this structure in the data to validate the data. A little more discussion on the wiki.

UPDATE 30/10/2012

Current Cost have asked me to remove the protocol documentation from the wiki. More details here.

UPDATE 5/1/2016

Current cost have kindly allowed me to put the docs back onto the github wiki!

EDF EcoManager wiki

I've started a wiki page for technical details of the EDF EcoManager protocol. Please feel free to edit!

UPDATE 30/10/2012

Current Cost have asked me to remove the protocol documentation from the wiki. More details here.

UPDATE 5/1/2016

Current cost have kindly allowed me to put the docs back onto the github wiki!

Pages

Subscribe to RSS - CurrentCost