core: Problem with pairing Yeelight lightstrip with homekit controller on v2022.3.1

The problem

I am trying to pair yeelight lightstrip with homekit_controller. First i paired it with Home app, then removed it and tried adding it via homekit_controller, then i get error Cannot add pairing as device can no longer be found.

I even tried deleting homekit.state file but that only reseted my homekit bridge integration

I turned on debug logs for these but nothing showing there:

homeassistant.components.homekit_controller: debug
aiohomekit: debug

What version of Home Assistant Core has the issue?

2022.3.1

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Supervised

Integration causing the issue

Homekit Controller

Link to integration documentation on our website

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

Diagnostics information

No response

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 2 years ago
  • Comments: 17 (6 by maintainers)

Commits related to this issue

Most upvoted comments

I’m getting the same error on 2022.4.5. Adding a few debugs to the config flow gives:


2022-04-18 18:17:12 DEBUG (MainThread) [aiohomekit.zeroconf] _async_homekit_devices_from_cache infos=[AsyncServiceInfo(type='_hap._tcp.local.', name='Rachio-3EEC76._hap._tcp.local.', addresses=[], port=None, weight=0, priority=0, server='Rachio-3EEC76._hap._tcp.local.', properties={}, interface_index=None), AsyncServiceInfo(type='_hap._tcp.local.', name='Elements 5147._hap._tcp.local.', addresses=[], port=None, weight=0, priority=0, server='Elements 5147._hap._tcp.local.', properties={}, interface_index=None)]

2022-04-18 18:17:12 DEBUG (MainThread) [aiohomekit.zeroconf] - _async_homekit_devices_from_cache info=AsyncServiceInfo(type='_hap._tcp.local.', name='Rachio-3EEC76._hap._tcp.local.', addresses=[b'\n\x01\x00\xd1'], port=80, weight=0, priority=0, server='WICED-hap-3EEC76.local.', properties={b'id': b'A3:B8:90:C4:33:DD', b'md': b'Rachio-3EEC76', b'pv': b'1.1', b's#': b'1', b'sf': b'0', b'ff': b'1', b'ci': b'2', b'sh': b'zeV3Tw==', b'c#': b'1'}, interface_index=None)

