ronengr / hass_nuki_bt

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

Add support for Nuki Opener #10

Open bliepp opened 10 months ago

bliepp commented 10 months ago

Checklist

Is your feature request related to a problem? Please describe.

Right now (as far as I understand the source code) only Nuki SmartLocks are supported. It would be nice to have the ability to use Nuki Openers with this intgration as well.

Describe the solution you'd like

The Nuki Opener API seems to be implemented in PyNukiBT as far as I understand (at least there are the correct API constants available, but the actual implementation might have some flaws - I'm not sure about that, though, as I was unable to test it,).

Describe alternatives you've considered

Buying a Bridge or using a Nuki Hub or the ESPHome extension, but I want to avoid extra hardware.

Additional context

None

bliepp commented 10 months ago

I did a quick dive into the source and I think it's basically these methods that need to be modified (+ some additional code for the Opener's specific features that differ from a regular Nuki Smart Lock like RingToOpen, Doorbell Detection+Suppression, ...):

https://github.com/ronengr/hass_nuki_bt/blob/6270b2729b9abb3183e7000dbc92518f23614732/custom_components/hass_nuki_bt/lock.py#L63-L73

The provided constants should be NukiOpenerConst.LockAction.<###> where <###> is whatever the lock action for a Opener should be (NukiHub and the official integration that needs the bridge use the lock/unlock mechanism to toggle Ring To Open or Continuous Mode as far as I know, so (DE)ACTIVATE_CM would make sense for (un)lock and ELECTRIC_STRIKE_ACTUATION for opening).

ronengr commented 10 months ago

I would love to add support for Nuki Opener. Unfortunately I don't have one and am not really familiar with it and it's functionality. I did my best to keep the support from it in PyNukiBT, but as i have no way to test it i'm not sure if it really works.

If you have an opener and are interested in adding the necessary code changes, I would gladly add them. Please let me know if there is any way I can help.

bliepp commented 10 months ago

Thanks for the reply. I'm already digging through the code and try my best, but I can hardly tell if I will succeed as I have absolutely no experience in developing integrations for Home Assistant. Guess I'll try to make the features work step by step and we'll see how far I come. What' the best way to ask further (and probably more detailed) questions? Do you prefer general questions being asked here or would you prefer activating Github Discussions to keep offtopic questions separate?

ronengr commented 10 months ago

I also don't have any experience in developing HA integrations. This is my first one :-) Regarding further questions - whatever you prefer. I've activated Github Discussions (or at least i think i did), but this is not a very active repo so you can continue asking here.

One advice i can already give you is to first verify the pyNukiBT part is working. The way i did it was using my modified version of RaspiNukiBridge that i changed to use pyNukiBT. This way you can let RaspiNukiBridge manage and save the lock credentials and use curl to send/receive commands. I tried to keep things generic so they wold work with the opener, but as i said i had no way to test so i have no idea if it actually works.

Once pyNukiBT works with the opener, changing the HA integration should be the easy part.

bliepp commented 10 months ago

Thanks for the advice. That will probably save me hours of debugging 😅

I'm gonna test pyNukiBT over the weekend. From first sight I spotted some potential pitfalls.

bliepp commented 10 months ago

Okay, so I couldn't make your modified version of RaspiNukiBridge work due to some async/await errors, so I'm currently writing my own test environment for pyNukiBT. It looks promising so far, as I was able to pair and pyNukiBT seems to recognize my Opener as an Nuki Opener device, but until now trying to communicate with it (e.g. retrieving its config) doesn't work properly. There's a parser error occuring (stating the stream read less than specified amount) thus leading to a timeout.

Not sure if it's a package error or just me being confused.

ronengr commented 10 months ago

Can you share the error log you are getting with RaspiNukiBridge?

Also can you share the log of pyNukiBT's parsing issue?

mayabe I can understand the issue from the logs

bklaesener commented 8 months ago

Hi, not OP but this is what I get when trying to set up a Nuki Opener with hass_nuki_bt:

Error setting up entry Nuki_Opener_BT for hass_nuki_bt Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 399, in async_setup result = await component.async_setup_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/hass_nuki_bt/init.py", line 79, in async_setup_entry if not await coordinator.async_wait_ready(): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/hass_nuki_bt/coordinator.py", line 148, in async_wait_ready await self._async_update() File "/config/custom_components/hass_nuki_bt/coordinator.py", line 108, in _async_update await self.device.update_state() File "/usr/local/lib/python3.11/site-packages/pyNukiBT/nuki.py", line 423, in update_state await self.connect() # connect so we can identify the device type and update self._const accordingly ^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/pyNukiBT/nuki.py", line 399, in connect await self._safe_start_notify( File "/usr/local/lib/python3.11/site-packages/pyNukiBT/nuki.py", line 370, in _safe_start_notify await self._client.start_notify(*args) File "/usr/local/lib/python3.11/site-packages/bleak/init.py", line 822, in start_notify raise BleakError(f"Characteristic {char_specifier} not found!") bleak.exc.BleakError: Characteristic a92ee101-5501-11e4-916c-0800200c9a66 not found!

bliepp commented 7 months ago

Sorry for not answering for a while. I got caught up with uni (exams and stuff).

@bklaesener If I remember correctly this is the same error I got. It basically says that pairing failed. Actually pairing an Opener isn't currently possible with this project, so making sure the underlying package works is the first step. To further test the PyNukiBt package against the Opener I wrote a utility script that verifies pairing an Opener is technically possible, but there are some errors when actually communicating (e.g. requesting the current config results in some error). Expect my script to be posted here soon.

bliepp commented 7 months ago

Okay, here's my test script as well as the error message I get. When pairing the Opener it actually just times out and I don't know why. Above I wrote that pairing worked in the past and it just failed when actually connecting to the Opener (e.g. for requesting data), but even that isn't the case anymore (although the system is exactly the same).

Here's my test environment: https://github.com/ronengr/hass_nuki_bt/files/13328487/testenv.zip It's basically a minimal example of this project by copying and pasting the relevant parts into one script. Make sure you have PyNukiBt installed.

To use it, activate pairing mode on your Opener by pressing the button for 6 seconds until the LED is blinking. Then run the script. It will search for BLE devices called Nuki_Opener_<gibberish>, pair with the first one it finds and print the device's connection data and type on success. It then connects to it, attempts to update the config to gain info about the battery percentage. In the attached zip file there's also a log.txtfile with the scripts output on my machine.

ronengr commented 7 months ago

Looking at the logs it seems to try to connect using the Lock BLE char. my guess, the code that should recognize if it is a lock or an opener (and set the self._const accordingly) is not identifying the opener correctly.

Looking at the code, the way it identifies Nuki type is by checking for NukiOpenerConst.BLE_PAIRING_CHAR in the ble Characteristics and if it is not there it assumes its a lock.

maybe the BLE IDs for the opener i have are wrong?

could you try again with debug logs enabled? there is a debug log that prints the services and all the Characteristics of the device before trying to connect. this way we can find out if we have the correct char id or not

nico1510 commented 4 months ago

Hey @ronengr I'm not the original poster but ran into the same issue. The BLE IDs for the opener seem to be correct but I'm not experienced with bluetooth at all. To me the debug logs seem to indicate that connection is successful but parsing the messages from the opener fails. Here are my debug logs please let me know if you have any pointers for me :slightly_smiling_face:

vscode ➜ /workspaces/hass_nuki_bt (main) $ ./scripts/develop 
2024-03-01 07:50:46.228 WARNING (SyncWorker_0) [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-01 07:50:59.031 WARNING (MainThread) [asyncio] Executing <Task pending name='setup component analytics' coro=<_async_setup_component() running at /home/vscode/.local/lib/python3.10/site-packages/homeassistant/setup.py:288> wait_for=<Task pending name='Storage load core.analytics' coro=<Store._async_load() running at /home/vscode/.local/lib/python3.10/site-packages/homeassistant/helpers/storage.py:124> cb=[set.remove(), Task.task_wakeup()] created at /home/vscode/.local/lib/python3.10/site-packages/homeassistant/core.py:560> cb=[set.remove(), Task.task_wakeup()] created at /home/vscode/.local/lib/python3.10/site-packages/homeassistant/core.py:560> took 0.349 seconds
2024-03-01 07:51:08.084 WARNING (MainThread) [homeassistant.components.debugpy] Listening for remote debug connection on 0.0.0.0:5678
2024-03-01 07:52:22.433 WARNING (MainThread) [asyncio] Executing <Task pending name='setup component ssdp' coro=<_async_setup_component() running at /home/vscode/.local/lib/python3.10/site-packages/homeassistant/setup.py:288> wait_for=<_GatheringFuture pending cb=[Task.task_wakeup()] created at /usr/local/lib/python3.10/asyncio/tasks.py:665> cb=[set.remove(), Task.task_wakeup()] created at /home/vscode/.local/lib/python3.10/site-packages/homeassistant/core.py:560> took 0.120 seconds
2024-03-01 07:52:36.184 WARNING (MainThread) [asyncio] Executing <Task pending name='setup component cloud' coro=<_async_setup_component() running at /home/vscode/.local/lib/python3.10/site-packages/homeassistant/setup.py:288> wait_for=<Task pending name='Storage load cloud' coro=<Store._async_load() running at /home/vscode/.local/lib/python3.10/site-packages/homeassistant/helpers/storage.py:124> cb=[set.remove(), Task.task_wakeup()] created at /home/vscode/.local/lib/python3.10/site-packages/homeassistant/core.py:560> cb=[set.remove(), Task.task_wakeup()] created at /home/vscode/.local/lib/python3.10/site-packages/homeassistant/core.py:560> took 0.754 seconds
2024-03-01 07:52:36.219 ERROR (MainThread) [homeassistant.bootstrap] Error setting up integration bluetooth - received exception
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 3108, in _dep_map
    return self.__dep_map
  File "/usr/local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 2901, in __getattr__
    raise AttributeError(attr)
AttributeError: _DistInfoDistribution__dep_map

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 3099, in _parsed_pkg_info
    return self._pkg_info
  File "/usr/local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 2901, in __getattr__
    raise AttributeError(attr)
AttributeError: _pkg_info

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/vscode/.local/lib/python3.10/site-packages/homeassistant/setup.py", line 102, in async_setup_component
    return await task
  File "/home/vscode/.local/lib/python3.10/site-packages/homeassistant/setup.py", line 207, in _async_setup_component
    await async_process_deps_reqs(hass, config, integration)
  File "/home/vscode/.local/lib/python3.10/site-packages/homeassistant/setup.py", line 420, in async_process_deps_reqs
    await requirements.async_get_integration_with_requirements(
  File "/home/vscode/.local/lib/python3.10/site-packages/homeassistant/requirements.py", line 52, in async_get_integration_with_requirements
    return await manager.async_get_integration_with_requirements(domain)
  File "/home/vscode/.local/lib/python3.10/site-packages/homeassistant/requirements.py", line 171, in async_get_integration_with_requirements
    await self._async_process_integration(integration, done)
  File "/home/vscode/.local/lib/python3.10/site-packages/homeassistant/requirements.py", line 186, in _async_process_integration
    await self.async_process_requirements(
  File "/home/vscode/.local/lib/python3.10/site-packages/homeassistant/requirements.py", line 252, in async_process_requirements
    await self._async_process_requirements(name, missing)
  File "/home/vscode/.local/lib/python3.10/site-packages/homeassistant/requirements.py", line 284, in _async_process_requirements
    installed, failures = await self.hass.async_add_executor_job(
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/vscode/.local/lib/python3.10/site-packages/homeassistant/requirements.py", line 113, in _install_requirements_if_missing
    if pkg_util.is_installed(req) or _install_with_retry(req, kwargs):
  File "/home/vscode/.local/lib/python3.10/site-packages/homeassistant/util/package.py", line 40, in is_installed
    pkg_resources.get_distribution(package)
  File "/usr/local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 526, in get_distribution
    dist = get_provider(dist)
  File "/usr/local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 398, in get_provider
    return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
  File "/usr/local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 966, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 832, in resolve
    new_requirements = dist.requires(req.extras)[::-1]
  File "/usr/local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 2821, in requires
    dm = self._dep_map
  File "/usr/local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 3110, in _dep_map
    self.__dep_map = self._compute_dependencies()
  File "/usr/local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 3119, in _compute_dependencies
    for req in self._parsed_pkg_info.get_all('Requires-Dist') or []:
  File "/usr/local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 3101, in _parsed_pkg_info
    metadata = self.get_metadata(self.PKG_INFO)
  File "/usr/local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 1517, in get_metadata
    value = self._get(path)
  File "/usr/local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 1726, in _get
    with open(path, 'rb') as stream:
FileNotFoundError: [Errno 2] No such file or directory: '/home/vscode/.local/lib/python3.10/site-packages/dbus_fast-2.21.1.dist-info/METADATA'
2024-03-01 07:52:36.550 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: counter, input_select, zone, input_number, input_text, history, stt, homeassistant_alerts, input_boolean, trace, sun, timer, hardware, blueprint, scene, input_button, input_datetime, tag, tts, schedule, conversation
2024-03-01 07:52:43.671 ERROR (MainThread) [homeassistant.bootstrap] Error setting up integration default_config - received exception
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 3108, in _dep_map
    return self.__dep_map
  File "/usr/local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 2901, in __getattr__
    raise AttributeError(attr)
AttributeError: _DistInfoDistribution__dep_map

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 3099, in _parsed_pkg_info
    return self._pkg_info
  File "/usr/local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 2901, in __getattr__
    raise AttributeError(attr)
AttributeError: _pkg_info

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/vscode/.local/lib/python3.10/site-packages/homeassistant/setup.py", line 102, in async_setup_component
    return await task
  File "/home/vscode/.local/lib/python3.10/site-packages/homeassistant/setup.py", line 207, in _async_setup_component
    await async_process_deps_reqs(hass, config, integration)
  File "/home/vscode/.local/lib/python3.10/site-packages/homeassistant/setup.py", line 416, in async_process_deps_reqs
    if failed_deps := await _async_process_dependencies(hass, config, integration):
  File "/home/vscode/.local/lib/python3.10/site-packages/homeassistant/setup.py", line 150, in _async_process_dependencies
    results = await asyncio.gather(
  File "/home/vscode/.local/lib/python3.10/site-packages/homeassistant/setup.py", line 95, in async_setup_component
    return await setup_tasks[domain]
FileNotFoundError: [Errno 2] No such file or directory: '/home/vscode/.local/lib/python3.10/site-packages/dbus_fast-2.21.1.dist-info/METADATA'
2024-03-01 07:52:43.694 WARNING (MainThread) [homeassistant.bootstrap] Support for the running Python version 3.10.12 is deprecated and will be removed in Home Assistant 2023.8; Please upgrade Python to 3.11
2024-03-01 07:52:44.161 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved:   File "/home/vscode/.local/bin/hass", line 8, in <module>
    sys.exit(main())
  File "/home/vscode/.local/lib/python3.10/site-packages/homeassistant/__main__.py", line 214, in main
    exit_code = runner.run(runtime_conf)
  File "/home/vscode/.local/lib/python3.10/site-packages/homeassistant/runner.py", line 179, in run
    return loop.run_until_complete(setup_and_run_hass(runtime_config))
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 636, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 603, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1901, in _run_once
    handle._run()
  File "/usr/local/lib/python3.10/asyncio/events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
  File "/home/vscode/.local/lib/python3.10/site-packages/homeassistant/core.py", line 1186, in _onetime_listener
    self._hass.async_run_job(listener, event)
  File "/home/vscode/.local/lib/python3.10/site-packages/homeassistant/core.py", line 675, in async_run_job
    return self.async_run_hass_job(HassJob(target), *args)
  File "/home/vscode/.local/lib/python3.10/site-packages/homeassistant/core.py", line 630, in async_run_hass_job
    return self.async_add_hass_job(hassjob, *args)
  File "/home/vscode/.local/lib/python3.10/site-packages/homeassistant/core.py", line 524, in async_add_hass_job
    task = self.loop.create_task(hassjob.target(*args), name=hassjob.name)
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 3108, in _dep_map
    return self.__dep_map
  File "/usr/local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 2901, in __getattr__
    raise AttributeError(attr)
AttributeError: _DistInfoDistribution__dep_map

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 3099, in _parsed_pkg_info
    return self._pkg_info
  File "/usr/local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 2901, in __getattr__
    raise AttributeError(attr)
AttributeError: _pkg_info

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/vscode/.local/lib/python3.10/site-packages/homeassistant/setup.py", line 95, in async_setup_component
    return await setup_tasks[domain]
FileNotFoundError: [Errno 2] No such file or directory: '/home/vscode/.local/lib/python3.10/site-packages/dbus_fast-2.21.1.dist-info/METADATA'
2024-03-01 07:52:52.169 WARNING (MainThread) [asyncio] Executing <Task finished name='config entry flow apple_tv 58a6de50e3d67b9d2e57346cc16a9519' coro=<ConfigEntriesFlowManager._async_init() done, defined at /home/vscode/.local/lib/python3.10/site-packages/homeassistant/config_entries.py:866> result=(<homeassistan...x7fbe9ddabbb0>, {'description_placeholders': None, 'flow_id': '58a6de50e3d6...7346cc16a9519', 'handler': 'apple_tv', 'reason': 'unknown', ...}) created at /usr/local/lib/python3.10/asyncio/tasks.py:337> took 0.144 seconds
2024-03-01 07:53:25.485 WARNING (MainThread) [asyncio] Executing <Task finished name='config entry flow xiaomi_miio 5b263adf6bc27cf10cb37efcca66931c' coro=<ConfigEntriesFlowManager._async_init() done, defined at /home/vscode/.local/lib/python3.10/site-packages/homeassistant/config_entries.py:866> result=(<homeassistan...x7fbe9cfae380>, {'description_placeholders': None, 'flow_id': '5b263adf6bc2...37efcca66931c', 'handler': 'xiaomi_miio', 'reason': 'not_xiaomi_miio', ...}) created at /usr/local/lib/python3.10/asyncio/tasks.py:337> took 0.544 seconds
2024-03-01 07:53:30.159 WARNING (MainThread) [asyncio] Executing <Task finished name='config entry flow xiaomi_aqara 30315a3d75ac3f3ff3975b3915c2660e' coro=<ConfigEntriesFlowManager._async_init() done, defined at /home/vscode/.local/lib/python3.10/site-packages/homeassistant/config_entries.py:866> result=(<homeassistan...x7fbe9dfa5210>, {'description_placeholders': None, 'flow_id': '30315a3d75ac...75b3915c2660e', 'handler': 'xiaomi_aqara', 'reason': 'not_xiaomi_aqara', ...}) created at /usr/local/lib/python3.10/asyncio/tasks.py:337> took 0.264 seconds
2024-03-01 07:53:53.250 WARNING (MainThread) [asyncio] Executing <Task pending name='config entry flow upnp 8c191759afa85cb8a72f1829cb4d78de' coro=<ConfigEntriesFlowManager._async_init() running at /home/vscode/.local/lib/python3.10/site-packages/homeassistant/config_entries.py:884> wait_for=<Future pending cb=[_chain_future.<locals>._call_check_cancel() at /usr/local/lib/python3.10/asyncio/futures.py:385, <1 more>, Task.task_wakeup()] created at /usr/local/lib/python3.10/asyncio/base_events.py:429> cb=[Task.task_wakeup()] created at /usr/local/lib/python3.10/asyncio/tasks.py:337> took 0.110 seconds
^C^CTraceback (most recent call last):
  File "/home/vscode/.local/lib/python3.10/site-packages/debugpy/_vendored/pydevd/pydevd.py", line 2299, in __wait_for_threads_to_finish
    time.sleep(1 / 10.)
  File "/home/vscode/.local/lib/python3.10/site-packages/homeassistant/util/async_.py", line 167, in protected_loop_func
    return func(*args, **kwargs)
KeyboardInterrupt
vscode ➜ /workspaces/hass_nuki_bt (main) $ ^C
vscode ➜ /workspaces/hass_nuki_bt (main) $ pip install -r requirements.txt 
Defaulting to user installation because normal site-packages is not writeable
Collecting pyNukiBT@ git+https://github.com/ronengr/pyNukiBT.git@main
  Cloning https://github.com/ronengr/pyNukiBT.git (to revision main) to /tmp/pip-install-f5gsrl0_/pynukibt_39573c98aa3a4eb5bd28d399f976c79a
  Running command git clone --filter=blob:none --quiet https://github.com/ronengr/pyNukiBT.git /tmp/pip-install-f5gsrl0_/pynukibt_39573c98aa3a4eb5bd28d399f976c79a
  Resolved https://github.com/ronengr/pyNukiBT.git to commit 5dc7edaa7f7cb2ef3f04e7345ab3e12b547cd384
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: colorlog in /home/vscode/.local/lib/python3.10/site-packages (from -r requirements.txt (line 1)) (6.8.2)
Requirement already satisfied: homeassistant in /home/vscode/.local/lib/python3.10/site-packages (from -r requirements.txt (line 2)) (2023.7.3)
Requirement already satisfied: pip in /usr/local/lib/python3.10/site-packages (from -r requirements.txt (line 3)) (23.0.1)
Requirement already satisfied: ruff in /home/vscode/.local/lib/python3.10/site-packages (from -r requirements.txt (line 4)) (0.3.0)
Collecting dbus-fast==2.21.1
  Using cached dbus_fast-2.21.1-cp310-cp310-manylinux_2_31_x86_64.whl (4.0 MB)
Requirement already satisfied: lru-dict==1.2.0 in /home/vscode/.local/lib/python3.10/site-packages (from homeassistant->-r requirements.txt (line 2)) (1.2.0)
Requirement already satisfied: PyJWT==2.7.0 in /home/vscode/.local/lib/python3.10/site-packages (from homeassistant->-r requirements.txt (line 2)) (2.7.0)
Requirement already satisfied: ifaddr==0.2.0 in /home/vscode/.local/lib/python3.10/site-packages (from homeassistant->-r requirements.txt (line 2)) (0.2.0)
Requirement already satisfied: aiohttp==3.8.5 in /home/vscode/.local/lib/python3.10/site-packages (from homeassistant->-r requirements.txt (line 2)) (3.8.5)
Requirement already satisfied: requests==2.31.0 in /home/vscode/.local/lib/python3.10/site-packages (from homeassistant->-r requirements.txt (line 2)) (2.31.0)
Requirement already satisfied: astral==2.2 in /home/vscode/.local/lib/python3.10/site-packages (from homeassistant->-r requirements.txt (line 2)) (2.2)
Requirement already satisfied: async-timeout==4.0.2 in /home/vscode/.local/lib/python3.10/site-packages (from homeassistant->-r requirements.txt (line 2)) (4.0.2)
Requirement already satisfied: atomicwrites-homeassistant==1.4.1 in /home/vscode/.local/lib/python3.10/site-packages (from homeassistant->-r requirements.txt (line 2)) (1.4.1)
Requirement already satisfied: PyYAML==6.0.1 in /home/vscode/.local/lib/python3.10/site-packages (from homeassistant->-r requirements.txt (line 2)) (6.0.1)
Requirement already satisfied: Jinja2==3.1.2 in /home/vscode/.local/lib/python3.10/site-packages (from homeassistant->-r requirements.txt (line 2)) (3.1.2)
Requirement already satisfied: yarl==1.9.2 in /home/vscode/.local/lib/python3.10/site-packages (from homeassistant->-r requirements.txt (line 2)) (1.9.2)
Requirement already satisfied: python-slugify==4.0.1 in /home/vscode/.local/lib/python3.10/site-packages (from homeassistant->-r requirements.txt (line 2)) (4.0.1)
Requirement already satisfied: voluptuous==0.13.1 in /home/vscode/.local/lib/python3.10/site-packages (from homeassistant->-r requirements.txt (line 2)) (0.13.1)
Requirement already satisfied: httpx==0.24.1 in /home/vscode/.local/lib/python3.10/site-packages (from homeassistant->-r requirements.txt (line 2)) (0.24.1)
Requirement already satisfied: ulid-transform==0.7.2 in /home/vscode/.local/lib/python3.10/site-packages (from homeassistant->-r requirements.txt (line 2)) (0.7.2)
Requirement already satisfied: voluptuous-serialize==2.6.0 in /home/vscode/.local/lib/python3.10/site-packages (from homeassistant->-r requirements.txt (line 2)) (2.6.0)
Requirement already satisfied: typing-extensions<5.0,>=4.6.3 in /home/vscode/.local/lib/python3.10/site-packages (from homeassistant->-r requirements.txt (line 2)) (4.10.0)
Requirement already satisfied: pyOpenSSL==23.2.0 in /home/vscode/.local/lib/python3.10/site-packages (from homeassistant->-r requirements.txt (line 2)) (23.2.0)
Requirement already satisfied: awesomeversion==22.9.0 in /home/vscode/.local/lib/python3.10/site-packages (from homeassistant->-r requirements.txt (line 2)) (22.9.0)
Requirement already satisfied: certifi>=2021.5.30 in /home/vscode/.local/lib/python3.10/site-packages (from homeassistant->-r requirements.txt (line 2)) (2024.2.2)
Requirement already satisfied: bcrypt==4.0.1 in /home/vscode/.local/lib/python3.10/site-packages (from homeassistant->-r requirements.txt (line 2)) (4.0.1)
Requirement already satisfied: cryptography==41.0.1 in /home/vscode/.local/lib/python3.10/site-packages (from homeassistant->-r requirements.txt (line 2)) (41.0.1)
Requirement already satisfied: orjson==3.9.1 in /home/vscode/.local/lib/python3.10/site-packages (from homeassistant->-r requirements.txt (line 2)) (3.9.1)
Requirement already satisfied: ciso8601==2.3.0 in /home/vscode/.local/lib/python3.10/site-packages (from homeassistant->-r requirements.txt (line 2)) (2.3.0)
Requirement already satisfied: attrs==22.2.0 in /home/vscode/.local/lib/python3.10/site-packages (from homeassistant->-r requirements.txt (line 2)) (22.2.0)
Requirement already satisfied: home-assistant-bluetooth==1.10.0 in /home/vscode/.local/lib/python3.10/site-packages (from homeassistant->-r requirements.txt (line 2)) (1.10.0)
Requirement already satisfied: aiosignal>=1.1.2 in /home/vscode/.local/lib/python3.10/site-packages (from aiohttp==3.8.5->homeassistant->-r requirements.txt (line 2)) (1.3.1)
Requirement already satisfied: multidict<7.0,>=4.5 in /home/vscode/.local/lib/python3.10/site-packages (from aiohttp==3.8.5->homeassistant->-r requirements.txt (line 2)) (6.0.5)
Requirement already satisfied: charset-normalizer<4.0,>=2.0 in /home/vscode/.local/lib/python3.10/site-packages (from aiohttp==3.8.5->homeassistant->-r requirements.txt (line 2)) (3.3.2)
Requirement already satisfied: frozenlist>=1.1.1 in /home/vscode/.local/lib/python3.10/site-packages (from aiohttp==3.8.5->homeassistant->-r requirements.txt (line 2)) (1.4.1)
Requirement already satisfied: pytz in /home/vscode/.local/lib/python3.10/site-packages (from astral==2.2->homeassistant->-r requirements.txt (line 2)) (2024.1)
Requirement already satisfied: cffi>=1.12 in /home/vscode/.local/lib/python3.10/site-packages (from cryptography==41.0.1->homeassistant->-r requirements.txt (line 2)) (1.16.0)
Requirement already satisfied: idna in /home/vscode/.local/lib/python3.10/site-packages (from httpx==0.24.1->homeassistant->-r requirements.txt (line 2)) (3.6)
Requirement already satisfied: sniffio in /home/vscode/.local/lib/python3.10/site-packages (from httpx==0.24.1->homeassistant->-r requirements.txt (line 2)) (1.3.1)
Requirement already satisfied: httpcore<0.18.0,>=0.15.0 in /home/vscode/.local/lib/python3.10/site-packages (from httpx==0.24.1->homeassistant->-r requirements.txt (line 2)) (0.17.3)
Requirement already satisfied: MarkupSafe>=2.0 in /home/vscode/.local/lib/python3.10/site-packages (from Jinja2==3.1.2->homeassistant->-r requirements.txt (line 2)) (2.1.5)
Requirement already satisfied: text-unidecode>=1.3 in /home/vscode/.local/lib/python3.10/site-packages (from python-slugify==4.0.1->homeassistant->-r requirements.txt (line 2)) (1.3)
Requirement already satisfied: urllib3<3,>=1.21.1 in /home/vscode/.local/lib/python3.10/site-packages (from requests==2.31.0->homeassistant->-r requirements.txt (line 2)) (2.0.7)
Requirement already satisfied: pynacl>=1.3.0 in /home/vscode/.local/lib/python3.10/site-packages (from pyNukiBT@ git+https://github.com/ronengr/pyNukiBT.git@main->-r requirements.txt (line 5)) (1.5.0)
Collecting construct>=2.10.68
  Using cached construct-2.10.70-py3-none-any.whl (63 kB)
Requirement already satisfied: crccheck>=1.3.0 in /home/vscode/.local/lib/python3.10/site-packages (from pyNukiBT@ git+https://github.com/ronengr/pyNukiBT.git@main->-r requirements.txt (line 5)) (1.3.0)
Requirement already satisfied: bleak>=0.20 in /home/vscode/.local/lib/python3.10/site-packages (from pyNukiBT@ git+https://github.com/ronengr/pyNukiBT.git@main->-r requirements.txt (line 5)) (0.20.2)
Collecting bleak>=0.20
  Using cached bleak-0.21.1-py3-none-any.whl (137 kB)
Requirement already satisfied: pycparser in /home/vscode/.local/lib/python3.10/site-packages (from cffi>=1.12->cryptography==41.0.1->homeassistant->-r requirements.txt (line 2)) (2.21)
Requirement already satisfied: h11<0.15,>=0.13 in /home/vscode/.local/lib/python3.10/site-packages (from httpcore<0.18.0,>=0.15.0->httpx==0.24.1->homeassistant->-r requirements.txt (line 2)) (0.14.0)
Requirement already satisfied: anyio<5.0,>=3.0 in /home/vscode/.local/lib/python3.10/site-packages (from httpcore<0.18.0,>=0.15.0->httpx==0.24.1->homeassistant->-r requirements.txt (line 2)) (4.3.0)
Requirement already satisfied: exceptiongroup>=1.0.2 in /home/vscode/.local/lib/python3.10/site-packages (from anyio<5.0,>=3.0->httpcore<0.18.0,>=0.15.0->httpx==0.24.1->homeassistant->-r requirements.txt (line 2)) (1.2.0)
Installing collected packages: dbus-fast, construct, bleak
  Attempting uninstall: dbus-fast
    Found existing installation: dbus-fast 1.86.0
    Uninstalling dbus-fast-1.86.0:
      Successfully uninstalled dbus-fast-1.86.0
  Attempting uninstall: construct
    Found existing installation: construct 2.10.56
    Uninstalling construct-2.10.56:
      Successfully uninstalled construct-2.10.56
  Attempting uninstall: bleak
    Found existing installation: bleak 0.20.2
    Uninstalling bleak-0.20.2:
      Successfully uninstalled bleak-0.20.2
Successfully installed bleak-0.21.1 construct-2.10.70 dbus-fast-2.21.1

[notice] A new release of pip is available: 23.0.1 -> 24.0
[notice] To update, run: pip install --upgrade pip
vscode ➜ /workspaces/hass_nuki_bt (main) $ ^C
vscode ➜ /workspaces/hass_nuki_bt (main) $ ^C
vscode ➜ /workspaces/hass_nuki_bt (main) $ stat /home/vscode/.local/lib/python3.10/site-packages/dbus_fast-2.21.1.dist-info/METADATA
  File: /home/vscode/.local/lib/python3.10/site-packages/dbus_fast-2.21.1.dist-info/METADATA
  Size: 10658           Blocks: 24         IO Block: 4096   regular file
Device: 33h/51d Inode: 7632775     Links: 1
Access: (0644/-rw-r--r--)  Uid: ( 1000/  vscode)   Gid: ( 1000/  vscode)
Access: 2024-03-01 07:56:32.039187237 +0000
Modify: 2024-03-01 07:55:47.999160574 +0000
Change: 2024-03-01 07:55:47.999160574 +0000
 Birth: 2024-03-01 07:55:47.999160574 +0000
vscode ➜ /workspaces/hass_nuki_bt (main) $ python --version
Python 3.10.12
vscode ➜ /workspaces/hass_nuki_bt (main) $ ./scripts/develop 
2024-03-01 07:57:07.963 WARNING (SyncWorker_0) [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-01 07:57:08.721 WARNING (MainThread) [asyncio] Executing <Task pending name='setup component analytics' coro=<_async_setup_component() running at /home/vscode/.local/lib/python3.10/site-packages/homeassistant/setup.py:288> wait_for=<Task pending name='Storage load core.analytics' coro=<Store._async_load() running at /home/vscode/.local/lib/python3.10/site-packages/homeassistant/helpers/storage.py:124> cb=[set.remove(), Task.task_wakeup()] created at /home/vscode/.local/lib/python3.10/site-packages/homeassistant/core.py:560> cb=[set.remove(), Task.task_wakeup()] created at /home/vscode/.local/lib/python3.10/site-packages/homeassistant/core.py:560> took 0.432 seconds
2024-03-01 07:57:09.084 WARNING (MainThread) [homeassistant.components.debugpy] Listening for remote debug connection on 0.0.0.0:5678
2024-03-01 07:57:21.164 WARNING (MainThread) [asyncio] Executing <Task finished name='Task-225' coro=<RequestHandler._handle_request() done, defined at /home/vscode/.local/lib/python3.10/site-packages/aiohttp/web_protocol.py:423> result=(<Response OK eof>, False) created at /home/vscode/.local/lib/python3.10/site-packages/aiohttp/web_protocol.py:508> took 0.174 seconds
2024-03-01 07:57:26.679 WARNING (MainThread) [asyncio] Executing <Task pending name='setup component bluetooth' coro=<_async_setup_component() running at /home/vscode/.local/lib/python3.10/site-packages/homeassistant/setup.py:288> wait_for=<Task pending name='Storage load bluetooth.remote_scanners' coro=<Store._async_load() running at /home/vscode/.local/lib/python3.10/site-packages/homeassistant/helpers/storage.py:124> cb=[set.remove(), Task.task_wakeup()] created at /home/vscode/.local/lib/python3.10/site-packages/homeassistant/core.py:560> cb=[set.remove(), Task.task_wakeup()] created at /home/vscode/.local/lib/python3.10/site-packages/homeassistant/core.py:560> took 0.116 seconds
2024-03-01 07:57:27.334 WARNING (MainThread) [asyncio] Executing <Task pending name='setup component cloud' coro=<_async_setup_component() running at /home/vscode/.local/lib/python3.10/site-packages/homeassistant/setup.py:288> wait_for=<Task pending name='Storage load cloud' coro=<Store._async_load() running at /home/vscode/.local/lib/python3.10/site-packages/homeassistant/helpers/storage.py:124> cb=[set.remove(), Task.task_wakeup()] created at /home/vscode/.local/lib/python3.10/site-packages/homeassistant/core.py:560> cb=[set.remove(), Task.task_wakeup()] created at /home/vscode/.local/lib/python3.10/site-packages/homeassistant/core.py:560> took 0.630 seconds
2024-03-01 07:57:28.184 WARNING (MainThread) [asyncio] Executing <Task pending name='setup component stream' coro=<_async_setup_component() running at /home/vscode/.local/lib/python3.10/site-packages/homeassistant/setup.py:321> cb=[set.remove(), <1 more>, Task.task_wakeup()] created at /home/vscode/.local/lib/python3.10/site-packages/homeassistant/core.py:560> took 0.118 seconds
2024-03-01 07:57:32.404 WARNING (MainThread) [homeassistant.bootstrap] Support for the running Python version 3.10.12 is deprecated and will be removed in Home Assistant 2023.8; Please upgrade Python to 3.11
2024-03-01 07:57:33.167 WARNING (MainThread) [asyncio] Executing <Task finished name='config entry flow apple_tv 97ca671ff229144f14dc6cc94ae5a5db' coro=<ConfigEntriesFlowManager._async_init() done, defined at /home/vscode/.local/lib/python3.10/site-packages/homeassistant/config_entries.py:866> result=(<homeassistan...x7fd50f8848e0>, {'description_placeholders': None, 'flow_id': '97ca671ff229...c6cc94ae5a5db', 'handler': 'apple_tv', 'reason': 'unknown', ...}) created at /usr/local/lib/python3.10/asyncio/tasks.py:337> took 0.423 seconds
2024-03-01 07:57:38.679 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved:   File "/home/vscode/.local/bin/hass", line 8, in <module>
    sys.exit(main())
  File "/home/vscode/.local/lib/python3.10/site-packages/homeassistant/__main__.py", line 214, in main
    exit_code = runner.run(runtime_conf)
  File "/home/vscode/.local/lib/python3.10/site-packages/homeassistant/runner.py", line 179, in run
    return loop.run_until_complete(setup_and_run_hass(runtime_config))
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 636, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 603, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1901, in _run_once
    handle._run()
  File "/usr/local/lib/python3.10/asyncio/events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
  File "/home/vscode/.local/lib/python3.10/site-packages/homeassistant/core.py", line 1186, in _onetime_listener
    self._hass.async_run_job(listener, event)
  File "/home/vscode/.local/lib/python3.10/site-packages/homeassistant/core.py", line 675, in async_run_job
    return self.async_run_hass_job(HassJob(target), *args)
  File "/home/vscode/.local/lib/python3.10/site-packages/homeassistant/core.py", line 630, in async_run_hass_job
    return self.async_add_hass_job(hassjob, *args)
  File "/home/vscode/.local/lib/python3.10/site-packages/homeassistant/core.py", line 524, in async_add_hass_job
    task = self.loop.create_task(hassjob.target(*args), name=hassjob.name)
Traceback (most recent call last):
  File "/home/vscode/.local/lib/python3.10/site-packages/homeassistant/helpers/discovery_flow.py", line 95, in _async_start
    await gather_with_concurrency(
  File "/home/vscode/.local/lib/python3.10/site-packages/homeassistant/util/async_.py", line 185, in gather_with_concurrency
    return await gather(
  File "/home/vscode/.local/lib/python3.10/site-packages/homeassistant/util/async_.py", line 183, in sem_task
    return await task
  File "/home/vscode/.local/lib/python3.10/site-packages/homeassistant/config_entries.py", line 856, in async_init
    flow, result = await task
  File "/home/vscode/.local/lib/python3.10/site-packages/homeassistant/config_entries.py", line 884, in _async_init
    result = await self._async_handle_step(flow, flow.init_step, data)
  File "/home/vscode/.local/lib/python3.10/site-packages/homeassistant/data_entry_flow.py", line 393, in _async_handle_step
    result: FlowResult = await getattr(flow, method)(user_input)
  File "/home/vscode/.local/lib/python3.10/site-packages/homeassistant/components/shelly/config_flow.py", line 268, in async_step_zeroconf
    self.device_info = await validate_input(self.hass, self.host, self.info, {})
  File "/home/vscode/.local/lib/python3.10/site-packages/homeassistant/components/shelly/config_flow.py", line 93, in validate_input
    block_device = await BlockDevice.create(
  File "/home/vscode/.local/lib/python3.10/site-packages/aioshelly/block_device/device.py", line 91, in create
    await instance.initialize()
  File "/home/vscode/.local/lib/python3.10/site-packages/aioshelly/block_device/device.py", line 113, in initialize
    if self.requires_auth and not self.options.auth:
  File "/home/vscode/.local/lib/python3.10/site-packages/aioshelly/block_device/device.py", line 333, in requires_auth
    raise WrongShellyGen
aioshelly.exceptions.WrongShellyGen
2024-03-01 07:57:39.467 WARNING (MainThread) [asyncio] Executing <Task finished name='config entry flow xiaomi_aqara c7602151be60afb405f9eb57bd020f06' coro=<ConfigEntriesFlowManager._async_init() done, defined at /home/vscode/.local/lib/python3.10/site-packages/homeassistant/config_entries.py:866> result=(<homeassistan...x7fd50e946fe0>, {'description_placeholders': None, 'flow_id': 'c7602151be60...9eb57bd020f06', 'handler': 'xiaomi_aqara', 'reason': 'not_xiaomi_aqara', ...}) created at /usr/local/lib/python3.10/asyncio/tasks.py:337> took 0.119 seconds
2024-03-01 07:57:44.617 WARNING (MainThread) [asyncio] Executing <Task finished name='Task-731' coro=<NetworkWatcher.async_discover() done, defined at /home/vscode/.local/lib/python3.10/site-packages/homeassistant/components/dhcp/__init__.py:281> result=None created at /home/vscode/.local/lib/python3.10/site-packages/homeassistant/core.py:560> took 0.147 seconds
2024-03-01 07:57:48.193 WARNING (MainThread) [asyncio] Executing <Task finished name='config entry flow xiaomi_miio 2b961489771307eb441b52289f730b07' coro=<ConfigEntriesFlowManager._async_init() done, defined at /home/vscode/.local/lib/python3.10/site-packages/homeassistant/config_entries.py:866> result=(<homeassistan...x7fd50e946fe0>, {'description_placeholders': None, 'flow_id': '2b9614897713...b52289f730b07', 'handler': 'xiaomi_miio', 'reason': 'not_xiaomi_miio', ...}) created at /usr/local/lib/python3.10/asyncio/tasks.py:337> took 0.333 seconds
2024-03-01 07:58:10.492 INFO (MainThread) [custom_components.hass_nuki_bt] Discovered bluetooth device: {'name': 'Nuki_Opener_39586442', 'address': '$REDACTED_MAC_ADDRESS', 'rssi': -54, 'manufacturer_data': {76: b'\x02\x15\xa9*\xe2\x00U\x01\x11\xe4\x91l\x08\x00 \x0c\x9af9XdB\xc4'}, 'service_data': {}, 'service_uuids': [], 'source': 'F8:94:C2:A9:51:81', 'advertisement': AdvertisementData(local_name='Nuki_Opener_39586442', manufacturer_data={76: b'\x02\x15\xa9*\xe2\x00U\x01\x11\xe4\x91l\x08\x00 \x0c\x9af9XdB\xc4'}, rssi=-54), 'device': BLEDevice($REDACTED_MAC_ADDRESS, Nuki_Opener_39586442), 'connectable': True, 'time': 1947.511808511}
2024-03-01 07:58:18.618 WARNING (MainThread) [asyncio] Executing <Task pending name='config entry flow upnp 17b635035e097559790a1f40dc3aa825' coro=<ConfigEntriesFlowManager._async_init() running at /home/vscode/.local/lib/python3.10/site-packages/homeassistant/config_entries.py:884> wait_for=<Future pending cb=[_chain_future.<locals>._call_check_cancel() at /usr/local/lib/python3.10/asyncio/futures.py:385, <1 more>, Task.task_wakeup()] created at /usr/local/lib/python3.10/asyncio/base_events.py:429> cb=[Task.task_wakeup()] created at /usr/local/lib/python3.10/asyncio/tasks.py:337> took 0.111 seconds
2024-03-01 07:59:43.286 WARNING (MainThread) [asyncio] Executing <Task pending name='config entry flow radio_browser 679bc97f5a1f02fac5046d2fc22efbad' coro=<ConfigEntriesFlowManager._async_init() running at /home/vscode/.local/lib/python3.10/site-packages/homeassistant/config_entries.py:884> wait_for=<Task pending name='setup component radio_browser' coro=<_async_setup_component() running at /home/vscode/.local/lib/python3.10/site-packages/homeassistant/setup.py:168> cb=[set.remove(), Task.task_wakeup()] created at /home/vscode/.local/lib/python3.10/site-packages/homeassistant/core.py:560> cb=[Task.task_wakeup()] created at /usr/local/lib/python3.10/asyncio/tasks.py:337> took 0.123 seconds
2024-03-01 07:59:56.993 WARNING (MainThread) [asyncio] Executing <Task pending name='websocket_api.async:websocket_get_translations' coro=<_handle_async_response() running at /home/vscode/.local/lib/python3.10/site-packages/homeassistant/components/websocket_api/decorators.py:26> wait_for=<Future pending cb=[_chain_future.<locals>._call_check_cancel() at /usr/local/lib/python3.10/asyncio/futures.py:385, <1 more>, Task.task_wakeup()] created at /usr/local/lib/python3.10/asyncio/base_events.py:429> cb=[set.remove()] created at /home/vscode/.local/lib/python3.10/site-packages/homeassistant/core.py:579> took 0.239 seconds
2024-03-01 08:01:46.558 INFO (MainThread) [custom_components.hass_nuki_bt] Discovered bluetooth device: {'name': 'Nuki_Opener_39586442', 'address': '$REDACTED_MAC_ADDRESS', 'rssi': -73, 'manufacturer_data': {76: b'\x02\x15\xa9*\xe2\x00U\x01\x11\xe4\x91l\x08\x00 \x0c\x9af9XdB\xc4'}, 'service_data': {'a92ae100-5501-11e4-916c-0800200c9a66': b'9XdB'}, 'service_uuids': [], 'source': 'F8:94:C2:A9:51:81', 'advertisement': AdvertisementData(local_name='Nuki_Opener_39586442', manufacturer_data={76: b'\x02\x15\xa9*\xe2\x00U\x01\x11\xe4\x91l\x08\x00 \x0c\x9af9XdB\xc4'}, service_data={'a92ae100-5501-11e4-916c-0800200c9a66': b'9XdB'}, rssi=-73), 'device': BLEDevice($REDACTED_MAC_ADDRESS, Nuki_Opener_39586442), 'connectable': True, 'time': 2193.812063686}
2024-03-01 08:01:59.398 INFO (MainThread) [custom_components.hass_nuki_bt] Discovered bluetooth device: {'name': 'Nuki_Opener_39586442', 'address': '$REDACTED_MAC_ADDRESS', 'rssi': -60, 'manufacturer_data': {76: b'\x02\x15\xa9*\xe2\x00U\x01\x11\xe4\x91l\x08\x00 \x0c\x9af9XdB\xc4'}, 'service_data': {'a92ae100-5501-11e4-916c-0800200c9a66': b'9XdB'}, 'service_uuids': ['0000003e-0000-1000-8000-0026bb765291', '00000044-0000-1000-8000-0026bb765291', '00000045-0000-1000-8000-0026bb765291', '00000055-0000-1000-8000-0026bb765291', '000000a2-0000-1000-8000-0026bb765291', '00001800-0000-1000-8000-00805f9b34fb', '0000180a-0000-1000-8000-00805f9b34fb', 'a92ae100-5501-11e4-916c-0800200c9a66', 'a92ae200-5501-11e4-916c-0800200c9a66'], 'source': 'F8:94:C2:A9:51:81', 'advertisement': AdvertisementData(local_name='Nuki_Opener_39586442', manufacturer_data={76: b'\x02\x15\xa9*\xe2\x00U\x01\x11\xe4\x91l\x08\x00 \x0c\x9af9XdB\xc4'}, service_data={'a92ae100-5501-11e4-916c-0800200c9a66': b'9XdB'}, service_uuids=['0000003e-0000-1000-8000-0026bb765291', '00000044-0000-1000-8000-0026bb765291', '00000045-0000-1000-8000-0026bb765291', '00000055-0000-1000-8000-0026bb765291', '000000a2-0000-1000-8000-0026bb765291', '00001800-0000-1000-8000-00805f9b34fb', '0000180a-0000-1000-8000-00805f9b34fb', 'a92ae100-5501-11e4-916c-0800200c9a66', 'a92ae200-5501-11e4-916c-0800200c9a66'], rssi=-60), 'device': BLEDevice($REDACTED_MAC_ADDRESS, Nuki_Opener_39586442), 'connectable': True, 'time': 2206.652410523}
2024-03-01 08:01:59.401 DEBUG (MainThread) [pyNukiBT.nuki] Services ['a92ae200-5501-11e4-916c-0800200c9a66 (Handle: 141): Unknown', 'a92ae100-5501-11e4-916c-0800200c9a66 (Handle: 137): Unknown', '00000055-0000-1000-8000-0026bb765291 (Handle: 69): Unknown', '00000044-0000-1000-8000-0026bb765291 (Handle: 124): Unknown', '00000045-0000-1000-8000-0026bb765291 (Handle: 92): Unknown', '0000180a-0000-1000-8000-00805f9b34fb (Handle: 150): Device Information', '0000003e-0000-1000-8000-0026bb765291 (Handle: 22): Unknown', '000000a2-0000-1000-8000-0026bb765291 (Handle: 8): Unknown']
2024-03-01 08:01:59.401 DEBUG (MainThread) [pyNukiBT.nuki] Characteristics ['a92ae202-5501-11e4-916c-0800200c9a66 (Handle: 145): Unknown', 'a92ae203-5501-11e4-916c-0800200c9a66 (Handle: 148): Unknown', 'a92ae201-5501-11e4-916c-0800200c9a66 (Handle: 142): Unknown', 'a92ae101-5501-11e4-916c-0800200c9a66 (Handle: 138): Unknown', '0000004c-0000-1000-8000-0026bb765291 (Handle: 72): Unknown', 'e604e95d-a759-4817-87d3-aa005083a0d1 (Handle: 70): Unknown', '00000050-0000-1000-8000-0026bb765291 (Handle: 87): Unknown', '0000004f-0000-1000-8000-0026bb765291 (Handle: 82): Unknown', '0000004e-0000-1000-8000-0026bb765291 (Handle: 77): Unknown', '00000019-0000-1000-8000-0026bb765291 (Handle: 127): AVDTP', '00000037-0000-1000-8000-0026bb765291 (Handle: 132): Unknown', 'e604e95d-a759-4817-87d3-aa005083a0d1 (Handle: 125): Unknown', '0000001e-0000-1000-8000-0026bb765291 (Handle: 110): MCAP Control Channel', '00000023-0000-1000-8000-0026bb765291 (Handle: 119): Unknown', '000000a5-0000-1000-8000-0026bb765291 (Handle: 95): Unknown', 'e604e95d-a759-4817-87d3-aa005083a0d1 (Handle: 93): Unknown', '0000001d-0000-1000-8000-0026bb765291 (Handle: 101): Unknown', '00002a26-0000-1000-8000-00805f9b34fb (Handle: 155): Firmware Revision String', '00002a25-0000-1000-8000-00805f9b34fb (Handle: 151): Serial Number String', '00002a27-0000-1000-8000-00805f9b34fb (Handle: 153): Hardware Revision String', '00000014-0000-1000-8000-0026bb765291 (Handle: 25): Hardcopy Data Channel', '000000a6-0000-1000-8000-0026bb765291 (Handle: 60): Unknown', '00000053-0000-1000-8000-0026bb765291 (Handle: 55): Unknown', '00000023-0000-1000-8000-0026bb765291 (Handle: 40): Unknown', '00000021-0000-1000-8000-0026bb765291 (Handle: 35): Unknown', '00000030-0000-1000-8000-0026bb765291 (Handle: 45): Unknown', '00000020-0000-1000-8000-0026bb765291 (Handle: 30): Unknown', 'e604e95d-a759-4817-87d3-aa005083a0d1 (Handle: 23): Unknown', '00000052-0000-1000-8000-0026bb765291 (Handle: 50): Unknown', '000000a5-0000-1000-8000-0026bb765291 (Handle: 16): Unknown', 'e604e95d-a759-4817-87d3-aa005083a0d1 (Handle: 9): Unknown', '00000037-0000-1000-8000-0026bb765291 (Handle: 11): Unknown']
2024-03-01 08:01:59.467 INFO (MainThread) [pyNukiBT.nuki] Connected
2024-03-01 08:01:59.470 INFO (MainThread) [pyNukiBT.nuki] Trying to send data. Attempt 1
2024-03-01 08:01:59.470 INFO (MainThread) [pyNukiBT.nuki] Connected
2024-03-01 08:01:59.470 INFO (MainThread) [pyNukiBT.nuki] Sending data to Nuki
2024-03-01 08:01:59.496 INFO (MainThread) [pyNukiBT.nuki] Data sent on attempt 1
2024-03-01 08:01:59.606 DEBUG (MainThread) [pyNukiBT.nuki] Notification handler: a92ae101-5501-11e4-916c-0800200c9a66 (Handle: 138): Unknown, data: bytearray(b'\x03\x00\xc6%\x00~\xbb^\xb6\x98tS\x1cs\x06\x0e\xc7\xc7\xc3\xf7\x88F\xb3\x1d5\xae,\xe1\xe7\xf5\x8bm&$qS')
2024-03-01 08:01:59.620 INFO (MainThread) [pyNukiBT.nuki] Nuki $REDACTED_MAC_ADDRESS public key: REDACTED
2024-03-01 08:01:59.623 INFO (MainThread) [pyNukiBT.nuki] Trying to send data. Attempt 1
2024-03-01 08:01:59.623 INFO (MainThread) [pyNukiBT.nuki] Connected
2024-03-01 08:01:59.624 INFO (MainThread) [pyNukiBT.nuki] Sending data to Nuki
2024-03-01 08:01:59.646 INFO (MainThread) [pyNukiBT.nuki] Data sent on attempt 1
2024-03-01 08:01:59.649 DEBUG (MainThread) [pyNukiBT.nuki] Notification handler: a92ae101-5501-11e4-916c-0800200c9a66 (Handle: 138): Unknown, data: bytearray(b'\x04\x00\x02\xc0@\\v\xb5#\xe0\xd3\x9e\x159tY\xce&\xceO\xd7D\xd0\xe4m\xd1\xf4\xfc\xe1c\xd1nxBpI')
2024-03-01 08:01:59.652 INFO (MainThread) [pyNukiBT.nuki] Trying to send data. Attempt 1
2024-03-01 08:01:59.652 INFO (MainThread) [pyNukiBT.nuki] Connected
2024-03-01 08:01:59.653 INFO (MainThread) [pyNukiBT.nuki] Sending data to Nuki
2024-03-01 08:01:59.677 INFO (MainThread) [pyNukiBT.nuki] Data sent on attempt 1
2024-03-01 08:01:59.801 DEBUG (MainThread) [pyNukiBT.nuki] Notification handler: a92ae101-5501-11e4-916c-0800200c9a66 (Handle: 138): Unknown, data: bytearray(b'\x04\x00q\xd6\xf0\xe6\xa8\xf9\x0b\x1ei\xb8\x86y\x19\xb4\x88\xaer\xb0\x12\x18V\xdca}9\x92A|\x18\xbdp\xb0\x81K')
2024-03-01 08:01:59.814 INFO (MainThread) [pyNukiBT.nuki] Trying to send data. Attempt 1
2024-03-01 08:01:59.814 INFO (MainThread) [pyNukiBT.nuki] Connected
2024-03-01 08:01:59.815 INFO (MainThread) [pyNukiBT.nuki] Sending data to Nuki
2024-03-01 08:01:59.856 INFO (MainThread) [pyNukiBT.nuki] Data sent on attempt 1
2024-03-01 08:01:59.859 DEBUG (MainThread) [pyNukiBT.nuki] Notification handler: a92ae101-5501-11e4-916c-0800200c9a66 (Handle: 138): Unknown, data: bytearray(b'\x07\x00\xbc\xe3\x9bv:\x1b\x13\xb6v\xf1\xa2\xbd\xa4~\t}\x0c\x1f\xe3\x14w\x0f\xbf\x07\xfbq\x86\xe2\xe0\x0f\x8d\x0c\xdf\\4\x00\x1d>\xfd\xb8Xs\xe6xR-7AI\x8d\xaf\xb4\x8dw\x9b\xd0M\x9b\xe9\xd5\xc7\xa4\x9a\xb6\x8d\xa7\x87\x80\x898\x07\x82>\x91Rk\x05\xb1\x1f\x14|A\t\xf3\xe2\xa2')
2024-03-01 08:01:59.862 INFO (MainThread) [pyNukiBT.nuki] Trying to send data. Attempt 1
2024-03-01 08:01:59.862 INFO (MainThread) [pyNukiBT.nuki] Connected
2024-03-01 08:01:59.862 INFO (MainThread) [pyNukiBT.nuki] Sending data to Nuki
2024-03-01 08:01:59.886 INFO (MainThread) [pyNukiBT.nuki] Data sent on attempt 1
2024-03-01 08:01:59.889 DEBUG (MainThread) [pyNukiBT.nuki] Notification handler: a92ae101-5501-11e4-916c-0800200c9a66 (Handle: 138): Unknown, data: bytearray(b'\x0e\x00\x00\x9d\xd7')
2024-03-01 08:01:59.890 DEBUG (MainThread) [pyNukiBT.nuki] Last action: COMPLETED
2024-03-01 08:01:59.891 INFO (MainThread) [pyNukiBT.nuki] Nuki disconnecting...
2024-03-01 08:02:01.759 INFO (MainThread) [pyNukiBT.nuki] Nuki disconnected
2024-03-01 08:02:01.777 INFO (MainThread) [pyNukiBT.nuki] Nuki: $REDACTED_MAC_ADDRESS, RSSI: -53
2024-03-01 08:02:01.780 INFO (MainThread) [pyNukiBT.nuki] Querying Nuki state
2024-03-01 08:02:01.785 INFO (MainThread) [pyNukiBT.nuki] Querying Nuki state
2024-03-01 08:02:01.786 INFO (MainThread) [pyNukiBT.nuki] update state already in progress. ignoring
2024-03-01 08:02:02.640 DEBUG (MainThread) [pyNukiBT.nuki] Services ['a92ae200-5501-11e4-916c-0800200c9a66 (Handle: 141): Unknown', 'a92ae100-5501-11e4-916c-0800200c9a66 (Handle: 137): Unknown', '00000055-0000-1000-8000-0026bb765291 (Handle: 69): Unknown', '00000044-0000-1000-8000-0026bb765291 (Handle: 124): Unknown', '00000045-0000-1000-8000-0026bb765291 (Handle: 92): Unknown', '0000180a-0000-1000-8000-00805f9b34fb (Handle: 150): Device Information', '0000003e-0000-1000-8000-0026bb765291 (Handle: 22): Unknown', '000000a2-0000-1000-8000-0026bb765291 (Handle: 8): Unknown']
2024-03-01 08:02:02.641 DEBUG (MainThread) [pyNukiBT.nuki] Characteristics ['a92ae202-5501-11e4-916c-0800200c9a66 (Handle: 145): Unknown', 'a92ae203-5501-11e4-916c-0800200c9a66 (Handle: 148): Unknown', 'a92ae201-5501-11e4-916c-0800200c9a66 (Handle: 142): Unknown', 'a92ae101-5501-11e4-916c-0800200c9a66 (Handle: 138): Unknown', '0000004c-0000-1000-8000-0026bb765291 (Handle: 72): Unknown', 'e604e95d-a759-4817-87d3-aa005083a0d1 (Handle: 70): Unknown', '00000050-0000-1000-8000-0026bb765291 (Handle: 87): Unknown', '0000004f-0000-1000-8000-0026bb765291 (Handle: 82): Unknown', '0000004e-0000-1000-8000-0026bb765291 (Handle: 77): Unknown', '00000019-0000-1000-8000-0026bb765291 (Handle: 127): AVDTP', '00000037-0000-1000-8000-0026bb765291 (Handle: 132): Unknown', 'e604e95d-a759-4817-87d3-aa005083a0d1 (Handle: 125): Unknown', '0000001e-0000-1000-8000-0026bb765291 (Handle: 110): MCAP Control Channel', '00000023-0000-1000-8000-0026bb765291 (Handle: 119): Unknown', '000000a5-0000-1000-8000-0026bb765291 (Handle: 95): Unknown', 'e604e95d-a759-4817-87d3-aa005083a0d1 (Handle: 93): Unknown', '0000001d-0000-1000-8000-0026bb765291 (Handle: 101): Unknown', '00002a26-0000-1000-8000-00805f9b34fb (Handle: 155): Firmware Revision String', '00002a25-0000-1000-8000-00805f9b34fb (Handle: 151): Serial Number String', '00002a27-0000-1000-8000-00805f9b34fb (Handle: 153): Hardware Revision String', '00000014-0000-1000-8000-0026bb765291 (Handle: 25): Hardcopy Data Channel', '000000a6-0000-1000-8000-0026bb765291 (Handle: 60): Unknown', '00000053-0000-1000-8000-0026bb765291 (Handle: 55): Unknown', '00000023-0000-1000-8000-0026bb765291 (Handle: 40): Unknown', '00000021-0000-1000-8000-0026bb765291 (Handle: 35): Unknown', '00000030-0000-1000-8000-0026bb765291 (Handle: 45): Unknown', '00000020-0000-1000-8000-0026bb765291 (Handle: 30): Unknown', 'e604e95d-a759-4817-87d3-aa005083a0d1 (Handle: 23): Unknown', '00000052-0000-1000-8000-0026bb765291 (Handle: 50): Unknown', '000000a5-0000-1000-8000-0026bb765291 (Handle: 16): Unknown', 'e604e95d-a759-4817-87d3-aa005083a0d1 (Handle: 9): Unknown', '00000037-0000-1000-8000-0026bb765291 (Handle: 11): Unknown']
2024-03-01 08:02:02.692 INFO (MainThread) [pyNukiBT.nuki] Connected
2024-03-01 08:02:02.693 INFO (MainThread) [pyNukiBT.nuki] sending encrypted command REQUEST_DATA
2024-03-01 08:02:02.693 INFO (MainThread) [pyNukiBT.nuki] Trying to send data. Attempt 1
2024-03-01 08:02:02.693 INFO (MainThread) [pyNukiBT.nuki] Connected
2024-03-01 08:02:02.693 INFO (MainThread) [pyNukiBT.nuki] Sending data to Nuki
2024-03-01 08:02:02.721 INFO (MainThread) [pyNukiBT.nuki] Data sent on attempt 1
2024-03-01 08:02:02.738 DEBUG (MainThread) [pyNukiBT.nuki] Notification handler: a92ae202-5501-11e4-916c-0800200c9a66 (Handle: 145): Unknown, data: bytearray(b'\xa91\x01\x91\xd6\x1f$z\xc7\x06\x83_\x97\x1a\xaa\xda\x1b\xb5\xcb\x0e\xe8\xd8)\xfd\xdf\\4\x003\x00\x1a,A\xb9\x8fW~\xa6!\xcc\xe9\xb8\xe99\x80\x05\x0bY\xc2^<\xf1\xe3T<n\xb7B-\xde\x9d\xc0\xf9@Z\xb8\xf4\x8a\xc9\n\x0b\x87\x18uD\tK\x8d=,\xc2')
2024-03-01 08:02:02.740 WARNING (MainThread) [pyNukiBT.nuki] parse error Error in path (parsing) -> crc
wrong checksum, read 2024, computed 20195
2024-03-01 08:02:02.741 WARNING (MainThread) [pyNukiBT.nuki] Got unexpected message length for command 8150. got length:81 expecting length:8
2024-03-01 08:02:02.742 WARNING (MainThread) [pyNukiBT.nuki] Got 73 unknown bytes with value: b'$z\xc7\x06\x83_\x97\x1a\xaa\xda\x1b\xb5\xcb\x0e\xe8\xd8)\xfd\xdf\\4\x003\x00\x1a,A\xb9\x8fW~\xa6!\xcc\xe9\xb8\xe99\x80\x05\x0bY\xc2^<\xf1\xe3T<n\xb7B-\xde\x9d\xc0\xf9@Z\xb8\xf4\x8a\xc9\n\x0b\x87\x18uD\tK\x8d='
2024-03-01 08:02:02.743 ERROR (MainThread) [pyNukiBT.nuki] HomeAssistant: Received unsolicited notification: Container: 
    auth_id = b'\xa91\x01\x91' (total 4)
    command = (enum) (unknown) 8150
    payload = None
    crc = 31268
2024-03-01 08:02:02.744 ERROR (MainThread) [pyNukiBT.nuki] was expecting KEYTURNER_STATES
2024-03-01 08:02:02.746 INFO (MainThread) [pyNukiBT.nuki] Nuki: $REDACTED_MAC_ADDRESS, RSSI: -57
2024-03-01 08:02:02.746 INFO (MainThread) [pyNukiBT.nuki] Ignoring duplicate beacon from Nuki $REDACTED_MAC_ADDRESS
2024-03-01 08:02:11.792 INFO (MainThread) [pyNukiBT.nuki] Querying Nuki state
2024-03-01 08:02:11.792 INFO (MainThread) [pyNukiBT.nuki] update state already in progress. ignoring
2024-03-01 08:02:22.725 WARNING (MainThread) [homeassistant.config_entries] Config entry 'Nuki_Opener_39586442' for hass_nuki_bt integration not ready yet: $REDACTED_MAC_ADDRESS is not advertising state; Retrying in background
2024-03-01 08:02:28.074 INFO (MainThread) [pyNukiBT.nuki] Nuki: $REDACTED_MAC_ADDRESS, RSSI: -57
2024-03-01 08:02:28.078 INFO (MainThread) [pyNukiBT.nuki] Querying Nuki state
2024-03-01 08:02:28.093 INFO (MainThread) [pyNukiBT.nuki] Querying Nuki state
2024-03-01 08:02:28.094 INFO (MainThread) [pyNukiBT.nuki] update state already in progress. ignoring
2024-03-01 08:02:32.599 DEBUG (MainThread) [pyNukiBT.nuki] Services ['a92ae200-5501-11e4-916c-0800200c9a66 (Handle: 141): Unknown', 'a92ae100-5501-11e4-916c-0800200c9a66 (Handle: 137): Unknown', '00000055-0000-1000-8000-0026bb765291 (Handle: 69): Unknown', '00000044-0000-1000-8000-0026bb765291 (Handle: 124): Unknown', '00000045-0000-1000-8000-0026bb765291 (Handle: 92): Unknown', '0000180a-0000-1000-8000-00805f9b34fb (Handle: 150): Device Information', '0000003e-0000-1000-8000-0026bb765291 (Handle: 22): Unknown', '000000a2-0000-1000-8000-0026bb765291 (Handle: 8): Unknown']
2024-03-01 08:02:32.599 DEBUG (MainThread) [pyNukiBT.nuki] Characteristics ['a92ae202-5501-11e4-916c-0800200c9a66 (Handle: 145): Unknown', 'a92ae203-5501-11e4-916c-0800200c9a66 (Handle: 148): Unknown', 'a92ae201-5501-11e4-916c-0800200c9a66 (Handle: 142): Unknown', 'a92ae101-5501-11e4-916c-0800200c9a66 (Handle: 138): Unknown', '0000004c-0000-1000-8000-0026bb765291 (Handle: 72): Unknown', 'e604e95d-a759-4817-87d3-aa005083a0d1 (Handle: 70): Unknown', '00000050-0000-1000-8000-0026bb765291 (Handle: 87): Unknown', '0000004f-0000-1000-8000-0026bb765291 (Handle: 82): Unknown', '0000004e-0000-1000-8000-0026bb765291 (Handle: 77): Unknown', '00000019-0000-1000-8000-0026bb765291 (Handle: 127): AVDTP', '00000037-0000-1000-8000-0026bb765291 (Handle: 132): Unknown', 'e604e95d-a759-4817-87d3-aa005083a0d1 (Handle: 125): Unknown', '0000001e-0000-1000-8000-0026bb765291 (Handle: 110): MCAP Control Channel', '00000023-0000-1000-8000-0026bb765291 (Handle: 119): Unknown', '000000a5-0000-1000-8000-0026bb765291 (Handle: 95): Unknown', 'e604e95d-a759-4817-87d3-aa005083a0d1 (Handle: 93): Unknown', '0000001d-0000-1000-8000-0026bb765291 (Handle: 101): Unknown', '00002a26-0000-1000-8000-00805f9b34fb (Handle: 155): Firmware Revision String', '00002a25-0000-1000-8000-00805f9b34fb (Handle: 151): Serial Number String', '00002a27-0000-1000-8000-00805f9b34fb (Handle: 153): Hardware Revision String', '00000014-0000-1000-8000-0026bb765291 (Handle: 25): Hardcopy Data Channel', '000000a6-0000-1000-8000-0026bb765291 (Handle: 60): Unknown', '00000053-0000-1000-8000-0026bb765291 (Handle: 55): Unknown', '00000023-0000-1000-8000-0026bb765291 (Handle: 40): Unknown', '00000021-0000-1000-8000-0026bb765291 (Handle: 35): Unknown', '00000030-0000-1000-8000-0026bb765291 (Handle: 45): Unknown', '00000020-0000-1000-8000-0026bb765291 (Handle: 30): Unknown', 'e604e95d-a759-4817-87d3-aa005083a0d1 (Handle: 23): Unknown', '00000052-0000-1000-8000-0026bb765291 (Handle: 50): Unknown', '000000a5-0000-1000-8000-0026bb765291 (Handle: 16): Unknown', 'e604e95d-a759-4817-87d3-aa005083a0d1 (Handle: 9): Unknown', '00000037-0000-1000-8000-0026bb765291 (Handle: 11): Unknown']
2024-03-01 08:02:32.664 INFO (MainThread) [pyNukiBT.nuki] Connected
2024-03-01 08:02:32.666 INFO (MainThread) [pyNukiBT.nuki] sending encrypted command REQUEST_DATA
2024-03-01 08:02:32.669 INFO (MainThread) [pyNukiBT.nuki] Trying to send data. Attempt 1
2024-03-01 08:02:32.670 INFO (MainThread) [pyNukiBT.nuki] Connected
2024-03-01 08:02:32.671 INFO (MainThread) [pyNukiBT.nuki] Sending data to Nuki
2024-03-01 08:02:32.708 INFO (MainThread) [pyNukiBT.nuki] Data sent on attempt 1
2024-03-01 08:02:32.713 DEBUG (MainThread) [pyNukiBT.nuki] Notification handler: a92ae202-5501-11e4-916c-0800200c9a66 (Handle: 145): Unknown, data: bytearray(b'?PT\xce\xc5\x1f\xfe>\xda\x1fM\x1f\xfdg%\x0fy\xb6\xff\x04}\xfb\x9b\xd1\xdf\\4\x003\x00\xa3/I#=P3\x04\x93\xeb\xf1X!\xf5X\x83\x9dU\x85h\xe2\x96\x1d\xd0\xc6\x8b\xc8\x9e\xb2X\xe2\xed\xcek\x07|\x99\xe7-\x04\x1d\xee34\x1a\xa8\xd1\xc7\xd7\r\xdf')
2024-03-01 08:02:32.716 WARNING (MainThread) [pyNukiBT.nuki] parse error Error in path (parsing) -> crc
wrong checksum, read 2024, computed 55948
2024-03-01 08:02:32.719 WARNING (MainThread) [pyNukiBT.nuki] Got unexpected message length for command 8133. got length:81 expecting length:8
2024-03-01 08:02:32.723 WARNING (MainThread) [pyNukiBT.nuki] Got 73 unknown bytes with value: b'\xfe>\xda\x1fM\x1f\xfdg%\x0fy\xb6\xff\x04}\xfb\x9b\xd1\xdf\\4\x003\x00\xa3/I#=P3\x04\x93\xeb\xf1X!\xf5X\x83\x9dU\x85h\xe2\x96\x1d\xd0\xc6\x8b\xc8\x9e\xb2X\xe2\xed\xcek\x07|\x99\xe7-\x04\x1d\xee34\x1a\xa8\xd1\xc7\xd7'
2024-03-01 08:02:32.726 ERROR (MainThread) [pyNukiBT.nuki] HomeAssistant: Received unsolicited notification: Container: 
    auth_id = b'?PT\xce' (total 4)
    command = (enum) (unknown) 8133
    payload = None
    crc = 16126
2024-03-01 08:02:32.728 ERROR (MainThread) [pyNukiBT.nuki] was expecting KEYTURNER_STATES
2024-03-01 08:03:02.996 INFO (MainThread) [pyNukiBT.nuki] Nuki: $REDACTED_MAC_ADDRESS, RSSI: -63
2024-03-01 08:03:02.999 INFO (MainThread) [pyNukiBT.nuki] Querying Nuki state
2024-03-01 08:03:03.004 INFO (MainThread) [pyNukiBT.nuki] Querying Nuki state
2024-03-01 08:03:03.004 INFO (MainThread) [pyNukiBT.nuki] update state already in progress. ignoring
2024-03-01 08:03:07.082 DEBUG (MainThread) [pyNukiBT.nuki] Services ['a92ae200-5501-11e4-916c-0800200c9a66 (Handle: 141): Unknown', 'a92ae100-5501-11e4-916c-0800200c9a66 (Handle: 137): Unknown', '00000055-0000-1000-8000-0026bb765291 (Handle: 69): Unknown', '00000044-0000-1000-8000-0026bb765291 (Handle: 124): Unknown', '00000045-0000-1000-8000-0026bb765291 (Handle: 92): Unknown', '0000180a-0000-1000-8000-00805f9b34fb (Handle: 150): Device Information', '0000003e-0000-1000-8000-0026bb765291 (Handle: 22): Unknown', '000000a2-0000-1000-8000-0026bb765291 (Handle: 8): Unknown']
2024-03-01 08:03:07.083 DEBUG (MainThread) [pyNukiBT.nuki] Characteristics ['a92ae202-5501-11e4-916c-0800200c9a66 (Handle: 145): Unknown', 'a92ae203-5501-11e4-916c-0800200c9a66 (Handle: 148): Unknown', 'a92ae201-5501-11e4-916c-0800200c9a66 (Handle: 142): Unknown', 'a92ae101-5501-11e4-916c-0800200c9a66 (Handle: 138): Unknown', '0000004c-0000-1000-8000-0026bb765291 (Handle: 72): Unknown', 'e604e95d-a759-4817-87d3-aa005083a0d1 (Handle: 70): Unknown', '00000050-0000-1000-8000-0026bb765291 (Handle: 87): Unknown', '0000004f-0000-1000-8000-0026bb765291 (Handle: 82): Unknown', '0000004e-0000-1000-8000-0026bb765291 (Handle: 77): Unknown', '00000019-0000-1000-8000-0026bb765291 (Handle: 127): AVDTP', '00000037-0000-1000-8000-0026bb765291 (Handle: 132): Unknown', 'e604e95d-a759-4817-87d3-aa005083a0d1 (Handle: 125): Unknown', '0000001e-0000-1000-8000-0026bb765291 (Handle: 110): MCAP Control Channel', '00000023-0000-1000-8000-0026bb765291 (Handle: 119): Unknown', '000000a5-0000-1000-8000-0026bb765291 (Handle: 95): Unknown', 'e604e95d-a759-4817-87d3-aa005083a0d1 (Handle: 93): Unknown', '0000001d-0000-1000-8000-0026bb765291 (Handle: 101): Unknown', '00002a26-0000-1000-8000-00805f9b34fb (Handle: 155): Firmware Revision String', '00002a25-0000-1000-8000-00805f9b34fb (Handle: 151): Serial Number String', '00002a27-0000-1000-8000-00805f9b34fb (Handle: 153): Hardware Revision String', '00000014-0000-1000-8000-0026bb765291 (Handle: 25): Hardcopy Data Channel', '000000a6-0000-1000-8000-0026bb765291 (Handle: 60): Unknown', '00000053-0000-1000-8000-0026bb765291 (Handle: 55): Unknown', '00000023-0000-1000-8000-0026bb765291 (Handle: 40): Unknown', '00000021-0000-1000-8000-0026bb765291 (Handle: 35): Unknown', '00000030-0000-1000-8000-0026bb765291 (Handle: 45): Unknown', '00000020-0000-1000-8000-0026bb765291 (Handle: 30): Unknown', 'e604e95d-a759-4817-87d3-aa005083a0d1 (Handle: 23): Unknown', '00000052-0000-1000-8000-0026bb765291 (Handle: 50): Unknown', '000000a5-0000-1000-8000-0026bb765291 (Handle: 16): Unknown', 'e604e95d-a759-4817-87d3-aa005083a0d1 (Handle: 9): Unknown', '00000037-0000-1000-8000-0026bb765291 (Handle: 11): Unknown']
2024-03-01 08:03:07.150 INFO (MainThread) [pyNukiBT.nuki] Connected
2024-03-01 08:03:07.152 INFO (MainThread) [pyNukiBT.nuki] sending encrypted command REQUEST_DATA
2024-03-01 08:03:07.156 INFO (MainThread) [pyNukiBT.nuki] Trying to send data. Attempt 1
2024-03-01 08:03:07.157 INFO (MainThread) [pyNukiBT.nuki] Connected
2024-03-01 08:03:07.157 INFO (MainThread) [pyNukiBT.nuki] Sending data to Nuki
2024-03-01 08:03:07.193 INFO (MainThread) [pyNukiBT.nuki] Data sent on attempt 1
2024-03-01 08:03:07.196 DEBUG (MainThread) [pyNukiBT.nuki] Notification handler: a92ae202-5501-11e4-916c-0800200c9a66 (Handle: 145): Unknown, data: bytearray(b'=vX\x9e\x1e\t\x04\xcaC\x83\x92\xd2z\x17\x80\x9b\xb6d\xc4\xec\xe0\x85\xa0\x88\xdf\\4\x003\x00\xe81\xcdE\xd0*\xbd\xb9\xb3\xd3m\xf9\xa7z\r\x01\x86\xb5u\x15\x17:\xf1<\x07;i\x81p`\x03\xd7\x90\x89_"\x02\x12\xa0\x9a=\x1a7\xb0\xd5\xf9\x03\xfe\x86d\xb4')
2024-03-01 08:03:07.197 WARNING (MainThread) [pyNukiBT.nuki] parse error Error in path (parsing) -> crc
wrong checksum, read 2024, computed 21722
2024-03-01 08:03:07.198 WARNING (MainThread) [pyNukiBT.nuki] Got unexpected message length for command 2334. got length:81 expecting length:8
2024-03-01 08:03:07.200 WARNING (MainThread) [pyNukiBT.nuki] Got 73 unknown bytes with value: b'\x04\xcaC\x83\x92\xd2z\x17\x80\x9b\xb6d\xc4\xec\xe0\x85\xa0\x88\xdf\\4\x003\x00\xe81\xcdE\xd0*\xbd\xb9\xb3\xd3m\xf9\xa7z\r\x01\x86\xb5u\x15\x17:\xf1<\x07;i\x81p`\x03\xd7\x90\x89_"\x02\x12\xa0\x9a=\x1a7\xb0\xd5\xf9\x03\xfe\x86'
2024-03-01 08:03:07.201 ERROR (MainThread) [pyNukiBT.nuki] HomeAssistant: Received unsolicited notification: Container: 
    auth_id = b'=vX\x9e' (total 4)
    command = (enum) (unknown) 2334
    payload = None
    crc = 51716
2024-03-01 08:03:07.203 ERROR (MainThread) [pyNukiBT.nuki] was expecting KEYTURNER_STATES
2024-03-01 08:03:47.321 INFO (MainThread) [pyNukiBT.nuki] Nuki: $REDACTED_MAC_ADDRESS, RSSI: -64
2024-03-01 08:03:47.326 INFO (MainThread) [pyNukiBT.nuki] Querying Nuki state
2024-03-01 08:03:47.338 INFO (MainThread) [pyNukiBT.nuki] Querying Nuki state
2024-03-01 08:03:47.339 INFO (MainThread) [pyNukiBT.nuki] update state already in progress. ignoring
2024-03-01 08:03:49.739 DEBUG (MainThread) [pyNukiBT.nuki] Services ['a92ae200-5501-11e4-916c-0800200c9a66 (Handle: 141): Unknown', 'a92ae100-5501-11e4-916c-0800200c9a66 (Handle: 137): Unknown', '00000055-0000-1000-8000-0026bb765291 (Handle: 69): Unknown', '00000044-0000-1000-8000-0026bb765291 (Handle: 124): Unknown', '00000045-0000-1000-8000-0026bb765291 (Handle: 92): Unknown', '0000180a-0000-1000-8000-00805f9b34fb (Handle: 150): Device Information', '0000003e-0000-1000-8000-0026bb765291 (Handle: 22): Unknown', '000000a2-0000-1000-8000-0026bb765291 (Handle: 8): Unknown']
2024-03-01 08:03:49.739 DEBUG (MainThread) [pyNukiBT.nuki] Characteristics ['a92ae202-5501-11e4-916c-0800200c9a66 (Handle: 145): Unknown', 'a92ae203-5501-11e4-916c-0800200c9a66 (Handle: 148): Unknown', 'a92ae201-5501-11e4-916c-0800200c9a66 (Handle: 142): Unknown', 'a92ae101-5501-11e4-916c-0800200c9a66 (Handle: 138): Unknown', '0000004c-0000-1000-8000-0026bb765291 (Handle: 72): Unknown', 'e604e95d-a759-4817-87d3-aa005083a0d1 (Handle: 70): Unknown', '00000050-0000-1000-8000-0026bb765291 (Handle: 87): Unknown', '0000004f-0000-1000-8000-0026bb765291 (Handle: 82): Unknown', '0000004e-0000-1000-8000-0026bb765291 (Handle: 77): Unknown', '00000019-0000-1000-8000-0026bb765291 (Handle: 127): AVDTP', '00000037-0000-1000-8000-0026bb765291 (Handle: 132): Unknown', 'e604e95d-a759-4817-87d3-aa005083a0d1 (Handle: 125): Unknown', '0000001e-0000-1000-8000-0026bb765291 (Handle: 110): MCAP Control Channel', '00000023-0000-1000-8000-0026bb765291 (Handle: 119): Unknown', '000000a5-0000-1000-8000-0026bb765291 (Handle: 95): Unknown', 'e604e95d-a759-4817-87d3-aa005083a0d1 (Handle: 93): Unknown', '0000001d-0000-1000-8000-0026bb765291 (Handle: 101): Unknown', '00002a26-0000-1000-8000-00805f9b34fb (Handle: 155): Firmware Revision String', '00002a25-0000-1000-8000-00805f9b34fb (Handle: 151): Serial Number String', '00002a27-0000-1000-8000-00805f9b34fb (Handle: 153): Hardware Revision String', '00000014-0000-1000-8000-0026bb765291 (Handle: 25): Hardcopy Data Channel', '000000a6-0000-1000-8000-0026bb765291 (Handle: 60): Unknown', '00000053-0000-1000-8000-0026bb765291 (Handle: 55): Unknown', '00000023-0000-1000-8000-0026bb765291 (Handle: 40): Unknown', '00000021-0000-1000-8000-0026bb765291 (Handle: 35): Unknown', '00000030-0000-1000-8000-0026bb765291 (Handle: 45): Unknown', '00000020-0000-1000-8000-0026bb765291 (Handle: 30): Unknown', 'e604e95d-a759-4817-87d3-aa005083a0d1 (Handle: 23): Unknown', '00000052-0000-1000-8000-0026bb765291 (Handle: 50): Unknown', '000000a5-0000-1000-8000-0026bb765291 (Handle: 16): Unknown', 'e604e95d-a759-4817-87d3-aa005083a0d1 (Handle: 9): Unknown', '00000037-0000-1000-8000-0026bb765291 (Handle: 11): Unknown']
2024-03-01 08:03:49.811 INFO (MainThread) [pyNukiBT.nuki] Connected
2024-03-01 08:03:49.813 INFO (MainThread) [pyNukiBT.nuki] sending encrypted command REQUEST_DATA
2024-03-01 08:03:49.816 INFO (MainThread) [pyNukiBT.nuki] Trying to send data. Attempt 1
2024-03-01 08:03:49.816 INFO (MainThread) [pyNukiBT.nuki] Connected
2024-03-01 08:03:49.817 INFO (MainThread) [pyNukiBT.nuki] Sending data to Nuki
2024-03-01 08:03:49.854 INFO (MainThread) [pyNukiBT.nuki] Data sent on attempt 1
2024-03-01 08:03:49.858 DEBUG (MainThread) [pyNukiBT.nuki] Notification handler: a92ae202-5501-11e4-916c-0800200c9a66 (Handle: 145): Unknown, data: bytearray(b"\xf9)\xd1NX\xe7\x02\xf1\x8c\xc2\x04//\x01\xe9\xfd\xe3v\xf7-\x83\x0b\xdd\x18\xdf\\4\x003\x00\xf2+/\xe8U\x8f\xa9\xa9h\x818\xee\xd6\xc8\xf0\xd0b\x19\xe6\rC\xda\xe6\xbe\xd9\xe3\x83\xec\xd4\xc2\x9e\xfdw\xbb\x10\xf0b\xd1\xc8Q\xe0\xba\x10\x992@\xc8:\x99\'p")
2024-03-01 08:03:49.860 WARNING (MainThread) [pyNukiBT.nuki] parse error Error in path (parsing) -> crc
wrong checksum, read 2024, computed 39502
2024-03-01 08:03:49.863 WARNING (MainThread) [pyNukiBT.nuki] Got unexpected message length for command 59224. got length:81 expecting length:8
2024-03-01 08:03:49.864 WARNING (MainThread) [pyNukiBT.nuki] Got 73 unknown bytes with value: b'\x02\xf1\x8c\xc2\x04//\x01\xe9\xfd\xe3v\xf7-\x83\x0b\xdd\x18\xdf\\4\x003\x00\xf2+/\xe8U\x8f\xa9\xa9h\x818\xee\xd6\xc8\xf0\xd0b\x19\xe6\rC\xda\xe6\xbe\xd9\xe3\x83\xec\xd4\xc2\x9e\xfdw\xbb\x10\xf0b\xd1\xc8Q\xe0\xba\x10\x992@\xc8:\x99'
2024-03-01 08:03:49.865 ERROR (MainThread) [pyNukiBT.nuki] HomeAssistant: Received unsolicited notification: Container: 
    auth_id = b'\xf9)\xd1N' (total 4)
    command = (enum) (unknown) 59224
    payload = None
    crc = 61698
2024-03-01 08:03:49.866 ERROR (MainThread) [pyNukiBT.nuki] was expecting KEYTURNER_STATES
2024-03-01 08:04:50.193 INFO (MainThread) [pyNukiBT.nuki] Nuki: $REDACTED_MAC_ADDRESS, RSSI: -59
2024-03-01 08:04:50.194 INFO (MainThread) [pyNukiBT.nuki] Querying Nuki state
2024-03-01 08:04:50.197 INFO (MainThread) [pyNukiBT.nuki] Querying Nuki state
2024-03-01 08:04:50.197 INFO (MainThread) [pyNukiBT.nuki] update state already in progress. ignoring
2024-03-01 08:04:53.648 DEBUG (MainThread) [pyNukiBT.nuki] Services ['a92ae200-5501-11e4-916c-0800200c9a66 (Handle: 141): Unknown', 'a92ae100-5501-11e4-916c-0800200c9a66 (Handle: 137): Unknown', '00000055-0000-1000-8000-0026bb765291 (Handle: 69): Unknown', '00000044-0000-1000-8000-0026bb765291 (Handle: 124): Unknown', '00000045-0000-1000-8000-0026bb765291 (Handle: 92): Unknown', '0000180a-0000-1000-8000-00805f9b34fb (Handle: 150): Device Information', '0000003e-0000-1000-8000-0026bb765291 (Handle: 22): Unknown', '000000a2-0000-1000-8000-0026bb765291 (Handle: 8): Unknown']
2024-03-01 08:04:53.648 DEBUG (MainThread) [pyNukiBT.nuki] Characteristics ['a92ae202-5501-11e4-916c-0800200c9a66 (Handle: 145): Unknown', 'a92ae203-5501-11e4-916c-0800200c9a66 (Handle: 148): Unknown', 'a92ae201-5501-11e4-916c-0800200c9a66 (Handle: 142): Unknown', 'a92ae101-5501-11e4-916c-0800200c9a66 (Handle: 138): Unknown', '0000004c-0000-1000-8000-0026bb765291 (Handle: 72): Unknown', 'e604e95d-a759-4817-87d3-aa005083a0d1 (Handle: 70): Unknown', '00000050-0000-1000-8000-0026bb765291 (Handle: 87): Unknown', '0000004f-0000-1000-8000-0026bb765291 (Handle: 82): Unknown', '0000004e-0000-1000-8000-0026bb765291 (Handle: 77): Unknown', '00000019-0000-1000-8000-0026bb765291 (Handle: 127): AVDTP', '00000037-0000-1000-8000-0026bb765291 (Handle: 132): Unknown', 'e604e95d-a759-4817-87d3-aa005083a0d1 (Handle: 125): Unknown', '0000001e-0000-1000-8000-0026bb765291 (Handle: 110): MCAP Control Channel', '00000023-0000-1000-8000-0026bb765291 (Handle: 119): Unknown', '000000a5-0000-1000-8000-0026bb765291 (Handle: 95): Unknown', 'e604e95d-a759-4817-87d3-aa005083a0d1 (Handle: 93): Unknown', '0000001d-0000-1000-8000-0026bb765291 (Handle: 101): Unknown', '00002a26-0000-1000-8000-00805f9b34fb (Handle: 155): Firmware Revision String', '00002a25-0000-1000-8000-00805f9b34fb (Handle: 151): Serial Number String', '00002a27-0000-1000-8000-00805f9b34fb (Handle: 153): Hardware Revision String', '00000014-0000-1000-8000-0026bb765291 (Handle: 25): Hardcopy Data Channel', '000000a6-0000-1000-8000-0026bb765291 (Handle: 60): Unknown', '00000053-0000-1000-8000-0026bb765291 (Handle: 55): Unknown', '00000023-0000-1000-8000-0026bb765291 (Handle: 40): Unknown', '00000021-0000-1000-8000-0026bb765291 (Handle: 35): Unknown', '00000030-0000-1000-8000-0026bb765291 (Handle: 45): Unknown', '00000020-0000-1000-8000-0026bb765291 (Handle: 30): Unknown', 'e604e95d-a759-4817-87d3-aa005083a0d1 (Handle: 23): Unknown', '00000052-0000-1000-8000-0026bb765291 (Handle: 50): Unknown', '000000a5-0000-1000-8000-0026bb765291 (Handle: 16): Unknown', 'e604e95d-a759-4817-87d3-aa005083a0d1 (Handle: 9): Unknown', '00000037-0000-1000-8000-0026bb765291 (Handle: 11): Unknown']
2024-03-01 08:04:53.710 INFO (MainThread) [pyNukiBT.nuki] Connected
2024-03-01 08:04:53.711 INFO (MainThread) [pyNukiBT.nuki] sending encrypted command REQUEST_DATA
2024-03-01 08:04:53.711 INFO (MainThread) [pyNukiBT.nuki] Trying to send data. Attempt 1
2024-03-01 08:04:53.712 INFO (MainThread) [pyNukiBT.nuki] Connected
2024-03-01 08:04:53.712 INFO (MainThread) [pyNukiBT.nuki] Sending data to Nuki
2024-03-01 08:04:53.740 INFO (MainThread) [pyNukiBT.nuki] Data sent on attempt 1
2024-03-01 08:04:53.742 DEBUG (MainThread) [pyNukiBT.nuki] Notification handler: a92ae202-5501-11e4-916c-0800200c9a66 (Handle: 145): Unknown, data: bytearray(b'\xacZ,\x0b\xf1\xbb\\Y )\x03\xb69\\\xb5:\x87\xfbC.\x9e\xf7\xbaQ\xdf\\4\x003\x00\xc2\xfa\x0f \xa5\xcf\xfe\x83*R.\x84\xcdB\xbf=\x96u\xc5C\x8b!(\x83+\x08\xcd\x01z\r\rD\xa7\x94Mr\xcb\xe7\xa3C\x16\x88\xe8`\x81\xfe\xfd\xe2\x80h\x92')
2024-03-01 08:04:53.742 WARNING (MainThread) [pyNukiBT.nuki] parse error Error in path (parsing) -> crc
wrong checksum, read 2024, computed 61234
2024-03-01 08:04:53.744 WARNING (MainThread) [pyNukiBT.nuki] Got unexpected message length for command 48113. got length:81 expecting length:8
2024-03-01 08:04:53.744 WARNING (MainThread) [pyNukiBT.nuki] Got 73 unknown bytes with value: b'\\Y )\x03\xb69\\\xb5:\x87\xfbC.\x9e\xf7\xbaQ\xdf\\4\x003\x00\xc2\xfa\x0f \xa5\xcf\xfe\x83*R.\x84\xcdB\xbf=\x96u\xc5C\x8b!(\x83+\x08\xcd\x01z\r\rD\xa7\x94Mr\xcb\xe7\xa3C\x16\x88\xe8`\x81\xfe\xfd\xe2\x80'
2024-03-01 08:04:53.746 ERROR (MainThread) [pyNukiBT.nuki] HomeAssistant: Received unsolicited notification: Container: 
    auth_id = b'\xacZ,\x0b' (total 4)
    command = (enum) (unknown) 48113
    payload = None
    crc = 22876
2024-03-01 08:04:53.747 ERROR (MainThread) [pyNukiBT.nuki] was expecting KEYTURNER_STATES
^C^C2024-03-01 08:05:05.437 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Nuki_Opener_39586442 for hass_nuki_bt
Traceback (most recent call last):
  File "/home/vscode/.local/lib/python3.10/site-packages/homeassistant/runner.py", line 179, in run
    return loop.run_until_complete(setup_and_run_hass(runtime_config))
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 636, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 603, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1871, in _run_once
    event_list = self._selector.select(timeout)
  File "/usr/local/lib/python3.10/selectors.py", line 469, in select
    fd_event_list = self._selector.poll(timeout, max_ev)
KeyboardInterrupt

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/vscode/.local/lib/python3.10/site-packages/homeassistant/config_entries.py", line 390, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/workspaces/hass_nuki_bt/custom_components/hass_nuki_bt/__init__.py", line 86, in async_setup_entry
    if not await coordinator.async_wait_ready():
  File "/workspaces/hass_nuki_bt/custom_components/hass_nuki_bt/coordinator.py", line 151, in async_wait_ready
    await self._async_update()
  File "/workspaces/hass_nuki_bt/custom_components/hass_nuki_bt/coordinator.py", line 110, in _async_update
    await self.device.update_state()
  File "/home/vscode/.local/lib/python3.10/site-packages/pyNukiBT/nuki.py", line 421, in update_state
    msg = await self._send_encrtypted_command(
  File "/home/vscode/.local/lib/python3.10/site-packages/pyNukiBT/nuki.py", line 189, in _send_encrtypted_command
    return await self._send_command(
  File "/home/vscode/.local/lib/python3.10/site-packages/pyNukiBT/nuki.py", line 362, in _send_command
    msg = await self._notify_future
asyncio.exceptions.CancelledError
2024-03-01 08:05:05.464 ERROR (MainThread) [root] Uncaught exception
Traceback (most recent call last):
  File "/home/vscode/.local/bin/hass", line 8, in <module>
    sys.exit(main())
  File "/home/vscode/.local/lib/python3.10/site-packages/homeassistant/__main__.py", line 214, in main
    exit_code = runner.run(runtime_conf)
  File "/home/vscode/.local/lib/python3.10/site-packages/homeassistant/runner.py", line 179, in run
    return loop.run_until_complete(setup_and_run_hass(runtime_config))
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 636, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 603, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1871, in _run_once
    event_list = self._selector.select(timeout)
  File "/usr/local/lib/python3.10/selectors.py", line 469, in select
    fd_event_list = self._selector.poll(timeout, max_ev)
KeyboardInterrupt
^CTraceback (most recent call last):
  File "/home/vscode/.local/lib/python3.10/site-packages/debugpy/_vendored/pydevd/pydevd.py", line 2299, in __wait_for_threads_to_finish
    time.sleep(1 / 10.)
  File "/home/vscode/.local/lib/python3.10/site-packages/homeassistant/util/async_.py", line 167, in protected_loop_func
    return func(*args, **kwargs)
KeyboardInterrupt
^C
vscode ➜ /workspaces/hass_nuki_bt (main) $ 
ronengr commented 3 months ago

@nico1510 indeed it seems there is an error parsing the message. It seems that the decryption is incorrect for some reason.

You can see that the unencrypted part of the message seems to be OK (length make sense and the auth-id is consistent), but in the encrypted part you get a lot of strange things: the auth-id is always different, the command ID is different and doesn't correspond to any known command, etc.

(you can find the message format here: https://developer.nuki.io/page/nuki-opener-api-1/7)

the strange thing is that pairing seems to be successful, so I'm not sure why the decryption fails. maybe the message format for opener is different that the lock (and different than the docs)

you can try to print the unencrypted message by changing the function _parse_message() simply save and print the value of self._decrypt_message(data) before passing it to self._const.NukiMessage.parse() hopefully from there you can find if the message is the same as in the documentation or not. try looking for the authID (same 4 bytes that are 24:27 in the unencrypted message part), maybe there is some offset.

another strange thing i noticed is that the crc is always the same - 2024, which makes me believe the decryption maybe did succeed but the issue is with the message format (2024 could be the year, which is part of the expected message)

011V32 commented 3 weeks ago

Does this already work? The Opener gets discovered... image

ronengr commented 3 weeks ago

@011V32 no idea. I don't have an opener so i have no way of testing. Latest changes could have solved the opener issues. Only way to really know is to try :-)

If it still doesn't work please send me the logs and i will try to fix.