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).
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:
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).
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.
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.
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?