rtl_433 command line help for 2 rtl_sdr receivers

973 views
Skip to first unread message

Greg Liebig

unread,
Feb 24, 2023, 6:47:15 PM2/24/23
to rtl_433
I had been using one NESDR 2+ with mqtt hopping between 2 frequencies every 150 seconds. But now I have several sensors that only broadcast a signal about every 5 minutes and this no longer works. the original command line was:

rtl_433 -f 433.53M -f 915M -C customary -H 150 -F "mqtt://192.168.1.20:1883, user=user, pass=abc123, events=rtl_433home[/model][/id]"

I've added a second NESDR 2+ and have assigned 2 difference serial numbers running on the same wyse3040 box running Xubuntu.

Found 2 device(s):
  0:  Realtek, RTL2838UHIDIR, SN: 00000433
  1:  Realtek, RTL2838UHIDIR, SN: 00000915

I need both frequencies receiving all the time as my weather station broadcasts on 915 and the other sensors are on 433. I've tried the :00000433 option, -d 0  and -d 1 option and I can't manage to get both receivers up. like I did with the hopping command line and I'm looking for help. Eventually I want to put this into a service that will run at startup as this will be going into an RV.


Greg Troxel

unread,
Feb 24, 2023, 7:20:45 PM2/24/23
to 'Greg Liebig' via rtl_433
You didn't include the error output or the commands you think ought to work.

I am successfully running two rtl_433 commands, and one mqtt_relay for
two frequencies, selecting via serial numbers.

dongle selection args look like

RTL_1001="-d:00001001 -p -73"
RTL_1002="-d:00001002 -p -51"

Greg Liebig

unread,
Feb 25, 2023, 8:21:26 AM2/25/23
to rtl_433
It looks like only one SDR dongle is used at 433.53.

rtl_433 -d :00000433 -f 433.53M -d:00000915 -f 915M -C customary  -F "mqtt://192.168.8.20:1883, user=user, pass=abc123, events=rtl_433home[/model][/id]"
rtl_433 version 21.12 (2021-12-14) inputs file rtl_tcp RTL-SDR SoapySDR
Use -h for usage help and see https://triq.org/ for documentation.
Trying conf file at "rtl_433.conf"...
Trying conf file at "/home/sdr/.config/rtl_433/rtl_433.conf"...
Trying conf file at "/usr/local/etc/rtl_433/rtl_433.conf"...
Trying conf file at "/etc/rtl_433/rtl_433.conf"...

New defaults active, use "-Y classic -s 250k" for the old defaults!

Publishing MQTT data to 192.168.8.20 port 1883
Publishing events info to MQTT topic "rtl_433home[/model][/id]".
Registered 176 out of 207 device decoding protocols [ 1-4 8 11-12 15-17 19-23 25-26 29-36 38-60 63 67-71 73-100 102-105 108-116 119 121 124-128 130-149 151-161 163-168 170-175 177-197 199 201-207 ]
Detached kernel driver
Found Rafael Micro R820T tuner
Exact sample rate is: 1000000.026491 Hz
[R82XX] PLL not locked!
Sample rate set to 1000000 S/s.
Tuner gain set to Auto.
Tuned to 433.530MHz.
Allocating 15 zero-copy buffers
MQTT Connected...
baseband_demod_FM: low pass filter for 1000000 Hz at cutoff 100000 Hz, 10.0 us
MQTT Connection established.

Greg Troxel

unread,
Feb 25, 2023, 8:56:29 AM2/25/23
to 'Greg Liebig' via rtl_433
"'Greg Liebig' via rtl_433" <rtl...@googlegroups.com> writes:

> It looks like only one SDR dongle is used at 433.53.
>
> rtl_433 -d :00000433 -f 433.53M -d:00000915 -f 915M -C customary -F
> "mqtt://192.168.8.20:1883, user=user, pass=abc123,
> events=rtl_433home[/model][/id]"

