Home Assistant Add-on: rtl_433 with MQTT auto discovery

Thanks for the prompt reply and sorry for missing the flex decoder piece.
Isn’t there any way to replay the signal receive from that dongle? I used rtlConsole and it showed the ability to record and play.
I wanted to double check to make sure I did not interpret your answer the wrong way.

To replay the signal you should use other hardware such as Sonoff RF bridge (tasmotized) or OpenMQTTgateway(this can be DIY), because, as far as I know the USB dongles used in rtl_433 are just receivers, don’t have the hardware to send signals.
But, in the case you choose any of the options to replay the remote signal, you could also receive the signal in such device (sonoff rf bridge or openmqttgateway) and let rtl_433 to receive other kind of sensors…

Got it thanks.

I searched far and wide, but I can’t figure out what to do.

I setup RTL_433 and MQTT AutoDiscovery and found ~40 window/door sensors. I’m able to tell which one is which, because the devices/entities created with autodiscovery react correctly to the -tamper binary sensor changes.
The problem is that the actual contact switch (autodiscovered as an -alarm binary sensor) is not changing when the door opens/closes. I can see with MQTT explorer that “reed_open” changes, while “state” and “contact_open” remain unchanged when I open/close the door. I assume that’s why the auto-discovered devices are not working.

I’m trying to figure out to modify the behavior of the auto-discovered devices, but I can’t figure out where their configuration gets created.

Is it so that I need to create all new devices in the configuration.yaml with the correct topics? How do I make sure to not overwrite the tamper and battery sensors that seem to be working correctly after auto-discovery?

Here’s an example of the JSONs:
{
“time”: “2023-12-24 11:21:12”,
“model”: “Honeywell-Security”,
“id”: 984164,
“channel”: 10,
“event”: 160,
“state”: “open”,
“contact_open”: 1,
“reed_open”: 1,
“alarm”: 0,
“tamper”: 0,
“battery_ok”: 1,
“heartbeat”: 0,
“mic”: “CRC”
}

{
“time”: “2023-12-24 11:21:15”,
“model”: “Honeywell-Security”,
“id”: 984164,
“channel”: 10,
“event”: 128,
“state”: “open”,
“contact_open”: 1,
“reed_open”: 0,
“alarm”: 0,
“tamper”: 0,
“battery_ok”: 1,
“heartbeat”: 0,
“mic”: “CRC”
}

Yes, that’s certainly the easiest thing to do. What you can do is grab the autoconfigured topics from the MQTT server, and use those as a starting point.

I found the original change, and it sounds like this is because your sensors actually support two different methods of detecting changes - a physical wire and a magnetic switch.

Thank you.
I followed your advice and copied over the device configuration from MQTT with the updated state_topic details. Bard by Google proved very helpful with automating the creating of multiple entries at the same time.

Here’s an example sensor:

  • binary_sensor:
    device_class: door
    force_update: ‘false’
    payload_on: ‘1’
    payload_off: ‘0’
    state_topic: ‘rtl_433/17069798-rtl433/devices/Honeywell-Security/10/984164/reed_open’
    unique_id: Honeywell-Security-10-984164-reed
    name: Front Door
    device:
    identifiers:
    - Honeywell-Security-10-984164
    name: Honeywell-Security-10-984164
    model: Honeywell-Security
    manufacturer: rtl_433

Hi! I will preface this by saying I am a total radio noob.

I’m trying to get my 433 MHz Temperature and Humidity sensors to show up in Home Assistant.

I am using the RTL-SDR Blog V4 (Buy RTL-SDR Dongles (RTL2832U)) as the receiver with the dipole antenna from the kit. I tested the hardware out using SDR# with the RTL_433 plugin enabled and I was able to pick up the sensors as shown below:

However, while plugging the device into my Home Assistant green (either directly or via a powered USB hub), the receiver can’t seem to be able to find any devices at all, no matter how long it is left scanning.

The log for startup is here: Hastebin

The /homeassistant/rtl_433/rtl_433.conf.template file can be found here: Hastebin

I am unsure how to proceed from here, any advice would be welcome!

Did you install the add-on for autodiscovery the sensors?
In the configuration, the line of output kv is commented, so the sensors won’t appear in the log and, if the autodiscovery add-on is not installed, nothing will be seen in home assistant, unless you configure the sensors manually…

Thanks for the reply! I also have the rtl_433 MQTT Auto Discovery Add-on installed as well as Mosquitto Broker.

The logs from the MQTT Auto Discovery: Hastebin

I will decomment the output line and see what happens!

Also in the config file is commented protocol 73, which is the one the picture shows you have, so uncomment it and, probably it will start catching that sensor…

Uncommenting “output kv” did not add anything to the logs, but I will try to uncomment the protocol as well

Well, so far nothing new has appeared on the logs and it’s been 30 minutes.

Ok, you have disabled protocol 73 in the config file again, so delete, or comment, from line 44 until the last line

Thanks! Here’s the current config: Hastebin

And the log: Hastebin

In this last log there is no info about detecting the rtl dongle. Still with the powered hub? Reboot the host, but first you could also add this line to your config:

pulse_detect classic

And to aim better the sensor, you could also change the frequency from 433.92 to 433.9.
But first it’s mandatory that the usb dongle is correctly detected.

Thank you. The dongle is still connected via the powered hub, although I attempted to connect it to Home Assistant Green directly, no effect. Home Assistant Green has been rebooted (the red button under advanced mode).

Here’s the new config that was written pre-reboot: Hastebin

and output post-reboot: Hastebin

It seems that this warning : WARNING: Failed to set center freq which was also in the first log you provided, could be the culprit. But looking for this error seems to happens when there is an issue with the dongle itself, but as you stated it works in other machine…Try other usb powered hub, maybe it’s not supplying enough current ( I had problems with my dongles due to the usb powered hub got faulty with the use)
Edit: If you don’t have other usb powered hub but you have a USB cable with a female conector and two male connectors (where one it’s data and other just current) you can power the dongle with a wall usb charger and connect the data line directly to the green assistant.

I made a new add-on, that is greatly improved, Working on better discovery too.
The current add-on was very complicated as well. Here you go.

I also have an updated sample config for everyone using the original one.

Do you have a docker build for this? This is awesome! But not all of us use HAOS :slight_smile:

Well a docker already exists for rtl_433. That is also why I liked to a complete separate repo to host the config file and template. So all you need to do is start rtl_433 and use this template here: GitHub - catduckgnaf/rtl_433_ha: This is the primary location for the project of making RTL_433 for the HA community.

I am also hoping everyone contributes to the discovery script. The HAOS add-on actually pull the script and the template from this repo, so anyone can use. :slight_smile: