You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When integrating other third party consumers using MQTT, there is currently no way of knowing whether the EmonESP is online or not. I'm pulling data into my HomeAssistant instance and if the EmonESP goes offline, the last received value is assumed to still be correct. This causes things like integration functions to produce incorrect results with no indication that they are wrong.
This is commonly solved by adding an availability topic that indicates whether the device is online. When connecting to the broker, a 'last will' message can be provided which would be to set the availability topic to it's offline state. That means that the broker would send the offline availability payload if the connection unexpectedly closed.
The MQTT library used has support for this in it's connect() function, so it's a very minor change.
The text was updated successfully, but these errors were encountered:
When integrating other third party consumers using MQTT, there is currently no way of knowing whether the EmonESP is online or not. I'm pulling data into my HomeAssistant instance and if the EmonESP goes offline, the last received value is assumed to still be correct. This causes things like integration functions to produce incorrect results with no indication that they are wrong.
This is commonly solved by adding an availability topic that indicates whether the device is online. When connecting to the broker, a 'last will' message can be provided which would be to set the availability topic to it's offline state. That means that the broker would send the offline availability payload if the connection unexpectedly closed.
The MQTT library used has support for this in it's connect() function, so it's a very minor change.
The text was updated successfully, but these errors were encountered: