rtl_watch
monitors output from rtl_433
to display, in real time, the characteristics of the ISM-band devices broadcasting in your neighborhood.
rtl_watch
can help you understand the ISM environment in your neighborhood by cataloging devices near you that are broadcasting on the ISM band (433MHz in the US). The values provided by rtl_watch
for the device signal characteristics over a number of readings may help you identify devices that are close to your location and/or new devices in your neighborhood.
If your system already has the required components, the command ./rtl_watch
is all that's needed to begin monitoring. ./rtl_watch
starts the program, prompts for the name of the rtl_433
host on your local area network, and connects to that host via MQTT protocol (the default). ./rtl_watch -H <hostname>
starts the program without the prompt and connects to the rtl_433
service via MQTT. To connect via HTTP to that service, use ./rtl_watch -S HTTP -H <hostname>
.
The program opens a scrollable, resizable display window with a table with columns that characterize the signals from the devices observed by your rtl_433
system; it appends to the table new remote devices and associated data as they are observed by the rtl_433
host system; and it updates subsequent readings as they are reported.
./rtl_watch -h
provides more information about command-line options. Additional configuration options are described in a later section.
The display window is divided into several sections:
This section provides general information about the monitoring process. It indicates:
rtl_433
host that it is monitoring;rtl_433
port that it is connected through;This section is the table of characteristics of the signals observed from each device:
rtl_433
;rtl_433
;rtl_433
;[!NOTE] ITGT and PPT statistics lag one transmission behind readings, since the end of the past transmission isn't recognized until a new one begins.
This section is located just below the title bar and provides the following controls for program operation:
Data collection continues until you press the Quit button or type the \<CNTL-C> character on the controlling keyboard.
rtl_watch
monitors packets decoded by rtl_433
for two signals that might indicate that maintenance of a remote sensor is needed:
battery_low
flag from 1 to 0 in its broadcast packets. Any occurence of battery_low
= 0 causes rtl_watch
to post the "!!" warning flag for that device. That flag is sticky: the warning flag remains, even if battery_low
returns to 1, since the battery voltage may be fluctuating with ambient temperature and the device may need attention in any case.Battery Low takes precedence over Status Change, so only "!!" will be displayed if the battery-low flag has been seen even if a status-change has occurred.
The Reset Warn button clears both the battery-low and status-change flags for all devices. If warning flags reappear after a reset, they are due to new warning conditions appearing for the device.
The information from rtl_watch
can be helpful in several ways to understand your ISM neighborhood:
rtl_watch
rtl_watch
is a Python3 program. It requires that the Python packages tkinter
and paho-mqtt
be installed on the computer on which rtl_watch
is invoked. rtl_watch
has been tested on Mac OSX Catalina and Sonoma and Raspbian Bullseye and Bookworm. On Mac OSX, you may need to install Python3 if you haven't already done so ( https://www.python.org/downloads/macos/ ).
To install, connect to an appropriate directory for downloading code and issue the command
git clone http://github.com/hdtodd/rtl_watch
then cd rtl_watch
and ./rtl_watch
to run the program. See below for command-line options.
[!NOTE] Paho-MQTT v2 broke v1 callback invocations, but v3 and subsequent versions of
rtl_watch
incorporate a workaround so that it will operate with either v1.x or v2.x of Paho-MQTT. However, invocation on a system running v2.x will generate a warning, sincertl_watch
continues to use the deprecated v1-style callback invocation for now.check_paho_vers
is included in this distribution: executing it will tell you which version you're running.
rtl_watch
requires that a computer (the "monitoring computer") on your local-area network be running rtl_433
and re-broadcasting the ISM packets it recognizes as JSON messages via either the HTTP or MQTT protocol on the local-area network. See instructions below if you do not have an rtl_433
system set up or if it has not been set up to re-broadcast packets via MQTT or HTTP.
If you plan to use HTTP as your connection protocol, you can verify that your rtl_433
server is set up to stream via HTTP by running the program http_rtl
that is included in this distribution. It simply monitors the server HTTP stream and prints to the console a summary of the records that have been streamed (no interactive window).
rtl_watch
The following options may be provided on the command line to provide parameters and manage program operation:
-h
| --help
]-S
| --source
] [HTTP | MQTT]
rtl_433
service via HTTP or MQTT protocol (default MQTT)-H
| --host
] <MQTT Broker host name (string)>
rtl_433
packet infomation in JSON format-T
| --topic
] <MQTT Broker rtl_433 topic (string)>
-U
| --username
] <MQTT Broker rtl_433 username (string)>
-P
| --password
] <MQTT Broker rtl_433 password>
-p
| --port
] <
rtl_433service MQTT publishing port or HTTP stream port (integer)>
-x
| --exclude_noise
] <noise threshhold (integer)>
-w
| --xmit_window
] <max transmission time (float, in sec)>
-t
| --TPMS
]-o
| --omit
] [ SNR &| Freq &| ITGT &| PPT ]
-d
| --debug
]-W
| --warn
]-d
option also enabled-v
| --version
]rtl_433
server hostnamertl_watch
requires the identity of the rtl_433
server to which it should connect for MQTT subscription or HTTP streaming. You can specify that hostname (or IP address) by setting an environment variable or by specifying it on the command line with the -H
option. If not provided on the command line or environment, rtl_watch
prompts for the hostname and assumes the default port 8433 for HTTP or 1883 for MQTT.
For HTTP service, only the hostname and -S HTTP
are needed to start operation (unless the streaming port is not 8433).
The HTTP hostname and port may also be specified by environment variables HTTP_HOST
and HTTP_PORT
. The environment values are overridden by command-line values if they're provided.
If you're using MQTT protocol, rtl_watch
requires additional information about the rtl_433
MQTT publishing host:
All but the host name are set to default values and may not need to be provided or changed. But if your rtl_433
host MQTT broker parameters are set differently, these parameters may be provided in four different ways. In decreasing order of precedence:
rtl_watch
source code.These instructions are for a Linux system. It should be possible to install the monitoring system on OSX as well since the software
components of the monitoring system are available for Mac (not tried -- use brew
or port
to install the MQTT component).
Perform these steps on the computer you intend to use to monitor the ISM-band radio signals.
CubicSDR
(https://cubicsdr.com/) to observe the various ISM bands and discover which ones have activity in your region. Set the frequency in rtl_433
(below) accordingly.sudo apt-get install mosquitto mosquitto-client
. The broker will be started by systemd
and will be restarted whenever the system is rebooted.git
to install rtl_433
: git clone https://github.com/merbanan/rtl_433
../docs/BUILDING.md
to build and install the rtl_433 program. Be sure to install the prerequisite programs needed by rtl_433 before starting cmake
. sudo /usr/local/bin/rtl_433
to verify that it starts up, finds the RTL_SDR dongle, and identifies ISM packets. You may need to adjust the frequency via command line, e.g., -f 315M
, if you're not in the US.rtl_433
is a very sophisticated program with many options, and you may want to explore its use by reading through the help message or browsing the configuration file. But for regular operation, it's easiest to create the configuration file and, once it's working as you want it to, add rtl_433
as a system service following instructions:
cp /usr/local/etc/rtl_433/rtl_433.example.conf /usr/local/etc/rtl_433/rtl_433.conf
/usr/local/etc/rtl_433/rtl_433.conf
:
#report_meta stats
output http
.output mqtt
.output json:/var/log/rtl_433/rtl_433.json
to tell rtl_433
to log received packets to a log file in case you want to do subsequent analysis of devices in your neighborhood. More options for HTTP streaming and MQTT publishing service are available, but this will get you started.
*Create the directory for that log file: sudo mkdir /var/log/rtl_433
sudo /usr/local/bin/rtl_433
from the command line of one terminal screen on the monitoring computer. From the command line of another terminal screen on that computer, or from another computer with mosquitto client installed, type mosquitto_sub -h <monitorhost> -t "rtl_433/<monitorhost>/events"
, where you substitute your monitoring computer's hostname for "\<monitorhost>". If you have ISM-band traffic in your neighborhood, and if you've tuned rtl_433
to the correct frequency, you should be seeing the JSON-format records of packets received by the RTL_SDR dongle. If you don't, first verify that you can publish to mosquitto
on that monitoring computer and receive via a client (use the native mosquitto_pub
and mosquitto_sub
commands). If mosquitto
is functioning correctly, check that the rtl_433 configuration file specifies mqtt output correctly.sudo cp rtl_433.service /etc/systemd/system/
to copy the .service file from this download directory (where this README file is located) into the systemd directorysudo systemctl enable rtl_433
and sudo systemctl start rtl_433
to enable and start the serviceThe JSON log file grows quickly, so you will, over time, need to remove the JSON log file on the monitoring computer (/var/log/rtl_433/rtl_433.json
). Or you may want to use logrotate
to manage those JSON files, in which case you could sudo mv rtl_433.logrotate /etc/logrotate.d/rtl_433
on the host monitoring system to compress and manage the log files.
The developers of rtl_433
continually update the list of devices that the program recognizes, so connect to the rtl_433
download directory, git pull
, re-build, and re-install rtl_433
periodically to add recognition of new devices in your neighborhood.
The current version of Python Paho-MQTT is v2 on MacOS Sonoma with Python v3.12.4, and it is v1.6 on RaspiOS 6.6 Bookworm with Python v3.11.2 as installed with apt-get/pip3. Paho-MQTT v2 broke the callback invocation for v1. rtl_watch
has a workaround (invokes v1 compatibility on a v2 system), but v2 issues a deprecation warning. rtl_watch
will be updated to use v2 invocation when the RaspiOS Paho-MQTT library has been updated to v2.
When using HTTP streaming as the connection protocol, there may be a delay between pressing the Quit button and actual termination of the program as threads terminate themselves.
[!NOTE]
rtl_watch
uses message queuing between process threads to buffer message processing and window updating from packet collection. It has not been tested on a single-core system in a high-traffic location and may not be able to respond well in that environment. If you notice problems, please report them to the author with details about the system on which you're runningrtl_watch
.
These related rtl_433
tools might also be helpful:
rtl_433_stats
: Analyzes the JSON logs from the system that runs rtl_433
to catalog the devices seen and analyze their signal characteristics. Equivalent to rtl_watch
but for processing log files.rtl_433_stats
or rtl_watch
about thermometers in your neighborhood and then monitor them with a real-time display.David Todd, hdtodd@gmail.com, v1: 2023.03; v2.0: 2023.05; v2.1 2024.07; v3.0 2024.08; v4.0 2024.08