Tried the HomeKit integration introduced a few updates ago with mixed success (some devices not responding etc) so I thought it might be a good time to test it again. However, now I cannot even get it to work at all. Removed the pin-code option in the configuration file so it only reads homekit: and removed the .homekit.state file and rebooted my docker container. All I get now is an error in the log:
Log Details (ERROR)
Thu May 10 2018 09:28:04 GMT+0200 (CEST)
Error doing job: Future exception was never retrieved
Traceback (most recent call last):
File “/usr/local/lib/python3.6/concurrent/futures/thread.py”, line 56, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/src/app/homeassistant/components/homekit/init.py”, line 204, in start
self.add_bridge_accessory(state)
File “/usr/src/app/homeassistant/components/homekit/init.py”, line 190, in add_bridge_accessory
self.bridge.add_accessory(acc)
File “/usr/local/lib/python3.6/site-packages/pyhap/accessory.py”, line 468, in add_accessory
raise ValueError(“Duplicate AID found when attempting to add accessory”)
ValueError: Duplicate AID found when attempting to add accessory
@cdce8p Thanks for the reply. I was guessing something like this had happened but I would have expected other complications if this had happened.
The logger gave me an I idea of where to start looking and I could begon to narrow down which entity was the faulty one by first using the exclude_domains tag and then further narrowing down by using exclude_entities. Luckily it was a entity which I do not want I homekit anyway,
I have the same problem and the process by @upsideduck is quite painful. Is there a better way to find the duplicate? I have lots of entities, and restarting HASS each time to test it is painful…add in the homekit service delay as is documented on the homekit doco page…I’ll be here for a month of sundays.
That they appear to have the same name, doesn’t have anything to do with the AID. It’s just that the Home App can’t display characters beyond a certain length. However you can rename your entities in the App.
2020-02-18 22:00:19 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 247, in async_run
await self._handle_action(action, variables, context)
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 331, in _handle_action
await self._actions[_determine_action(action)](action, variables, context)
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 413, in _async_call_service
context=context,
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 96, in async_call_from_config
domain, service_name, service_data, blocking=blocking, context=context
File "/usr/src/homeassistant/homeassistant/core.py", line 1226, in async_call
await asyncio.shield(self._execute_service(handler, service_call))
File "/usr/src/homeassistant/homeassistant/core.py", line 1253, in _execute_service
await self._hass.async_add_executor_job(handler.func, service_call)
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/homekit/__init__.py", line 167, in handle_homekit_service_start
homekit.start()
File "/usr/src/homeassistant/homeassistant/components/homekit/__init__.py", line 378, in start
self.add_bridge_accessory(state)
File "/usr/src/homeassistant/homeassistant/components/homekit/__init__.py", line 350, in add_bridge_accessory
self.bridge.add_accessory(acc)
File "/usr/local/lib/python3.7/site-packages/pyhap/accessory.py", line 354, in add_accessory
raise ValueError("Duplicate AID found when attempting to add accessory")
ValueError: Duplicate AID found when attempting to add accessory