Closed Dtrotmw closed 1 year ago
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!
(message by CodeOwnersMention)
homekit_controller documentation homekit_controller source (message by IssueLinks)
When you say reset, have they reset HomeKit? And then you have removed the integration in HA and re-added it?
Heatmiser have reset the Homekit so it now appears as an unpaired device that I tried adding (add integration>Apple>Homekit Controller>Device Selection> Heatmiser neoHub>submit). On the page asking for the pairing code it displays
An unhandled error occurred while attempting to pair with this device. This may be a temporary failure or your device may not be supported currently: Connection closed
And it won’t accept the pairing code.
The log that you attached doesn't show that - can you show me a pairing failure log please?
Your log does shows /pair-verify attempts. It looks like we are either unable to hold a connection to the device or the homekit service on the device is closing the connection without answering.
So this is sounding like the last ticket you raised - #85317 (unexplained connection closed errors).
If there aren't connectivity issues with the device, and you have verified the ports being used are correct with the Service Browser app or similar like before, then I think your hub is in a weird state still and not serving HomeKit properly.
I think this is the log entry you asked for:
2023-01-20 11:42:36.667 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 491, in async_step_pair
self.finish_pairing = await discovery.async_start_pairing(self.hkid)
File "/usr/local/lib/python3.10/site-packages/aiohomekit/controller/ip/discovery.py", line 62, in async_start_pairing
response = await self.connection.post_tlv(
File "/usr/local/lib/python3.10/site-packages/aiohomekit/controller/ip/connection.py", line 391, in post_tlv
response = await self.post(
File "/usr/local/lib/python3.10/site-packages/aiohomekit/controller/ip/connection.py", line 355, in post
return await self.request(
File "/usr/local/lib/python3.10/site-packages/aiohomekit/controller/ip/connection.py", line 450, in request
resp = await self.protocol.send_bytes(request_bytes)
File "/usr/local/lib/python3.10/site-packages/aiohomekit/controller/ip/connection.py", line 81, in send_bytes
return await result
aiohomekit.exceptions.AccessoryDisconnectedError: Connection closed
2023-01-20 11:43:03.393 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 491, in async_step_pair
self.finish_pairing = await discovery.async_start_pairing(self.hkid)
File "/usr/local/lib/python3.10/site-packages/aiohomekit/controller/ip/discovery.py", line 62, in async_start_pairing
response = await self.connection.post_tlv(
File "/usr/local/lib/python3.10/site-packages/aiohomekit/controller/ip/connection.py", line 391, in post_tlv
response = await self.post(
File "/usr/local/lib/python3.10/site-packages/aiohomekit/controller/ip/connection.py", line 355, in post
return await self.request(
File "/usr/local/lib/python3.10/site-packages/aiohomekit/controller/ip/connection.py", line 450, in request
resp = await self.protocol.send_bytes(request_bytes)
File "/usr/local/lib/python3.10/site-packages/aiohomekit/controller/ip/connection.py", line 69, in send_bytes
raise AccessoryDisconnectedError("Transport is closed")
aiohomekit.exceptions.AccessoryDisconnectedError: Transport is closed
I need more, that doesn't give me the context. It just tells me that your hub dropped the connection.
That's all that is in either log file with that timestamp (.log and .log.1). Where do I find what you need?
How did you get the log files you attached to the original bug report?
By selecting "enable debug logging" at the integration. The supplier issued another reset and I've now successfully added the integration, so you were right in thinking it was some wierd state in the neohub. The trouble is I've now got a second set of 49 entities with the _2 suffix. Is there any simple way I can avoid re-building everything I've used that refers to them?
In HA there are entities and devices. It sounds like you have duplicated entities but from your description I don't know if you have duplicate devices. Are you able to post screenshots of this from your device page?
2 copies of all the Heatmiser devices!
All sorted now after a session of changing all the entity names. It seems I managed to keep all the histories which was a big win. Thank you so much for all your help. it is much appreicated.
The problem
I had a long power cut yesterday and the Homekit controller which provides access to a Heatmiser NeoHub wont reconnect. The network is working fine and the router reports the hub still connected to the same IP address.
The supplier has reset the device & I've pressed "pair" on the hub. The Android app provided by Heatmiser is still working.
What version of Home Assistant Core has the issue?
Home Assistant 2023.1.6 Supervisor 2022.12.1 Operating System 9.4 Frontend 20230110.0 - latest
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant Container
Integration causing the issue
Apple Homekit
Link to integration documentation on our website
https://www.home-assistant.io/integrations/homekit_controller
Diagnostics information
home-assistant_homekit_controller_2023-01-20T10-55-20.303Z.log
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response