While these updates were made a while ago they weren’t documented. In the original post on the LaCrosse Weather station, rtl_433 sends mqtt data to our openhab server. On github we found a simple means to get rtl_433 to run as a service.
The core is to update /etc/rtl_433/rtl_433.conf
. There is a sample file at conf/rtl_433.example.conf
. Most important is the output mqtt...
line for example:
output mqtt://jtk-openhab,devices=rtl_433/garage[/model]
If the Pi has multiple dongles you will also need to confirm the device
line. Then create /etc/systemd/system/rtl_433-mqtt.service
:
[Unit]
Description=rtl_433 to MQTT publisher
After=network.target
[Service]
ExecStart=/usr/local/bin/rtl_433
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
Enable the service with systemctl enable rtl_433-mqtt.service
.