tolwi / hassio-ecoflow-cloud

EcoFlow Cloud Integration for Home Assistant
284 stars 48 forks source link

Counting doesn't self restart after an Internet cut #153

Closed Fyr42 closed 9 months ago

Fyr42 commented 9 months ago

Hi,

After an Internet cut, of course all counters stopped. In my case both the powerstream and my delta 2 max. After Internet is back, all the counters stay at their last value and I have to restart HA to see them counting again. The only message in Logbook was "PowerStream Status changed to assume_offline" which is the same when powerstream shuts off after all power drained. Others services like nabucasa, icloud and daikin restarted OK by themselves.

In home-assistant.log I have the follwing message repeated every 30 seconds :

======================================

2023-09-20 11:12:57.170 ERROR (Thread-4 (_thread_main)) [custom_components.ecoflow_cloud.mqtt.ecoflow_mqtt] Unexpected MQTT disconnection: 16. Will auto-reconnect 2023-09-20 11:13:02.174 ERROR (Thread-4 (_thread_main)) [custom_components.ecoflow_cloud.mqtt.ecoflow_mqtt] Unexpected MQTT disconnection: 16. Will auto-reconnect 2023-09-20 11:13:06.098 ERROR (Thread-13 (_thread_main)) [custom_components.ecoflow_cloud.mqtt.ecoflow_mqtt] Unexpected MQTT disconnection: 16. Will auto-reconnect 2023-09-20 11:13:10.810 ERROR (MainThread) [homeassistant] Error doing job: Future exception was never retrieved Traceback (most recent call last): File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/ecoflow_cloud/sensor.py", line 283, in __check_status self._update_status(data_outdated_sec) File "/config/custom_components/ecoflow_cloud/sensor.py", line 328, in _update_status self.send_get_message({"version": "1.1", "moduleType": 0, "operateType": "latestQuotas", "params": {}}) File "/config/custom_components/ecoflow_cloud/entities/init.py", line 25, in send_get_message self._client.send_get_message(command) File "/config/custom_components/ecoflow_cloud/mqtt/ecoflow_mqtt.py", line 316, in send_get_message _LOGGER.debug("Sending " + json.dumps(payload) + " :" + str(info) + "(" + str(info.is_published()) + ")") ^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/paho/mqtt/client.py", line 381, in is_published raise RuntimeError('Message publish failed: %s' % (error_string(self.rc))) RuntimeError: Message publish failed: The client is not currently connected.

======================================

Not sure if it's related sometimes this part is not displayed at the. end of the repeated block :

File "/usr/local/lib/python3.11/site-packages/paho/mqtt/client.py", line 381, in is_published raise RuntimeError('Message publish failed: %s' % (error_string(self.rc))) RuntimeError: Message publish failed: The client is not currently connected.

Regards,