core: HomeKit setup errors out with Connection reset by peer / ECONNRESET

The problem

I’m having an issue with setting up HomeKit. When I set it up with even the basic demo.demo setup, it gives me an error in the HomeKit app saying “Unable to Add Accessory, An unknown error occurred”. I included my logs and my yaml config below.

What version of Home Assistant Core has the issue?

2022.12.6

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

Link to integration documentation on our website

https://www.home-assistant.io/integrations/homekit#supported-components

Diagnostics information

config_entry-homekit-964aca4b2d99290f6e8fda1401e33673.json.txt

Example YAML snippet

homekit:
  filter:
    include_entities:
      - demo.demo

Anything in the logs that might be useful for us?

2022-12-15 13:34:28.527 DEBUG (MainThread) [homeassistant.components.homekit] Begin setup HomeKit for Home Assistant Bridge
2022-12-15 13:34:28.558 DEBUG (MainThread) [pyhap.characteristic] set_value: Name to Home Assistant Bridge
2022-12-15 13:34:28.560 DEBUG (MainThread) [pyhap.characteristic] set_value: Model to Bridge
2022-12-15 13:34:28.560 DEBUG (MainThread) [pyhap.characteristic] set_value: SerialNumber to homekit.bridge
2022-12-15 13:34:28.561 DEBUG (MainThread) [homeassistant.components.homekit] Driver start for Home Assistant Bridge
2022-12-15 13:34:28.561 INFO (MainThread) [pyhap.accessory_driver] Starting accessory Home Assistant Bridge on address 192.168.1.42, port 21063.
2022-12-15 13:34:28.566 DEBUG (MainThread) [pyhap.accessory_driver] Get accessories response: [{'aid': 1, 'services': [{'iid': 1, 'type': '3E', 'characteristics': [{'iid': 2, 'type': '14', 'perms': ['pw'], 'format': 'bool'}, {'iid': 3, 'type': '20', 'perms': ['pr'], 'format': 'string', 'value': 'Home Assistant'}, {'iid': 4, 'type': '21', 'perms': ['pr'], 'format': 'string', 'value': 'Bridge'}, {'iid': 5, 'type': '23', 'perms': ['pr'], 'format': 'string', 'value': 'Home Assistant Bridge'}, {'iid': 6, 'type': '30', 'perms': ['pr'], 'format': 'string', 'value': 'homekit.bridge'}, {'iid': 7, 'type': '52', 'perms': ['pr'], 'format': 'string', 'value': '2022.12.6'}]}, {'iid': 8, 'type': 'A2', 'characteristics': [{'iid': 9, 'type': '37', 'perms': ['pr', 'ev'], 'format': 'string', 'value': '01.01.00'}]}]}]
2022-12-15 13:34:28.567 DEBUG (MainThread) [pyhap.accessory_driver] Starting accessory Home Assistant Bridge
2022-12-15 13:34:28.567 DEBUG (MainThread) [pyhap.accessory_driver] AccessoryDriver for Home Assistant Bridge started successfully
2022-12-15 13:34:40.461 INFO (MainThread) [pyhap.hap_protocol] ('192.168.1.178', 64802): Connection made to Home Assistant Bridge
2022-12-15 13:34:40.463 DEBUG (MainThread) [pyhap.hap_protocol] ('192.168.1.178', 64802) (None): Recv unencrypted: b'POST /pair-setup HTTP/1.1\r\nHost: Home\\032Assistant\\032Bridge\\0328BAF7D._hap._tcp.local\r\nContent-Length: 6\r\nContent-Type: application/pairing+tlv8\r\n\r\n\x00\x01\x00\x06\x01\x01'
2022-12-15 13:34:40.464 DEBUG (MainThread) [pyhap.hap_protocol] ('192.168.1.178', 64802) (None): h11 Event: Request(method=b'POST', headers=<Headers([(b'host', b'Home\\032Assistant\\032Bridge\\0328BAF7D._hap._tcp.local'), (b'content-length', b'6'), (b'content-type', b'application/pairing+tlv8')])>, target=b'/pair-setup', http_version=b'1.1')
2022-12-15 13:34:40.465 DEBUG (MainThread) [pyhap.hap_handler] ('192.168.1.178', 64802): Request POST for path '/pair-setup': {'host': 'Home\\032Assistant\\032Bridge\\0328BAF7D._hap._tcp.local', 'content-length': '6', 'content-type': 'application/pairing+tlv8'}
2022-12-15 13:34:40.528 DEBUG (MainThread) [pyhap.hap_protocol] ('192.168.1.178', 64802) (None): Connection lost to Home Assistant Bridge: [Errno 104] Connection reset by peer
2022-12-15 13:34:40.596 INFO (MainThread) [pyhap.hap_protocol] ('192.168.1.178', 64803): Connection made to Home Assistant Bridge
2022-12-15 13:34:40.598 DEBUG (MainThread) [pyhap.hap_protocol] ('192.168.1.178', 64803) (None): Recv unencrypted: b'POST /pair-setup HTTP/1.1\r\nHost: Home\\032Assistant\\032Bridge\\0328BAF7D._hap._tcp.local\r\nContent-Length: 6\r\nContent-Type: application/pairing+tlv8\r\n\r\n\x00\x01\x00\x06\x01\x01'
2022-12-15 13:34:40.599 DEBUG (MainThread) [pyhap.hap_protocol] ('192.168.1.178', 64803) (None): h11 Event: Request(method=b'POST', headers=<Headers([(b'host', b'Home\\032Assistant\\032Bridge\\0328BAF7D._hap._tcp.local'), (b'content-length', b'6'), (b'content-type', b'application/pairing+tlv8')])>, target=b'/pair-setup', http_version=b'1.1')
2022-12-15 13:34:40.601 DEBUG (MainThread) [pyhap.hap_handler] ('192.168.1.178', 64803): Request POST for path '/pair-setup': {'host': 'Home\\032Assistant\\032Bridge\\0328BAF7D._hap._tcp.local', 'content-length': '6', 'content-type': 'application/pairing+tlv8'}
2022-12-15 13:34:40.665 DEBUG (MainThread) [pyhap.hap_protocol] ('192.168.1.178', 64803) (None): Connection lost to Home Assistant Bridge: [Errno 104] Connection reset by peer

Additional information

No response

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 28 (10 by maintainers)

Most upvoted comments

ps.txt

There’s also this? I’m not sure if it’ll help or not

I’ll do some more research since for some reason even with the profile installed it’s not giving me a log for HomeKit