Cannot get RTL_433 to work with MQTT

I can’t get RTL_433 to sent MQTT messages from my weather sensors.

From the logs, RTL_433 is started and is able to connect to the MQTT broker:

I can see the successful connection from Mosquitto:

However, nothing is being sent over MQTT :

My RTL_433 config file:

output mqtt://10.0.0.158:1883,user=mqtt,pass=mqttpassword,retain=0
convert     si
frequency   433.92M

I am able to see MQTT messages from my weather stations using another add-on:
acurite2mqtt.

My configuration for this add-on is:

The goal is to switch from acurite2mqtt to RTL_433 because I need to use the flex decoder to expand to other non-weather related devices, such as the SONOFF 433MHz buttons, PIR sensor and magnetic door sensors.

However, there’s no point in trying to make these flex decoders work, since I’m not able to simply demodulate the already known working weather stations.

I’d like to split the problem in two; how can I display / print in a log what’s being demodulated by RTL_433? I am not sure if the problem lies with the demodulator itself or with the MQTT configuration.

image

Any help appreciated!

I’m running an older version of HA, but with the quantity of stuff I have in HA … if it ain’t broke, don’t fix it (unless otherwise advised!)

1 Like

Just found this in the supervisor system logs:

22-01-27 12:51:57 INFO (SyncWorker_2) [supervisor.docker.addon] Starting Docker add-on 17069798/armv7-addon-rtl433 with version 0.1.3
22-01-27 12:51:57 INFO (MainThread) [supervisor.homeassistant.websocket] WebSocket command WSType.SUPERVISOR_EVENT is not supported until core-2021.2.4. Ignoring WebSocket message.

I also am getting the same message by running the functionnal acurite2mqtt add-on:

22-01-27 13:03:10 INFO (SyncWorker_7) [supervisor.docker.addon] Starting Docker add-on d63406df/armv7-addon-acurite2mqtt with version 0.3.8b
22-01-27 13:03:10 INFO (MainThread) [supervisor.homeassistant.websocket] WebSocket command WSType.SUPERVISOR_EVENT is not supported until core-2021.2.4. Ignoring WebSocket message.

I’d like to avoid updating the OS in the winter (run thru breaking changes, bugs, etc), unless absolutely required to troubleshoot this RTL_433 issue.

Your thoughts?

Any chance you can run rtl_433 separately, verifying that you are receiving and decoding weather station data correctly? Don’t worry about MQTT for this test, just make sure it outputs decoded readings.

Basically, I’m recommending removing HA dependency to verify rtl_433 can in fact decode you weather station. If it works, then maybe there’s something not configured right with MQTT. Are ACLs set correctly?

I was able to decode the weather stations with the same SDR receiver, not on my raspberry running HA, but on my windows PC. So yes, RTL_433 is able to decode the weather stations.

I’d like to run RTL_433, alone, on the pi that’s running HA, like you proposed. Myself being a noob outside of Home Assistant … Running RTL433 by itself, does it mean doing that via the terminal?

Alternatively, any value in getting my spare SD card ready with Rasbian and boot that on the PI, install RTL_433 and make it work? Different OS … Different problem ?

I was suggesting running it from the console to try to help you isolate where the issue is. If you can receive weather station data by running rtl_433 directly, then I suggest looking at making sure the HA integration is configured correctly (I’ve never used it) and that the MQTT topic, etc, is what you are expecting. Also, make sure the MQTT user as permissions to publish (write) that topic.

Terminal/console aren’t the same thing?

How do I access the console, assuming I’ve installed installed the Home Assistant Operating System?

I’m a bit more “hardcore” and run HA under Docker. I try to minimize HA integrations as much as possible, favoring just using the MQTT integration. This keeps things simple and I rarely have issues between HA versions. Or more important: nonsense from “cloud” IoT crap. So…I’m really not familiar enough with HA OS, sorry. I was just throwing out ideas to try.

I run rtl_433 separately on a Pi3 outside on my balcony in a rainproof enclosure and use rtl_433 options to connect to MQTT. My shell script – which is a daemon managed by a systemd unit – looks something like this (I use an SSH tunnel to my MQTT server):

#!/bin/sh

while true
do
    /usr/local/bin/rtl_433 \
        -d 1 \
        -F "mqtt://localhost:1883,user=$mqttuser,pass=$mqttpwd,retain=0,events=rtl_433[/id]" \
        -M level -M protocol \
        -f 433.92M
    sleep 1
done

I’ll boot from Raspbian, installing RTL_433 from there. Not sure if that’ll tell me anything if it works; too many variables changed. But if it doesn’t work, then yes, that will be helpful.

@joelp Booted with Raspbian, running RTL_433 from the command line and it does work. I am not connecting to the MQTT server, because it was shut down I only have one pi.

I did try running from the command line RTL_433 from windows with the same .conf file, this time connecting to MQTT, and it does work.

So there is something wrong running with hass.io, still don’t know where the problem is …