Efergy Wireless Energy Monitor decoding now in Windows!

If it seems I’ve been a little crazy with the posts lately, you’re not mistaken. I’ve been slightly busy trying different things, and now I have some good news – you can now decode your Efergy Wireless Energy Monitor from within Windows as well. Now people who aren’t interested in setting up Linux altogether can get to use it (although Linux is very useful).

Here’s how to get it working …

First, you should install the Zadig driver so that your RTL2832 dongle can be used by userspace programs. The linked instructions are for setting up SDR# in Windows, which you don’t strictly need to install but it’s a great SDR program for the RTL2832 tuners. You only need to follow the part about installing Zadig.

Next, you will need to download the rtl-sdr prebuilt binaries for Windows. It’s great they have this pre-built – unzip the file, and you can safely delete the version that’s not useful for you (e.g. 32-bit users please keep x32, 64-bit users please keep x64).

Next, you should install Cygwin (including gcc) and compile the decoder software from Nathaniel Elijah (or my slightly modified version here). The commands are as provided in the source code itself.

I can understand, this is probably quite daunting for the uninitiated, and it’s really a lot of trouble to go to for just one program. As a result, for those who don’t want to do it themselves and can trust me (that’s the other issue), you can have my compiled binaries here.

Please unzip the file into the same folder you kept above so that rtl_fm.exe and these EfergyRPI_log-???v.exe files are in the same place. Also ensure that cygwin1.dll is also within the same directory. As I am redistributing cygwin1.dll, I must fulfil my GPL duties by providing access to the source code hosted here (the DLL I built it against was an older version of Cygwin 1.7.20, so please keep in mind that there are later versions available at cygwin.com).

These compiled binaries are based on my logging version of the code by Nathaniel Elijah, and are compiled with different voltage levels (see the filename). Use the one appropriate for your situation. If no second argument is provided, the program performs as per the original. If a second argument is provided, data will be logged to a file with the given name in append mode. Data is only flushed to file every ten samples to avoid excessive wear (while avoiding possibility of data loss). The line endings are also in DOS format for compatibility with Windows programs.

I will remind you, I am volunteering my time here, and I give you no warranties whatsoever (express, or implied) as to the suitability of the code for its purpose or the compiled binaries. I will not be responsible for any damages caused whatsoever. You try this at your own risk!

That being said, I’m a nice person, and I’m pretty sure it will work for most of you since it works for me. If you’ve gotten this far, you’re doing well. You should now have a folder that looks like this:

Folder Listing

To invoke the application, first you need to fire up a Command Prompt, and change to the directory where these files are held. (e.g. if the files are in C:\efergydecode, you can reach there by typing c:<enter>, cd efergydecode<enter>)

You can then start the program by typing in

rtl_fm -f 433550000 -s 200000 -r 96000 -g 19.7 | EfergyRPI_log-xxxv

replacing xxx with the voltage which best matches your line. Also consider changing your frequency, and gain to suit as detailed in my previous post. If you wish to log to file, just add a space and the file name after – in this example, I’m using the 240v file and logging to a file called log.csv.

rtl_fm -f 433550000 -s 200000 -r 96000 -g 19.7 | EfergyRPI_log-240v log.csv

You will note that this works subtly different to the Linux version which redirects the rtl_fm diagnostic print to null – I’m not sure how that can be accomplished in Windows, but it’s not really important as the logging is done only of the data by the code itself, rather than captured by what is printed to console.

I also can’t help you with the American date – I suppose a change in the code can help, but at this moment, what you get is what’s here. If you’re interested in fixing it, you are most welcome to do so (sources are given, and you can recompile with Cygwin).

Efergy-in-Windows

To kill the program, hitting CRTL+C kills it gracefully.

If you have trouble …

In case of problems, you might find that Windows may install the generic Realtek TV tuner driver – please ensure the device is using the Zadig driver. You can tell if this is the case because the TV tuner will not be showing like it does below and instead will be in the Sound, video and game controllers section.

