core: Homekit Controller Intermittent delay with Aqara e1 Hub for Door Lock

The problem

I have Homekit controller paired with an e1 hub, which itself has around 3 sensors (2 thermostat) paired to it. Response time in the Aqara Hub and 2 thermostats and Home Assistant Is normally instant. However randomly the response time from when a Door Lock is triggered to when it reports in HA will go from instant, to taking 30 seconds to a minute OR NEVER.

"device": { "name": "Smart Door Lock N100 C2B3", "model": "ZNMS16LM", "manfacturer": "Aqara", "sw_version": "1.1.3", "hw_version": "1.0.0", "entities": [ { "original_name": "Signal strength", "original_device_class": "signal_strength", "entity_category": "diagnostic", "original_icon": null, "icon": null, "unit_of_measurement": "dBm", "device_class": null, "disabled": true, "disabled_by": "integration", "state": null }, { "original_name": "Smart Door Lock N100 C2B3", "original_device_class": null, "entity_category": null, "original_icon": null, "icon": null, "unit_of_measurement": null, "device_class": null, "disabled": false, "disabled_by": null, "state": { "entity_id": "lock.smart_door_lock_n100_c2b3", "state": "locked", "attributes": { "friendly_name": "Smart Door Lock N100 C2B3", "supported_features": 0 }, "last_changed": "2023-05-25T18:37:21.750688+00:00", "last_updated": "2023-05-25T18:37:21.750688+00:00" } }, { "original_name": "Smart Door Lock N100 C2B3 Identify", "original_device_class": null, "entity_category": "diagnostic", "original_icon": null, "icon": null, "unit_of_measurement": null, "device_class": null, "disabled": false, "disabled_by": null, "state": { "entity_id": "button.smart_door_lock_n100_c2b3_identify", "state": "2023-05-25T18:46:49.660779+00:00", "attributes": { "friendly_name": "Smart Door Lock N100 C2B3 Identify" }, "last_changed": "2023-05-25T18:46:49.661173+00:00", "last_updated": "2023-05-25T18:46:49.661173+00:00" } }, { "original_name": "Smart Door Lock N100 C2B3 battery_service", "original_device_class": "battery", "entity_category": "diagnostic", "original_icon": "mdi:battery-unknown", "icon": null, "unit_of_measurement": "%", "device_class": null, "disabled": false, "disabled_by": null, "state": { "entity_id": "sensor.smart_door_lock_n100_c2b3_battery_service", "state": "100", "attributes": { "state_class": "measurement", "unit_of_measurement": "%", "device_class": "battery", "icon": "mdi:battery", "friendly_name": "Smart Door Lock N100 C2B3 battery_service" }, "last_changed": "2023-05-25T18:30:21.265938+00:00", "last_updated": "2023-05-25T18:30:21.265938+00:00" } } ] }

What version of Home Assistant Core has the issue?

core-2023.5.4

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

HA OS

Integration causing the issue

Homekit Controller

Link to integration documentation on our website

https://www.home-assistant.io/integrations/homekit_controller/

Diagnostics information

