I see that Hassio is aware if a sonoff with tasmota software is going offline in around one minute.
I would like to get this same awareness for my own sensors.
How do I do this.
I see that Hassio is aware if a sonoff with tasmota software is going offline in around one minute.
I would like to get this same awareness for my own sensors.
How do I do this.
It depends on your sensor’s technology.
What kind of sensor are you using?
esp8266 and wemos.
I like how the sonoff sensors are immediatly in the correct state when rebooting hassio and want the same behavior with these sensors.
In my hassio I have almost exact the same config but without rebooting also the sensor they are “unavailable” in hassio
You could try putting Tasmota on your WEMOS
Yes that would be an option but I want to understand how it works so I can do this on my own projects.
It’s not a feature of Tasmota but of MQTT called “Last Will and Testament”. Basically if the MQTT broker doesn’t receive a keepalive from the Sonoff before a timeout, the broker publishes its “testament” (“Offline” on “tele/sonoff/LWT”) signaling HA that it went offline.
Here you can find a better explanation:
https://www.hivemq.com/blog/mqtt-essentials-part-9-last-will-and-testament
HA getting the correct state of Tasmota is again a feature of MQTT: the status messages are published as “retained”, when HA connects again to the broker, the broker repeat the last status messages from Tasmota updating the switches.
Create a binary sensor ping for every device. then make an automation to inform you
Hmm, again some testing done but can’t figure out how Tasmota software is giving presence to hassio. Mqttlens also doens’t work at this moment. Hoped I could see the mqtt messages from tasmota but the mqtt interface makes it for me impossible to troubleshoot.
Anyone with an example what to send on an esp and how the configuration in hassio should look like ?
Try with Mqtt-spy , is a free java software it works on any platform.
mqttlens issue looks solved, now still need to solve why my sensors status is not like tasmota
I checked the mqtt messages from the sonoff but can’t figure out what is different compared to my configuration.
Still can’t find why tasmota software is getting a correct status update and my configuration doesn’t detect this