theneweinstein / somneo

Home Assistant custom component for Philips Someo
33 stars 18 forks source link

Read operation timeout cascading errors #13

Closed tetsuo55 closed 7 months ago

tetsuo55 commented 2 years ago

The past couple of weeks my log has been filling up with errors, i updated to the latest version but that didn't fix the issue for me.

Here are some logs

Deze fout is ontstaan door een aangepaste integratie.

Logger: homeassistant.helpers.entity Source: custom_components/somneo/init.py:94 Integration: Philips Somneo (documentation, issues) First occurred: 5:55:49 (4 occurrences) Last logged: 18:56:30

Update for sensor.somneo_temperature fails Update for number.somneo_alarm0_hours fails Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 445, in _make_request six.raise_from(e, None) File "", line 3, in raise_from File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 440, in _make_request httplib_response = conn.getresponse() File "/usr/local/lib/python3.9/http/client.py", line 1371, in getresponse response.begin() File "/usr/local/lib/python3.9/http/client.py", line 319, in begin version, status, reason = self._read_status() File "/usr/local/lib/python3.9/http/client.py", line 280, in _read_status line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1") File "/usr/local/lib/python3.9/socket.py", line 704, in readinto return self._sock.recv_into(b) File "/usr/local/lib/python3.9/ssl.py", line 1241, in recv_into return self.read(nbytes, buffer) File "/usr/local/lib/python3.9/ssl.py", line 1099, in read return self._sslobj.read(len, buffer) socket.timeout: The read operation timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/requests/adapters.py", line 439, in send resp = conn.urlopen( File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 755, in urlopen retries = retries.increment( File "/usr/local/lib/python3.9/site-packages/urllib3/util/retry.py", line 532, in increment raise six.reraise(type(error), error, _stacktrace) File "/usr/local/lib/python3.9/site-packages/urllib3/packages/six.py", line 770, in reraise raise value File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 699, in urlopen httplib_response = self._make_request( File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 447, in _make_request self._raise_timeout(err=e, url=url, timeout_value=read_timeout) File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 336, in _raise_timeout raise ReadTimeoutError( urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='192.168.1.157', port=443): Read timed out. (read timeout=20)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 446, in async_update_ha_state await self.async_device_update() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 649, in async_device_update await task File "/config/custom_components/somneo/sensor.py", line 65, in async_update await self._data.update() File "/config/custom_components/somneo/init.py", line 94, in update await self._hass.async_add_executor_job(self.somneo.update) File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run result = self.fn(*self.args, self.kwargs) File "/usr/local/lib/python3.9/site-packages/pysomneo/init.py", line 248, in update self.light_data = self._get('wulgt') File "/usr/local/lib/python3.9/site-packages/pysomneo/init.py", line 96, in _get return self._internal_call('GET', url, None, payload) File "/usr/local/lib/python3.9/site-packages/pysomneo/init.py", line 77, in _internal_call r = self._session.request(method, url, verify=False, timeout=20, args) File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 542, in request resp = self.send(prep, send_kwargs) File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 655, in send r = adapter.send(request, kwargs) File "/usr/local/lib/python3.9/site-packages/requests/adapters.py", line 529, in send raise ReadTimeout(e, request=request) requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='192.168.1.157', port=443): Read timed out. (read timeout=20)

Here is another one

Deze fout is ontstaan door een aangepaste integratie.

Logger: homeassistant.helpers.entity Source: custom_components/somneo/light.py:67 Integration: Philips Somneo (documentation, issues) First occurred: 16:45:38 (4 occurrences) Last logged: 16:48:08

Update for light.somneo fails Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 446, in async_update_ha_state await self.async_device_update() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 641, in async_device_update raise exc File "/config/custom_components/somneo/light.py", line 67, in async_update self._attr_is_on, self._attr_brightness = self._data.somneo.light_status() File "/usr/local/lib/python3.9/site-packages/pysomneo/init.py", line 271, in light_status return self.light_data['onoff'], int(int(self.light_data['ltlvl']) / 25 * 255) KeyError: 'onoff'

These errors give the impression that the device is off of disconnected but when i check it's online

theneweinstein commented 2 years ago

This indeed sounds like it doesn't get a response from the device. Do you have a static IP for the Somneo light?

tetsuo55 commented 2 years ago

Yeah it would change sometimes in the past so i have it set statically on the router for several months