HomeKit Accessory Integration Fails

Hello,

I have rebuilt my Home Assistant Core on a new Rpi4. Everything has gone smoothly, but when I try to add a HomeKit Accessory through Configuration-Integration-HomeKit Accessory a small box opens, nothing within it, then it goes back to the main Configuration-Integration-Add screen. I have rebooted several times and added .zeroconf to my configuration.yaml, and rebooted again, but no change.

I checked my error log and get this:

Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/aiohttp/web_protocol.py", line 418, in start
    resp = await task
  File "/usr/local/lib/python3.7/site-packages/aiohttp/web_app.py", line 458, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.7/site-packages/aiohttp/web_middlewares.py", line 119, in impl
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/real_ip.py", line 39, in real_ip_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 72, in ban_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 135, in auth_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 123, in handle
    result = await result
  File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 127, in post
    return await super().post(request)
  File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 50, in wrapper
    result = await method(view, request, *args, **kwargs)
  File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 59, in post
    handler, context={"source": config_entries.SOURCE_USER}
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 109, in async_init
    result = await self._async_handle_step(flow, flow.init_step, data)
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 172, in _async_handle_step
    result: Dict = await getattr(flow, method)(user_input)
  File "/usr/src/homeassistant/homeassistant/components/homekit_controller/config_flow.py", line 107, in async_step_user
    all_hosts = await self.hass.async_add_executor_job(self.controller.discover, 5)
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.7/site-packages/homekit/controller/controller.py", line 90, in discover
    return discover_homekit_devices(max_seconds)
  File "/usr/local/lib/python3.7/site-packages/homekit/zeroconf_impl/__init__.py", line 102, in discover_homekit_devices
    info.properties
  File "/usr/local/lib/python3.7/site-packages/homekit/zeroconf_impl/__init__.py", line 180, in parse_discovery_properties
    d['category'] = Categories[int(category)]
  File "/usr/local/lib/python3.7/site-packages/homekit/model/categories.py", line 94, in __getitem__
    raise KeyError('Item {item} not found'.format(item=item))
KeyError: 'Item 33 not found'

I have searched Google for any topics like this, and have searched this site, but I am not finding a similar problem that is current. The closest problem was in 2018 and the suggestion that a directory called .homekit needed to be added, but that was changed in later versions.

Any suggestions on what I may try to add my HomeKit accessories?

Thank you in advance

Hi - for a code error like this your best bet is to raise an issue on GitHub - it will get tagged as homekit_controller and assigned to the maintainer (me!). I’m not active on here normally, just GitHub. This isn’t a configuration problem - your device just isn’t supported. But if you raise a ticket we might be able to add support. It will take a bit of back and forth - i’ll need you to collect some files for me and test some fixes if you are up for that.

Great! Thanks!

Interesting that it is not supported. It worked flawlessly on the same version of Home Assistant Core on my Rpi3. I will raise this as an issue on GitHub.

Cheers. Please include as much detail about the device you are trying to pair with and what other devices you have on your network that might support HomeKit. Category item 33 is apparently a HomeKit router. Don’t suppose you have any eero or linksys velop network gear?

Actually my network is eero

I have entered this on GitHub as an issue

For anyone else seeing this error, see here to track the resolution. Thanks @JamesDenby.