gickowtf / pixoo-homeassistant

Home Assistant Integration for Divoom Pixoo 64
MIT License
109 stars 12 forks source link

Stops switching pages after a while #73

Closed ro8inmorgan closed 3 months ago

ro8inmorgan commented 3 months ago

I'm not sure what I'm doing wrong, but everyday it just stops changing the pages and I have to restart HA to get it going again. Is there an option somewhere I need to check?

Mrredstone5230 commented 3 months ago

Could you check your logs and send anything related to the integration? (Settings -> System -> Logs)

ro8inmorgan commented 3 months ago

Checked the logs it seems if it cannot connect once it doesn't recover and just stops working completely until I restart. The odd thing is the on off switch still works, I can still turn the pixoo on and off from HA even after this error occured

`Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/urllib3/connection.py", line 174, in _new_conn conn = connection.create_connection( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/urllib3/util/connection.py", line 95, in create_connection raise err File "/usr/local/lib/python3.12/site-packages/urllib3/util/connection.py", line 85, in create_connection sock.connect(sa) TimeoutError: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/urllib3/connectionpool.py", line 715, in urlopen httplib_response = self._make_request( ^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/urllib3/connectionpool.py", line 416, in _make_request conn.request(method, url, **httplib_request_kw) File "/usr/local/lib/python3.12/site-packages/urllib3/connection.py", line 244, in request super(HTTPConnection, self).request(method, url, body=body, headers=headers) File "/usr/local/lib/python3.12/http/client.py", line 1331, in request self._send_request(method, url, body, headers, encode_chunked) File "/usr/local/lib/python3.12/http/client.py", line 1377, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/usr/local/lib/python3.12/http/client.py", line 1326, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/usr/local/lib/python3.12/http/client.py", line 1085, in _send_output self.send(msg) File "/usr/local/lib/python3.12/http/client.py", line 1029, in send self.connect() File "/usr/local/lib/python3.12/site-packages/urllib3/connection.py", line 205, in connect conn = self._new_conn() ^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/urllib3/connection.py", line 179, in _new_conn raise ConnectTimeoutError( urllib3.exceptions.ConnectTimeoutError: (<urllib3.connection.HTTPConnection object at 0x7f3af35a6270>, 'Connection to 192.168.2.128 timed out. (connect timeout=10)')

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/requests/adapters.py", line 486, in send resp = conn.urlopen( ^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/urllib3/connectionpool.py", line 799, in urlopen retries = retries.increment( ^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/urllib3/util/retry.py", line 592, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='192.168.2.128', port=80): Max retries exceeded with url: /post (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x7f3af35a6270>, 'Connection to 192.168.2.128 timed out. (connect timeout=10)'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 950, in async_update_ha_state await self.async_device_update() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1295, in async_device_update await hass.async_add_executor_job(self.update) File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/divoom_pixoo/light.py", line 55, in update self._state = self._pixoo.get_state() ^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/divoom_pixoo/pixoo64/_pixoo.py", line 381, in get_state response = requests.post(self.__url, json.dumps({ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/requests/api.py", line 115, in post return request("post", url, data=data, json=json, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/requests/api.py", line 59, in request return session.request(method=method, url=url, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/requests/sessions.py", line 589, in request resp = self.send(prep, send_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/requests/sessions.py", line 703, in send r = adapter.send(request, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/requests/adapters.py", line 507, in send raise ConnectTimeout(e, request=request) requests.exceptions.ConnectTimeout: HTTPConnectionPool(host='192.168.2.128', port=80): Max retries exceeded with url: /post (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x7f3af35a6270>, 'Connection to 192.168.2.128 timed out. (connect timeout=10)'))`

Mrredstone5230 commented 3 months ago

Indeed it seems like it fails to ping the device and it breaks the update loops, which makes sense, but is definitely a bug. I wanted to do proper unavailability handling for a while now, so I guess this is a good excuse to start working on it!

ro8inmorgan commented 3 months ago

Indeed it seems like it fails to ping the device and it breaks the update loops, which makes sense, but is definitely a bug. I wanted to do proper unavailability handling for a while now, so I guess this is a good excuse to start working on it!

Thank you, to be honest I don't even know exactly why it says it cant connect to my pixoo64 because network is stable. It seems to happen specially when I'm messing in the Divoom app looking for new art to add to my fav list

declanfleming commented 3 months ago

Hi - getting the same issue, works great for a day, then seems to get stuck overnight and stops going back to the clock.

Thanks for your work on this integration! I've got it displaying the flight coming in overhead, and telling me the plane size. Next is to collect plane size info for a while, then have it shout when it sees a new plane!

image

D

ro8inmorgan commented 3 months ago

Thanks bro, running it now!