Multiple Radios running service - Setup and MQTT Issues

269 views
Skip to first unread message

Mike L

unread,
Apr 17, 2022, 10:41:43 PM4/17/22
to rtl_433
I have two SDL-RTL devices on my ubuntu server

I'm using RTL_433.service and RTL_433_1.service.

I am unable to see a status on RTL_433_1 
"$ sudo rtl_433_1 status
sudo: rtl_433_1: command not found"

Although it appears to be running.

If i disable the service I can manually start from the CLI but I get rapid MQTT connect disconnect between the two instances of RTL_433.

"time" : "2022-04-17 22:36:32", "model" : "Acurite-Tower", "id" : 16269, "channel" : "A", "battery_ok" : 1, "temperature_C" : 4.800, "humidity" : 28, "mic" : "CHECKSUM"}
MQTT Connection failed...
MQTT Connected...
MQTT Connection established.
MQTT Connection failed...
MQTT Connected...
MQTT Connection established.
MQTT Connection failed...
MQTT Connected...

Here is an example of my .service
[Unit]
Description=RTL_433 service script
#StartLimitIntervalSec=5
Documentation=https://github.com/merbanan/rtl_433/README.md
After=syslog.target network.target

[Service]
Type=exec
User=thepad
#Original is top that was working
#ExecStart=/usr/bin/rtl_433 -c /etc/rtl_433/service.conf
ExecStart=/usr/bin/rtl_433 -F json -M edt -F mqtt://192.168.1.144:1883,user=xxxx,pass=yyyy,retain=0,events=rtl_433[/model][/id] -d0 -f 345M


# Restart script if stopped
Restart=always
# Wait 30s before restart
RestartSec=30s
## Added belwo
RemainAfterExit=no






Any ideas here, is there a better way to do this?

Christian Z.

unread,
Apr 18, 2022, 9:58:47 AM4/18/22
to rtl_433
rtl_433 picks an MQTT client-ID based on the device. You need to specify a different device for both instances, e.g. -d 0 and -d 1 (default is always -d 0 which is the next available device).
Best is to give each device a unique serial (rtl_eeprom) and the use -d :theserial (note the colon). I use a serial based on the connected antenna (e.g. SDR86800)

Greg Troxel

unread,
Apr 18, 2022, 11:13:38 AM4/18/22
to Christian Z., rtl_433
mqtt client ids just need to be unique, and perhaps should just be
random with a prefix. They really need to be unique across
e.g. multiple people sending data to a broker. But interesting about
rtl_eeprom and :serial

signature.asc

Mike L

unread,
Apr 18, 2022, 12:29:50 PM4/18/22
to rtl_433
I have been using -d 0 and -d 1.

I'll look into the rtl_eeprom and how to do that.  I know what the serial numbers are from the usb commands.

I was aware that would fix the MQTT connection crashes!  I'll try that now!  Figure it was just another way of defining the devices but -d 0 and -d 1 was working so I left it.

Also I'm able to force devices to update and watch them on gqrx but not getting them into RTL_433... need to learn how to define them, the next task.

Mike L

unread,
May 6, 2022, 4:48:32 PM5/6/22
to rtl_433
Well interesting news.... if you move -d# to the first place the issue goes away.

Documented here.
Reply all
Reply to author
Forward
0 new messages