Menu Close

Setting up RTL-433 as a Service on a Raspberry Pi

This is Part 1 of what will be a multi-part series on how to monitor and log your own weather and temperature devices, utility meters, etc. using readily available software and inexpensive hardware.

https://github.com/kellimac/multiband_rtlsdr-433_sniffer

This repository describes in loose detail how to accomplish the installation of the rtl_433 software to use with an RTL-SDR dongle and install a service that monitors both the 433 and 915 mHz bands by frequency hopping. It also spins up a tcp server to allow a client to connect and collect decoded data from wireless IoT devices in range over a TCP connection as JSON data.

Use case: Using an SDR dongle to monitor both the 433 and 915 mHz and other bands for temperature probe, utility meter and other wireless ISM band IoT device data using rtl_433.

I have several Acurite temperature probes and other devices that transmit data in the 433 and 915 mHz bands, mostly as OOK data. The data received by the SDR receiver and decoded by rtl_433 and passed on to a client for processing (display, triggering alarms, etc) as json data over a tcp server.

  • I found that due to voltage fluctuations, loose connections on USB port and a myriad of other reasons the cantankerous Raspberry Pi 2 might have for losing connection to the SDR dongle, this process, while it can be done in a single command line, requires a failure monitor and auto restart function in order to be reliable enough to use for things like monitoring for higher than normal temperature and other abbormal conditions via data received from IoT devices by an SDR radio.
  • The process was fairly reliable until I decided to add a second frequency and hop between the two every minute or so. This causes the rtl_433 process to fail, sometimes several times per day. I observed that the CPU time used by the rtl_433 process drops to 0 when this failure occurs and that the CPU % is normally between 40-55% on my Rasbperry Pi 2B.
  • This project addresses those issues by installing the rtl_433 and tcp server commands as a service and then monitoring the CPU load used by the rtl_433 process to trigger a service kill and restart as needed.

To be covered in future part and repository: Utilizing the collected telemetry data (with Node-Red in my case)

An example of how I use the collected telemetry data to monitor electic usage for more conscious use of electricity. The SDR radio receives telemetry data on 912 mHz that is continually transmitted by electric meters with this feaure enabled. The data is then sent via a tcp connection to a running instance of Node-Red.

Node-Red TCP node connected to tcp server on Raspberry Pi that is running rtl_433

Example panel set up in Node-Red to display data sent by temperature probes on 433 mHz

Github repository: https://github.com/kellimac/multiband_rtlsdr-433_sniffer