DigiH
May 29, 2024, 12:58pm
21
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.
lindhe
May 29, 2024, 5:39pm
22
Looking real good now!! Great job!
Screenshots of the device's sensors in Home Assistant
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…
lindhe
May 29, 2024, 5:49pm
23
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).
lindhe
May 29, 2024, 5:53pm
24
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
DigiH
May 29, 2024, 6:31pm
25
lindhe:
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\"}}"}
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.
lindhe
May 29, 2024, 6:32pm
26
Check my last message. It’s a (really strange) bug in MQTT Explorer.
All is well, let’s merge!
1 Like
DigiH
May 29, 2024, 6:54pm
27
Just out of curiosity, which version of MQTT Explorer are you using - might also be good to include in the MQTT Explorer issue
lindhe
May 29, 2024, 7:26pm
28
Sounds awfully reasonable to include the version in the issue. I’ve added that.
I’m on 0.4.0-beta4
DigiH
May 29, 2024, 7:37pm
29
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.