kvj / hass_nuki_ng

Better support for Nuki devices in the Home Assistant
MIT License
185 stars 36 forks source link

Plugin triggers HomeKit (via HA) "locked" notification several times #128

Open bgoncal opened 1 year ago

bgoncal commented 1 year ago

I just installed the plugin today and it works very well, but the entity "lock" goes "unavailable" once in a while and also triggers "locked" notification in HomeKit every time it recovers from "unavailable", is this a known issue?

bgoncal commented 1 year ago

The lock is currently unavailable and I see this in the logs

Log Details (ERROR)

This error originated from a custom integration. Logger: custom_components.nuki_ng.nuki Source: custom_components/nuki_ng/nuki.py:78 Integration: Nuki Lock (documentation, issues) First occurred: 10:49:47 AM (20 occurrences) Last logged: 8:30:25 PM

Failed to get latest data: ('Connection aborted.', BadStatusLine('12E\r\n')) Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 703, in urlopen httplib_response = self._make_request( File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 449, in _make_request six.raise_from(e, None) File "", line 3, in raise_from File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 444, in _make_request httplib_response = conn.getresponse() File "/usr/local/lib/python3.10/http/client.py", line 1374, in getresponse response.begin() File "/usr/local/lib/python3.10/http/client.py", line 318, in begin version, status, reason = self._read_status() File "/usr/local/lib/python3.10/http/client.py", line 300, in _read_status raise BadStatusLine(line) http.client.BadStatusLine: 12E

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 489, in send resp = conn.urlopen( File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 787, in urlopen retries = retries.increment( File "/usr/local/lib/python3.10/site-packages/urllib3/util/retry.py", line 550, in increment raise six.reraise(type(error), error, _stacktrace) File "/usr/local/lib/python3.10/site-packages/urllib3/packages/six.py", line 769, in reraise raise value.with_traceback(tb) File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 703, in urlopen httplib_response = self._make_request( File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 449, in _make_request six.raise_from(e, None) File "", line 3, in raise_from File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 444, in _make_request httplib_response = conn.getresponse() File "/usr/local/lib/python3.10/http/client.py", line 1374, in getresponse response.begin() File "/usr/local/lib/python3.10/http/client.py", line 318, in begin version, status, reason = self._read_status() File "/usr/local/lib/python3.10/http/client.py", line 300, in _read_status raise BadStatusLine(line) urllib3.exceptions.ProtocolError: ('Connection aborted.', BadStatusLine('12E\r\n'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/config/custom_components/nuki_ng/nuki.py", line 396, in _update bridge_info = await self.api.bridge_info() File "/config/custom_components/nuki_ng/nuki.py", line 78, in bridge_info return await self.async_json(lambda r: r.get(self.bridge_url("/info"), timeout=BRIDGE_TIMEOUT)) File "/config/custom_components/nuki_ng/nuki.py", line 37, in async_json response = await self.hass.async_add_executor_job(lambda: cb(requests)) File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, self.kwargs) File "/config/custom_components/nuki_ng/nuki.py", line 37, in response = await self.hass.async_add_executor_job(lambda: cb(requests)) File "/config/custom_components/nuki_ng/nuki.py", line 78, in return await self.async_json(lambda r: r.get(self.bridge_url("/info"), timeout=BRIDGE_TIMEOUT)) File "/usr/local/lib/python3.10/site-packages/requests/api.py", line 73, in get return request("get", url, params=params, kwargs) File "/usr/local/lib/python3.10/site-packages/requests/api.py", line 59, in request return session.request(method=method, url=url, kwargs) File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 587, in request resp = self.send(prep, send_kwargs) File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 701, in send r = adapter.send(request, **kwargs) File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 547, in send raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: ('Connection aborted.', BadStatusLine('12E\r\n'))