core icon indicating copy to clipboard operation
core copied to clipboard

Onvis SMS2 lost connection / Can't pair again

Open pbehrens99hh opened this issue 5 months ago • 2 comments

The problem

Hi,

my ONVIS SMS2 motion sensors recently (randomly) lost connection. They're initially HomeKit devices which I've added to HomeKit, removing them, then adding them to HA after being discovered instantly.

I've updated both sensors yesterday after some troubleshooting, unfortunately with the same outcome.

Please find the stack trace attached.

What version of Home Assistant Core has the issue?

2025.9.4

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_controller

Link to integration documentation on our website

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

Diagnostics information

No response

Example YAML snippet


Anything in the logs that might be useful for us?

Logger: homeassistant.components.homekit_controller.config_flow
Source: components/homekit_controller/config_flow.py:439 
integration: HomeKit Device (documentation, issues) 
First occurred: 9:08:24 AM (1 occurrence) 
Last logged: 9:08:24 AM
Pairing attempt failed with an unhandled exception
Traceback (most recent call last):
  File "/usr/local/lib/python3.13/site-packages/aiohomekit/controller/coap/pairing.py", line 105, in _ensure_connected
    await self.connection_future
  File "/usr/local/lib/python3.13/site-packages/aiohomekit/controller/coap/connection.py", line 386, in connect
    await self.get_accessory_info()
  File "/usr/local/lib/python3.13/site-packages/aiohomekit/controller/coap/connection.py", line 395, 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 181, in post
    res_pdu = await self.post_bytes(req_pdu)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/aiohomekit/controller/coap/connection.py", line 160, in post_bytes
    response = await self.coap_ctx.request(request).response
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/aiocoap/protocol.py", line 768, 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 843, 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 439, in async_step_pair
    return await self._entry_from_accessory(pairing)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/homekit_controller/config_flow.py", line 567, in _entry_from_accessory
    name = await pairing.get_primary_name()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/aiohomekit/controller/abstract.py", line 253, 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 140, in list_accessories_and_characteristics
    await self._ensure_connected()
  File "/usr/local/lib/python3.13/site-packages/aiohomekit/controller/coap/pairing.py", line 107, in _ensure_connected
    raise AccessoryDisconnectedError("failed to connect")
aiohomekit.exceptions.AccessoryDisconnectedError: failed to connectLogger: homeassistant.components.homekit_controller.config_flow
Source: components/homekit_controller/config_flow.py:439 
integration: HomeKit Device (documentation, issues) 
First occurred: 9:08:24 AM (1 occurrence) 
Last logged: 9:08:24 AM
Pairing attempt failed with an unhandled exception
Traceback (most recent call last):
  File "/usr/local/lib/python3.13/site-packages/aiohomekit/controller/coap/pairing.py", line 105, in _ensure_connected
    await self.connection_future
  File "/usr/local/lib/python3.13/site-packages/aiohomekit/controller/coap/connection.py", line 386, in connect
    await self.get_accessory_info()
  File "/usr/local/lib/python3.13/site-packages/aiohomekit/controller/coap/connection.py", line 395, 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 181, in post
    res_pdu = await self.post_bytes(req_pdu)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/aiohomekit/controller/coap/connection.py", line 160, in post_bytes
    response = await self.coap_ctx.request(request).response
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/aiocoap/protocol.py", line 768, 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 843, 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 439, in async_step_pair
    return await self._entry_from_accessory(pairing)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/homekit_controller/config_flow.py", line 567, in _entry_from_accessory
    name = await pairing.get_primary_name()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/aiohomekit/controller/abstract.py", line 253, 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 140, in list_accessories_and_characteristics
    await self._ensure_connected()
  File "/usr/local/lib/python3.13/site-packages/aiohomekit/controller/coap/pairing.py", line 107, in _ensure_connected
    raise AccessoryDisconnectedError("failed to connect")
aiohomekit.exceptions.AccessoryDisconnectedError: failed to connect

Additional information

No response

pbehrens99hh avatar Sep 20 '25 07:09 pbehrens99hh

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 close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign homekit_controller Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove 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)

home-assistant[bot] avatar Sep 23 '25 20:09 home-assistant[bot]

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.