` Logger: homeassistant.core Source: components/homekit_controller/connection.py:781 First occurred: 21:33:57 (4 occurrences) Last logged: 21:47:29

Error executing service: <ServiceCall button.press (c:01H1A2Z258E4FXJN1Y8HMZTK34): entity_id=[‘button.smart_door_lock_n100_c2b3_identify’]> Error executing service: <ServiceCall lock.unlock (c:01H1A3H4BXSSJP9S3TDPWNC309): entity_id=[‘lock.smart_door_lock_n100_c2b3’]> Error executing service: <ServiceCall button.press (c:01H1A3QBEZ84K24VJSR5ZT6DR4): entity_id=[‘button.smart_door_lock_n100_c2b3_identify’]> Error executing service: <ServiceCall lock.unlock (c:01H1A3QKEVW56ZJYH58B79QMYH): entity_id=[‘lock.smart_door_lock_n100_c2b3’]> Traceback (most recent call last): File “/usr/local/lib/python3.10/site-packages/bleak_retry_connector/init.py”, line 344, in establish_connection await client.connect( File “/usr/src/homeassistant/homeassistant/components/bluetooth/wrappers.py”, line 253, in connect wrapped_backend = self._async_get_best_available_backend_and_device(manager) File “/usr/src/homeassistant/homeassistant/components/bluetooth/wrappers.py”, line 355, in _async_get_best_available_backend_and_device raise BleakError( bleak.exc.BleakError: No backend with an available connection slot that can reach address D0:CE:00:6B:7A:4D was found

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File “/usr/local/lib/python3.10/site-packages/aiohomekit/controller/ble/connection.py”, line 47, in establish_connection return await retry_establish_connection( File “/usr/local/lib/python3.10/site-packages/bleak_retry_connector/init.py”, line 421, in establish_connection _raise_if_needed(name, device.address, exc) File “/usr/local/lib/python3.10/site-packages/bleak_retry_connector/init.py”, line 313, in _raise_if_needed raise BleakOutOfConnectionSlotsError( bleak_retry_connector.BleakOutOfConnectionSlotsError: Smart Door Lock N100 C2B3 [D0:CE:00:6B:7A:4D] (id=FE:2C:2A:66:4C:9E) - D0:CE:00:6B:7A:4D: Failed to connect: No backend with an available connection slot that can reach address D0:CE:00:6B:7A:4D was found: The proxy/adapter is out of connection slots; Add additional proxies near this device

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File “/usr/src/homeassistant/homeassistant/core.py”, line 1867, in catch_exceptions await coro_or_task File “/usr/src/homeassistant/homeassistant/core.py”, line 1889, in _execute_service await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)( File “/usr/src/homeassistant/homeassistant/helpers/entity_component.py”, line 226, in handle_service await service.entity_service_call( File “/usr/src/homeassistant/homeassistant/helpers/service.py”, line 798, in entity_service_call future.result() # pop exception if have File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 980, in async_request_call await coro File “/usr/src/homeassistant/homeassistant/helpers/service.py”, line 838, in _handle_entity_call await result File “/usr/src/homeassistant/homeassistant/components/button/init.py”, line 116, in _async_press_action await self.async_press() File “/usr/src/homeassistant/homeassistant/components/homekit_controller/button.py”, line 125, in async_press await self.async_put_characteristics({key: val}) File “/usr/src/homeassistant/homeassistant/components/homekit_controller/entity.py”, line 89, in async_put_characteristics return await self._accessory.put_characteristics(payload) File “/usr/src/homeassistant/homeassistant/components/homekit_controller/connection.py”, line 781, in put_characteristics await self.pairing.put_characteristics(characteristics) File “/usr/local/lib/python3.10/site-packages/aiohomekit/controller/ble/pairing.py”, line 189, in _async_operation_lock_wrap return await func(self, *args, **kwargs) File “/usr/local/lib/python3.10/site-packages/bleak_retry_connector/init.py”, line 454, in _async_wrap_bluetooth_connection_error_retry return await func(*args, **kwargs) File “/usr/local/lib/python3.10/site-packages/aiohomekit/controller/ble/pairing.py”, line 205, in _async_disconnect_on_missing_services_wrap return await func(self, *args, **kwargs) File “/usr/local/lib/python3.10/site-packages/aiohomekit/controller/ble/pairing.py”, line 229, in _async_restore_and_resume await self._populate_accessories_and_characteristics() File “/usr/local/lib/python3.10/site-packages/aiohomekit/controller/ble/pairing.py”, line 1099, in _populate_accessories_and_characteristics made_connection = await self._ensure_connected(attempts) File “/usr/local/lib/python3.10/site-packages/aiohomekit/controller/ble/pairing.py”, line 500, in _ensure_connected self.client = await establish_connection( File “/usr/local/lib/python3.10/site-packages/aiohomekit/controller/ble/connection.py”, line 61, in establish_connection raise AccessoryDisconnectedError(ex) from ex aiohomekit.exceptions.AccessoryDisconnectedError: Smart Door Lock N100 C2B3 [D0:CE:00:6B:7A:4D] (id=FE:2C:2A:66:4C:9E) - D0:CE:00:6B:7A:4D: Failed to connect: No backend with an available connection slot that can reach address D0:CE:00:6B:7A:4D was found: The proxy/adapter is out of connection slots; Add additional proxies near this device `

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 31 (13 by maintainers)

Most upvoted comments

There is nothing in your logs that indicates there is a bug. It looks like HA is asking Linux to connect to the device and it is either out of range, out of battery, or your bluetooth dongle is having trouble.

One lock required the user to be inches away in order to work (due to limitations of the lock).

If you have both it will use the strongest so it shouldn’t matter.

So homekit supports IP, Bluetooth and thread. HA supports all 3.

Your error message in the first post mentions Bluetooth.

The door lock talks HomeKit Accessory Protocol … over Bluetooth