kvj / hass_nuki_ng

Better support for Nuki devices in the Home Assistant
MIT License
167 stars 32 forks source link

Failed to update callback #156

Open z-master42 opened 11 months ago

z-master42 commented 11 months ago

First of all, as far as I can tell, the integration works as desired, but despite this, error messages keep appearing in the log, which I would like to show here.

Logger: custom_components.nuki_ng.nuki
Source: custom_components/nuki_ng/nuki.py:40
Integration: Nuki Lock (documentation, issues)
First occurred: 13:29:53 (4 occurrences)
Last logged: 16:57:25

Failed to update callback http://192.168.42.43:8123/api/webhook/nuki_ng_bridge_hook_5bc73c445b22269c06d732b4795403c9
Failed to get latest data: Http response for http://192.168.42.55:8080/info?token=rgtk6m: 503 Service Unavailable
Traceback (most recent call last):
  File "/config/custom_components/nuki_ng/nuki.py", line 392, in _update
    callbacks_list = await self.api.bridge_check_callback(
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/nuki_ng/nuki.py", line 155, in bridge_check_callback
    callbacks = await self.async_json(
                ^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/nuki_ng/nuki.py", line 40, in async_json
    raise HomeAssistantError(f"Http response for {response.request.url}: {response.status_code} {response.reason}")
homeassistant.exceptions.HomeAssistantError: Http response for http://192.168.42.55:8080/callback/list?token=rgtk6m: 503 Service Unavailable
Logger: custom_components.nuki_ng.nuki
Source: helpers/update_coordinator.py:229
Integration: Nuki Lock (documentation, issues)
First occurred: 13:29:53 (5 occurrences)
Last logged: 17:42:51

Error fetching nuki_ng data:
Logger: custom_components.nuki_ng.nuki
Source: custom_components/nuki_ng/nuki.py:156
Integration: Nuki Lock (documentation, issues)
First occurred: 17:39:44 (4 occurrences)
Last logged: 17:43:51

Failed to update callback http://192.168.42.43:8123/api/webhook/nuki_ng_bridge_hook_5bc73c445b22269c06d732b4795403c9
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/urllib3/connection.py", line 174, in _new_conn
    conn = connection.create_connection(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/urllib3/util/connection.py", line 95, in create_connection
    raise err
  File "/usr/local/lib/python3.11/site-packages/urllib3/util/connection.py", line 85, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/urllib3/connectionpool.py", line 714, in urlopen
    httplib_response = self._make_request(
                       ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/urllib3/connectionpool.py", line 415, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/usr/local/lib/python3.11/site-packages/urllib3/connection.py", line 244, in request
    super(HTTPConnection, self).request(method, url, body=body, headers=headers)
  File "/usr/local/lib/python3.11/http/client.py", line 1286, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/local/lib/python3.11/http/client.py", line 1332, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/local/lib/python3.11/http/client.py", line 1281, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/local/lib/python3.11/http/client.py", line 1041, in _send_output
    self.send(msg)
  File "/usr/local/lib/python3.11/http/client.py", line 979, in send
    self.connect()
  File "/usr/local/lib/python3.11/site-packages/urllib3/connection.py", line 205, in connect
    conn = self._new_conn()
           ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/urllib3/connection.py", line 186, in _new_conn
    raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f6975a390>: Failed to establish a new connection: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/requests/adapters.py", line 486, in send
    resp = conn.urlopen(
           ^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/urllib3/connectionpool.py", line 798, in urlopen
    retries = retries.increment(
              ^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/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.42.55', port=8080): Max retries exceeded with url: /callback/list?token=rgtk6m (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f6975a390>: Failed to establish a new connection: [Errno 111] Connection refused'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/config/custom_components/nuki_ng/nuki.py", line 392, in _update
    callbacks_list = await self.api.bridge_check_callback(
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/nuki_ng/nuki.py", line 155, in bridge_check_callback
    callbacks = await self.async_json(
                ^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/nuki_ng/nuki.py", line 38, in async_json
    response = await self.hass.async_add_executor_job(lambda: cb(requests))
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  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/nuki_ng/nuki.py", line 38, in <lambda>
    response = await self.hass.async_add_executor_job(lambda: cb(requests))
                                                              ^^^^^^^^^^^^
  File "/config/custom_components/nuki_ng/nuki.py", line 156, in <lambda>
    lambda r: r.get(self.bridge_url("/callback/list"), timeout=BRIDGE_TIMEOUT)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/requests/api.py", line 73, in get
    return request("get", url, params=params, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/requests/adapters.py", line 519, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='192.168.42.55', port=8080): Max retries exceeded with url: /callback/list?token=rgtk6m (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f6975a390>: Failed to establish a new connection: [Errno 111] Connection refused'))
Logger: custom_components.nuki_ng.nuki
Source: custom_components/nuki_ng/nuki.py:79
Integration: Nuki Lock (documentation, issues)
First occurred: 17:35:43 (5 occurrences)
Last logged: 17:43:51

Failed to get latest data: HTTPConnectionPool(host='192.168.42.55', port=8080): Max retries exceeded with url: /info?token=rgtk6m (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f3613d890>: Failed to establish a new connection: [Errno 111] Connection refused'))
Failed to get latest data: HTTPConnectionPool(host='192.168.42.55', port=8080): Max retries exceeded with url: /info?token=rgtk6m (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f367c4550>: Failed to establish a new connection: [Errno 111] Connection refused'))
Failed to get latest data: HTTPConnectionPool(host='192.168.42.55', port=8080): Max retries exceeded with url: /info?token=rgtk6m (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f765d0c50>: Failed to establish a new connection: [Errno 101] Network unreachable'))
Failed to get latest data: HTTPConnectionPool(host='192.168.42.55', port=8080): Max retries exceeded with url: /info?token=rgtk6m (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f361482d0>: Failed to establish a new connection: [Errno 101] Network unreachable'))
Failed to get latest data: HTTPConnectionPool(host='192.168.42.55', port=8080): Max retries exceeded with url: /info?token=rgtk6m (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f74494310>: Failed to establish a new connection: [Errno 101] Network unreachable'))
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/urllib3/connection.py", line 174, in _new_conn
    conn = connection.create_connection(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/urllib3/util/connection.py", line 95, in create_connection
    raise err
  File "/usr/local/lib/python3.11/site-packages/urllib3/util/connection.py", line 85, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/urllib3/connectionpool.py", line 714, in urlopen
    httplib_response = self._make_request(
                       ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/urllib3/connectionpool.py", line 415, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/usr/local/lib/python3.11/site-packages/urllib3/connection.py", line 244, in request
    super(HTTPConnection, self).request(method, url, body=body, headers=headers)
  File "/usr/local/lib/python3.11/http/client.py", line 1286, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/local/lib/python3.11/http/client.py", line 1332, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/local/lib/python3.11/http/client.py", line 1281, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/local/lib/python3.11/http/client.py", line 1041, in _send_output
    self.send(msg)
  File "/usr/local/lib/python3.11/http/client.py", line 979, in send
    self.connect()
  File "/usr/local/lib/python3.11/site-packages/urllib3/connection.py", line 205, in connect
    conn = self._new_conn()
           ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/urllib3/connection.py", line 186, in _new_conn
    raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f3613d890>: Failed to establish a new connection: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/requests/adapters.py", line 486, in send
    resp = conn.urlopen(
           ^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/urllib3/connectionpool.py", line 798, in urlopen
    retries = retries.increment(
              ^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/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.42.55', port=8080): Max retries exceeded with url: /info?token=rgtk6m (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f3613d890>: Failed to establish a new connection: [Errno 111] Connection refused'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/config/custom_components/nuki_ng/nuki.py", line 397, in _update
    bridge_info = await self.api.bridge_info()
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/nuki_ng/nuki.py", line 79, 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 38, in async_json
    response = await self.hass.async_add_executor_job(lambda: cb(requests))
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  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/nuki_ng/nuki.py", line 38, in <lambda>
    response = await self.hass.async_add_executor_job(lambda: cb(requests))
                                                              ^^^^^^^^^^^^
  File "/config/custom_components/nuki_ng/nuki.py", line 79, in <lambda>
    return await self.async_json(lambda r: r.get(self.bridge_url("/info"), timeout=BRIDGE_TIMEOUT))
                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/requests/api.py", line 73, in get
    return request("get", url, params=params, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/requests/adapters.py", line 519, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='192.168.42.55', port=8080): Max retries exceeded with url: /info?token=rgtk6m (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f3613d890>: Failed to establish a new connection: [Errno 111] Connection refused'))
Phoenix-DH commented 11 months ago

Hey, I was just wondering if there was already a case opened. I have the same topic. A lot of errors in the log, but all seems to be working fine as far as I can interprete.

Phoenix-DH commented 10 months ago

@kvj Is there a chance to get an update? Can deliver logs. Thank you.

mindgam3s commented 8 months ago

+1 got the same kind of errors

n0bbi commented 8 months ago

+1 Same for me

efolio commented 4 months ago

+1 idem