Could not add HomeKit device Onvis CT3 Sensor
The problem
I have been using 6 Onvis CT3 sensors for a year now. In the past, I was able to add the devices to Home Assistant in the following way. First, I added the sensors to Apple Home via the Onvis app and checked for a firmware update. I then deleted the sensors from Apple Home and the devices were offered to me as new devices in the Home Assistant. The code was requested during configuration and the device was successfully assigned to a room. Since the Home Assistant update in September, the sensors were no longer accessible. I then deleted and reset the sensors. I then added them back in the Onvis app and updated the firmware again. Then deleted from Apple Home again. The sensor is then displayed again as an available device in the Home Assistant, then the device is configured and the code is entered. A message then appears stating that the device is already connected to another control unit. The rest of the sensor was also unsuccessful. What to do now?
What version of Home Assistant Core has the issue?
2024.9.1
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
HomeKit Onvis CT3 Sensor
Link to integration documentation on our website
No response
Diagnostics information
Logger: homeassistant.components.homekit_controller.config_flow Quelle: components/homekit_controller/config_flow.py:454 Integration: HomeKit-Gerät (Dokumentation, Probleme) Erstmals aufgetreten: 18:58:24 (1 Vorkommnisse) Zuletzt protokolliert: 18:58:24
Pairing attempt failed with an unhandled exception Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/aiohomekit/controller/coap/pairing.py", line 111, in _ensure_connected await self.connection_future File "/usr/local/lib/python3.12/site-packages/aiohomekit/controller/coap/connection.py", line 404, in connect await self.get_accessory_info() File "/usr/local/lib/python3.12/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.12/site-packages/aiohomekit/controller/coap/connection.py", line 194, in post res_pdu = await self.post_bytes(req_pdu) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/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.12/site-packages/aiocoap/protocol.py", line 758, in _run_outer await cls._run(app_request, response, weak_observation, protocol, log) File "/usr/local/lib/python3.12/site-packages/aiocoap/protocol.py", line 833, in _run blockresponse = await blockrequest.response ^^^^^^^^^^^^^^^^^^^^^^^^^^^ aiocoap.error.LibraryShutdown
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/homekit_controller/config_flow.py", line 454, in async_step_pair return await self._entry_from_accessory(pairing) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/homekit_controller/config_flow.py", line 582, in _entry_from_accessory name = await pairing.get_primary_name() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohomekit/controller/abstract.py", line 264, in get_primary_name accessories = await self.list_accessories_and_characteristics() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohomekit/controller/coap/pairing.py", line 147, in list_accessories_and_characteristics await self._ensure_connected() File "/usr/local/lib/python3.12/site-packages/aiohomekit/controller/coap/pairing.py", line 113, in _ensure_connected raise AccessoryDisconnectedError("failed to connect") aiohomekit.exceptions.AccessoryDisconnectedError: failed to connect
Example YAML snippet
No response
Anything in the logs that might be useful for us?
Logger: coap-server
Quelle: runner.py:189
Erstmals aufgetreten: 18:58:24 (1 Vorkommnisse)
Zuletzt protokolliert: 18:58:24
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")
Additional information
First I connected the Sensor to HomeKit and the remove it. After this, HA found the Sensor, but after I have entered the paring Code the comes the message, the sensor is already connected to an other device.
Hey there @jc2k, @bdraco, mind taking a look at this issue as it has been labeled with an integration (homekit_controller) you are listed as a code owner for? Thanks!
Code owner commands
Code owners of homekit_controller can trigger bot actions by commenting:
-
@home-assistant closeCloses the issue. -
@home-assistant rename Awesome new titleRenames the issue. -
@home-assistant reopenReopen the issue. -
@home-assistant unassign homekit_controllerRemoves the current integration label and assignees on the issue, add the integration domain after the command. -
@home-assistant add-label needs-more-informationAdd a label (needs-more-information, problem in dependency, problem in custom component) to the issue. -
@home-assistant remove-label needs-more-informationRemove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.
(message by CodeOwnersMention)
homekit_controller documentation homekit_controller source (message by IssueLinks)
I am facing the same issue after trying to reconnect an Eve Room device after recalibration. The very first time I connected this to HomeKit, then removed it from HomeKit and connected to Home Assistant as HomeKit device. Later, I reset the device to trigger recalibration and tried to redo the same steps. Connecting to HomeKit was not a problem, I then removed it from HomeKit. I then instantly get the option to connect as HomeKit device in Home Assistant and upon trying to pair it, I am running into the very same issue and receive the same error message.
I include the log as well as the last traceback seems to be missing from the above log:
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/aiohomekit/controller/coap/pairing.py", line 111, in _ensure_connected
await self.connection_future
File "/usr/local/lib/python3.12/site-packages/aiohomekit/controller/coap/connection.py", line 404, in connect
await self.get_accessory_info()
File "/usr/local/lib/python3.12/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.12/site-packages/aiohomekit/controller/coap/connection.py", line 194, in post
res_pdu = await self.post_bytes(req_pdu)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/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.12/site-packages/aiocoap/protocol.py", line 758, in _run_outer
await cls._run(app_request, response, weak_observation, protocol, log)
File "/usr/local/lib/python3.12/site-packages/aiocoap/protocol.py", line 833, in _run
blockresponse = await blockrequest.response
^^^^^^^^^^^^^^^^^^^^^^^^^^^
aiocoap.error.LibraryShutdown
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/homekit_controller/config_flow.py", line 454, in async_step_pair
return await self._entry_from_accessory(pairing)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/homekit_controller/config_flow.py", line 582, in _entry_from_accessory
name = await pairing.get_primary_name()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aiohomekit/controller/abstract.py", line 264, in get_primary_name
accessories = await self.list_accessories_and_characteristics()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aiohomekit/controller/coap/pairing.py", line 147, in list_accessories_and_characteristics
await self._ensure_connected()
File "/usr/local/lib/python3.12/site-packages/aiohomekit/controller/coap/pairing.py", line 113, in _ensure_connected
raise AccessoryDisconnectedError("failed to connect")
aiohomekit.exceptions.AccessoryDisconnectedError: failed to connect
2024-09-22 11:45:31.622 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-09-22 11:45:31.634 ERROR (MainThread) [aiohomekit.utils] Failure running background task: Task-512
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/aiohomekit/utils.py", line 40, in _handle_task_result
task.result()
File "/usr/local/lib/python3.12/site-packages/aiohomekit/controller/coap/pairing.py", line 169, in _process_config_changed
await self.list_accessories_and_characteristics()
File "/usr/local/lib/python3.12/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.12/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.12/site-packages/aiohomekit/controller/coap/connection.py", line 194, in post
res_pdu = await self.post_bytes(req_pdu)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/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.12/site-packages/aiocoap/protocol.py", line 758, in _run_outer
await cls._run(app_request, response, weak_observation, protocol, log)
File "/usr/local/lib/python3.12/site-packages/aiocoap/protocol.py", line 833, in _run
blockresponse = await blockrequest.response
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aiocoap/protocol.py", line 473, in send
request_interface.request(pipe)
File "/usr/local/lib/python3.12/site-packages/aiocoap/tokenmanager.py", line 246, in request
self.outgoing_requests[key] = request
~~~~~~~~~~~~~~~~~~~~~~^^^^^
TypeError: 'NoneType' object does not support item assignment
Are there any new findings on this. I can't use my CT3 Sensors.
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.