tolwi / hassio-ecoflow-cloud

EcoFlow Cloud Integration for Home Assistant
353 stars 60 forks source link

Lost Connection #43

Closed neotigger closed 1 year ago

neotigger commented 1 year ago

I have the problem that the integration is currently hardly usable, because the connection to the boxes is constantly lost. Sometimes after minutes, at the latest after a few hours. Yes, there are WLAN problems on the part of the firmware, but they are sporadic. In the official app everything is displayed correctly. Any idea what it could be.

Raspi 4 & Delta 2, River, River 2 Max

Übersetzt mit DeepL (https://www.deepl.com/app/?utm_source=ios&utm_medium=app&utm_campaign=share-translation

Frankie72 commented 1 year ago

Same behavior on my system. After one hour the connection is lost. The App is still working. After reload of the integration everything works again for one hour.

I'm using a Delta 2 and Homeassistant on a Raspberry Pi.

belowzero218 commented 1 year ago

I‘ve got the same error on my side. Got Homeassistant installed on a Linux Maschine with docker. After a reload of the integration it works for a couple of minutes up to 1 hour. Then the connection is broken. Using it with a River 2 currently

xaxix commented 1 year ago

Same Problem here. Home Assistent on a Pie. After a couple of time the connection is lost. I am using a river 2.

Error Log: Traceback (most recent call last): File "/usr/local/lib/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/usr/local/lib/python3.10/threading.py", line 953, in run self._target(*self._args, **self._kwargs) File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 3591, in _thread_main self.loop_forever(retry_first_connection=True) File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 1756, in loop_forever rc = self._loop(timeout) File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 1164, in _loop rc = self.loop_read() File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 1556, in loop_read rc = self._packet_read() File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 2439, in _packet_read rc = self._packet_handle() File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 3033, in _packet_handle return self._handle_publish() File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 3327, in _handle_publish self._handle_on_message(message) File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 3570, in _handle_on_message on_message(self, self._userdata, message) File "/config/custom_components/ecoflow_cloud/mqtt/ecoflow_mqtt.py", line 247, in on_message payload = message.payload.decode("utf-8") UnicodeDecodeError: 'utf-8' codec can't decode byte 0xbd in position 7: invalid start byte

Home Assistant 2023.5.0 Supervisor 2023.04.1 Operating System 10.1 Frontend 20230503.1 - latest

EcoFlowCloud 0.8.5

belowzero218 commented 1 year ago

I get the following error when the connection fails, maybe that helps:

2023-05-04 13:29:15.478 ERROR (Thread-82 (_thread_main)) [root] Uncaught thread exception Traceback (most recent call last): File "/usr/local/lib/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/usr/local/lib/python3.10/threading.py", line 953, in run self._target(*self._args, **self._kwargs) File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 3591, in _thread_main self.loop_forever(retry_first_connection=True) File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 1756, in loop_forever rc = self._loop(timeout) File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 1164, in _loop rc = self.loop_read() File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 1556, in loop_read rc = self._packet_read() File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 2439, in _packet_read rc = self._packet_handle() File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 3033, in _packet_handle return self._handle_publish() File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 3327, in _handle_publish self._handle_on_message(message) File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 3570, in _handle_on_message on_message(self, self._userdata, message) File "/config/custom_components/ecoflow_cloud/mqtt/ecoflow_mqtt.py", line 247, in on_message payload = message.payload.decode("utf-8") UnicodeDecodeError: 'utf-8' codec can't decode byte 0x91 in position 7: invalid start byte

absurdkira commented 1 year ago

Same by me.No Control over my River2 max since 1Week.The connection is broken. The App works.

!!!!! Problem solved. !!!!! After a complett reboot of my HomeAssistant Server (Shutdown + !Power off!) and a newstart it looks fine.I dont know, why but everything works fine again.thx

PatteWi commented 1 year ago

I have the same issue and the same errors in the Logs. I can‘t confirm that shutdown and restart fixes the issue

xaxix commented 1 year ago

Same here. Issue still exists after shutdown and restart. As workaround i reload the integration via an automation

darkysmile1 commented 1 year ago

i pushed a fix for this and tolwi has it alredy merged. pls try it

PatteWi commented 1 year ago

Looks like it helped 👍🏻 It doesn‘t prevent the error, but it catches it, so the integration don‘t crashes Thanks!

belowzero218 commented 1 year ago

Looks good now. No lost connection today. Thanks 😊