ronengr / hass_nuki_bt

Control Nuki Lock over bluetooth
MIT License
32 stars 7 forks source link

Stuck on initialization - Smart Lock 4.0 Pro #40

Closed ponchofiesta closed 3 months ago

ponchofiesta commented 3 months ago

System Health details

System Information

version core-2024.2.5
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.12.1
os_name Linux
os_version 6.6.16-haos
arch x86_64
timezone Europe/Berlin
config_dir /config
Home Assistant Community Store GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok GitHub API Calls Remaining | 4936 Installed Version | 1.34.0 Stage | running Available Repositories | 1400 Downloaded Repositories | 10
Home Assistant Cloud logged_in | false -- | -- can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | ok
Home Assistant Supervisor host_os | Home Assistant OS 12.0 -- | -- update_channel | stable supervisor_version | supervisor-2024.02.1 agent_version | 1.6.0 docker_version | 24.0.7 disk_total | 30.8 GB disk_used | 5.1 GB healthy | true supported | true board | ova supervisor_api | ok version_api | ok installed_addons | Terminal & SSH (9.9.0), Samba share (12.3.0), OpenThread Border Router (2.5.0), Silicon Labs Multiprotocol (2.4.4), Matter Server (5.4.0)
Dashboards dashboards | 2 -- | -- resources | 7 views | 3 mode | storage
Recorder oldest_recorder_run | 26. Februar 2024 um 14:47 -- | -- current_recorder_run | 5. März 2024 um 14:16 estimated_db_size | 5.53 MiB database_engine | sqlite database_version | 3.44.2

Checklist

Describe the issue

I try to add my Smart Lock 4.0 Pro to Home Assistant. After pairing the integration stucks at initialization.

Looks like this is the exception message:

bleak.exc.BleakError: No backend with an available connection slot that can reach address 54:D2:72:87:7E:EC was found

Using:

Reproduction steps

  1. Nuki got auto discovered
  2. Add via auto pairing and 5s button press
  3. Integration stucks ...

Debug logs

