Announcement

Collapse
No announcement yet.

Steps On How To Install RTL_433 SDR (Software Defined Radio) As A Windows Service

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Steps On How To Install RTL_433 SDR (Software Defined Radio) As A Windows Service

    The RTL_433 allows HomeSeer to listen for and decode popular wireless transmissions. Examples of this are: Temperature Sensors, Energy Meters, and even Insteon wireless signals. The software that talks to the RTL_433 is able to take these decoded signals and publish the values to an MQTT broker where they can be processed by something like mcsMQTT and added as HomeSeer devices, added to a database, charted, etc.

    Here is the RTL 433 from Amazon:

    https://www.amazon.com/RTL-SDR-Blog-.../dp/B0129EBDS2

    Mine came with an antenna on a tripod, but I guess the new ones do not. You will have to order an antenna that is compatible with the SMA connector on the RTL 433 that is tuned to the frequency you want to use. My use is in 433 MHz range.

    For example, I have a Current Cost Envi (whole house energy meter) where the receiver died but the transmitter with the clamps around the mains in the breaker panel is just fine. I use the RTL_433 to receive and decode the energy use of the house at the panel. The RTL_433 then publishes the values to my Mosquito MQTT broker. Then mcsMQTT plugin subscribes to the MQTT topics that were published, it created 2 new HomeSeer devices (1 for House Wattage Use on Phase A and 1 for House Wattage Use on Phase B of the electrical mains coming into my house). I then create a third device that is simply the sum of the other two for the whole house power (Phase A Watts + Phase B Watts). I then have MQTT save the values that come in every 10 seconds of updated power use to an InfluxDB database. From there the power can be charted.

    The RTL_433 runs easily on a Raspberry Pi but it can also run on Windows as a Windows Service with some work. There are 3 pieces of software needed:
    1. The compiled RTL_433 Windows Driver and executable program.
    2. A utility called “zadig-2.7.exe” that fixes the USB driver problem with this RTL_433 adapter in windows
    3. A utility called NSSM that allows you to make the RTL_433 Windows executable into a Windows Service that starts up with the system.

    Here is each component one by one:

    1 - The compiled RTL_433 Windows Driver and executable program

    This is sourced from Github and someone by the name of “winterrace” has compiled and posted the completed binaries.

    Releases Folder:

    https://github.com/winterrace/rtl_433_win/releases

    Link to the latest version:

    https://github.com/winterrace/rtl_43...2019-08-19.zip

    Article where I learned about this:

    https://austinsnerdythings.com/tag/rtl_433/

    2 - A utility called “zadig” that fixes a driver issue when you install the RTL_433 usb device on a Windows PC.

    After I installed the RTL_433 on windows, I was unable to connect to it via the RTL_433 software I had downloaded from above. When I went to go look at the Windows “Device Manager” view I saw that I now had 2 new devices called “Bulk-In, Interface” under “Other Devices” and both of the new devices as had the warning icon on them. I looked online and found some people complaining about the same thing and they talked about how Windows thinks the RTL_433 is a different device and “The Windows 10 upgrade process appears to replace the WinUSB drivers with the Windows DVB-T ones”. The “zadig” utility replaces the driver with the correct “WinUSB” driver. This should only be done on “Bulk-In, Interface (Interface 0)”.

    I learned of this here:

    https://www.rtl-sdr.com/tag/zadig/

    I downloaded Zadig here:

    https://zadig.akeo.ie/

    Again, I only applied the “WinUSB” driver to the “Bulk-In, Interface (Interface 0)”.

    After that was done I again tested the RTL_433 executable and this time it found the interface and immediately showed me all the devices it was decoding on the screen. You can then also dump them to an MQTT broker with this command:

    rtl_433.exe -C customary -F "mqtt://{IP Address of the MQTT Broker}:1883"

    3 - Now that I have RTL_433 working I wanted to get it installed as a Windows Service. For that I used a utility called NSSM.
    I got NSSM from here:

    https://nssm.cc/download

    It is very simple yet effective. Because each of these are standalone executable files with no installation needed I put them all in a single directory “C:\Program Files\rtl_433” in that directory I end up with 4 files:

    nssm.exe
    rtl_433.exe
    rtlsdr.dll
    zadig-2.7.exe

    I then configure the service to use the “rtl_433.exe” from that directory and use “C:\Program Files\rtl_433” as the working directory.

    That is pretty much all there is to it.
    ---------------------------------------------------
    Jean-Marie G. Vaneskahian
    jean@vaneskahian.com
    ---------------------------------------------------
Working...
X