Correctly-Detected

If you can’t install unsigned drivers, say on Windows 8, you will have to toggle the signed driver check using Advanced Startup before trying to install the Zadig driver.

Conclusion

I hope this gives everyone an excuse to try this if they have an efergy Wireless Energy Monitor. No longer is not knowing how to run Linux an excuse! Things just get better, don’t they?

About lui_gough

I'm a bit of a nut for electronics, computing, photography, radio, satellite and other technical hobbies. Click for more about me!
This entry was posted in Computing, Electronics, Radio and tagged , , . Bookmark the permalink.

18 Responses to Efergy Wireless Energy Monitor decoding now in Windows!

  1. Pingback: Decoding Efergy Energy Monitor Signals with RTL-SDR - rtl-sdr.com

  2. Jacob Stahl says:

    Hello, I am having trouble logging my data into a .csv file. I followed the code that you suggested, and the readout is working so far. However, when I open the .csv spreadsheet, it is blank. Otherwise, thank you so much for the help, the program works great!

    • lui_gough says:

      Please ensure to invoke with a second option with the file name to record to. I have compiled only to flush to file when ten samples have occurred – so this means anywhere from 60 – 100s for 6s and 10s send intervals. Much longer if your transmitter is set to transmit at 12/24s. Your file will be empty if the program is terminated before reaching this!

      E.g. rtl_fm -f 433550000 -s 200000 -r 96000 -g 19.7 | EfergyRPI_log mylog.csv

      Of course, you will need to substitute the correct build of EfergyRPI_log for your given line voltage, and you can change the file name as well (it will be logged in the current directory – I don’t think it supports full paths). And of course, if you know the correct frequency or ppm offset, you can add -p option, and twiddle with the gain.

      With any luck, that should get you going ;).

      – Gough

  3. Frank says:

    Hi

    Thank you for making windows binaries! Unfortunately my energy monitor isn’t compatible with Efergy’s protocol.

    I haven’t c++ compiled code in a very long time… do you know if rtl_433 is available in windows 32bit binary somewhere?

    If not, can you make a build for it as well?

    I am trying to decode one of these:
    http://www.bluelineinnovations.com/Customer-Service/PowerCost-Monitor/FAQs/#5

    I can see the single every 32 with SDR# no problem. I just need a way to turn that into digital information to decode… where would I begin?

    • lui_gough says:

      Dear Frank,

      I don’t think that rtl_433 is available for Windows at the moment – unfortunately, I don’t have the resources to make it work under Windows as it needs to be built with rtl_sdr under Windows and my Cygwin install (due to some libusb incompatibility) builds programs which cannot directly access the tuner itself. That is why, at least for the Efergy, we can get around it by using the prebuilt Windows binaries for rtl_sdr and just build the decoder which takes the audio via a pipe (which my Cygwin install seems to have no trouble with).

      I’m not sure if rtl_433 will help you, as rtl_433 is made for decoding of OOK/ASK signals. You can tell if your signal is OOK/ASK by zooming in user SDR#. If your signal appears as one strong line which may drift a little, then it’s OOK/ASK. If it seems to “split” into two lines, alternating back and forth, it’s FSK and rtl_433 is not really able to analyze those signals meaningfully at this time.

      As for reverse engineering the signals – I’m just as clueless as you I’d have to admit. I have an Efergy HM01 (search it on this site) which isn’t compatible with this code either – I’ve made some recordings of the signal at various power levels and asked for some assistance although it seems nobody has (at yet) been able to give me any leads.

      I think it is a case of identifying “fixed” bits of the message (pre-amble, device ID) and variable bits (reading, check code), and then trying to correlate the reading to the actual displayed value by deriving a scale value (e.g. 1024 units per mA).

      – Gough

  4. Frank says:

    Thanks for the response!

    More research has shown me it is ASK/OOK at 433.92. I will be using an arduino and a receiver to attempt the decoding.

    Here’s a link for anyone else considering decoding these Blueline power monitors
    http://scruss.com/blog/tag/blueline/

    • lui_gough says:

      In that case, it will be very likely that with some specific code modifications to rtl_433, it will be possible to also get rtl_433 to decode it. You will have to contact the guy behind rtl_433 though, if you don’t already have the required experience to make sense of the code, although it’s still very much for Linux at the moment.

      – Gough

  5. Pingback: Cheap wide band radio receiver (USB Dongle) - Page 3 - EcoRenovator

  6. kanenas says:

    Very nice guide!, Please make a follow up post with what we can do with the data
    e.g. d3.js, google charts, open power monitor and etc…

  7. David G says:

    Thanks for this – exactly what I needed, particularly the Windows version 🙂
    Some of my observations:
    I am using a Clipsal rebadged Efergy E2 with a DIN rail mounted TX (mains powered).
    -My RTL receiver is somewhat deaf – the Efergy receiver works 99% of the time on my desk which is about 15M from the TX. I had to the move the RTL antenna to less than 3M from the TX. (My RTL has a Belling Lee antenna socket so it is easy to extend.)
    – my centre freq is 433.530MHz
    – I had to fiddle with bandwidth and gain to get reliable decodes every 6 secs. I ended up using 200,000Hz BW and 35db gain.
    – the readings I get match the Efergy RX most of the time but about 1 in 5 readings is out by up to 100 Watts. I’m not sure which one to believe, but I am erring on the side of the RTL.

    73
    DG

  8. Paulo says:

    Hello,

    I’m trying to do the same job, can you please check if this RTL2832 will do the job ?
    http://www.ebay.com/itm/USB2-0-Digital-DVB-T-SDR-DAB-FM-HDTV-TV-Tuner-Receiver-Stick-HE-RTL2832U-R820T-/201140299234?pt=AU_Components&hash=item2ed4e565e2
    Or can you advice one for me?

    Thanks, and great job

  9. Jaco says:

    Hi. I ran as per the instructions but data output to the screen is erratic. Sometime only every 10 minutes, sometimes longer. What am I doing wrong>

    • lui_gough says:

      Have you calibrated your RTL dongle for frequency offset? This is probably one major issue, as most crystals in RTL dongles are off by up to about 150ppm, so the signal isn’t exactly where you expect it to be. Use SDR# or another SDR program to tune into a known signal and find the ppm correction value that brings the signal to the right frequency, or use a utility like kalibrate-rtl under Linux after the dongle has warmed up.

      Check for interference in the 433mhz band, and check your gain settings – also best done with an SDR program – you should see your data bursts centred and strong over the background noise. More gain isn’t always better – as the interference may also be amplified and spill into the passband.

      Check the antenna is cut to the right length for maximum reception efficiency, and try moving the antenna to improve signal strength.

      Other than that, I can’t really help you, as the results will vary for person to person and from equipment to equipment, but needless to say, I can get pretty reliable decodes with it as it stands.

      – Gough

  10. Roger says:

    Hi,

    Do you have it working for Efergy E2-IR?

  11. loviing it says:

    perfecttttt!! thanks for the info took 5mins to setup!!

    Windows setup
    install
    cygwin.com
    Install
    http://rtlsdr.org/softwarewindows
    Install vc++ 2010

    https://goughlui.com/wp-content/uploads/2013/11/EfergyRPI_log-for-Windows.zip
    https://sdr.osmocom.org/trac/raw-attachment/wiki/rtl-sdr/RelWithDebInfo.zip

    Put above in same folder

    rtl_fm -f 433550000 -s 200000 -r 96000 -g 19.7 | EfergyRPI_log-240v log.csv

  12. Mark says:

    Hi is anyone still playing around with this?
    I’m trying under Linux, and I can see the clicks every 6 seconds through Gqrx, but not getting any decoding.

Error: Comment is Missing!