2024-03-05 14:16:25.244 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration ui_lovelace_minimalist which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-03-05 14:16:25.249 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-03-05 14:16:25.252 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration hass_nuki_bt which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-03-05 14:16:51.209 WARNING (MainThread) [homeassistant.setup] Setup of hassio is taking over 10 seconds.
2024-03-05 14:16:51.209 WARNING (MainThread) [homeassistant.setup] Setup of bluetooth is taking over 10 seconds.
2024-03-05 14:17:05.381 WARNING (MainThread) [homeassistant.setup] Setup of input_number is taking over 10 seconds.
2024-03-05 14:17:05.906 WARNING (MainThread) [homeassistant.setup] Setup of input_text is taking over 10 seconds.
2024-03-05 14:17:05.906 WARNING (MainThread) [homeassistant.setup] Setup of schedule is taking over 10 seconds.
2024-03-05 14:17:05.907 WARNING (MainThread) [homeassistant.setup] Setup of zone is taking over 10 seconds.
2024-03-05 14:17:06.117 WARNING (MainThread) [homeassistant.setup] Setup of tag is taking over 10 seconds.
2024-03-05 14:17:06.117 WARNING (MainThread) [homeassistant.setup] Setup of counter is taking over 10 seconds.
2024-03-05 14:17:06.117 WARNING (MainThread) [homeassistant.setup] Setup of input_datetime is taking over 10 seconds.
2024-03-05 14:17:06.118 WARNING (MainThread) [homeassistant.setup] Setup of input_select is taking over 10 seconds.
2024-03-05 14:18:55.418 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 452, in _handle_request
    resp = await request_handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_app.py", line 543, in _handle
    resp = await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_middlewares.py", line 114, in impl
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 91, in security_filter_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 100, in forwarded_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 80, in ban_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 235, in auth_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/headers.py", line 31, in headers_middleware
    response = await handler(request)
               ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 149, in handle
    result = await handler(request, **request.match_info)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/decorators.py", line 72, in with_admin
    return await func(self, request, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 185, in post
    return await super().post(request, flow_id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 72, in wrapper
    result = await method(view, request, data, *args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 110, in post
    result = await self._flow_mgr.async_configure(flow_id, data)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 358, in async_configure
    result = await self._async_configure(flow_id, user_input)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 400, in _async_configure
    result = await self._async_handle_step(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 501, in _async_handle_step
    result: FlowResult = await getattr(flow, method)(user_input)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/hass_nuki_bt/config_flow.py", line 159, in async_step_pair
    ret = await device.pair()
          ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/pyNukiBT/nuki.py", line 499, in pair
    await self.connect() # connect so we can identify the device type and update self._const accordingly
    ^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/pyNukiBT/nuki.py", line 383, in connect
    await self._client.connect()
  File "/usr/local/lib/python3.12/site-packages/habluetooth/wrappers.py", line 275, in connect
    wrapped_backend = self._async_get_best_available_backend_and_device(manager)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/habluetooth/wrappers.py", line 384, in _async_get_best_available_backend_and_device
    raise BleakError(
bleak.exc.BleakError: No backend with an available connection slot that can reach address 54:D2:72:87:7E:EC was found
2024-03-05 14:19:15.850 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 452, in _handle_request
    resp = await request_handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_app.py", line 543, in _handle
    resp = await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_middlewares.py", line 114, in impl
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 91, in security_filter_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 100, in forwarded_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 80, in ban_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 235, in auth_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/headers.py", line 31, in headers_middleware
    response = await handler(request)
               ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 149, in handle
    result = await handler(request, **request.match_info)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/decorators.py", line 72, in with_admin
    return await func(self, request, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 185, in post
    return await super().post(request, flow_id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 72, in wrapper
    result = await method(view, request, data, *args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 110, in post
    result = await self._flow_mgr.async_configure(flow_id, data)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 358, in async_configure
    result = await self._async_configure(flow_id, user_input)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 400, in _async_configure
    result = await self._async_handle_step(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 501, in _async_handle_step
    result: FlowResult = await getattr(flow, method)(user_input)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/hass_nuki_bt/config_flow.py", line 159, in async_step_pair
    ret = await device.pair()
          ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/pyNukiBT/nuki.py", line 499, in pair
    await self.connect() # connect so we can identify the device type and update self._const accordingly
    ^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/pyNukiBT/nuki.py", line 383, in connect
    await self._client.connect()
  File "/usr/local/lib/python3.12/site-packages/habluetooth/wrappers.py", line 275, in connect
    wrapped_backend = self._async_get_best_available_backend_and_device(manager)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/habluetooth/wrappers.py", line 384, in _async_get_best_available_backend_and_device
    raise BleakError(
bleak.exc.BleakError: No backend with an available connection slot that can reach address 54:D2:72:87:7E:EC was found
2024-03-05 14:19:44.355 WARNING (MainThread) [pyNukiBT.nuki] parse error Error in path (parsing) -> crc
wrong checksum, read 62466, computed 29162
2024-03-05 14:19:44.356 WARNING (MainThread) [pyNukiBT.nuki] Got unexpected message length for command 64385. got length:132 expecting length:8
2024-03-05 14:19:44.357 WARNING (MainThread) [pyNukiBT.nuki] Got 124 unknown bytes with value: b'E\x9a\x189H\x85\x87\x9d\xf4m\x16c\xfaQAP$\x86\xdf\x97\x04\x00f\x00\xab\xae]\xd5\x90\xcf\x80\x03\xec\xdeU!"\xfe\xd8\x89\xff^\x06m\xa3\xf9\xe8\x90\x8auA)i\r\x07\xe2c\xe5\xf9.\xd1?\xbb<\xe1\xde\xd36\xe0\xe5D\xb6\xf0$\xe9\x9e-\xed}\x9c\xd4\x87\xe3M\xd9\xfb\x99\xe2\xfc\xea\x9e\xdfp\x828\xfd\x1a\x81#\xcel\xa3U\xd5\xa4\xe7\xdao\xe7\x84\x87\x11\x8a\x81\x17sh\xd6\xa8\x9b\x82\xa05\x8b'
2024-03-05 14:19:44.357 ERROR (MainThread) [pyNukiBT.nuki] HomeAssistant: Received unsolicited notification: Container: 
    auth_id = b'\r\xc3\xc3\xc5' (total 4)
    command = (enum) (unknown) 64385
    payload = None
    crc = 39493
2024-03-05 14:19:44.357 ERROR (MainThread) [pyNukiBT.nuki] was expecting CONFIG
2024-03-05 14:20:14.568 WARNING (MainThread) [pyNukiBT.nuki] parse error Error in path (parsing) -> crc
wrong checksum, read 1794, computed 60391
2024-03-05 14:20:14.569 WARNING (MainThread) [pyNukiBT.nuki] Got unexpected message length for command 17805. got length:132 expecting length:8
2024-03-05 14:20:14.570 WARNING (MainThread) [pyNukiBT.nuki] Got 124 unknown bytes with value: b'R\xfdn\x88(\x06f4`\xfdH\xfd<\xa7X\x06\x90\xf9\xdf\x97\x04\x00f\x00p\nx\x12i\xc4b\x88\xe2E\x90~\x8c\x9d\x83\xbb\xbd\xac \x14\x86p_\x12\x9cd\n\xbf\x07\xce\rt\x9a\x16\x02\xdd{\xb13\xf8T\x95\xca \xfac\xa8\x98P \xd9\x9c\x82%\xf57\x0f\xfa\x8f\xdb\xd8\xa3\xda\nrO\x90T\xb4\x08\xaeH-?\x11\x17\xce+\xdb}(S\xeabO\x89EZ`o\xabsl\xdf\xa8G%\x81U\xba'
2024-03-05 14:20:14.570 ERROR (MainThread) [pyNukiBT.nuki] HomeAssistant: Received unsolicited notification: Container: 
    auth_id = b'\xb5\xf8\xf3q' (total 4)
    command = (enum) (unknown) 17805
    payload = None
    crc = 64850
2024-03-05 14:20:14.571 ERROR (MainThread) [pyNukiBT.nuki] was expecting CONFIG
2024-03-05 14:20:52.865 WARNING (MainThread) [pyNukiBT.nuki] parse error Error in path (parsing) -> crc
wrong checksum, read 47874, computed 54471
2024-03-05 14:20:52.866 WARNING (MainThread) [pyNukiBT.nuki] Got unexpected message length for command 39800. got length:132 expecting length:8
2024-03-05 14:20:52.866 WARNING (MainThread) [pyNukiBT.nuki] Got 124 unknown bytes with value: b"$\xbb\x8d~\xf0F\xeb\xf9\x02t\xd2s\xc6\x88\xfceR\xd3\xdf\x97\x04\x00f\x00\x92\x1f\x05Ou\xfe\x16L\xf3P\x88\x114\xb6\x11,l\xc8\xa5\xd2\xac\x8dq\xc4\xbb}\x82-\xe3v\x82\x1f\xec\x88\x12\x98*F\xe1\xf7\x9ciWi\xcf\x8e\x8e\xccB\xcf\x7fEc%\xeb\xe3\xd8H'\xd1\x87\xcbwB2=a\xc4I[V\xd3\xe5\xa9\x08\x13\xe4\x8a^\x12'&_\xb8\xb0c\x14hX\x1cw\x8e\x87~V\xf0\xa0.7o"
2024-03-05 14:20:52.866 ERROR (MainThread) [pyNukiBT.nuki] HomeAssistant: Received unsolicited notification: Container: 
    auth_id = b'\x0f7\xeb\xb5' (total 4)
    command = (enum) (unknown) 39800
    payload = None
    crc = 47908
2024-03-05 14:20:52.867 ERROR (MainThread) [pyNukiBT.nuki] was expecting CONFIG
2024-03-05 14:21:43.534 WARNING (MainThread) [pyNukiBT.nuki] parse error Error in path (parsing) -> crc
wrong checksum, read 60930, computed 11992
2024-03-05 14:21:43.535 WARNING (MainThread) [pyNukiBT.nuki] Got unexpected message length for command 16285. got length:132 expecting length:8
2024-03-05 14:21:43.535 WARNING (MainThread) [pyNukiBT.nuki] Got 124 unknown bytes with value: b'\x98\xec\x91\xc6-\xd1\x80g\xa6\x8f\xf0\xa3\xc5Q[\x93i)\xdf\x97\x04\x00f\x00.lq\xe9\x91^\x9b\xe8\x8ed(@\x8b4V\x90\xbd\xd9\xa0%\x182\xfb\x0blMj\xbf\\[\xdb\x86%\x9d\x85\xc4\xb0\xff\xac\xd0ur\xe6\xa82a2\xd8\xdc\xc3B\xe3\xab\x91"\x11\xe5-t?\xf1\xb2\x1b~\x80m\xaa\x9b\x8d\x86m\t\xdc\xfb\xb4{\x8c\x8c_\xd2\x03\xdcKB\r\x02\xeb\xec\xb1\xca\xe4\xfb\x85FX\x95\xab N#'
2024-03-05 14:21:43.535 ERROR (MainThread) [pyNukiBT.nuki] HomeAssistant: Received unsolicited notification: Container: 
    auth_id = b'\xed\x99fi' (total 4)
    command = (enum) (unknown) 16285
    payload = None
    crc = 60568
2024-03-05 14:21:43.536 ERROR (MainThread) [pyNukiBT.nuki] was expecting CONFIG
2024-03-05 14:22:43.720 ERROR (MainThread) [custom_components.hass_nuki_bt] 54:D2:72:87:7E:EC: Bluetooth error whilst polling: No backend with an available connection slot that can reach address 54:D2:72:87:7E:EC was found
2024-03-05 14:24:03.926 INFO (MainThread) [pyNukiBT.nuki] Nuki: 54:D2:72:87:7E:EC, RSSI: -90
2024-03-05 14:24:03.927 INFO (MainThread) [pyNukiBT.nuki] Querying Nuki state
2024-03-05 14:24:03.930 INFO (MainThread) [pyNukiBT.nuki] Querying Nuki state
2024-03-05 14:24:03.930 INFO (MainThread) [pyNukiBT.nuki] update state already in progress. ignoring
2024-03-05 14:24:07.552 INFO (MainThread) [pyNukiBT.nuki] Nuki: 54:D2:72:87:7E:EC, RSSI: -78
2024-03-05 14:24:07.555 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Nuki_3B877EEC for hass_nuki_bt
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 444, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/hass_nuki_bt/__init__.py", line 86, in async_setup_entry
    if not await coordinator.async_wait_ready():
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/hass_nuki_bt/coordinator.py", line 151, in async_wait_ready
    await self._async_update()
  File "/config/custom_components/hass_nuki_bt/coordinator.py", line 110, in _async_update
    await self.device.update_state()
  File "/usr/local/lib/python3.12/site-packages/pyNukiBT/nuki.py", line 420, in update_state
    await self.connect() # connect so we can identify the device type and update self._const accordingly
    ^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/pyNukiBT/nuki.py", line 384, in connect
    logger.debug(f"Services {[str(s) for s in self._client.services]}")
                                              ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/bleak/__init__.py", line 686, in services
    if not self._backend.services:
           ^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'services'
2024-03-05 14:24:13.936 INFO (MainThread) [pyNukiBT.nuki] Querying Nuki state
2024-03-05 14:24:13.942 DEBUG (MainThread) [pyNukiBT.nuki] Services ['a92ee100-5501-11e4-916c-0800200c9a66 (Handle: 23): Unknown', 'a92ee200-5501-11e4-916c-0800200c9a66 (Handle: 27): Unknown', '0000180a-0000-1000-8000-00805f9b34fb (Handle: 14): Device Information', '0000fff6-0000-1000-8000-00805f9b34fb (Handle: 36): Vendor specific', '00001801-0000-1000-8000-00805f9b34fb (Handle: 1): Generic Attribute Profile']
2024-03-05 14:24:13.942 DEBUG (MainThread) [pyNukiBT.nuki] Characteristics ['a92ee101-5501-11e4-916c-0800200c9a66 (Handle: 24): Unknown', 'a92ee202-5501-11e4-916c-0800200c9a66 (Handle: 31): Unknown', 'a92ee201-5501-11e4-916c-0800200c9a66 (Handle: 28): Unknown', 'a92ee203-5501-11e4-916c-0800200c9a66 (Handle: 34): Unknown', '00002a27-0000-1000-8000-00805f9b34fb (Handle: 17): Hardware Revision String', '00002a24-0000-1000-8000-00805f9b34fb (Handle: 21): Model Number String', '00002a25-0000-1000-8000-00805f9b34fb (Handle: 15): Serial Number String', '00002a26-0000-1000-8000-00805f9b34fb (Handle: 19): Firmware Revision String', '18ee2ef5-263d-4559-959f-4f9c429f9d11 (Handle: 37): Unknown', '18ee2ef5-263d-4559-959f-4f9c429f9d12 (Handle: 39): Unknown', '00002b29-0000-1000-8000-00805f9b34fb (Handle: 7): Client Supported Features', '00002a05-0000-1000-8000-00805f9b34fb (Handle: 2): Service Changed', '00002b2a-0000-1000-8000-00805f9b34fb (Handle: 5): Database Hash']
2024-03-05 14:24:14.025 INFO (MainThread) [pyNukiBT.nuki] Connected
2024-03-05 14:24:14.025 INFO (MainThread) [pyNukiBT.nuki] sending encrypted command REQUEST_DATA
2024-03-05 14:24:14.026 INFO (MainThread) [pyNukiBT.nuki] Trying to send data. Attempt 1
2024-03-05 14:24:14.026 INFO (MainThread) [pyNukiBT.nuki] Connected
2024-03-05 14:24:14.026 INFO (MainThread) [pyNukiBT.nuki] Sending data to Nuki
2024-03-05 14:24:14.055 INFO (MainThread) [pyNukiBT.nuki] Data sent on attempt 1
2024-03-05 14:24:14.056 DEBUG (MainThread) [pyNukiBT.nuki] Notification handler: a92ee202-5501-11e4-916c-0800200c9a66 (Handle: 31): Unknown, data: bytearray(b'5\xf6e\x8cBD!\xe7OL\x04\xbe\xaa\xfazg\xa1\xda\x08\xcc\x86\xd9d\xdf\xdf\x97\x04\x003\x004[x\x9d\xb61\xd9y\x93i}\xfd\xdf\x9dV2w\xc6\x8e\xf4u8,\xdfk\x12%\xf7,L\x12G\xb3\xe2<|=\x06\x82\xf1\x0eO\x1f[\xd4~\xc6\x04\xb8P8')
2024-03-05 14:24:14.058 DEBUG (MainThread) [pyNukiBT.nuki] State: Container: 
    nuki_state = (enum) DOOR_MODE 2
    lock_state = (enum) LOCKED 1
    trigger = (enum) SYSTEM 0
    current_time = Container: 
        year = 2024
        month = 3
        day = 5
        hour = 13
        minute = 24
        second = 14
    timezone_offset = 0
    critical_battery_state = 112
    config_update_count = 12
    lock_n_go_timer = 0
    last_lock_action = (enum) UNLOCK 1
    last_lock_action_trigger = (enum) AUTOMATIC 3
    last_lock_action_completion_status = (enum) SUCCESS 0
    door_sensor_state = (enum) DOOR_CLOSED 2
    nightmode_active = 1024
    accessory_battery_state = 3
2024-03-05 14:24:14.058 INFO (MainThread) [pyNukiBT.nuki] Retrieve nuki configuration
2024-03-05 14:24:14.058 INFO (MainThread) [pyNukiBT.nuki] Connected
2024-03-05 14:24:14.059 INFO (MainThread) [pyNukiBT.nuki] sending encrypted command REQUEST_DATA
2024-03-05 14:24:14.059 INFO (MainThread) [pyNukiBT.nuki] Trying to send data. Attempt 1
2024-03-05 14:24:14.059 INFO (MainThread) [pyNukiBT.nuki] Connected
2024-03-05 14:24:14.059 INFO (MainThread) [pyNukiBT.nuki] Sending data to Nuki
2024-03-05 14:24:14.100 INFO (MainThread) [pyNukiBT.nuki] Data sent on attempt 1
2024-03-05 14:24:14.102 DEBUG (MainThread) [pyNukiBT.nuki] Notification handler: a92ee202-5501-11e4-916c-0800200c9a66 (Handle: 31): Unknown, data: bytearray(b'\x96o\xa1\xc8\xaa\xb7\x1ao,\xc8b\xd7N\x0e\x18\xfd\xade\x8e\xcc\xe7\x1b=\xe7\xdf\x97\x04\x008\x00v.s\xf4\x1a\x9c\xad\xf5\xdb&e{y\xcap\xb0=\xb3F$]\xa3\xd8-%\xce\x8d\xdb\xa5a\tJy\xe4^zZ<v!h\xabNB\xc9\xce;&^\xec4j\x19tA\xcb')
2024-03-05 14:24:14.104 INFO (MainThread) [pyNukiBT.nuki] sending encrypted command REQUEST_CONFIG
2024-03-05 14:24:14.104 INFO (MainThread) [pyNukiBT.nuki] Trying to send data. Attempt 1
2024-03-05 14:24:14.104 INFO (MainThread) [pyNukiBT.nuki] Connected
2024-03-05 14:24:14.104 INFO (MainThread) [pyNukiBT.nuki] Sending data to Nuki
2024-03-05 14:24:14.145 INFO (MainThread) [pyNukiBT.nuki] Data sent on attempt 1
2024-03-05 14:24:14.148 DEBUG (MainThread) [pyNukiBT.nuki] Notification handler: a92ee202-5501-11e4-916c-0800200c9a66 (Handle: 31): Unknown, data: bytearray(b'\xd3\x98tTP\x0f\xcbTs={B\xde\x92\xaa!>\xc0\xf8\x9e\x80\xf6\xf6~\xdf\x97\x04\x00f\x00\x1f\xb8g\xa4\xcd\xc3\x07\xf5ecL\x08>\x82\x83x\xbe\x84\xac\xaf\xfd\xfa\xa4\xb2/V\xf9\x1f\x81a\x85\xf7eh\x93KP\x8b\x08i0\xa0\x16\x91\xef\xf2\xdc\x93fA\xa7\x17\x80\xd0\xfd\x07\x03Z\xa2\x8a\xd9\x90k, Z!\x8b\xe7\xe1\x9d\x90+\n\xd6<\xf3\xbb?Wb\xeb\x86\xe3\x90\xe1\x8c-\x18\x1a\x82\t\xb0\xe8\x9d\x87}\xca\x83\x9dqm')
2024-03-05 14:24:14.150 WARNING (MainThread) [pyNukiBT.nuki] parse error Error in path (parsing) -> crc
wrong checksum, read 12802, computed 30673
2024-03-05 14:24:14.150 WARNING (MainThread) [pyNukiBT.nuki] Got unexpected message length for command 3920. got length:132 expecting length:8
2024-03-05 14:24:14.151 WARNING (MainThread) [pyNukiBT.nuki] Got 124 unknown bytes with value: b'\xcbTs={B\xde\x92\xaa!>\xc0\xf8\x9e\x80\xf6\xf6~\xdf\x97\x04\x00f\x00\x1f\xb8g\xa4\xcd\xc3\x07\xf5ecL\x08>\x82\x83x\xbe\x84\xac\xaf\xfd\xfa\xa4\xb2/V\xf9\x1f\x81a\x85\xf7eh\x93KP\x8b\x08i0\xa0\x16\x91\xef\xf2\xdc\x93fA\xa7\x17\x80\xd0\xfd\x07\x03Z\xa2\x8a\xd9\x90k, Z!\x8b\xe7\xe1\x9d\x90+\n\xd6<\xf3\xbb?Wb\xeb\x86\xe3\x90\xe1\x8c-\x18\x1a\x82\t\xb0\xe8\x9d\x87}\xca\x83\x9d'
2024-03-05 14:24:14.151 ERROR (MainThread) [pyNukiBT.nuki] HomeAssistant: Received unsolicited notification: Container: 
    auth_id = b'\xd3\x98tT' (total 4)
    command = (enum) (unknown) 3920
    payload = None
    crc = 21707
2024-03-05 14:24:14.152 ERROR (MainThread) [pyNukiBT.nuki] was expecting CONFIG
2024-03-05 14:24:34.148 ERROR (MainThread) [custom_components.hass_nuki_bt] 54:D2:72:87:7E:EC: Failure while polling
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/pyNukiBT/nuki.py", line 362, in _send_command
    msg = await self._notify_future
          ^^^^^^^^^^^^^^^^^^^^^^^^^
asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/bluetooth/active_update_coordinator.py", line 129, in _async_poll
    self.data = await self._async_poll_data(self._last_service_info)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/bluetooth/active_update_coordinator.py", line 122, in _async_poll_data
    return await self._poll_method(last_service_info)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/hass_nuki_bt/coordinator.py", line 110, in _async_update
    await self.device.update_state()
  File "/usr/local/lib/python3.12/site-packages/pyNukiBT/nuki.py", line 433, in update_state
    await self.update_config()
  File "/usr/local/lib/python3.12/site-packages/pyNukiBT/nuki.py", line 489, in update_config
    msg = await self._send_encrtypted_command(
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/pyNukiBT/nuki.py", line 189, in _send_encrtypted_command
    return await self._send_command(
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/pyNukiBT/nuki.py", line 361, in _send_command
    async with async_timeout.timeout(self.command_response_timeout):
  File "/usr/local/lib/python3.12/site-packages/async_timeout/__init__.py", line 141, in __aexit__
    self._do_exit(exc_type)
  File "/usr/local/lib/python3.12/site-packages/async_timeout/__init__.py", line 228, in _do_exit
    raise asyncio.TimeoutError
TimeoutError

Diagnostics dump

No response

ponchofiesta commented 3 months ago

I also tried another Bluetooth USB dongle (TP-Link EB500). Same problem.

ronengr commented 3 months ago

From the logs, it seems HA cannot find a connection to the device

bleak.exc.BleakError: No backend with an available connection slot that can reach address 54:D2:72:87:7E:EC was found

try putting the BT closer to the lock

Unfortunately, there is nothing i can do if i can't establish a BT connection