Now I can tell what you did wrong. You have to run two copies of
rtl_433, one with each d/f pair. And you will need to be sure that the
two copies use different mqtt client ids so they can both be logged in
at once.

I use the mqtt_relay script in contrib with

-F syslog:127.0.0.1:1433

to rtl_433. Two copies of rtl_433 send to that just fine.


Christian Z.

unread,
Feb 25, 2023, 11:28:04 AM2/25/23
to rtl_433
rtl_433 generates the MQTT client ID based on the hostname and "-d" argument. Running two copies with different "-d" will work.

Greg Troxel

unread,
Feb 25, 2023, 12:12:54 PM2/25/23
to Christian Z., rtl_433
"Christian Z." <chri...@zuckschwerdt.org> writes:

> rtl_433 generates the MQTT client ID based on the hostname and "-d"
> argument. Running two copies with different "-d" will work.

Good to know and I'll try to remember. It's just very hard to debug
when this is the problem so I thought I'd mention it.

Christian Z.

unread,
Feb 25, 2023, 12:41:04 PM2/25/23
to rtl_433
Absolutly. I remember a frustrating search on an issue where it turned out the submitter had two systems with… default hostname.

Greg Liebig

unread,
Feb 25, 2023, 1:03:07 PM2/25/23
to rtl_433
OK, I'm back ready to create two rtl_433.conf files in "/home/sdr/.config/rtl_433/rtl_433_433.conf" and   "/home/sdr/.config/rtl_433/rtl_433_915.conf" with the only differences is the -d and -f options. I'm planning on using MQTT to do the filtering with NODE Red so I really don't care about limiting protocols but I'm assuming they are needed if using the .conf file. This is about as clear as mud for me at the moment.

Some lines are surrounded by brackets, some are not. Do I need the brackets? When do I need quotes?  I understand the # are comments but trying to follow https://raw.githubusercontent.com/merbanan/rtl_433/master/conf/rtl_433.example.conf



Greg Troxel

unread,
Feb 25, 2023, 1:16:07 PM2/25/23
to 'Greg Liebig' via rtl_433
brackets are a unix man page convention for something being optional.

I don't use a config file. I just pass args on the command line. This
is cut/paste from Debian on RPI3:

rtl_433 -d:00001004 -f 433.92M -s 250k -C si -M level -M noise -M stats -M protocol -M bits -Y autolevel -Y minlevel=-30 -Y magest -F syslog:127.0.0.1 1433
rtl_433 -d:00001003 -f 915.00M -s 250k -C si -M level -M noise -M stats -M protocol -M bits -Y autolevel -Y minlevel=-30 -Y magest -F syslog:127.0.0.1 1433

Benjamin Larsson

unread,
Feb 25, 2023, 1:18:30 PM2/25/23
to rtl...@googlegroups.com
On 25/02/2023 17:28, Christian Z. wrote:
> rtl_433 generates the MQTT client ID based on the hostname and "-d"
> argument. Running two copies with different "-d" will work.
>

Maybe we can keep track of failures and then report the error with a
suggestion to use the -d parameter.

MvH
Benjamin Larsson

Greg Liebig

unread,
Feb 25, 2023, 2:28:43 PM2/25/23
to rtl_433
Using putty for two sessions, the first session uses this:

sdr@sdr-alpha:~$ rtl_433 -f 433M -d :00000433 -C customary -F "mqtt://192.168.8.20:1883, user=user, pass=abc123, events=rtl_433home[/model][/id]"

