You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm running Home Assistant 2024.12.3 and trying to pair Nanoleaf Led Stip which seems to work via Thread. It keeps on failing claiming the device is already added to another device. It asks to report it, so I did.
2024-12-15 09:45:35.679 WARNING (MainThread) [aiohomekit.controller.coap.pdu] Transaction 0 failed with error 6 (Invalid request
2024-12-15 09:45:35.948 WARNING (MainThread) [coap-server] An exception that is not an aiocoap Error was raised from a transport; please report this as a bug in aiocoap: TypeError("'NoneType' object does not support item assignment")
2024-12-15 09:45:35.948 ERROR (MainThread) [aiohomekit.utils] Failure running background task: Task-198725
Traceback (most recent call last):
File "/usr/local/lib/python3.13/site-packages/aiohomekit/utils.py", line 40, in _handle_task_result
task.result()
~~~~~~~~~~~^^
File "/usr/local/lib/python3.13/site-packages/aiohomekit/controller/coap/pairing.py", line 169, in _process_config_changed
await self.list_accessories_and_characteristics()
File "/usr/local/lib/python3.13/site-packages/aiohomekit/controller/coap/pairing.py", line 149, in list_accessories_and_characteristics
accessories = await self.connection.get_accessory_info()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/aiohomekit/controller/coap/connection.py", line 413, in get_accessory_info
_, body = await self.enc_ctx.post(OpCode.UNK_09_READ_GATT, 0x0000, b"")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/aiohomekit/controller/coap/connection.py", line 194, in post
res_pdu = await self.post_bytes(req_pdu)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/aiohomekit/controller/coap/connection.py", line 171, in post_bytes
response = await self.coap_ctx.request(request).response
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/aiocoap/protocol.py", line 760, in _run_outer
await cls._run(app_request, response, weak_observation, protocol, log)
File "/usr/local/lib/python3.13/site-packages/aiocoap/protocol.py", line 835, in _run
blockresponse = await blockrequest.response
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/aiocoap/protocol.py", line 475, in send
request_interface.request(pipe)
~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
File "/usr/local/lib/python3.13/site-packages/aiocoap/tokenmanager.py", line 246, in request
self.outgoing_requests[key] = request
~~~~~~~~~~~~~~~~~~~~~~^^^^^
TypeError: 'NoneType' object does not support item assignment
2024-12-15 09:45:35.950 WARNING (MainThread) [coap-server] An exception that is not an aiocoap Error was raised from a transport; please report this as a bug in aiocoap: TypeError("'NoneType' object does not support item assignment")
2024-12-15 09:45:35.951 ERROR (MainThread) [homeassistant.components.homekit_controller.config_flow] Pairing attempt failed with an unhandled exception
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/homekit_controller/config_flow.py", line 437, in async_step_pair
return await self._entry_from_accessory(pairing)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/homekit_controller/config_flow.py", line 565, in _entry_from_accessory
name = await pairing.get_primary_name()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/aiohomekit/controller/abstract.py", line 264, in get_primary_name
accessories = await self.list_accessories_and_characteristics()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/aiohomekit/controller/coap/pairing.py", line 149, in list_accessories_and_characteristics
accessories = await self.connection.get_accessory_info()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/aiohomekit/controller/coap/connection.py", line 440, in get_accessory_info
results = await self.enc_ctx.post_all(OpCode.CHAR_READ, iids, data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/aiohomekit/controller/coap/connection.py", line 201, in post_all
res_pdu = await self.post_bytes(req_pdu)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/aiohomekit/controller/coap/connection.py", line 171, in post_bytes
response = await self.coap_ctx.request(request).response
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/aiocoap/protocol.py", line 760, in _run_outer
await cls._run(app_request, response, weak_observation, protocol, log)
File "/usr/local/lib/python3.13/site-packages/aiocoap/protocol.py", line 835, in _run
blockresponse = await blockrequest.response
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/aiocoap/protocol.py", line 475, in send
request_interface.request(pipe)
~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
File "/usr/local/lib/python3.13/site-packages/aiocoap/tokenmanager.py", line 246, in request
self.outgoing_requests[key] = request
~~~~~~~~~~~~~~~~~~~~~~^^^^^
TypeError: 'NoneType' object does not support item assignment
The text was updated successfully, but these errors were encountered:
The main issue appears to be in aiohomekit where the transaction failed. Apparently, aiohomekit then shuts down its aiocoap context and still keeps sending requests; please take this up with the aiohomekit developers (and CC me in the issue, I'm curious how this came to be).
There is a secondary error that aiocoap does not properly raise a LibraryShutdown error instead of a TypeError; this is being fixed.
I'm running Home Assistant 2024.12.3 and trying to pair Nanoleaf Led Stip which seems to work via Thread. It keeps on failing claiming the device is already added to another device. It asks to report it, so I did.
The text was updated successfully, but these errors were encountered: