ronengr / hass_nuki_bt

Control Nuki Lock over bluetooth
MIT License
39 stars 8 forks source link

Nuki 3.0 - Fails to load entity after pairing "AttributeError: 'NukiDevice' object has no attribute '_const'" #39

Closed SublimePotato closed 8 months ago

SublimePotato commented 9 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.1.73-haos-raspi
arch aarch64
timezone Europe/Berlin
config_dir /config
Home Assistant Community Store GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok GitHub API Calls Remaining | 4800 Installed Version | 1.34.0 Stage | running Available Repositories | 1467 Downloaded Repositories | 15
Home Assistant Supervisor host_os | Home Assistant OS 12.0 -- | -- update_channel | stable supervisor_version | supervisor-2024.02.0 agent_version | 1.6.0 docker_version | 24.0.7 disk_total | 457.7 GB disk_used | 19.1 GB healthy | true supported | true board | rpi4-64 supervisor_api | ok version_api | ok installed_addons | Samba share (12.3.0), AdGuard Home (5.0.3), Home Assistant Google Drive Backup (0.112.1), Mosquitto broker (6.4.0), Terminal & SSH (9.9.0), Studio Code Server (5.15.0), Grafana (9.1.3), InfluxDB (5.0.0), Vaultwarden (Bitwarden) (0.21.1), Nginx Proxy Manager (1.0.1), MariaDB (2.6.1), Log Viewer (0.17.0), Zigbee2MQTT (1.35.3-1)
Dashboards dashboards | 1 -- | -- resources | 14 views | 6 mode | storage
Recorder oldest_recorder_run | 24. Februar 2024 um 11:47 -- | -- current_recorder_run | 29. Februar 2024 um 11:33 estimated_db_size | 531.07 MiB database_engine | sqlite database_version | 3.44.2
Spotify api_endpoint_reachable | ok -- | --

Checklist

Describe the issue

After setting up the device successfully in the integration, it fails to load the entities. In the log i can find the following errors: grafik

Logger: custom_components.hass_nuki_bt
Source: components/bluetooth/active_update_coordinator.py:129
Integration: Nuki Türöffner ([documentation](https://github.com/ronengr/hass_nuki_bt), [issues](https://github.com/ronengr/hass_nuki_bt/issues))
First occurred: 11:34:24 (1 occurrences)
Last logged: 11:34:24
XXX: Failure while polling

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 113, in _async_update
    logs = await self.device.request_log_entries(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/pyNukiBT/nuki.py", line 585, in request_log_entries
    self._const.NukiCommand.REQUEST_DATA,
    ^^^^^^^^^^^
AttributeError: 'NukiDevice' object has no attribute '_const'
Logger: homeassistant.config_entries
Source: config_entries.py:444
First occurred: 11:34:24 (1 occurrences)
Last logged: 11:34:24

Error setting up entry Nuki_XXX 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'

After enabling debug logs, these errors appeared:

Logger: homeassistant.config_entries
Source: config_entries.py:444
First occurred: 11:44:36 (1 occurrences)
Last logged: 11:44:36

Error setting up entry Nuki_XXX 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 119, in _async_update
    elif logs[0].index > self.last_nuki_log_entry.index:
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'dict' object has no attribute 'index'
Logger: custom_components.hass_nuki_bt
Source: components/bluetooth/active_update_coordinator.py:129
Integration: Nuki Türöffner (documentation, issues)
First occurred: 11:44:35 (1 occurrences)
Last logged: 11:44:35

XXX: Failure while polling
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 119, in _async_update
    elif logs[0].index > self.last_nuki_log_entry.index:
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'dict' object has no attribute 'index'

Reproduction steps

  1. Device got auto discovered
  2. Followed instruction and completed successful
  3. Integration fails to load entities

Debug logs

2024-02-29 11:44:33.358 INFO (MainThread) [pyNukiBT.nuki] Nuki: XX:XX:XX:XX:XX:XX, RSSI: -57
2024-02-29 11:44:33.359 INFO (MainThread) [pyNukiBT.nuki] Querying Nuki state
2024-02-29 11:44:33.369 INFO (MainThread) [pyNukiBT.nuki] Querying Nuki state
2024-02-29 11:44:33.370 INFO (MainThread) [pyNukiBT.nuki] update state already in progress. ignoring
2024-02-29 11:44:33.370 INFO (MainThread) [pyNukiBT.nuki] request 1 log entries, start=0
2024-02-29 11:44:35.704 DEBUG (MainThread) [pyNukiBT.nuki] Services ['00000044-0000-1000-8000-0026bb765291 (Handle: 151): Unknown', '000000a2-0000-1000-8000-0026bb765291 (Handle: 30): Unknown', 'a92ee100-5501-11e4-916c-0800200c9a66 (Handle: 8): Unknown', '00000045-0000-1000-8000-0026bb765291 (Handle: 119): Unknown', '0000003e-0000-1000-8000-0026bb765291 (Handle: 44): Unknown', '00000096-0000-1000-8000-0026bb765291 (Handle: 164): Unknown', '0000180a-0000-1000-8000-00805f9b34fb (Handle: 21): Device Information', 'a92ee200-5501-11e4-916c-0800200c9a66 (Handle: 12): Unknown', '00000055-0000-1000-8000-0026bb765291 (Handle: 96): Unknown']
2024-02-29 11:44:35.705 DEBUG (MainThread) [pyNukiBT.nuki] Characteristics ['00000037-0000-1000-8000-0026bb765291 (Handle: 159): Unknown', '00000019-0000-1000-8000-0026bb765291 (Handle: 154): AVDTP', 'e604e95d-a759-4817-87d3-aa005083a0d1 (Handle: 152): Unknown', 'e604e95d-a759-4817-87d3-aa005083a0d1 (Handle: 31): Unknown', '00000037-0000-1000-8000-0026bb765291 (Handle: 33): Unknown', '000000a5-0000-1000-8000-0026bb765291 (Handle: 38): Unknown', 'a92ee101-5501-11e4-916c-0800200c9a66 (Handle: 9): Unknown', '000000a5-0000-1000-8000-0026bb765291 (Handle: 122): Unknown', '0000001d-0000-1000-8000-0026bb765291 (Handle: 128): Unknown', 'e604e95d-a759-4817-87d3-aa005083a0d1 (Handle: 120): Unknown', '00000023-0000-1000-8000-0026bb765291 (Handle: 146): Unknown', '0000001e-0000-1000-8000-0026bb765291 (Handle: 137): MCAP Control Channel', '00000023-0000-1000-8000-0026bb765291 (Handle: 62): Unknown', '000000a6-0000-1000-8000-0026bb765291 (Handle: 82): Unknown', '00000220-0000-1000-8000-0026bb765291 (Handle: 91): Unknown', '00000052-0000-1000-8000-0026bb765291 (Handle: 72): Unknown', 'e604e95d-a759-4817-87d3-aa005083a0d1 (Handle: 45): Unknown', '00000030-0000-1000-8000-0026bb765291 (Handle: 67): Unknown', '00000014-0000-1000-8000-0026bb765291 (Handle: 47): Hardcopy Data Channel', '00000053-0000-1000-8000-0026bb765291 (Handle: 77): Unknown', '00000021-0000-1000-8000-0026bb765291 (Handle: 57): Unknown', '00000020-0000-1000-8000-0026bb765291 (Handle: 52): Unknown', '00000079-0000-1000-8000-0026bb765291 (Handle: 179): Unknown', '00000068-0000-1000-8000-0026bb765291 (Handle: 167): Unknown', '00000023-0000-1000-8000-0026bb765291 (Handle: 185): Unknown', 'e604e95d-a759-4817-87d3-aa005083a0d1 (Handle: 165): Unknown', '0000008f-0000-1000-8000-0026bb765291 (Handle: 173): Unknown', '00002a27-0000-1000-8000-00805f9b34fb (Handle: 24): Hardware Revision String', '00002a26-0000-1000-8000-00805f9b34fb (Handle: 26): Firmware Revision String', '00002a25-0000-1000-8000-00805f9b34fb (Handle: 22): Serial Number String', '00002a24-0000-1000-8000-00805f9b34fb (Handle: 28): Model Number String', 'a92ee201-5501-11e4-916c-0800200c9a66 (Handle: 13): Unknown', 'a92ee202-5501-11e4-916c-0800200c9a66 (Handle: 16): Unknown', 'a92ee203-5501-11e4-916c-0800200c9a66 (Handle: 19): Unknown', '0000004c-0000-1000-8000-0026bb765291 (Handle: 99): Unknown', '0000004e-0000-1000-8000-0026bb765291 (Handle: 104): Unknown', '00000050-0000-1000-8000-0026bb765291 (Handle: 114): Unknown', 'e604e95d-a759-4817-87d3-aa005083a0d1 (Handle: 97): Unknown', '0000004f-0000-1000-8000-0026bb765291 (Handle: 109): Unknown']
2024-02-29 11:44:35.758 INFO (MainThread) [pyNukiBT.nuki] Connected
2024-02-29 11:44:35.763 INFO (MainThread) [pyNukiBT.nuki] sending encrypted command REQUEST_DATA
2024-02-29 11:44:35.763 INFO (MainThread) [pyNukiBT.nuki] Trying to send data. Attempt 1
2024-02-29 11:44:35.764 INFO (MainThread) [pyNukiBT.nuki] Connected
2024-02-29 11:44:35.764 INFO (MainThread) [pyNukiBT.nuki] Sending data to Nuki
2024-02-29 11:44:35.787 INFO (MainThread) [pyNukiBT.nuki] Data sent on attempt 1
2024-02-29 11:44:35.803 DEBUG (MainThread) [pyNukiBT.nuki] Notification handler: a92ee202-5501-11e4-916c-0800200c9a66 (Handle: 16): Unknown, data: bytearray(b'\xbd\xc6)\x18}\xa7F:\xa7+XS\xc4\tq)\x8e+\x94 \xbd\x1c\x8a9\xe0\\4\x002\x00\x80\x93\x7f\x0eX@\x96\xff-\x89\xf1}\x86v\xb1\x9bG\xefQ\x8e\xd9y<\xc6\xc0-F\xb5\xbdV$|\xeb$\xe5\x141u\x03\x01\xc6 B\xa3\\\xea\xdbvW\xd8')
2024-02-29 11:44:35.807 DEBUG (MainThread) [pyNukiBT.nuki] State: Container: 
    nuki_state = (enum) DOOR_MODE 2
    lock_state = (enum) UNDEFINED 255
    trigger = (enum) SYSTEM 0
    current_time = Container: 
        year = 2024
        month = 2
        day = 29
        hour = 10
        minute = 44
        second = 18
    timezone_offset = 0
    critical_battery_state = 200
    config_update_count = 9
    lock_n_go_timer = 0
    last_lock_action = (enum) NONE 0
    last_lock_action_trigger = (enum) SYSTEM 0
    last_lock_action_completion_status = (enum) OTHER_ERROR 254
    door_sensor_state = (enum) UNAVAILABLE 0
    nightmode_active = 0
    accessory_battery_state = 0
2024-02-29 11:44:35.807 INFO (MainThread) [pyNukiBT.nuki] Retrieve nuki configuration
2024-02-29 11:44:35.808 INFO (MainThread) [pyNukiBT.nuki] sending encrypted command REQUEST_DATA
2024-02-29 11:44:35.809 INFO (MainThread) [pyNukiBT.nuki] Trying to send data. Attempt 1
2024-02-29 11:44:35.809 INFO (MainThread) [pyNukiBT.nuki] Connected
2024-02-29 11:44:35.809 INFO (MainThread) [pyNukiBT.nuki] Sending data to Nuki
2024-02-29 11:44:35.832 INFO (MainThread) [pyNukiBT.nuki] Data sent on attempt 1
2024-02-29 11:44:35.849 DEBUG (MainThread) [pyNukiBT.nuki] Notification handler: a92ee202-5501-11e4-916c-0800200c9a66 (Handle: 16): Unknown, data: bytearray(b'\\\x9e7j5\x15n\xa6\xb1\xe7\xf1.\xfaf\xdf\x19\xd0\x7fz\xa1\x02\xdb~V\xe0\\4\x008\x00Ed\x92bhd7\xf5\xd7N<M.\x057l\xdew\xa9J\xed\xd7\xb1\x03\xf1\xd9\xb6\xbb\xf03"\xf9 8\x80:-T\xad%\xb4,\xff\xde\xac\xfbK\xe1\xee\x11\'\xbb\x86\x07\x9a\xf5')
2024-02-29 11:44:35.853 INFO (MainThread) [pyNukiBT.nuki] sending encrypted command REQUEST_LOG_ENTRIES
2024-02-29 11:44:35.854 INFO (MainThread) [pyNukiBT.nuki] Trying to send data. Attempt 1
2024-02-29 11:44:35.854 INFO (MainThread) [pyNukiBT.nuki] Connected
2024-02-29 11:44:35.854 INFO (MainThread) [pyNukiBT.nuki] Sending data to Nuki
2024-02-29 11:44:35.877 INFO (MainThread) [pyNukiBT.nuki] Data sent on attempt 1
2024-02-29 11:44:35.879 DEBUG (MainThread) [pyNukiBT.nuki] Notification handler: a92ee202-5501-11e4-916c-0800200c9a66 (Handle: 16): Unknown, data: bytearray(b"\xeflxV_6)\x87\xa5~wZ!\x0ea\xfc\xc6\xc6-ea\x07\xe4\x10\xe0\\4\x00M\x00\xc5Zl\x08\n\xcfVi+N\xe0\xaf\x16\'`*P\x98\xd3-7\xd3\xe9i1\xd99.zq\xd2c\x9eq\xe1\'\xbe\xdb\x872\xcaK\xeb\xf4\x98@\xaa\xfa\xeb>o\x14b<\xa6\x05)\x93\x84\x9cj\xe1\x1b\x11d\xdb\xd4d\x8d\x8a\x80\xe1`\xbd\xe6x\xd4")
2024-02-29 11:44:35.909 DEBUG (MainThread) [pyNukiBT.nuki] Notification handler: a92ee202-5501-11e4-916c-0800200c9a66 (Handle: 16): Unknown, data: bytearray(b"\x94\'\'#%\xab\x00\xe7\x8a^\x97\xdc\x84\xc6|\xfe`\xe6\x89\x80\x99Y}v\xe0\\4\x00\x19\x00k\x89\xe1@\xf1U\xf6{\'\x87]\x8dM\x12\x88t\x82X\xea\xe7\xe4\xac\xd0\xa8\xdb")
2024-02-29 11:44:35.910 DEBUG (MainThread) [pyNukiBT.nuki] Last action: COMPLETED
2024-02-29 11:44:35.911 DEBUG (MainThread) [pyNukiBT.nuki] Container: 
    status = (enum) COMPLETED 0
2024-02-29 11:44:35.911 DEBUG (MainThread) [pyNukiBT.nuki] [Container(index=13, timestamp=Container(year=2024, month=2, day=29, hour=9, minute=52, second=16), auth_id=4294967295, name=u'', type=uEnumIntegerString.new(4, 'INITIALIZATION_RUN'), data=Container(lock_action=uEnumIntegerString.new(0, 'NONE'), trigger=uEnumIntegerString.new(0, 'SYSTEM'), flags=0, completion_status=uEnumIntegerString.new(254, 'OTHER_ERROR'), padding=None))]
2024-02-29 11:44:35.912 ERROR (MainThread) [custom_components.hass_nuki_bt] XX:XX:XX:XX:XX:XX: Failure while polling
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 119, in _async_update
    elif logs[0].index > self.last_nuki_log_entry.index:
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'dict' object has no attribute 'index'
2024-02-29 11:44:35.926 INFO (MainThread) [pyNukiBT.nuki] Connected
2024-02-29 11:44:35.928 INFO (MainThread) [pyNukiBT.nuki] sending encrypted command REQUEST_DATA
2024-02-29 11:44:35.928 INFO (MainThread) [pyNukiBT.nuki] Trying to send data. Attempt 1
2024-02-29 11:44:35.929 INFO (MainThread) [pyNukiBT.nuki] Connected
2024-02-29 11:44:35.929 INFO (MainThread) [pyNukiBT.nuki] Sending data to Nuki
2024-02-29 11:44:35.952 INFO (MainThread) [pyNukiBT.nuki] Data sent on attempt 1
2024-02-29 11:44:35.955 DEBUG (MainThread) [pyNukiBT.nuki] Notification handler: a92ee202-5501-11e4-916c-0800200c9a66 (Handle: 16): Unknown, data: bytearray(b"\x15\xfa\xb7\xa28`\xff$\xc0\x0ci\n\xd0\x83\x9b\x90\xec\x89%\x952&\xca\xf2\xe0\\4\x008\x00\xa2L\x06\x8aF\xb0\x99JcG/\x9e\x1c\x83\x1e,S\x9a\x8b\xcc>|\xaa\x8b#([%\xf1\'\x1c\x19#\xe2\xc7\xcdGI\x1f\xb6jN\xa3\xbc\xf4\xed:\xca\xee\xe5&\xb3\xc3%\xe0\xd6")
2024-02-29 11:44:35.957 INFO (MainThread) [pyNukiBT.nuki] sending encrypted command REQUEST_CONFIG
2024-02-29 11:44:35.957 INFO (MainThread) [pyNukiBT.nuki] Trying to send data. Attempt 1
2024-02-29 11:44:35.958 INFO (MainThread) [pyNukiBT.nuki] Connected
2024-02-29 11:44:35.958 INFO (MainThread) [pyNukiBT.nuki] Sending data to Nuki
2024-02-29 11:44:35.982 INFO (MainThread) [pyNukiBT.nuki] Data sent on attempt 1
2024-02-29 11:44:35.985 DEBUG (MainThread) [pyNukiBT.nuki] Notification handler: a92ee202-5501-11e4-916c-0800200c9a66 (Handle: 16): Unknown, data: bytearray(b"\'\x0e \x9f \x05 w\x8dK\x17\x00\x1ca\xce\xcap\xf0J?\xf2\xff\x8d\xb8\xe0\\4\x00e\x00C\x8d\x04\x82n\xd5_\x9c\x15C\x18\xb5\xc8\xc6\x80\\\xf2\xf0\xdd\x88\xff\xbb^\xe9F\xfd\xd2\x95\xfa\x0f\x18\x941\x00\xd6\td\x19\x80NR\x0f\x06\xd6+&dM\xbb\x8dN\x9d{f\xb4\xd4\r\x94rp\xf0;e\xb0H\xbd\xe2p H\x1d?/\x91\xba?\xaa\xc7\xa4\x19\x91J\xadM\xbb\xba~\x1fgI\x8a\x9d5\xfcV2\x8ew\xa2\xbbh")
2024-02-29 11:44:35.987 DEBUG (MainThread) [pyNukiBT.nuki] Config: Container: 
    nuki_id = 12345678
    name = u'Home' (total 4)
    latitude = 123
    longitude = 123
    auto_unlatch = 1
    pairing_enabled = 1
    button_enabled = 1
    led_enabled = 1
    led_brightness = 0
    current_time = Container: 
        year = 2024
        month = 2
        day = 29
        hour = 10
        minute = 44
        second = 18
    timezone_offset = 0
    dst_mode = 0
    has_fob = 0
    fob_action_1 = 4
    fob_action_2 = 1
    fob_action_3 = 2
    single_lock = 1
    advertising_mode = (enum) AUTOMATIC 0
    has_keypad = 0
    firmware_version = ListContainer: 
        3
        7
        7
    hardware_revision = ListContainer: 
        4
        10
    homekit_status = 1
    timezone_id = (enum) EUROPE_BERLIN 37
    undocumented = 4
    undocumented2 = 0
    has_keypad_v2 = 0
2024-02-29 11:44:35.988 INFO (MainThread) [pyNukiBT.nuki] request 1 log entries, start=0
2024-02-29 11:44:35.989 INFO (MainThread) [pyNukiBT.nuki] sending encrypted command REQUEST_DATA
2024-02-29 11:44:35.989 INFO (MainThread) [pyNukiBT.nuki] Trying to send data. Attempt 1
2024-02-29 11:44:35.990 INFO (MainThread) [pyNukiBT.nuki] Connected
2024-02-29 11:44:35.990 INFO (MainThread) [pyNukiBT.nuki] Sending data to Nuki
2024-02-29 11:44:36.012 INFO (MainThread) [pyNukiBT.nuki] Data sent on attempt 1
2024-02-29 11:44:36.014 DEBUG (MainThread) [pyNukiBT.nuki] Notification handler: a92ee202-5501-11e4-916c-0800200c9a66 (Handle: 16): Unknown, data: bytearray(b"T\x9b5\xafJ\x02\x9f \xb8\x99\xe0LzI*P\xe5\x83S\xd6\xda\xdd\xbd\xf1\xe0\\4\x008\x00b\'\xc7\xe7\xcb&w\x8do$\xc0WG\x93\tJ\xa9\xef\xd9\xee\t\xd1\x1e\x0bf*\xab\x8a\xe9Sf\xdc\x10\x97\x9a\xbb\x19\x0c\xce\x173\xf1\x84\x8e\xd8){\xd5\xcfY\xc0\xf5n\xd2\x89\x8a")
2024-02-29 11:44:36.016 INFO (MainThread) [pyNukiBT.nuki] sending encrypted command REQUEST_LOG_ENTRIES
2024-02-29 11:44:36.017 INFO (MainThread) [pyNukiBT.nuki] Trying to send data. Attempt 1
2024-02-29 11:44:36.017 INFO (MainThread) [pyNukiBT.nuki] Connected
2024-02-29 11:44:36.017 INFO (MainThread) [pyNukiBT.nuki] Sending data to Nuki
2024-02-29 11:44:36.042 INFO (MainThread) [pyNukiBT.nuki] Data sent on attempt 1
2024-02-29 11:44:36.045 DEBUG (MainThread) [pyNukiBT.nuki] Notification handler: a92ee202-5501-11e4-916c-0800200c9a66 (Handle: 16): Unknown, data: bytearray(b'\t\xcaU\xc3\xa2\xc2\xbeA\xf5\xfb\xe8\xd9\xce{x\xcb\xbc[\x95\x06\xdb\xc3\x91q\xe0\\4\x00M\x00p\xb1e\xd5gL\x1fe\xb8w\xea\xa8\xf7\xbc\x08\x97~#\xb7E[\xeeS\xcc\x97s\x91H\xcf\xc8\xc6@\x88\xfc\xbbfm5&\xfd.2\xc4R\xd5\xf4\xb5\xdc3\xd3~\xbe\xa4_\xdf?\x84\xd9\t\xd4v\xf8\x85\x08F\x03\xb7\xaf\x85\t\t\x07K\xa3\xf7\xd1J')
2024-02-29 11:44:36.073 DEBUG (MainThread) [pyNukiBT.nuki] Notification handler: a92ee202-5501-11e4-916c-0800200c9a66 (Handle: 16): Unknown, data: bytearray(b"\x059\x90\xd0w-=\x1eU\xdb\xdfj\x16\x7f\xa3\x00/!V\\\xc7\x8b*\xbc\xe0\\4\x00\x19\x00\xfb\xec\xff5\xb9\xc9\xeae\xf1j\xad|\xac\xf3\x00\xb0Q\'\xde\xa1\x1d\xe1r\t\xae")
2024-02-29 11:44:36.077 DEBUG (MainThread) [pyNukiBT.nuki] Last action: COMPLETED
2024-02-29 11:44:36.078 DEBUG (MainThread) [pyNukiBT.nuki] Container: 
    status = (enum) COMPLETED 0
2024-02-29 11:44:36.079 DEBUG (MainThread) [pyNukiBT.nuki] [Container(index=13, timestamp=Container(year=2024, month=2, day=29, hour=9, minute=52, second=16), auth_id=4294967295, name=u'', type=uEnumIntegerString.new(4, 'INITIALIZATION_RUN'), data=Container(lock_action=uEnumIntegerString.new(0, 'NONE'), trigger=uEnumIntegerString.new(0, 'SYSTEM'), flags=0, completion_status=uEnumIntegerString.new(254, 'OTHER_ERROR'), padding=None))]
2024-02-29 11:44:36.080 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Nuki_2E02EC7C 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 119, in _async_update
    elif logs[0].index > self.last_nuki_log_entry.index:
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'dict' object has no attribute 'index'

Diagnostics dump

No response

leranp commented 8 months ago

Same here, i suspect that this is a HA version issue, i started after the update of 2024.3.1

ambernardino commented 8 months ago

Same here, but I think this is a bluetooth connection issue. Did you disabled bluetooth pairing in the lock itself?

011V32 commented 8 months ago

Same for me. Hope it get an fix 😟