Missing discovery messages for Nexa 433MHz devices

Hi @lindhe

There is a new test build(s) ready with SHA: b4ca30 or SHA:99731b (same functionality with additional code clean up - still running).

Please try this tonight and let us know if the State property is now being correctly auto-discovered and displayed as an On/Off binary sensor.

Looking real good now!! Great job!

Screenshots of the device's sensors in Home Assistant

Screenshot from 2024-05-29 19-32-13

Screenshot from 2024-05-29 19-34-26

To be honest, I thought something would be broken because the dm looked like this:

{"uuid":"ac\",\"Nexa-Security-3-7559323\"]],\"mdl\":\"Nexa-Security\",\"name\":\"Nexa-Security-3-7559323\",\"via_device\":\"OMG_1\"}}"}

Which is pretty different from the other ones:

{"stat_t":"+/+/RTL_433toMQTT/Nexa-Security/3/7559323","name":"Group","uniq_id":"Nexa-Security-3-7559323-group","val_tpl":"{{ value_json.group | is_defined }}","state_class":"measurement","device":{"ids":["Nexa-Security-3-7559323"],"cns":[["mac","Nexa-Security-3-7559323"]],"mdl":"Nexa-Security","name":"Nexa-Security-3-7559323","via_device":"OMG_1"}}

I won’t complain as long as it works. But how can this work? the dm looks broken to me…

Okay this is really strange. Checking retained messages in my broker, the payload looks good!!

{"stat_t":"+/+/RTL_433toMQTT/Nexa-Security/3/7559323","name":"State","uniq_id":"Nexa-Security-3-7559323-state","val_tpl":"{{ value_json.state | is_defined }}","pl_on":"ON","pl_off":"OFF","device":{"ids":["Nexa-Security-3-7559323"],"cns":[["mac","Nexa-Security-3-7559323"]],"mdl":"Nexa-Security","name":"Nexa-Security-3-7559323","via_device":"OMG_1"}}

But in MQTT Explorer, it’s way strange:

{"uuid":"ac\",\"Nexa-Security-3-7559323\"]],\"mdl\":\"Nexa-Security\",\"name\":\"Nexa-Security-3-7559323\",\"via_device\":\"OMG_1\"}}"}

I’ve double checked that I’m on the right topic. Tried reconnecting MQTT Explorer to no avial. Feels like a glitch in MQTT Explorer, I trust my broker (especially since HA works).

mosquitto_sub agrees with the broker and HA. The message looks like this:

{"stat_t":"+/+/RTL_433toMQTT/Nexa-Security/3/7559323","name":"State","uniq_id":"Nexa-Security-3-7559323-state","val_tpl":"{{ value_json.state | is_defined }}","pl_on":"ON","pl_off":"OFF","device":{"ids":["Nexa-Security-3-7559323"],"cns":[["mac","Nexa-Security-3-7559323"]],"mdl":"Nexa-Security","name":"Nexa-Security-3-7559323","via_device":"OMG_1"}}

Must be a parsing error in MQTT Explorer. ¯\_(ツ)_/¯

I’ve reported it here: Incorrect display of JSON payload · Issue #803 · thomasnordquist/MQTT-Explorer · GitHub

Good to hear that it is working fine now in HA, but I agree, the discovery messaage does look very strange in MQTT Explorer. Could you delete this strange discovery message through MQTT Explorer and turn on dicsovery again on your gateway and restart it, so as to get a fresh discovery message, to see if it has the same issue, or if the issue was cause because of the different tries with the State discovery?

Other than that I think this is good to get merged into development, and will then be available in all nightly development builds from now on.

Check my last message. It’s a (really strange) bug in MQTT Explorer. :upside_down_face:

All is well, let’s merge! :rocket:

1 Like

Just out of curiosity, which version of MQTT Explorer are you using - might also be good to include in the MQTT Explorer issue :wink:

Sounds awfully reasonable to include the version in the issue. I’ve added that.

I’m on 0.4.0-beta4

I’m still on the last stable 0.3.5. Might be worth also checking it with that, just to see if it might be a regression issue from the stable 0.3.5.