rtl_433 version 21.12 (2021-12-14) inputs file rtl_tcp RTL-SDR SoapySDR
Use -h for usage help and see https://triq.org/ for documentation.
Trying conf file at "rtl_433.conf"...
Trying conf file at "/home/sdr/.config/rtl_433/rtl_433.conf"...
Trying conf file at "/usr/local/etc/rtl_433/rtl_433.conf"...
Trying conf file at "/etc/rtl_433/rtl_433.conf"...
Publishing MQTT data to 192.168.8.20 port 1883
Publishing events info to MQTT topic "rtl_433home[/model][/id]".
Registered 176 out of 207 device decoding protocols [ 1-4 8 11-12 15-17 19-23 25-26 29-36 38-60 63 67-71 73-100 102-105 108-116 119 121 124-128 130-149 151-161 163-168 170-175 177-197 199 201-207 ]
Detached kernel driver
Found Rafael Micro R820T tuner
Exact sample rate is: 250000.000414 Hz
[R82XX] PLL not locked!
Sample rate set to 250000 S/s.

Tuner gain set to Auto.
Tuned to 433.000MHz.

Allocating 15 zero-copy buffers
MQTT Connected...
baseband_demod_FM: low pass filter for 250000 Hz at cutoff 25000 Hz, 40.0 us
MQTT Connection established.

and in a second putty session the 915M version:

sdr@sdr-alpha:~$ rtl_433 -f 915M -d :00000915 -C customary -F "mqtt://192.168.8.20:1883, user=user, pass=abc123, events=rtl_915home[/model][/id]"

rtl_433 version 21.12 (2021-12-14) inputs file rtl_tcp RTL-SDR SoapySDR
Use -h for usage help and see https://triq.org/ for documentation.
Trying conf file at "rtl_433.conf"...
Trying conf file at "/home/sdr/.config/rtl_433/rtl_433.conf"...
Trying conf file at "/usr/local/etc/rtl_433/rtl_433.conf"...
Trying conf file at "/etc/rtl_433/rtl_433.conf"...

New defaults active, use "-Y classic -s 250k" for the old defaults!

Publishing MQTT data to 192.168.8.20 port 1883
Publishing events info to MQTT topic "rtl_915home[/model][/id]".

Registered 176 out of 207 device decoding protocols [ 1-4 8 11-12 15-17 19-23 25-26 29-36 38-60 63 67-71 73-100 102-105 108-116 119 121 124-128 130-149 151-161 163-168 170-175 177-197 199 201-207 ]
Detached kernel driver
Found Rafael Micro R820T tuner
Exact sample rate is: 1000000.026491 Hz
[R82XX] PLL not locked!
Sample rate set to 1000000 S/s.
Tuner gain set to Auto.
Tuned to 915.000MHz.

Allocating 15 zero-copy buffers
MQTT Connected...
baseband_demod_FM: low pass filter for 1000000 Hz at cutoff 200000 Hz, 5.0 us
MQTT Connection established.

I did change the topic based on MHz for testing and I'm using MQTT explorer to check the output. There is no indication on either startup what the radio serial number is that is being used. That would be helpful! I do see the different frequency in each output. There is are 3 additional line in the 915 version:
(1)
(2) New defaults active, use "-Y classic -s 250k" for the old defaults!
(3)
Not sure why these are there. Everyone has been most helpful. Next step is creating an autostart on boot with a watchdog to restart and I'm done with the hardware end.

Greg Troxel

unread,
Feb 25, 2023, 2:58:14 PM2/25/23
to 'Greg Liebig' via rtl_433
"'Greg Liebig' via rtl_433" <rtl...@googlegroups.com> writes:

> I did change the topic based on MHz for testing and I'm using MQTT explorer
> to check the output. There is no indication on either startup what the
> radio serial number is that is being used. That would be helpful!

mqtt is in effect an abstraction and the radio serial# is not really
relevant. I see why you want it, but I see it as noise.

> I do see
> the different frequency in each output.

So you have both working, good

> There is are 3 additional line in the 915 version:
> (1)
> (2) New defaults active, use "-Y classic -s 250k" for the old defaults!
> (3)
> Not sure why these are there.

There are different defaults depending on frequency. Just accept them
until you dig in and understand why. It's complicated.
Reply all
Reply to author
Forward
0 new messages