Github Boards Devices Community Docs Blog

MQTT sensor with rtl intermittently reads wrong

Fashed esp32dev-rtl_433-firmware and setup a digoo weather station sensor.

  - platform: mqtt    
    name: " Digoo WeatherStation Temp"
    device_class: "temperature"
    state_topic: "home/OpenMQTTGateway_rtl_433_ESP/RTL_433toMQTT"
    value_template: "{{ value_json.temperature_C }}"
    unit_of_measurement: "°C" 

- platform: mqtt    
  name: " Digoo WeatherStation Humidity"
  device_class: "temperature"
  state_topic: "home/OpenMQTTGateway_rtl_433_ESP/RTL_433toMQTT"
  value_template: "{{ value_json.humidity }}"
  unit_of_measurement: "%"  

A temp and humidity show up in home assistant when I get an MQTT message. Very please it worked so easily.

{"model":"Nexus-TH","id":195,"channel":1,"battery":"OK","temperature_C":19.6,"humidity":49,"protocol":"Nexus, FreeTec NC-7345, NX-3980, Solight TE82S, TFA 30.3209 temperature/humidity sensor","rssi":-64,"duration":927827}

Then when the next message shows up the temp and humidity both show 0 on home assistant.

{"model":"unknown","protocol":"signal parsing failed","duration":140115,"signalRssi":-70,"pulses":25,"train":1,"messageCount":355,"_enabledReceiver":1,"receiveMode":0,"currentRssi":-96,"minimumRssi":-82}

Then next Nexus-TH message comes along again and temp and humidity come back.
How do I retain the temp and humidity readings on HA until the next message sent with new readings?

I have replaced the CC1101 small antenna with a ground plane antenna I’ve built and the readings have improved. I’m getting the signal through 2 concrete floors. Just before each drop out of readings the last reading have 14 decimal places.

While I don’t know much about the HomeAssistant .yaml definitions, isn’t it possible to define that only the messages from the model= “Nexus-TH” are registered for what you require? A further restriction could also be done by using the id as well, for example when having several sensors of the same model, but this will usually change whenever the sensors is being reset, like when changing the batteries.

I have a similar issue with temperature and humidity sensors here and use the model restrictions in openHAB to only get the messages from my temperature sensors and not the ones from my neighbours, which use different sensor models.

In your case it seems to be an unrecognised model though, with “signal parsing failed”. In that case you could try to set the build flag


to completely suppress such unrecognised signals from even sending MQTT messages.

Hope this helps.

P.S.: In your case a further definition restriction of your “Nexus-TH” sensor would be the “channel”:1, which will always stay the same, instead of the id :wink: didn’t see that initially.

Thanks. That’s a couple of rabbit holes to go down. Half the battle is knowing what terminology to search for. :grinning:

I was able to adjust the value template to restrict the data sent to the sensor to a specific ID. The readings are showing on Home Assistant. Real test will be when I get another sensor with a different ID.

   value_template: >
     {% if value_json is defined and == 195 %}
       {{ value_json.temperature_C }}
     {% else %}
       {{ states('sensor.digoo_weatherstation_temp') }}
     {% endif %}
1 Like

If your doing a custom build, their is an option available in the current development build which changes the MQTT message topic to make it easier to extract when you have multiple devices.


This will change the MQTT Topic to contain the model and ID values