Closed pontostroy closed 1 month ago
I will check the issue in this exporter and if MQTT behaves in the same way I'll implement the reconnection after not recieiving messages for XXX seconds.
Yes, the issue can be reproduced on IOS and MQTT exporter (exporter via REST API works fine).
I'll prepare a fix. There are two options:
I'd prefer the first option if it works.
Implemented in version 1.2.1 - https://github.com/tess1o/go-ecoflow-exporter/releases/tag/1.2.1
The logic is the following:
Check if we don't receive messages from MQTT for all devices within threshold (env variable MQTT_DEVICE_OFFLINE_THRESHOLD_SECONDS
, default value 60 seconds). If true, disconnect from broker and connect again.
Note: If one device receives messages and another device doesn't receive messages, it means that the second device is just offline and there is no need to reconnect. In this case we set all metrics to 0.
Thank you for pointing to this critical issue.
Please add this feature as in python exporter, reconnect if empty queue after using mobile app.