-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Slow response and warn logs for Nuki #262
Comments
Its normal for it to be a bit slow to reconnect since it only holds the connection for a few seconds after an operation, but taking a whole minute to reconnect is not normal. At most it should take 15s, at best 1-2s with a high performance adapter https://www.home-assistant.io/integrations/bluetooth/#known-working-high-performance-adapters. If you enable debug logs for |
Hi In general it's better to raise issues in the HA repo first. In this case the maintainers are the same, but you could easily be pinging strangers about HA misusing their library. Also, HA has a template that prompts you to give us the bare minimum of info about your environment (HA version, how HA is installed, diagnostics report). If it generally works but is slow we'd usually start by looking at environmental factors. So as above - What HA? What is it running on? How is it installed? What is the model of lock? Have you got any other homekit devices working with HA? One about other Bluetooth ones? Have you turned on the signal strength sensor, and what is that looking like? Are you using a Bluetooth dongle? Is it on the list of "high performance" dongles? Are you using HA OS? Is it up to date? Are you using any esphome proxies? |
@bdraco @Jc2k Thanks for reply @Jc2k Sorry, next time I will post directly to HA repo
I'm using latest HA 2022.11.5. running on Raspberry Pi 4 64bit model B using latest HA OS 9.3.
Nuki Smart Lock 3.0
No
-85dBm
No dongle, I'm using Raspberry Pi 4B hardware. |
85 is on the weak side. You are likely seeing packet loss, connection failures etc which won't be helping performance. An external dongle closer to the lock (ideally with an extension to help avoid noise from usb3 etc) and that is from the high performance list might help. Alternatively you could try using an esphome device as a "Bluetooth proxy" range extender. These are looking like they will be pretty stable for homekit when 2022.12 is out. 2022.12 includes fixes that should make connection setup slightly faster, but this will be dwarfed by connection failure due to a weak signal. Homekit Bluetooth devices aggressively disconnect to conserve battery, so we can't keep connections up. Also there are limits to how many active connections can be sustained on the host side (5 active connections is considered a good setup). We also go to great lengths to avoid connecting (sensors don't need us to connect and read at all any more). But when we do connect we have to wait for the lock to turn its radio on. This means that the worst case could be always be a little slow. |
@Jc2k Thank you for all the information. It is now more clear. |
Hi,
I just paired my Nuki device (BLE) to homeassistant (If I need to post this issue there and not here, please let me know) and when I tried to perform an operation (lock/unlock) it respond after few seconds, but as soon as I perform more operations (right after), they respond immediately. The operating become slow again after a while (not sure, something like 1 minute).
In the log I see many warn message goes like:
WARNING (MainThread) [aiohomekit.pdu] Transaction 57 failed with error 6 (Invalid request)
While the transaction number is different.
I can post also debug log, but i'm not sure if it contains confidential information, so please let me know.
Thanks you a lot for all the contribution and help!
The text was updated successfully, but these errors were encountered: