Open wojciej opened 5 years ago
It is possible to add topic "timestamp" for device. And in openhab write a rule that checks last timestamp... This is already done for some mqtt conventions in daemon.
Adding a timestamp is one way to go but then as you have mentioned, we would need another thing (rule) in openhab to check timestemp, while adding N/A or connection lost to a toppic would give user general idea of what have happened without additional rules in openhab.
I have rethink this:
@wojciej I have something like this kinda-sorta working in my branch https://github.com/insertjokehere/miflora-mqtt-daemon/tree/device_registry - it sets an availability topic in the home assistant discovery message. Currently all sensors that the daemon have discovered are marked as "available" if the daemon is up and connected; I've not implemented any logic around detecting if a specific sensor hasn't been contacted in a while
Hello, Scenario: MiFlora work for some time and returns data but battery goes off and data stop to flow.
Openhab display value last returned over mqtt. User newer knows that sensor is offline.
I would like to propose enhancement: In the event of lost connectivity to the sensor or failure to retrieve data, deamon could returned either "N/A" or "connection lost" value in all measurements for lost sensor.
Do you think it would be possible ?
Thanks Jarek