2022-04-18 18:17:12 DEBUG (MainThread) [aiohomekit.zeroconf] - _async_homekit_devices_from_cache info=AsyncServiceInfo(type='_hap._tcp.local.', name='Elements 5147._hap._tcp.local.', addresses=[b'\n

\x01\x00\xa0'], port=6517, weight=0, priority=0, server='Elements-5147.local.', properties={b'id': b'49:44:FC:F7:3E:04', b'md': b'NL52', b'ff': b'1', b'c#': b'5', b's#': b'1', b'ci': b'5', b'pv': b'1.1', b'sh': b'f/YqGw==', b'sf': b'1'}, interface_index=None)

2022-04-18 18:17:14 DEBUG (MainThread) [aiohomekit.zeroconf] _async_device_data_zeroconf_cache device_id=49:44:fc:f7:3e:04

2022-04-18 18:17:14 DEBUG (MainThread) [aiohomekit.zeroconf] _async_homekit_devices_from_cache infos=[AsyncServiceInfo(type='_hap._tcp.local.', name='Rachio-3EEC76._hap._tcp.local.', addresses=[], port=None, weight=0, priority=0, server='Rachio-3EEC76._hap._tcp.local.', properties={}, interface_index=None), AsyncServiceInfo(type='_hap._tcp.local.', name='Elements 5147._hap._tcp.local.', addresses=[], port=None, weight=0, priority=0, server='Elements 5147._hap._tcp.local.', properties={}, interface_index=None)]

2022-04-18 18:17:14 DEBUG (MainThread) [aiohomekit.zeroconf] - _async_homekit_devices_from_cache info=AsyncServiceInfo(type='_hap._tcp.local.', name='Rachio-3EEC76._hap._tcp.local.', addresses=[b'\n

\x01\x00\xd1'], port=80, weight=0, priority=0, server='WICED-hap-3EEC76.local.', properties={b'id': b'A3:B8:90:C4:33:DD', b'md': b'Rachio-3EEC76', b'pv': b'1.1', b's#': b'1', b'sf': b'0', b'ff': b'1', b'ci': b'2', b'sh': b'zeV3Tw==', b'c#': b'1'}, interface_index=None)

2022-04-18 18:17:14 DEBUG (MainThread) [aiohomekit.zeroconf] - _async_homekit_devices_from_cache info=AsyncServiceInfo(type='_hap._tcp.local.', name='Elements 5147._hap._tcp.local.', addresses=[b'\n\x01\x00\xa0'], port=6517, weight=0, priority=0, server='Elements-5147.local.', properties={b'id': b'49:44:FC:F7:3E:04', b'md': b'NL52', b'ff': b'1', b'c#': b'5', b's#': b'1', b'ci': b'5', b'pv': b'1.1', b'sh': b'f/YqGw==', b'sf': b'1'}, interface_index=None)

2022-04-18 18:17:14 DEBUG (MainThread) [homeassistant.components.homekit_controller.config_flow] ANFE 2

Traceback (most recent call last):

  File "/usr/src/homeassistant/homeassistant/components/homekit_controller/config_flow.py", line 403, in async_step_pair

    discovery = await self.controller.async_find(self.hkid)

  File "/usr/local/lib/python3.9/site-packages/aiohomekit/controller/controller.py", line 77, in async_find

    return await self.find_ip_by_device_id(device_id, max_seconds)

  File "/usr/local/lib/python3.9/site-packages/aiohomekit/controller/controller.py", line 118, in find_ip_by_device_id

    device = await async_find_data_for_device_id(

  File "/usr/local/lib/python3.9/site-packages/aiohomekit/zeroconf/__init__.py", line 332, in async_find_data_for_device_id

    return await _async_device_data_zeroconf_cache(

  File "/usr/local/lib/python3.9/site-packages/aiohomekit/zeroconf/__init__.py", line 120, in _async_device_data_zeroconf_cache

    raise AccessoryNotFoundError("Device not found from active ServiceBrower")

aiohomekit.exceptions.AccessoryNotFoundError: Device not found from active ServiceBrower

Note that we’re looking in the cache for a lowercase device ID while zeroconf properties.id has uppercase.

Thank you man, this fixed it for me aswell.

I’m getting the same error on 2022.4.5. Adding a few debugs to the config flow gives:

2022-04-18 18:17:12 DEBUG (MainThread) [aiohomekit.zeroconf] _async_homekit_devices_from_cache infos=[AsyncServiceInfo(type='_hap._tcp.local.', name='Rachio-3EEC76._hap._tcp.local.', addresses=[], port=None, weight=0, priority=0, server='Rachio-3EEC76._hap._tcp.local.', properties={}, interface_index=None), AsyncServiceInfo(type='_hap._tcp.local.', name='Elements 5147._hap._tcp.local.', addresses=[], port=None, weight=0, priority=0, server='Elements 5147._hap._tcp.local.', properties={}, interface_index=None)]
2022-04-18 18:17:12 DEBUG (MainThread) [aiohomekit.zeroconf] - _async_homekit_devices_from_cache info=AsyncServiceInfo(type='_hap._tcp.local.', name='Rachio-3EEC76._hap._tcp.local.', addresses=[b'\n\x01\x00\xd1'], port=80, weight=0, priority=0, server='WICED-hap-3EEC76.local.', properties={b'id': b'A3:B8:90:C4:33:DD', b'md': b'Rachio-3EEC76', b'pv': b'1.1', b's#': b'1', b'sf': b'0', b'ff': b'1', b'ci': b'2', b'sh': b'zeV3Tw==', b'c#': b'1'}, interface_index=None)
2022-04-18 18:17:12 DEBUG (MainThread) [aiohomekit.zeroconf] - _async_homekit_devices_from_cache info=AsyncServiceInfo(type='_hap._tcp.local.', name='Elements 5147._hap._tcp.local.', addresses=[b'\n
\x01\x00\xa0'], port=6517, weight=0, priority=0, server='Elements-5147.local.', properties={b'id': b'49:44:FC:F7:3E:04', b'md': b'NL52', b'ff': b'1', b'c#': b'5', b's#': b'1', b'ci': b'5', b'pv': b'1.1', b'sh': b'f/YqGw==', b'sf': b'1'}, interface_index=None)
2022-04-18 18:17:14 DEBUG (MainThread) [aiohomekit.zeroconf] _async_device_data_zeroconf_cache device_id=49:44:fc:f7:3e:04
2022-04-18 18:17:14 DEBUG (MainThread) [aiohomekit.zeroconf] _async_homekit_devices_from_cache infos=[AsyncServiceInfo(type='_hap._tcp.local.', name='Rachio-3EEC76._hap._tcp.local.', addresses=[], port=None, weight=0, priority=0, server='Rachio-3EEC76._hap._tcp.local.', properties={}, interface_index=None), AsyncServiceInfo(type='_hap._tcp.local.', name='Elements 5147._hap._tcp.local.', addresses=[], port=None, weight=0, priority=0, server='Elements 5147._hap._tcp.local.', properties={}, interface_index=None)]
2022-04-18 18:17:14 DEBUG (MainThread) [aiohomekit.zeroconf] - _async_homekit_devices_from_cache info=AsyncServiceInfo(type='_hap._tcp.local.', name='Rachio-3EEC76._hap._tcp.local.', addresses=[b'\n
\x01\x00\xd1'], port=80, weight=0, priority=0, server='WICED-hap-3EEC76.local.', properties={b'id': b'A3:B8:90:C4:33:DD', b'md': b'Rachio-3EEC76', b'pv': b'1.1', b's#': b'1', b'sf': b'0', b'ff': b'1', b'ci': b'2', b'sh': b'zeV3Tw==', b'c#': b'1'}, interface_index=None)
2022-04-18 18:17:14 DEBUG (MainThread) [aiohomekit.zeroconf] - _async_homekit_devices_from_cache info=AsyncServiceInfo(type='_hap._tcp.local.', name='Elements 5147._hap._tcp.local.', addresses=[b'\n\x01\x00\xa0'], port=6517, weight=0, priority=0, server='Elements-5147.local.', properties={b'id': b'49:44:FC:F7:3E:04', b'md': b'NL52', b'ff': b'1', b'c#': b'5', b's#': b'1', b'ci': b'5', b'pv': b'1.1', b'sh': b'f/YqGw==', b'sf': b'1'}, interface_index=None)
2022-04-18 18:17:14 DEBUG (MainThread) [homeassistant.components.homekit_controller.config_flow] ANFE 2
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/homekit_controller/config_flow.py", line 403, in async_step_pair
    discovery = await self.controller.async_find(self.hkid)
  File "/usr/local/lib/python3.9/site-packages/aiohomekit/controller/controller.py", line 77, in async_find
    return await self.find_ip_by_device_id(device_id, max_seconds)
  File "/usr/local/lib/python3.9/site-packages/aiohomekit/controller/controller.py", line 118, in find_ip_by_device_id
    device = await async_find_data_for_device_id(
  File "/usr/local/lib/python3.9/site-packages/aiohomekit/zeroconf/__init__.py", line 332, in async_find_data_for_device_id
    return await _async_device_data_zeroconf_cache(
  File "/usr/local/lib/python3.9/site-packages/aiohomekit/zeroconf/__init__.py", line 120, in _async_device_data_zeroconf_cache
    raise AccessoryNotFoundError("Device not found from active ServiceBrower")
aiohomekit.exceptions.AccessoryNotFoundError: Device not found from active ServiceBrower

Note that we’re looking in the cache for a lowercase device ID while zeroconf properties.id has uppercase.