aiohomekit
aiohomekit copied to clipboard
CoAP fails to pair-verify on macOS
trafficstars
2022-09-21 09:00:19.497 WARNING (MainThread) [aiohomekit.controller.coap.connection] Pair verify failed
Traceback (most recent call last):
File "/Users/john/Projects/home-assistant/venv/lib/python3.9/site-packages/aiohomekit/controller/coap/connection.py", line 386, in connect
await self.do_pair_verify(pairing_data)
File "/Users/john/Projects/home-assistant/venv/lib/python3.9/site-packages/aiohomekit/controller/coap/connection.py", line 334, in do_pair_verify
coap_client = await Context.create_server_context(root, bind=("::", 0))
File "/Users/john/Projects/home-assistant/venv/lib/python3.9/site-packages/aiocoap/protocol.py", line 255, in create_server_context
await self._append_tokenmanaged_messagemanaged_transport(
File "/Users/john/Projects/home-assistant/venv/lib/python3.9/site-packages/aiocoap/protocol.py", line 127, in _append_tokenmanaged_messagemanaged_transport
transport = await message_interface_constructor(mman)
File "/Users/john/Projects/home-assistant/venv/lib/python3.9/site-packages/aiocoap/transports/simplesocketserver.py", line 190, in create_server
self._pool = await self._serversocket.create(bind, log, self._loop, self)
File "/Users/john/Projects/home-assistant/venv/lib/python3.9/site-packages/aiocoap/transports/simplesocketserver.py", line 103, in create
raise ValueError("The transport can not be bound to any-address.")
ValueError: The transport can not be bound to any-address.
You can force the backend with:
AIOCOAP_SERVER_TRANSPORT=udp6
Which seems to allow it to start.
With https://github.com/chrysn/aiocoap/commit/54279e68ec1e4b49acd62ded4d348eb38cdfe831 we can specify transports in the code
If it uses udp6 on Linux anyway, then we should do that and force udp6.