Giter Site home page Giter Site logo

Comments (5)

itairaz1 avatar itairaz1 commented on June 24, 2024 1

@Jc2k Thank you for all the information. It is now more clear.
I think you can close the ticket.

from aiohomekit.

bdraco avatar bdraco commented on June 24, 2024

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 bleak_retry_connector and aiohomekit you can see why its taking so long to reconnect.

from aiohomekit.

Jc2k avatar Jc2k commented on June 24, 2024

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?

from aiohomekit.

itairaz1 avatar itairaz1 commented on June 24, 2024

@bdraco @Jc2k Thanks for reply
@bdraco I wasn't clear enough. It takes around 5-10 seconds (not 1 minute), so it seemed to be normal.
Is there a way to send operation to maintain/prepare a connection inadvance? so I can use it before I know there is a high chance I'm going to use the device.

@Jc2k Sorry, next time I will post directly to HA repo

So as above - What HA? What is it running on? How is it installed?

I'm using latest HA 2022.11.5. running on Raspberry Pi 4 64bit model B using latest HA OS 9.3.

What is the model of lock?

Nuki Smart Lock 3.0

Have you got any other homekit devices working with HA? One about other Bluetooth ones?

No

Have you turned on the signal strength sensor, and what is that looking like?

-85dBm

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?

No dongle, I'm using Raspberry Pi 4B hardware.
Raspberry Pi 4B listed as high performance
Using latest HA OS 9.3
No, I'm not using any esphome proxies?

from aiohomekit.

Jc2k avatar Jc2k commented on June 24, 2024

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.

from aiohomekit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.