Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HomeKit loses connection to Home Assistant Bridge #53420

Closed
sluramod opened this issue Jul 24, 2021 · 46 comments · Fixed by #53754, #53913 or #55005
Closed

HomeKit loses connection to Home Assistant Bridge #53420

sluramod opened this issue Jul 24, 2021 · 46 comments · Fixed by #53754, #53913 or #55005
Assignees

Comments

@sluramod
Copy link

sluramod commented Jul 24, 2021

The problem

HomeKit loses connection to Home Assistant Bridge shortly after restart.

Steps to reproduce:
Start Home Assistant
HomeKit Connection is working - all devices have correct state in HomeKit
Wait about a minute
HomeKit Connection is broken - No Response for accessories connected via Home Assistant

Open Developer Tools / Services
Select HomeKit: Reload
Press CALL SERVICE
HomeKit Connection is working again - all devices have correct state in HomeKit

What is version of Home Assistant Core has the issue?

core-2021.7.4

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

HomeKit

Link to integration documentation on our website

No response

Example YAML snippet

logger:
  default: warning
  logs:
    homeassistant.components.homekit: debug
    pyhap: debug

Anything in the logs that might be useful for us?

Last log entries before disconnect

2021-07-24 00:08:52 DEBUG (MainThread) [pyhap.hap_protocol] ('10.0.1.5', 51750): h11 Event: NEED_DATA
2021-07-24 00:08:52 DEBUG (MainThread) [pyhap.hap_protocol] ('10.0.1.9', 49203): Recv decrypted: b'PUT /characteristics HTTP/1.1\r\nHost: Home\\032Assistant\\032B
ridge\\032F9AE60._hap._tcp.local\r\nContent-Length: 59\r\nContent-Type: application/hap+json\r\n\r\n{"characteristics":[{"aid":3813471415,"iid":13,"ev":true}]}'
2021-07-24 00:08:52 DEBUG (MainThread) [pyhap.hap_protocol] ('10.0.1.9', 49203): h11 Event: PAUSED
2021-07-24 00:08:52 DEBUG (MainThread) [pyhap.hap_protocol] ('10.0.1.9', 49203): h11 Event: Request(method=b'PUT', target=b'/characteristics', headers=<Headers([(
b'host', b'Home\\032Assistant\\032Bridge\\032F9AE60._hap._tcp.local'), (b'content-length', b'59'), (b'content-type', b'application/hap+json')])>, http_version=b'1
.1')
2021-07-24 00:08:52 DEBUG (MainThread) [pyhap.hap_protocol] ('10.0.1.9', 49203): h11 Event: Data(data=bytearray(b'{"characteristics":[{"aid":3813471415,"iid":13,"
ev":true}]}'), chunk_start=False, chunk_end=False)
2021-07-24 00:08:52 DEBUG (MainThread) [pyhap.hap_protocol] ('10.0.1.9', 49203): h11 Event: EndOfMessage(headers=<Headers([])>)
2021-07-24 00:08:52 DEBUG (MainThread) [pyhap.hap_handler] ('10.0.1.9', 49203): Request PUT for path '/characteristics': {'host': 'Home\\032Assistant\\032Bridge\\
032F9AE60._hap._tcp.local', 'content-length': '59', 'content-type': 'application/hap+json'}
2021-07-24 00:08:52 DEBUG (MainThread) [pyhap.hap_handler] ('10.0.1.9', 49203): Set characteristics content: {'characteristics': [{'aid': 3813471415, 'iid': 13, '
ev': True}]}
2021-07-24 00:08:52 DEBUG (MainThread) [pyhap.accessory_driver] Subscribed client ('10.0.1.9', 49203) to topic 3813471415.13
2021-07-24 00:08:52 DEBUG (MainThread) [pyhap.hap_protocol] ('10.0.1.9', 49203): Send encrypted: b'HTTP/1.1 204 No Content\r\n\r\n'
2021-07-24 00:08:52 DEBUG (MainThread) [pyhap.hap_protocol] ('10.0.1.9', 49203): h11 Event: NEED_DATA
2021-07-24 00:10:08 DEBUG (MainThread) [pyhap.hap_protocol] ('10.0.1.9', 49203): Connection lost to Home Assistant Bridge: None
2021-07-24 00:10:08 DEBUG (MainThread) [pyhap.hap_protocol] ('10.0.1.5', 51750): Connection lost to Home Assistant Bridge: None

Additional information

Raspberry 3 running Home Assistant in docker container.

@probot-home-assistant
Copy link

homekit documentation
homekit source
(message by IssueLinks)

@probot-home-assistant
Copy link

Hey there @bdraco, mind taking a look at this issue as its been labeled with an integration (homekit) you are listed as a codeowner for? Thanks!
(message by CodeOwnersMention)

@bdraco
Copy link
Member

bdraco commented Jul 26, 2021

Likely fixed by ikalchev/HAP-python#360 or ikalchev/HAP-python#365

@bdraco
Copy link
Member

bdraco commented Jul 27, 2021

If you have cameras, it may also be ikalchev/HAP-python#367

@spartandrew18
Copy link

Hello, I am also having the same issue on my end. Everything does not work until I hit reload on the integration page for homekit bridge. I noticed it happens when I get a notification that my camera has gone offline.

@bdraco
Copy link
Member

bdraco commented Jul 30, 2021

Likely one of the issues above. They are now merged but not released

bdraco added a commit to bdraco/home-assistant that referenced this issue Jul 30, 2021
@bdraco bdraco mentioned this issue Jul 30, 2021
21 tasks
@bdraco
Copy link
Member

bdraco commented Jul 30, 2021

#53754 should fix the disconnect after a camera event.

This can also happen when the wifi signal is too low and the latency gets high enough (ping the iPhone to check) for the connection to get reset. There isn't much we can do about that.

@sluramod
Copy link
Author

sluramod commented Aug 3, 2021

@bdraco I very much appreciate your help with this issue, it's almost resolved, but still disconnects. log before disconnect happens now:

2021-08-02 19:38:49 DEBUG (MainThread) [pyhap.hap_protocol] ('10.0.1.9', 49797): Recv decrypted: b'PUT /characteristics HTTP/1.1\r\nHost: Home\032Assistant\032Bridge\032F9AE60._hap._tcp.local\r\nContent-Length: 59\r\nContent-Type: application/hap+json\r\n\r\n{"characteristics":[{"aid":3813471415,"iid":13,"ev":true}]}'
2021-08-02 19:38:49 DEBUG (MainThread) [pyhap.hap_protocol] ('10.0.1.9', 49797): h11 Event: PAUSED
2021-08-02 19:38:49 DEBUG (MainThread) [pyhap.hap_protocol] ('10.0.1.9', 49797): h11 Event: Request(method=b'PUT', target=b'/characteristics', headers=<Headers([(b'host', b'Home\032Assistant\032Bridge\032F9AE60._hap._tcp.local'), (b'content-length', b'59'), (b'content-type', b'application/hap+json')])>, http_version=b'1.1')
2021-08-02 19:38:49 DEBUG (MainThread) [pyhap.hap_protocol] ('10.0.1.9', 49797): h11 Event: Data(data=bytearray(b'{"characteristics":[{"aid":3813471415,"iid":13,"ev":true}]}'), chunk_start=False, chunk_end=False)
2021-08-02 19:38:49 DEBUG (MainThread) [pyhap.hap_protocol] ('10.0.1.9', 49797): h11 Event: EndOfMessage(headers=<Headers([])>)
2021-08-02 19:38:49 DEBUG (MainThread) [pyhap.hap_handler] ('10.0.1.9', 49797): Request PUT for path '/characteristics': {'host': 'Home\032Assistant\032Bridge\032F9AE60._hap._tcp.local', 'content-length': '59', 'content-type': 'application/hap+json'}
2021-08-02 19:38:49 DEBUG (MainThread) [pyhap.hap_handler] ('10.0.1.9', 49797): Set characteristics content: {'characteristics': [{'aid': 3813471415, 'iid': 13, 'ev': True}]}
2021-08-02 19:38:49 DEBUG (MainThread) [pyhap.accessory_driver] Subscribed client ('10.0.1.9', 49797) to topic 3813471415.13
2021-08-02 19:38:49 DEBUG (MainThread) [pyhap.hap_protocol] ('10.0.1.9', 49797): Send encrypted: b'HTTP/1.1 204 No Content\r\n\r\n'
2021-08-02 19:38:49 DEBUG (MainThread) [pyhap.hap_protocol] ('10.0.1.9', 49797): h11 Event: NEED_DATA
2021-08-02 19:39:38 DEBUG (MainThread) [pyhap.hap_protocol] ('10.0.2.200', 49157): Connection lost to Home Assistant Bridge: None
2021-08-02 19:41:35 DEBUG (MainThread) [pyhap.hap_protocol] ('10.0.1.25', 52749): Connection lost to Home Assistant Bridge: None
2021-08-02 19:42:20 DEBUG (MainThread) [pyhap.hap_protocol] ('10.0.1.9', 49797): Connection lost to Home Assistant Bridge: None
2021-08-02 19:42:23 DEBUG (MainThread) [pyhap.hap_protocol] ('10.0.1.26', 49631): Connection lost to Home Assistant Bridge: None

@bdraco
Copy link
Member

bdraco commented Aug 3, 2021

Thats very strange, as all of the iOS clients are closing the connection on their own.

I'm not sure if there is anything we can do about it since None indicates no error and the client (iOS) closed the connection.

Are they all connected to the same wifi network?

@sluramod
Copy link
Author

sluramod commented Aug 3, 2021

yes, they are. I also have ecobee thermostat on the same wifi and the thermostat always works, only accessories connected to home assistant are in 'no response' state.

however, after updating hap-python, homekit updates the status of them if I open the app at some point later. And then it gets into 'no response' again sometimes.

@bdraco
Copy link
Member

bdraco commented Aug 3, 2021

Seems like the mdns announcement is dropping causing iOS to disconnect.

https://apps.apple.com/us/app/discovery-dns-sd-browser/id305441017

@sluramod
Copy link
Author

sluramod commented Aug 3, 2021

Is there any way to troubleshoot this? btw, 10.0.1.9 in the log above is apple tv that's connected via ethernet.

@bdraco
Copy link
Member

bdraco commented Aug 3, 2021

Install the app I mentioned above and check to make sure the bridge shows in the _hap._tcp.local area

Try excluding what accessory has aid 3813471415

If that doesn't work, try excluding them one by one until the problem goes away.

@sluramod
Copy link
Author

sluramod commented Aug 3, 2021

@bdraco I did some more troubleshooting. Device 3813471415 is a motion sensor:

{
'aid': 3813471415,
'services': [
{
'iid': 1,
'type': '3E',
'characteristics': [
{
'iid': 2,
'type': '14',
'perms': [
'pw'
],
'format': 'bool'
},
{
'iid': 3,
'type': '20',
'perms': [
'pr'
],
'format': 'string',
'value': 'IKEA'
},
{
'iid': 4,
'type': '21',
'perms': [
'pr'
],
'format': 'string',
'value': 'TRADFRI motion sensor (E1525/E1745)'
},
{
'iid': 5,
'type': '23',
'perms': [
'pr'
],
'format': 'string',
'value': 'Hallway Motion Sensor_occupancy'
},
{
'iid': 6,
'type': '30',
'perms': [
'pr'
],
'format': 'string',
'value': 'binary_sensor.0x842e14fffe170080_occupancy'
},
{
'iid': 7,
'type': '52',
'perms': [
'pr'
],
'format': 'string',
'value': '2'
}
]
},
{
'iid': 8,
'type': '96',
'characteristics': [
{
'iid': 9,
'type': '68',
'perms': [
'pr',
'ev'
],
'format': 'uint8',
'unit': 'percentage',
'maxValue': 100,
'minStep': 1,
'minValue': 0,
'value': 74.0
},
{
'iid': 10,
'type': '8F',
'perms': [
'pr',
'ev'
],
'format': 'uint8',
'valid-values': [
0,
1,
2
],
'value': 2
},
{
'iid': 11,
'type': '79',
'perms': [
'pr',
'ev'
],
'format': 'uint8',
'valid-values': [
0,
1
],
'value': 0
}
]
},
{
'iid': 12,
'type': '85',
'characteristics': [
{
'iid': 13,
'type': '22',
'perms': [
'pr',
'ev'
],
'format': 'bool',
'value': False
}
]
}
]
},

Every time characteristic iid:13 is updated, connection to homekit is lost. Is it possible 'HTTP/1.1 204 No Content' is not valid response? See below.

2021-08-03 00:07:07 DEBUG (MainThread) [pyhap.hap_protocol] ('10.0.1.9', 49813): Recv decrypted: b'PUT /characteristics HTTP/1.1\r\nHost: Home\032Assistant\032Bridge\032F9AE60._hap.
_tcp.local\r\nContent-Length: 59\r\nContent-Type: application/hap+json\r\n\r\n{"characteristics":[{"aid":3813471415,"iid":13,"ev":true}]}'
2021-08-03 00:07:07 DEBUG (MainThread) [pyhap.hap_protocol] ('10.0.1.9', 49813): h11 Event: PAUSED
2021-08-03 00:07:07 DEBUG (MainThread) [pyhap.hap_protocol] ('10.0.1.9', 49813): h11 Event: Request(method=b'PUT', target=b'/characteristics', headers=<Headers([(b'host', b'Home\032As
sistant\032Bridge\032F9AE60._hap._tcp.local'), (b'content-length', b'59'), (b'content-type', b'application/hap+json')])>, http_version=b'1.1')
2021-08-03 00:07:07 DEBUG (MainThread) [pyhap.hap_protocol] ('10.0.1.9', 49813): h11 Event: Data(data=bytearray(b'{"characteristics":[{"aid":3813471415,"iid":13,"ev":true}]}'), chunk_s
tart=False, chunk_end=False)
2021-08-03 00:07:07 DEBUG (MainThread) [pyhap.hap_protocol] ('10.0.1.9', 49813): h11 Event: EndOfMessage(headers=<Headers([])>)
2021-08-03 00:07:07 DEBUG (MainThread) [pyhap.hap_handler] ('10.0.1.9', 49813): Request PUT for path '/characteristics': {'host': 'Home\032Assistant\032Bridge\032F9AE60._hap._tcp.lo
cal', 'content-length': '59', 'content-type': 'application/hap+json'}
2021-08-03 00:07:07 DEBUG (MainThread) [pyhap.hap_handler] ('10.0.1.9', 49813): Set characteristics content: {'characteristics': [{'aid': 3813471415, 'iid': 13, 'ev': True}]}
2021-08-03 00:07:07 DEBUG (MainThread) [pyhap.accessory_driver] Subscribed client ('10.0.1.9', 49813) to topic 3813471415.13
2021-08-03 00:07:07 DEBUG (MainThread) [pyhap.hap_protocol] ('10.0.1.9', 49813): Send encrypted: b'HTTP/1.1 204 No Content\r\n\r\n'
2021-08-03 00:07:07 DEBUG (MainThread) [pyhap.hap_protocol] ('10.0.1.9', 49813): h11 Event: NEED_DATA
2021-08-03 00:09:26 DEBUG (MainThread) [pyhap.hap_protocol] ('10.0.1.5', 57195): Connection lost to Home Assistant Bridge: None
2021-08-03 00:09:30 DEBUG (MainThread) [pyhap.hap_protocol] ('10.0.1.9', 49813): Connection lost to Home Assistant Bridge: None
2021-08-03 00:09:39 DEBUG (MainThread) [pyhap.hap_protocol] ('10.0.1.25', 52860): Connection lost to Home Assistant Bridge: None

@bdraco
Copy link
Member

bdraco commented Aug 3, 2021

'HTTP/1.1 204 No Content' is a valid response when there is no error subscribing to the events.

Does the problem go away if you exclude that motion sensor?

@bdraco
Copy link
Member

bdraco commented Aug 3, 2021

Also to make sure we are on the same page:

Please confirm you are running the latest beta

Also how many bridges / accessories do you have ?

@bdraco
Copy link
Member

bdraco commented Aug 3, 2021

Also

  • Which port are you using for the bridge

  • Do you have any entities or names longer than 64 chars?

@bdraco
Copy link
Member

bdraco commented Aug 3, 2021

Not sure if this is the issue, but if we were not truncating strings that exceed the max length. I fixed that in #53913

@ryanjohnsontv
Copy link
Contributor

I still need to do some debugging, but I just wanted to add that I am experiencing the same issue when updating to 2021.8.0, and it was also present when I tried beta 9 & 10. I have 91 accessories paired through my main bridge, as well as 3 locks and 2 TVs that are paired as accessories. Only the bridge loses connection when upgrading from 2021.7.4, accessories function fine.

In an almost identical Home Assistant/network environment I have an instance of 2021.8.0 running with a HomeKit bridge with 102 accessories, this instance has no issues.

I can open a new ticket for this once I have some relevant log information, or we can reopen this issue as I feel they are related.

@sluramod
Copy link
Author

sluramod commented Aug 10, 2021

This issue drives me crazy. I removed all zigbee sensors from home kit using homekit:filter:exclude_entity_globs: configuration setting. I also moved all automations from homekit to home-assistant.

Sometimes I open Home app and all accessories connected to home assistant show app OK. I open the app few seconds later only to see 'No Response' in home app.

Ecobee thermostat works 100% of the time in Home app. Also, apple tv configured as a hub and raspberry pi running home assistant are connected to the same switch using ethernet cable.

@bdraco Most recent sample:
2021-08-09 19:04:05 DEBUG (MainThread) [pyhap.hap_protocol] ('10.0.1.9', 50338): Send encrypted: b'HTTP/1.1 204 No Content\r\n\r\n'
2021-08-09 19:04:05 DEBUG (MainThread) [pyhap.hap_protocol] ('10.0.1.9', 50338): h11 Event: NEED_DATA
2021-08-09 19:04:05 DEBUG (MainThread) [pyhap.hap_protocol] ('10.0.1.9', 50338): Recv decrypted: b'PUT /characteristics HTTP/1.1\r\nHost: Home\032Assistant\032Bridge\032F9AE60._hap._tcp.local\r\nContent-Length: 96\r\nContent-Type: application/hap+json\r\n\r\n{"characteristics":[{"aid":2181052316,"iid":9,"ev":true},{"aid":2181052316,"iid":10,"ev":true}]}'
2021-08-09 19:04:05 DEBUG (MainThread) [pyhap.hap_protocol] ('10.0.1.9', 50338): h11 Event: PAUSED
2021-08-09 19:04:05 DEBUG (MainThread) [pyhap.hap_protocol] ('10.0.1.9', 50338): h11 Event: Request(method=b'PUT', target=b'/characteristics', headers=<Headers([(b'host', b'Home\032Assistant\032Bridge\032F9AE60._hap._tcp.local'), (b'content-length', b'96'), (b'content-type', b'application/hap+json')])>, http_version=b'1.1')
2021-08-09 19:04:05 DEBUG (MainThread) [pyhap.hap_protocol] ('10.0.1.9', 50338): h11 Event: Data(data=bytearray(b'{"characteristics":[{"aid":2181052316,"iid":9,"ev":true},{"aid":2181052316,"iid":10,"ev":true}]}'), chunk_start=False, chunk_end=False)
2021-08-09 19:04:05 DEBUG (MainThread) [pyhap.hap_protocol] ('10.0.1.9', 50338): h11 Event: EndOfMessage(headers=<Headers([])>)
2021-08-09 19:04:05 DEBUG (MainThread) [pyhap.hap_handler] ('10.0.1.9', 50338): Request PUT for path '/characteristics': {'host': 'Home\032Assistant\032Bridge\032F9AE60._hap._tcp.local', 'content-length': '96', 'content-type': 'application/hap+json'}
2021-08-09 19:04:05 DEBUG (MainThread) [pyhap.hap_handler] ('10.0.1.9', 50338): Set characteristics content: {'characteristics': [{'aid': 2181052316, 'iid': 9, 'ev': True}, {'aid': 2181052316, 'iid': 10, 'ev': True}]}
2021-08-09 19:04:05 DEBUG (MainThread) [pyhap.accessory_driver] Subscribed client ('10.0.1.9', 50338) to topic 2181052316.9
2021-08-09 19:04:05 DEBUG (MainThread) [pyhap.accessory_driver] Subscribed client ('10.0.1.9', 50338) to topic 2181052316.10
2021-08-09 19:04:05 DEBUG (MainThread) [pyhap.hap_protocol] ('10.0.1.9', 50338): Send encrypted: b'HTTP/1.1 204 No Content\r\n\r\n'
2021-08-09 19:04:05 DEBUG (MainThread) [pyhap.hap_protocol] ('10.0.1.9', 50338): h11 Event: NEED_DATA
2021-08-09 19:04:55 DEBUG (MainThread) [pyhap.hap_protocol] ('10.0.1.5', 54063): Connection lost to Home Assistant Bridge: None
2021-08-09 19:05:00 DEBUG (MainThread) [pyhap.hap_protocol] ('10.0.1.9', 50338): Connection lost to Home Assistant Bridge: None
2021-08-09 19:05:00 DEBUG (MainThread) [pyhap.hap_protocol] ('10.0.1.25', 60718): Connection lost to Home Assistant Bridge: None

@bdraco
Copy link
Member

bdraco commented Aug 10, 2021

Please open a new issue if #54294 doesn't fix it (included in 2021.8.5 -- #54368)

@bdraco
Copy link
Member

bdraco commented Aug 10, 2021

this instance has no issues.

That would make sense if they are on different networks if the issue is #54294 since it would only happen if the network multicast traffic level was high enough to trigger the flood protection

@sluramod
Copy link
Author

@bdraco I can open another issue, but upgraded to 2021.8.8 and still the same issue: works for a minute of so after start and then all devices loose connection at the same time:

2021-08-21 12:03:05 DEBUG (MainThread) [pyhap.hap_protocol] ('10.0.1.5', 50756): h11 Event: NEED_DATA
2021-08-21 12:04:13 DEBUG (MainThread) [pyhap.hap_protocol] ('10.0.1.5', 50756): Connection lost to Home Assistant Bridge: None
2021-08-21 12:04:13 DEBUG (MainThread) [pyhap.hap_protocol] ('10.0.1.9', 51814): Connection lost to Home Assistant Bridge: None
2021-08-21 12:04:14 DEBUG (MainThread) [pyhap.hap_protocol] ('10.0.1.26', 57390): Connection lost to Home Assistant Bridge: None
2021-08-21 12:04:18 DEBUG (MainThread) [pyhap.hap_protocol] ('10.0.1.25', 54554): Connection lost to Home Assistant Bridge: None

homeassisant bridge is missing from _hap._tcp section of Discovery iOS app when this happens, ecobee thermostat is present (and available in Home app).

Let me know if you want me to open another issue.

Thank you for looking into this.

@bdraco
Copy link
Member

bdraco commented Aug 21, 2021

First lets see if its solved by the development versions. (Please try one at a time instead of both at the same time so we know if one fixes it)

mkdir -p /config/custom_components
cd /config/custom_components
git clone https://github.com/bdraco/zeroconf

Restart and check

mkdir -p /config/custom_components
cd /config/custom_components
git clone https://github.com/bdraco/homekit

Restart and check

@bdraco bdraco reopened this Aug 21, 2021
@sluramod
Copy link
Author

sluramod commented Aug 22, 2021

With custom components behavior is better, but not ideal. I saw 'Connection lost to Home Assistance Bridge' in the logs. First time when I opened Home app when that happened, accessories connected to home bridge showed status 'Updating...' and then refreshed status.

2021-08-21 21:50:11 DEBUG (MainThread) [pyhap.hap_protocol] (’10.0.1.9’, 49175): h11 Event: NEED_DATA
2021-08-21 21:51:08 DEBUG (MainThread) [pyhap.characteristic] set_value: On to True
2021-08-21 21:51:08 DEBUG (MainThread) [pyhap.accessory_driver] Send event: topic(541210291.9), data({‘aid’: 541210291, ‘iid’: 9, ‘value’: True}), sender_client_addr(None)
2021-08-21 21:51:08 DEBUG (MainThread) [pyhap.accessory_driver] Sending event to client: (’10.0.1.25’, 54864), immediate: False
2021-08-21 21:51:08 DEBUG (MainThread) [pyhap.accessory_driver] Sending event to client: (’10.0.1.9’, 49175), immediate: False
2021-08-21 21:51:08 DEBUG (MainThread) [pyhap.accessory_driver] Sending event to client: (’10.0.1.5’, 52052), immediate: False
2021-08-21 21:51:09 DEBUG (MainThread) [pyhap.hap_protocol] (’10.0.1.25’, 54864): Send encrypted: b’EVENT/1.0 200 OK\r\nContent-Type: application/hap+json\r\nContent-Lengt
h: 60\r\n\r\n{“characteristics”:[{“aid”:541210291,”iid”:9,”value”:true}]}’
2021-08-21 21:51:09 DEBUG (MainThread) [pyhap.hap_protocol] (’10.0.1.9’, 49175): Send encrypted: b’EVENT/1.0 200 OK\r\nContent-Type: application/hap+json\r\nContent-Length
: 60\r\n\r\n{“characteristics”:[{“aid”:541210291,”iid”:9,”value”:true}]}’
2021-08-21 21:51:09 DEBUG (MainThread) [pyhap.hap_protocol] (’10.0.1.5’, 52052): Send encrypted: b’EVENT/1.0 200 OK\r\nContent-Type: application/hap+json\r\nContent-Length
: 60\r\n\r\n{“characteristics”:[{“aid”:541210291,”iid”:9,”value”:true}]}’
2021-08-21 21:51:25 DEBUG (MainThread) [pyhap.hap_protocol] (’10.0.1.5’, 52052): Connection lost to Home Assistant Bridge: None
2021-08-21 21:51:26 DEBUG (MainThread) [pyhap.hap_protocol] (’10.0.1.25’, 54864): Connection lost to Home Assistant Bridge: None
2021-08-21 21:51:26 DEBUG (MainThread) [pyhap.hap_protocol] (’10.0.1.9’, 49175): Connection lost to Home Assistant Bridge: None
2021-08-21 21:51:56 INFO (MainThread) [pyhap.hap_protocol] (’10.0.1.5’, 52208): Connection made to Home Assistant Bridge

2021-08-21 21:51:56 DEBUG (MainThread) [pyhap.hap_protocol] (’10.0.1.5’, 52208): Recv unencrypted: b’POST /pair-verify HTTP/1.1\r\nHost: Home\032Assistant\032Bridge\032
F9AE60._hap._tcp.local\r\nContent-Length: 37\r\nContent-Type: application/pairing+tlv8\r\n\r\n\x06\x01\x01\x03 \xd9d\x1aY\xf7\xcb\xa2P\xbe\x8b\xdf\xc9\x83\xed\xf68\xa4\xbd
$\\xfe\xde\x92\x94\xe4\x9b\x0b)\x04\xf4\xaa1’

Second time when connection was lost, I opened Home app and accessories showed 'No response'. I closed the app, then reopened and accessories showed correct status.

2021-08-21 21:57:43 DEBUG (MainThread) [pyhap.hap_protocol] ('10.0.1.25', 54872): h11 Event: NEED_DATA
2021-08-21 21:59:12 DEBUG (MainThread) [pyhap.hap_protocol] ('10.0.1.26', 57579): Connection lost to Home Assistant Bridge: None
2021-08-21 21:59:18 DEBUG (MainThread) [pyhap.hap_protocol] ('10.0.1.5', 52216): Connection lost to Home Assistant Bridge: None
2021-08-21 21:59:19 DEBUG (MainThread) [pyhap.hap_protocol] ('10.0.1.9', 49177): Connection lost to Home Assistant Bridge: None
2021-08-21 21:59:22 DEBUG (MainThread) [pyhap.hap_protocol] ('10.0.1.25', 54872): Connection lost to Home Assistant Bridge: None
2021-08-21 22:01:53 INFO (MainThread) [pyhap.hap_protocol] ('10.0.1.25', 54874): Connection made to Home Assistant Bridge

2021-08-21 22:01:53 DEBUG (MainThread) [pyhap.hap_protocol] ('10.0.1.25', 54874): Recv unencrypted: b'POST /pair-verify HTTP/1.1\r\nHost: Home\032Assistant\032Bridge\032F9AE60._hap._tcp.local\r\nContent-Length: 37\r\nContent-Type: application/pairing+tlv8\r\n\r\n\x06\x01\x01\x03 %Re\xd7UD\xa2H\xe4o\xe9\xda\xc1e\x06\x19\x8c\x8b\x12k\x1b9*\xc43\x81\xe8\xc6\x84\xb9\x02\x19'

Last case happened again (No response, then come back to see status updated):
2021-08-21 22:48:52 DEBUG (MainThread) [pyhap.hap_protocol] ('10.0.1.5', 52586): Connection lost to Home Assistant Bridge: None
2021-08-21 22:48:55 DEBUG (MainThread) [pyhap.hap_protocol] ('10.0.1.9', 49188): Connection lost to Home Assistant Bridge: None
2021-08-21 22:48:55 DEBUG (MainThread) [pyhap.hap_protocol] ('10.0.1.25', 54880): Connection lost to Home Assistant Bridge: None
2021-08-21 22:50:11 INFO (MainThread) [pyhap.hap_protocol] ('10.0.1.9', 49189): Connection made to Home Assistant Bridge

@bdraco
Copy link
Member

bdraco commented Aug 22, 2021

Are you still seeing the mdns announcements getting dropped?

What are you using for your networking and Wi-Fi gear?

@bdraco bdraco mentioned this issue Aug 22, 2021
22 tasks
@bdraco
Copy link
Member

bdraco commented Aug 23, 2021

@sluramod I bumped the dev version to use HAP-python 4.1.0 in case that helps

mkdir -p /config/custom_components
cd /config/custom_components
git clone https://github.com/bdraco/homekit
cd homekit
git pull origin master

Restart and check

@bdraco
Copy link
Member

bdraco commented Aug 23, 2021

Could also be caused by invalid values, which should be fixed in ikalchev/HAP-python#378

Not in the custom version above though

@bdraco bdraco reopened this Aug 23, 2021
@bdraco
Copy link
Member

bdraco commented Aug 23, 2021

Leaving this open in case we need the other PR

@sluramod
Copy link
Author

021-08-26 21:52:19 DEBUG (MainThread) [pyhap.hap_protocol] ('10.0.1.25', 50528) (f14dd9c8-4a8d-401d-8e94-57c9f87b412d): h11 Event: NEED_DATA
2021-08-26 21:52:20 DEBUG (MainThread) [pyhap.hap_protocol] ('10.0.1.25', 50528) (f14dd9c8-4a8d-401d-8e94-57c9f87b412d): Recv decrypted: b'GET /characteristics?id=2726444213.9,1879858972.9,153486721.9,3903938748.9,2181052316.9,1776600212.9,890372668.9,1052796026.9,2989287468.9,1346816754.9,1177856469.9,1614671069.9,1637380073.9,566421481.9,541210291.9,1600647344.9,2067661992.9,2030273064.9,2566586115.9,863381879.9,2406848309.9 HTTP/1.1\r\nHost: Home\032Assistant\032Bridge\032F9AE60._hap._tcp.local\r\n\r\n'
2021-08-26 21:52:20 DEBUG (MainThread) [pyhap.hap_protocol] ('10.0.1.25', 50528) (f14dd9c8-4a8d-401d-8e94-57c9f87b412d): h11 Event: PAUSED
2021-08-26 21:52:20 DEBUG (MainThread) [pyhap.hap_protocol] ('10.0.1.25', 50528) (f14dd9c8-4a8d-401d-8e94-57c9f87b412d): h11 Event: Request(method=b'GET', target=b'/characteristics?id=2726444213.9,1879858972.9,153486721.9,3903938748.9,2181052316.9,1776600212.9,890372668.9,1052796026.9,2989287468.9,1346816754.9,1177856469.9,1614671069.9,1637380073.9,566421481.9,541210291.9,1600647344.9,2067661992.9,2030273064.9,2566586115.9,863381879.9,2406848309.9', headers=<Headers([(b'host', b'Home\032Assistant\032Bridge\032F9AE60._hap._tcp.local')])>, http_version=b'1.1')
2021-08-26 21:52:20 DEBUG (MainThread) [pyhap.hap_protocol] ('10.0.1.25', 50528) (f14dd9c8-4a8d-401d-8e94-57c9f87b412d): h11 Event: EndOfMessage(headers=<Headers([])>)
2021-08-26 21:52:20 DEBUG (MainThread) [pyhap.hap_handler] ('10.0.1.25', 50528): Request GET for path '/characteristics?id=2726444213.9,1879858972.9,153486721.9,3903938748.9,2181052316.9,1776600212.9,890372668.9,1052796026.9,2989287468.9,1346816754.9,1177856469.9,1614671069.9,1637380073.9,566421481.9,541210291.9,1600647344.9,2067661992.9,2030273064.9,2566586115.9,863381879.9,2406848309.9': {'host': 'Home\032Assistant\032Bridge\032F9AE60._hap._tcp.local'}
2021-08-26 21:52:20 DEBUG (MainThread) [pyhap.accessory_driver] Get chars response: [{'aid': 2726444213, 'iid': 9, 'status': 0, 'value': True}, {'aid': 1879858972, 'iid': 9, 'status': 0, 'value': False}, {'aid': 153486721, 'iid': 9, 'status': 0, 'value': False}, {'aid': 3903938748, 'iid': 9, 'status': 0, 'value': False}, {'aid': 2181052316, 'iid': 9, 'status': 0, 'value': False}, {'aid': 1776600212, 'iid': 9, 'status': 0, 'value': False}, {'aid': 890372668, 'iid': 9, 'status': 0, 'value': False}, {'aid': 1052796026, 'iid': 9, 'status': 0, 'value': False}, {'aid': 2989287468, 'iid': 9, 'status': 0, 'value': False}, {'aid': 1346816754, 'iid': 9, 'status': 0, 'value': False}, {'aid': 1177856469, 'iid': 9, 'status': 0, 'value': False}, {'aid': 1614671069, 'iid': 9, 'status': 0, 'value': False}, {'aid': 1637380073, 'iid': 9, 'status': 0, 'value': False}, {'aid': 566421481, 'iid': 9, 'status': 0, 'value': False}, {'aid': 541210291, 'iid': 9, 'status': 0, 'value': False}, {'aid': 1600647344, 'iid': 9, 'status': 0, 'value': False}, {'aid': 2067661992, 'iid': 9, 'status': 0, 'value': True}, {'aid': 2030273064, 'iid': 9, 'status': 0, 'value': False}, {'aid': 2566586115, 'iid': 9, 'status': 0, 'value': True}, {'aid': 863381879, 'iid': 9, 'status': 0, 'value': False}, {'aid': 2406848309, 'iid': 9, 'status': 0, 'value': False}]
2021-08-26 21:52:20 DEBUG (MainThread) [pyhap.hap_protocol] ('10.0.1.25', 50528) (f14dd9c8-4a8d-401d-8e94-57c9f87b412d): Send encrypted: b'HTTP/1.1 200 OK\r\nContent-Type: application/hap+json\r\nContent-Length: 874\r\n\r\n{"characteristics":[{"aid":2726444213,"iid":9,"value":true},{"aid":1879858972,"iid":9,"value":false},{"aid":153486721,"iid":9,"value":false},{"aid":3903938748,"iid":9,"value":false},{"aid":2181052316,"iid":9,"value":false},{"aid":1776600212,"iid":9,"value":false},{"aid":890372668,"iid":9,"value":false},{"aid":1052796026,"iid":9,"value":false},{"aid":2989287468,"iid":9,"value":false},{"aid":1346816754,"iid":9,"value":false},{"aid":1177856469,"iid":9,"value":false},{"aid":1614671069,"iid":9,"value":false},{"aid":1637380073,"iid":9,"value":false},{"aid":566421481,"iid":9,"value":false},{"aid":541210291,"iid":9,"value":false},{"aid":1600647344,"iid":9,"value":false},{"aid":2067661992,"iid":9,"value":true},{"aid":2030273064,"iid":9,"value":false},{"aid":2566586115,"iid":9,"value":true},{"aid":863381879,"iid":9,"value":false},{"aid":2406848309,"iid":9,"value":false}]}'
2021-08-26 21:52:20 DEBUG (MainThread) [pyhap.hap_protocol] ('10.0.1.25', 50528) (f14dd9c8-4a8d-401d-8e94-57c9f87b412d): h11 Event: NEED_DATA
2021-08-26 21:54:02 DEBUG (MainThread) [pyhap.hap_protocol] ('10.0.1.5', 55920) (f14dd9c8-4a8d-401d-8e94-57c9f87b412d): Connection lost to Home Assistant Bridge: None
2021-08-26 21:54:04 DEBUG (MainThread) [pyhap.hap_protocol] ('10.0.1.9', 49681) (f14dd9c8-4a8d-401d-8e94-57c9f87b412d): Connection lost to Home Assistant Bridge: None

Home assistant is not present in Discovery app after the disconnect, I have engenius networking hardware:

EWS5912FP switch
EWS377AP access point

However, ecobee 3 never has any issues with homekit on the same network.

@bdraco
Copy link
Member

bdraco commented Aug 27, 2021

So the problem is almost definitely mdns. When HomeKit starts up it sends an unsolicited mdns announcement which your iOS devices are receiving. After about 100 seconds the A and SRV records will get close to expiring and mDNSResponder on the iOS device with multicast a question that it is expecting the zeroconf implementation running on Home Assistant to answer. It seems that Home Assistant is able to send answer to the iOS device as it wouldn't be able to the unsolicited answers sent at start up otherwise. It's likely something is preventing Home Assistant from getting the incoming questions so it doesn't respond

Can you send debug logs for zeroconf ?

Do you have incoming port 5353 open on the Home Assistant instance?

@bdraco
Copy link
Member

bdraco commented Aug 27, 2021 via email

@sluramod
Copy link
Author

Zeroconf entries from home-assistant.log have a lot of info regarding my home network config.

Instead, I installed Wireshark and captured few packets. Notice how wireshark marks some packets as retransmission:true and point to packet 54? Not sure if this is relevant.

----
# Packet 53 from /var/folders/q1/txwvty_x1s15nrvg8_l5k5jw0000gn/T/wireshark_Wi-FiLUXZ80.pcapng
- 53
- 96.395194 (timestamp)
- 10.0.1.197 (source)
- 224.0.0.251 (destination)
- MDNS
- 890
- Standard query 0x0000 PTR _googlecast._tcp.local, "QM" question PTR _http._tcp.local, "QM" question PTR _homekit._tcp.local, "QM" question PTR _mediaremotetv._tcp.local, "QM" question PTR _airplay._tcp.local, "QM" question PTR _hap._tcp.local, "QM" question PTR _spotify-connect._tcp.local, "QM" question PTR _home-assistant._tcp.local, "QM" question PTR _xbmc-jsonrpc-h._tcp.local, "QM" question PTR _dvl-deviceapi._tcp.local, "QM" question PTR _enphase-envoy._tcp.local, "QM" question PTR _system-bridge._udp.local, "QM" question PTR _touch-able._tcp.local, "QM" question PTR _axis-video._tcp.local, "QM" question PTR _esphomelib._tcp.local, "QM" question PTR _viziocast._tcp.local, "QM" question PTR _powerview._tcp.local, "QM" question PTR _easylink._tcp.local, "QM" question PTR _plugwise._tcp.local, "QM" question PTR _Volumio._tcp.local, "QM" question PTR _fbx-api._tcp.local, "QM" question PTR _printer._tcp.local, "QM" question PTR _kizbox._tcp.local, "QM" question PTR _dkapi._tcp.local, "QM" question PTR _sonos._tcp.local, "QM" question PTR _miio._udp.local, "QM" question PTR _ipps._tcp.local, "QM" question PTR _daap._tcp.local, "QM" question PTR _bond._tcp.local, "QM" question PTR _leap._tcp.local, "QM" question PTR _wled._tcp.local, "QM" question PTR _ipp._tcp.local, "QM" question PTR _elg._tcp.local, "QM" question PTR _hap._udp.local, "QM" question PTR _ssh._tcp.local, "QM" question PTR _nut._tcp.local, "QM" question PTR _api._udp.local, "QM" question PTR Toshiba-Cast-TV-6e9a9b0855bee4e25a4d70e466028920._googlecast._tcp.local PTR rachio_local-DB346E._http._tcp.local PTR EWS377APv3._http._tcp.local PTR 43B92CF7-0EC7-5B4B-A902-E402AEB8DFEE._homekit._tcp.local PTR Living Room (2)._mediaremotetv._tcp.local PTR Living Room (2)._airplay._tcp.local PTR Upstairs._hap._tcp.local


----
# Packet 54 from /var/folders/q1/txwvty_x1s15nrvg8_l5k5jw0000gn/T/wireshark_Wi-FiLUXZ80.pcapng
- 54
- 96.616331 (timestamp)
- 10.0.1.197 (source)
- 224.0.0.251 (destination)
- MDNS
- 363
- Standard query response 0x0000 PTR Home._home-assistant._tcp.local SRV, cache flush 0 0 8123 dcae3a6d83cd40f49f4e58aad7eba187.local TXT, cache flush A, cache flush 10.0.1.197

Multicast Domain Name System (response)
    Transaction ID: 0x0000
    Flags: 0x8400 Standard query response, No error
    Questions: 0
    Answer RRs: 4
    Authority RRs: 0
    Additional RRs: 0
    Answers
        _home-assistant._tcp.local: type PTR, class IN, Home._home-assistant._tcp.local
        Home._home-assistant._tcp.local: type SRV, class IN, cache flush, priority 0, weight 0, port 8123, target dcae3a6d83cd40f49f4e58aad7eba187.local
        Home._home-assistant._tcp.local: type TXT, class IN, cache flush
        dcae3a6d83cd40f49f4e58aad7eba187.local: type A, class IN, cache flush, addr 10.0.1.197
    [Request In: 53]
    [Time: 0.221137000 seconds]

----
# Packet 55 from /var/folders/q1/txwvty_x1s15nrvg8_l5k5jw0000gn/T/wireshark_Wi-FiLUXZ80.pcapng
- 55
- 96.648693
- 10.0.1.197
- 224.0.0.251
- MDNS
- 280
- Standard query response 0x0000 PTR Home Assistant Bridge F9AE60._hap._tcp.local SRV, cache flush 0 0 21063 Home-Assistant-Bridge-F9AE60.local TXT, cache flush A, cache flush 10.0.1.197

Multicast Domain Name System (response)
    Transaction ID: 0x0000
        [Expert Info (Warning/Protocol): DNS response retransmission. Original response in frame 54]
    Flags: 0x8400 Standard query response, No error
    Questions: 0
    Answer RRs: 4
    Authority RRs: 0
    Additional RRs: 0
    Answers
        _hap._tcp.local: type PTR, class IN, Home Assistant Bridge F9AE60._hap._tcp.local
        Home Assistant Bridge F9AE60._hap._tcp.local: type SRV, class IN, cache flush, priority 0, weight 0, port 21063, target Home-Assistant-Bridge-F9AE60.local
        Home Assistant Bridge F9AE60._hap._tcp.local: type TXT, class IN, cache flush
        Home-Assistant-Bridge-F9AE60.local: type A, class IN, cache flush, addr 10.0.1.197
    [Retransmitted response. Original response in: 54]
    [Retransmission: True]

----
# Packet 56 from /var/folders/q1/txwvty_x1s15nrvg8_l5k5jw0000gn/T/wireshark_Wi-FiLUXZ80.pcapng
- 56
- 96.685289
- 10.0.1.197
- 224.0.0.251
- MDNS
- 280
- Standard query response 0x0000 PTR Home Assistant Bridge F9AE60._hap._tcp.local TXT, cache flush A, cache flush 10.0.1.197 SRV, cache flush 0 0 21063 Home-Assistant-Bridge-F9AE60.local

Multicast Domain Name System (response)
    Transaction ID: 0x0000
        [Expert Info (Warning/Protocol): DNS response retransmission. Original response in frame 54]
    Flags: 0x8400 Standard query response, No error
    Questions: 0
    Answer RRs: 1
    Authority RRs: 0
    Additional RRs: 3
    Answers
        _hap._tcp.local: type PTR, class IN, Home Assistant Bridge F9AE60._hap._tcp.local
    Additional records
        Home Assistant Bridge F9AE60._hap._tcp.local: type TXT, class IN, cache flush
        Home-Assistant-Bridge-F9AE60.local: type A, class IN, cache flush, addr 10.0.1.197
        Home Assistant Bridge F9AE60._hap._tcp.local: type SRV, class IN, cache flush, priority 0, weight 0, port 21063, target Home-Assistant-Bridge-F9AE60.local
    [Retransmitted response. Original response in: 54]
    [Retransmission: True]

----
# Packet 57 from /var/folders/q1/txwvty_x1s15nrvg8_l5k5jw0000gn/T/wireshark_Wi-FiLUXZ80.pcapng
- 57
- 97.005102
- 10.0.1.197
- 224.0.0.251
- MDNS
- 363
- Standard query response 0x0000 PTR Home._home-assistant._tcp.local SRV, cache flush 0 0 8123 dcae3a6d83cd40f49f4e58aad7eba187.local TXT, cache flush A, cache flush 10.0.1.197

Multicast Domain Name System (response)
    Transaction ID: 0x0000
        [Expert Info (Warning/Protocol): DNS response retransmission. Original response in frame 54]
    Flags: 0x8400 Standard query response, No error
    Questions: 0
    Answer RRs: 4
    Authority RRs: 0
    Additional RRs: 0
    Answers
        _home-assistant._tcp.local: type PTR, class IN, Home._home-assistant._tcp.local
        Home._home-assistant._tcp.local: type SRV, class IN, cache flush, priority 0, weight 0, port 8123, target dcae3a6d83cd40f49f4e58aad7eba187.local
        Home._home-assistant._tcp.local: type TXT, class IN, cache flush
        dcae3a6d83cd40f49f4e58aad7eba187.local: type A, class IN, cache flush, addr 10.0.1.197
    [Retransmitted response. Original response in: 54]
    [Retransmission: True]

----
# Packet 58 from /var/folders/q1/txwvty_x1s15nrvg8_l5k5jw0000gn/T/wireshark_Wi-FiLUXZ80.pcapng
- 58
- 97.008015
- 10.0.1.197
- 224.0.0.251
- MDNS
- 280
- Standard query response 0x0000 PTR Home Assistant Bridge F9AE60._hap._tcp.local SRV, cache flush 0 0 21063 Home-Assistant-Bridge-F9AE60.local TXT, cache flush A, cache flush 10.0.1.197

Multicast Domain Name System (response)
    Transaction ID: 0x0000
        [Expert Info (Warning/Protocol): DNS response retransmission. Original response in frame 54]
    Flags: 0x8400 Standard query response, No error
    Questions: 0
    Answer RRs: 4
    Authority RRs: 0
    Additional RRs: 0
    Answers
        _hap._tcp.local: type PTR, class IN, Home Assistant Bridge F9AE60._hap._tcp.local
        Home Assistant Bridge F9AE60._hap._tcp.local: type SRV, class IN, cache flush, priority 0, weight 0, port 21063, target Home-Assistant-Bridge-F9AE60.local
        Home Assistant Bridge F9AE60._hap._tcp.local: type TXT, class IN, cache flush
        Home-Assistant-Bridge-F9AE60.local: type A, class IN, cache flush, addr 10.0.1.197
    [Retransmitted response. Original response in: 54]
    [Retransmission: True]

----
# Packet 59 from /var/folders/q1/txwvty_x1s15nrvg8_l5k5jw0000gn/T/wireshark_Wi-FiLUXZ80.pcapng
- 59
- 97.343605
- 10.0.1.197
- 224.0.0.251
- MDNS
- 280
- Standard query response 0x0000 PTR Home Assistant Bridge F9AE60._hap._tcp.local SRV, cache flush 0 0 21063 Home-Assistant-Bridge-F9AE60.local TXT, cache flush A, cache flush 10.0.1.197

Multicast Domain Name System (response)
    Transaction ID: 0x0000
        [Expert Info (Warning/Protocol): DNS response retransmission. Original response in frame 54]
    Flags: 0x8400 Standard query response, No error
    Questions: 0
    Answer RRs: 4
    Authority RRs: 0
    Additional RRs: 0
    Answers
        _hap._tcp.local: type PTR, class IN, Home Assistant Bridge F9AE60._hap._tcp.local
        Home Assistant Bridge F9AE60._hap._tcp.local: type SRV, class IN, cache flush, priority 0, weight 0, port 21063, target Home-Assistant-Bridge-F9AE60.local
        Home Assistant Bridge F9AE60._hap._tcp.local: type TXT, class IN, cache flush
        Home-Assistant-Bridge-F9AE60.local: type A, class IN, cache flush, addr 10.0.1.197
    [Retransmitted response. Original response in: 54]
    [Retransmission: True]

----
# Packet 60 from /var/folders/q1/txwvty_x1s15nrvg8_l5k5jw0000gn/T/wireshark_Wi-FiLUXZ80.pcapng
- 60
- 97.690589
- 10.0.1.197
- 224.0.0.251
- MDNS
- 363
- Standard query response 0x0000 PTR Home._home-assistant._tcp.local SRV, cache flush 0 0 8123 dcae3a6d83cd40f49f4e58aad7eba187.local TXT, cache flush A, cache flush 10.0.1.197

Multicast Domain Name System (response)
    Transaction ID: 0x0000
        [Expert Info (Warning/Protocol): DNS response retransmission. Original response in frame 54]
    Flags: 0x8400 Standard query response, No error
    Questions: 0
    Answer RRs: 1
    Authority RRs: 0
    Additional RRs: 3
    Answers
        _home-assistant._tcp.local: type PTR, class IN, Home._home-assistant._tcp.local
    Additional records
        Home._home-assistant._tcp.local: type SRV, class IN, cache flush, priority 0, weight 0, port 8123, target dcae3a6d83cd40f49f4e58aad7eba187.local
        Home._home-assistant._tcp.local: type TXT, class IN, cache flush
        dcae3a6d83cd40f49f4e58aad7eba187.local: type A, class IN, cache flush, addr 10.0.1.197
    [Retransmitted response. Original response in: 54]
    [Retransmission: True]

@sluramod
Copy link
Author

And this is what Ecobee3 sends out:

----
# Packet 330 from /var/folders/q1/txwvty_x1s15nrvg8_l5k5jw0000gn/T/wireshark_Wi-FiLUXZ80.pcapng
- 330
- 810.717923
- 10.0.1.188
- 224.0.0.251
- MDNS
- 295
- Standard query response 0x0000 PTR Upstairs._hap._tcp.local TXT, cache flush SRV, cache flush 0 0 36168 Upstairs.local A, cache flush 10.0.1.188 AAAA, cache flush fe80::4661:32ff:fee4:7b9b NSEC, cache flush Upstairs._hap._tcp.local NSEC, cache flush Upstairs.local

Multicast Domain Name System (response)
    Transaction ID: 0x0000
    Flags: 0x8400 Standard query response, No error
    Questions: 0
    Answer RRs: 1
    Authority RRs: 0
    Additional RRs: 6
    Answers
        _hap._tcp.local: type PTR, class IN, Upstairs._hap._tcp.local
            Name: _hap._tcp.local
            Type: PTR (domain name PoinTeR) (12)
            .000 0000 0000 0001 = Class: IN (0x0001)
            0... .... .... .... = Cache flush: False
            Time to live: 4500 (1 hour, 15 minutes)
            Data length: 11
            Domain Name: Upstairs._hap._tcp.local
    Additional records
        Upstairs._hap._tcp.local: type TXT, class IN, cache flush
            Name: Upstairs._hap._tcp.local
            Type: TXT (Text strings) (16)
            .000 0000 0000 0001 = Class: IN (0x0001)
            1... .... .... .... = Cache flush: True
            Time to live: 4500 (1 hour, 15 minutes)
            Data length: 77
            TXT Length: 5
            TXT: c#=25
            TXT Length: 4
            TXT: ff=1
            TXT Length: 20
            TXT: id=44:61:32:E4:7B:9B
            TXT Length: 10
            TXT: md=ecobee3
            TXT Length: 6
            TXT: pv=1.1
            TXT Length: 4
            TXT: s#=8
            TXT Length: 4
            TXT: sf=0
            TXT Length: 4
            TXT: ci=9
            TXT Length: 11
            TXT: sh=kcSuXg==
        Upstairs._hap._tcp.local: type SRV, class IN, cache flush, priority 0, weight 0, port 36168, target Upstairs.local
            Service: Upstairs
            Protocol: _hap
            Name: _tcp.local
            Type: SRV (Server Selection) (33)
            .000 0000 0000 0001 = Class: IN (0x0001)
            1... .... .... .... = Cache flush: True
            Time to live: 120 (2 minutes)
            Data length: 17
            Priority: 0
            Weight: 0
            Port: 36168
            Target: Upstairs.local
        Upstairs.local: type A, class IN, cache flush, addr 10.0.1.188
            Name: Upstairs.local
            Type: A (Host Address) (1)
            .000 0000 0000 0001 = Class: IN (0x0001)
            1... .... .... .... = Cache flush: True
            Time to live: 120 (2 minutes)
            Data length: 4
            Address: 10.0.1.188
        Upstairs.local: type AAAA, class IN, cache flush, addr fe80::4661:32ff:fee4:7b9b
            Name: Upstairs.local
            Type: AAAA (IPv6 Address) (28)
            .000 0000 0000 0001 = Class: IN (0x0001)
            1... .... .... .... = Cache flush: True
            Time to live: 120 (2 minutes)
            Data length: 16
            AAAA Address: fe80::4661:32ff:fee4:7b9b
        Upstairs._hap._tcp.local: type NSEC, class IN, cache flush, next domain name Upstairs._hap._tcp.local
            Name: Upstairs._hap._tcp.local
            Type: NSEC (Next Secure) (47)
            .000 0000 0000 0001 = Class: IN (0x0001)
            1... .... .... .... = Cache flush: True
            Time to live: 4500 (1 hour, 15 minutes)
            Data length: 9
            Next Domain Name: Upstairs._hap._tcp.local
            RR type in bit map: TXT (Text strings)
            RR type in bit map: SRV (Server Selection)
        Upstairs.local: type NSEC, class IN, cache flush, next domain name Upstairs.local
            Name: Upstairs.local
            Type: NSEC (Next Secure) (47)
            .000 0000 0000 0001 = Class: IN (0x0001)
            1... .... .... .... = Cache flush: True
            Time to live: 120 (2 minutes)
            Data length: 8
            Next Domain Name: Upstairs.local
            RR type in bit map: A (Host Address)
            RR type in bit map: AAAA (IPv6 Address)
    [Unsolicited: True]

----
# Packet 381 from /var/folders/q1/txwvty_x1s15nrvg8_l5k5jw0000gn/T/wireshark_Wi-FiLUXZ80.pcapng
- 381
- 981.774407
- 10.0.1.188
- 224.0.0.251
- MDNS
- 295
- Standard query response 0x0000 PTR Upstairs._hap._tcp.local TXT, cache flush SRV, cache flush 0 0 36168 Upstairs.local A, cache flush 10.0.1.188 AAAA, cache flush fe80::4661:32ff:fee4:7b9b NSEC, cache flush Upstairs._hap._tcp.local NSEC, cache flush Upstairs.local

Multicast Domain Name System (response)
    Transaction ID: 0x0000
    Flags: 0x8400 Standard query response, No error
    Questions: 0
    Answer RRs: 1
    Authority RRs: 0
    Additional RRs: 6
    Answers
        _hap._tcp.local: type PTR, class IN, Upstairs._hap._tcp.local
            Name: _hap._tcp.local
            Type: PTR (domain name PoinTeR) (12)
            .000 0000 0000 0001 = Class: IN (0x0001)
            0... .... .... .... = Cache flush: False
            Time to live: 4500 (1 hour, 15 minutes)
            Data length: 11
            Domain Name: Upstairs._hap._tcp.local
    Additional records
        Upstairs._hap._tcp.local: type TXT, class IN, cache flush
            Name: Upstairs._hap._tcp.local
            Type: TXT (Text strings) (16)
            .000 0000 0000 0001 = Class: IN (0x0001)
            1... .... .... .... = Cache flush: True
            Time to live: 4500 (1 hour, 15 minutes)
            Data length: 77
            TXT Length: 5
            TXT: c#=25
            TXT Length: 4
            TXT: ff=1
            TXT Length: 20
            TXT: id=44:61:32:E4:7B:9B
            TXT Length: 10
            TXT: md=ecobee3
            TXT Length: 6
            TXT: pv=1.1
            TXT Length: 4
            TXT: s#=8
            TXT Length: 4
            TXT: sf=0
            TXT Length: 4
            TXT: ci=9
            TXT Length: 11
            TXT: sh=kcSuXg==
        Upstairs._hap._tcp.local: type SRV, class IN, cache flush, priority 0, weight 0, port 36168, target Upstairs.local
            Service: Upstairs
            Protocol: _hap
            Name: _tcp.local
            Type: SRV (Server Selection) (33)
            .000 0000 0000 0001 = Class: IN (0x0001)
            1... .... .... .... = Cache flush: True
            Time to live: 120 (2 minutes)
            Data length: 17
            Priority: 0
            Weight: 0
            Port: 36168
            Target: Upstairs.local
        Upstairs.local: type A, class IN, cache flush, addr 10.0.1.188
            Name: Upstairs.local
            Type: A (Host Address) (1)
            .000 0000 0000 0001 = Class: IN (0x0001)
            1... .... .... .... = Cache flush: True
            Time to live: 120 (2 minutes)
            Data length: 4
            Address: 10.0.1.188
        Upstairs.local: type AAAA, class IN, cache flush, addr fe80::4661:32ff:fee4:7b9b
            Name: Upstairs.local
            Type: AAAA (IPv6 Address) (28)
            .000 0000 0000 0001 = Class: IN (0x0001)
            1... .... .... .... = Cache flush: True
            Time to live: 120 (2 minutes)
            Data length: 16
            AAAA Address: fe80::4661:32ff:fee4:7b9b
        Upstairs._hap._tcp.local: type NSEC, class IN, cache flush, next domain name Upstairs._hap._tcp.local
            Name: Upstairs._hap._tcp.local
            Type: NSEC (Next Secure) (47)
            .000 0000 0000 0001 = Class: IN (0x0001)
            1... .... .... .... = Cache flush: True
            Time to live: 4500 (1 hour, 15 minutes)
            Data length: 9
            Next Domain Name: Upstairs._hap._tcp.local
            RR type in bit map: TXT (Text strings)
            RR type in bit map: SRV (Server Selection)
        Upstairs.local: type NSEC, class IN, cache flush, next domain name Upstairs.local
            Name: Upstairs.local
            Type: NSEC (Next Secure) (47)
            .000 0000 0000 0001 = Class: IN (0x0001)
            1... .... .... .... = Cache flush: True
            Time to live: 120 (2 minutes)
            Data length: 8
            Next Domain Name: Upstairs.local
            RR type in bit map: A (Host Address)
            RR type in bit map: AAAA (IPv6 Address)
    [Unsolicited: True]

@bdraco
Copy link
Member

bdraco commented Aug 29, 2021 via email

@sluramod
Copy link
Author

sluramod commented Aug 29, 2021

Timestamps are included above (second line after packet number). Also, these are all packets generated when home-assistant starts:

----
# Packet 43 from /var/folders/q1/txwvty_x1s15nrvg8_l5k5jw0000gn/T/wireshark_Wi-FiLUXZ80.pcapng
- 43
- 88.684496
- 10.0.1.197
- 224.0.0.251
- MDNS
- 634
- Standard query 0x0000 PTR _spotify-connect._tcp.local, "QU" question PTR _home-assistant._tcp.local, "QU" question PTR _xbmc-jsonrpc-h._tcp.local, "QU" question PTR _dvl-deviceapi._tcp.local, "QU" question PTR _enphase-envoy._tcp.local, "QU" question PTR _mediaremotetv._tcp.local, "QU" question PTR _system-bridge._udp.local, "QU" question PTR _touch-able._tcp.local, "QU" question PTR _axis-video._tcp.local, "QU" question PTR _googlecast._tcp.local, "QU" question PTR _esphomelib._tcp.local, "QU" question PTR _viziocast._tcp.local, "QU" question PTR _powerview._tcp.local, "QU" question PTR _easylink._tcp.local, "QU" question PTR _plugwise._tcp.local, "QU" question PTR _Volumio._tcp.local, "QU" question PTR _airplay._tcp.local, "QU" question PTR _homekit._tcp.local, "QU" question PTR _fbx-api._tcp.local, "QU" question PTR _printer._tcp.local, "QU" question PTR _kizbox._tcp.local, "QU" question PTR _dkapi._tcp.local, "QU" question PTR _sonos._tcp.local, "QU" question PTR _miio._udp.local, "QU" question PTR _http._tcp.local, "QU" question PTR _ipps._tcp.local, "QU" question PTR _daap._tcp.local, "QU" question PTR _bond._tcp.local, "QU" question PTR _leap._tcp.local, "QU" question PTR _wled._tcp.local, "QU" question PTR _ipp._tcp.local, "QU" question PTR _elg._tcp.local, "QU" question PTR _hap._udp.local, "QU" question PTR _ssh._tcp.local, "QU" question PTR _hap._tcp.local, "QU" question PTR _nut._tcp.local, "QU" question PTR _api._udp.local, "QU" question

----
# Packet 46 from /var/folders/q1/txwvty_x1s15nrvg8_l5k5jw0000gn/T/wireshark_Wi-FiLUXZ80.pcapng
- 46
- 89.845949
- 10.0.1.197
- 224.0.0.251
- MDNS
- 890
- Standard query 0x0000 PTR _googlecast._tcp.local, "QM" question PTR _http._tcp.local, "QM" question PTR _homekit._tcp.local, "QM" question PTR _mediaremotetv._tcp.local, "QM" question PTR _airplay._tcp.local, "QM" question PTR _hap._tcp.local, "QM" question PTR _spotify-connect._tcp.local, "QM" question PTR _home-assistant._tcp.local, "QM" question PTR _xbmc-jsonrpc-h._tcp.local, "QM" question PTR _dvl-deviceapi._tcp.local, "QM" question PTR _enphase-envoy._tcp.local, "QM" question PTR _system-bridge._udp.local, "QM" question PTR _touch-able._tcp.local, "QM" question PTR _axis-video._tcp.local, "QM" question PTR _esphomelib._tcp.local, "QM" question PTR _viziocast._tcp.local, "QM" question PTR _powerview._tcp.local, "QM" question PTR _easylink._tcp.local, "QM" question PTR _plugwise._tcp.local, "QM" question PTR _Volumio._tcp.local, "QM" question PTR _fbx-api._tcp.local, "QM" question PTR _printer._tcp.local, "QM" question PTR _kizbox._tcp.local, "QM" question PTR _dkapi._tcp.local, "QM" question PTR _sonos._tcp.local, "QM" question PTR _miio._udp.local, "QM" question PTR _ipps._tcp.local, "QM" question PTR _daap._tcp.local, "QM" question PTR _bond._tcp.local, "QM" question PTR _leap._tcp.local, "QM" question PTR _wled._tcp.local, "QM" question PTR _ipp._tcp.local, "QM" question PTR _elg._tcp.local, "QM" question PTR _hap._udp.local, "QM" question PTR _ssh._tcp.local, "QM" question PTR _nut._tcp.local, "QM" question PTR _api._udp.local, "QM" question PTR Toshiba-Cast-TV-6e9a9b0855bee4e25a4d70e466028920._googlecast._tcp.local PTR rachio_local-DB346E._http._tcp.local PTR EWS377APv3._http._tcp.local PTR 43B92CF7-0EC7-5B4B-A902-E402AEB8DFEE._homekit._tcp.local PTR Living Room (2)._mediaremotetv._tcp.local PTR Living Room (2)._airplay._tcp.local PTR Upstairs._hap._tcp.local

----
# Packet 47 from /var/folders/q1/txwvty_x1s15nrvg8_l5k5jw0000gn/T/wireshark_Wi-FiLUXZ80.pcapng
- 47
- 91.846686
- 10.0.1.197
- 224.0.0.251
- MDNS
- 890
- Standard query 0x0000 PTR _googlecast._tcp.local, "QM" question PTR _http._tcp.local, "QM" question PTR _homekit._tcp.local, "QM" question PTR _mediaremotetv._tcp.local, "QM" question PTR _airplay._tcp.local, "QM" question PTR _hap._tcp.local, "QM" question PTR _spotify-connect._tcp.local, "QM" question PTR _home-assistant._tcp.local, "QM" question PTR _xbmc-jsonrpc-h._tcp.local, "QM" question PTR _dvl-deviceapi._tcp.local, "QM" question PTR _enphase-envoy._tcp.local, "QM" question PTR _system-bridge._udp.local, "QM" question PTR _touch-able._tcp.local, "QM" question PTR _axis-video._tcp.local, "QM" question PTR _esphomelib._tcp.local, "QM" question PTR _viziocast._tcp.local, "QM" question PTR _powerview._tcp.local, "QM" question PTR _easylink._tcp.local, "QM" question PTR _plugwise._tcp.local, "QM" question PTR _Volumio._tcp.local, "QM" question PTR _fbx-api._tcp.local, "QM" question PTR _printer._tcp.local, "QM" question PTR _kizbox._tcp.local, "QM" question PTR _dkapi._tcp.local, "QM" question PTR _sonos._tcp.local, "QM" question PTR _miio._udp.local, "QM" question PTR _ipps._tcp.local, "QM" question PTR _daap._tcp.local, "QM" question PTR _bond._tcp.local, "QM" question PTR _leap._tcp.local, "QM" question PTR _wled._tcp.local, "QM" question PTR _ipp._tcp.local, "QM" question PTR _elg._tcp.local, "QM" question PTR _hap._udp.local, "QM" question PTR _ssh._tcp.local, "QM" question PTR _nut._tcp.local, "QM" question PTR _api._udp.local, "QM" question PTR Toshiba-Cast-TV-6e9a9b0855bee4e25a4d70e466028920._googlecast._tcp.local PTR rachio_local-DB346E._http._tcp.local PTR EWS377APv3._http._tcp.local PTR 43B92CF7-0EC7-5B4B-A902-E402AEB8DFEE._homekit._tcp.local PTR Living Room (2)._mediaremotetv._tcp.local PTR Living Room (2)._airplay._tcp.local PTR Upstairs._hap._tcp.local

----
# Packet 48 from /var/folders/q1/txwvty_x1s15nrvg8_l5k5jw0000gn/T/wireshark_Wi-FiLUXZ80.pcapng
- 48
- 92.573694
- 10.0.1.197
- 224.0.0.251
- MDNS
- 105
- Standard query 0x0000 PTR _home-assistant._tcp.local, "QU" question PTR Home._home-assistant._tcp.local

----
# Packet 49 from /var/folders/q1/txwvty_x1s15nrvg8_l5k5jw0000gn/T/wireshark_Wi-FiLUXZ80.pcapng
- 49
- 96.309294
- 10.0.1.197
- 224.0.0.251
- MDNS
- 105
- Standard query 0x0000 PTR _home-assistant._tcp.local, "QU" question PTR Home._home-assistant._tcp.local

----
# Packet 50 from /var/folders/q1/txwvty_x1s15nrvg8_l5k5jw0000gn/T/wireshark_Wi-FiLUXZ80.pcapng
- 50
- 96.310208
- 10.0.1.197
- 224.0.0.251
- MDNS
- 105
- Standard query 0x0000 PTR _home-assistant._tcp.local, "QU" question PTR Home._home-assistant._tcp.local

----
# Packet 51 from /var/folders/q1/txwvty_x1s15nrvg8_l5k5jw0000gn/T/wireshark_Wi-FiLUXZ80.pcapng
- 51
- 96.329755
- 10.0.1.197
- 224.0.0.251
- MDNS
- 363
- Standard query response 0x0000 PTR Home._home-assistant._tcp.local SRV, cache flush 0 0 8123 dcae3a6d83cd40f49f4e58aad7eba187.local TXT, cache flush A, cache flush 10.0.1.197

----
# Packet 52 from /var/folders/q1/txwvty_x1s15nrvg8_l5k5jw0000gn/T/wireshark_Wi-FiLUXZ80.pcapng
- 52
- 96.353770
- 10.0.1.197
- 224.0.0.251
- MDNS
- 363
- Standard query response 0x0000 PTR Home._home-assistant._tcp.local SRV, cache flush 0 0 8123 dcae3a6d83cd40f49f4e58aad7eba187.local TXT, cache flush A, cache flush 10.0.1.197

----
# Packet 53 from /var/folders/q1/txwvty_x1s15nrvg8_l5k5jw0000gn/T/wireshark_Wi-FiLUXZ80.pcapng
- 53
- 96.395194
- 10.0.1.197
- 224.0.0.251
- MDNS
- 890
- Standard query 0x0000 PTR _googlecast._tcp.local, "QM" question PTR _http._tcp.local, "QM" question PTR _homekit._tcp.local, "QM" question PTR _mediaremotetv._tcp.local, "QM" question PTR _airplay._tcp.local, "QM" question PTR _hap._tcp.local, "QM" question PTR _spotify-connect._tcp.local, "QM" question PTR _home-assistant._tcp.local, "QM" question PTR _xbmc-jsonrpc-h._tcp.local, "QM" question PTR _dvl-deviceapi._tcp.local, "QM" question PTR _enphase-envoy._tcp.local, "QM" question PTR _system-bridge._udp.local, "QM" question PTR _touch-able._tcp.local, "QM" question PTR _axis-video._tcp.local, "QM" question PTR _esphomelib._tcp.local, "QM" question PTR _viziocast._tcp.local, "QM" question PTR _powerview._tcp.local, "QM" question PTR _easylink._tcp.local, "QM" question PTR _plugwise._tcp.local, "QM" question PTR _Volumio._tcp.local, "QM" question PTR _fbx-api._tcp.local, "QM" question PTR _printer._tcp.local, "QM" question PTR _kizbox._tcp.local, "QM" question PTR _dkapi._tcp.local, "QM" question PTR _sonos._tcp.local, "QM" question PTR _miio._udp.local, "QM" question PTR _ipps._tcp.local, "QM" question PTR _daap._tcp.local, "QM" question PTR _bond._tcp.local, "QM" question PTR _leap._tcp.local, "QM" question PTR _wled._tcp.local, "QM" question PTR _ipp._tcp.local, "QM" question PTR _elg._tcp.local, "QM" question PTR _hap._udp.local, "QM" question PTR _ssh._tcp.local, "QM" question PTR _nut._tcp.local, "QM" question PTR _api._udp.local, "QM" question PTR Toshiba-Cast-TV-6e9a9b0855bee4e25a4d70e466028920._googlecast._tcp.local PTR rachio_local-DB346E._http._tcp.local PTR EWS377APv3._http._tcp.local PTR 43B92CF7-0EC7-5B4B-A902-E402AEB8DFEE._homekit._tcp.local PTR Living Room (2)._mediaremotetv._tcp.local PTR Living Room (2)._airplay._tcp.local PTR Upstairs._hap._tcp.local

----
# Packet 54 from /var/folders/q1/txwvty_x1s15nrvg8_l5k5jw0000gn/T/wireshark_Wi-FiLUXZ80.pcapng
- 54
- 96.616331
- 10.0.1.197
- 224.0.0.251
- MDNS
- 363
- Standard query response 0x0000 PTR Home._home-assistant._tcp.local SRV, cache flush 0 0 8123 dcae3a6d83cd40f49f4e58aad7eba187.local TXT, cache flush A, cache flush 10.0.1.197

----
# Packet 55 from /var/folders/q1/txwvty_x1s15nrvg8_l5k5jw0000gn/T/wireshark_Wi-FiLUXZ80.pcapng
- 55
- 96.648693
- 10.0.1.197
- 224.0.0.251
- MDNS
- 280
- Standard query response 0x0000 PTR Home Assistant Bridge F9AE60._hap._tcp.local SRV, cache flush 0 0 21063 Home-Assistant-Bridge-F9AE60.local TXT, cache flush A, cache flush 10.0.1.197

----
# Packet 56 from /var/folders/q1/txwvty_x1s15nrvg8_l5k5jw0000gn/T/wireshark_Wi-FiLUXZ80.pcapng
- 56
- 96.685289
- 10.0.1.197
- 224.0.0.251
- MDNS
- 280
- Standard query response 0x0000 PTR Home Assistant Bridge F9AE60._hap._tcp.local TXT, cache flush A, cache flush 10.0.1.197 SRV, cache flush 0 0 21063 Home-Assistant-Bridge-F9AE60.local

----
# Packet 57 from /var/folders/q1/txwvty_x1s15nrvg8_l5k5jw0000gn/T/wireshark_Wi-FiLUXZ80.pcapng
- 57
- 97.005102
- 10.0.1.197
- 224.0.0.251
- MDNS
- 363
- Standard query response 0x0000 PTR Home._home-assistant._tcp.local SRV, cache flush 0 0 8123 dcae3a6d83cd40f49f4e58aad7eba187.local TXT, cache flush A, cache flush 10.0.1.197

----
# Packet 58 from /var/folders/q1/txwvty_x1s15nrvg8_l5k5jw0000gn/T/wireshark_Wi-FiLUXZ80.pcapng
- 58
- 97.008015
- 10.0.1.197
- 224.0.0.251
- MDNS
- 280
- Standard query response 0x0000 PTR Home Assistant Bridge F9AE60._hap._tcp.local SRV, cache flush 0 0 21063 Home-Assistant-Bridge-F9AE60.local TXT, cache flush A, cache flush 10.0.1.197

----
# Packet 59 from /var/folders/q1/txwvty_x1s15nrvg8_l5k5jw0000gn/T/wireshark_Wi-FiLUXZ80.pcapng
- 59
- 97.343605
- 10.0.1.197
- 224.0.0.251
- MDNS
- 280
- Standard query response 0x0000 PTR Home Assistant Bridge F9AE60._hap._tcp.local SRV, cache flush 0 0 21063 Home-Assistant-Bridge-F9AE60.local TXT, cache flush A, cache flush 10.0.1.197

----
# Packet 60 from /var/folders/q1/txwvty_x1s15nrvg8_l5k5jw0000gn/T/wireshark_Wi-FiLUXZ80.pcapng
- 60
- 97.690589
- 10.0.1.197
- 224.0.0.251
- MDNS
- 363
- Standard query response 0x0000 PTR Home._home-assistant._tcp.local SRV, cache flush 0 0 8123 dcae3a6d83cd40f49f4e58aad7eba187.local TXT, cache flush A, cache flush 10.0.1.197

----
# Packet 61 from /var/folders/q1/txwvty_x1s15nrvg8_l5k5jw0000gn/T/wireshark_Wi-FiLUXZ80.pcapng
- 61
- 104.453440
- 10.0.1.197
- 224.0.0.251
- MDNS
- 952
- Standard query 0x0000 PTR _googlecast._tcp.local, "QM" question PTR _hap._tcp.local, "QM" question PTR _http._tcp.local, "QM" question PTR _homekit._tcp.local, "QM" question PTR _mediaremotetv._tcp.local, "QM" question PTR _airplay._tcp.local, "QM" question PTR _home-assistant._tcp.local, "QM" question PTR _spotify-connect._tcp.local, "QM" question PTR _xbmc-jsonrpc-h._tcp.local, "QM" question PTR _dvl-deviceapi._tcp.local, "QM" question PTR _enphase-envoy._tcp.local, "QM" question PTR _system-bridge._udp.local, "QM" question PTR _touch-able._tcp.local, "QM" question PTR _axis-video._tcp.local, "QM" question PTR _esphomelib._tcp.local, "QM" question PTR _viziocast._tcp.local, "QM" question PTR _powerview._tcp.local, "QM" question PTR _easylink._tcp.local, "QM" question PTR _plugwise._tcp.local, "QM" question PTR _Volumio._tcp.local, "QM" question PTR _fbx-api._tcp.local, "QM" question PTR _printer._tcp.local, "QM" question PTR _kizbox._tcp.local, "QM" question PTR _dkapi._tcp.local, "QM" question PTR _sonos._tcp.local, "QM" question PTR _miio._udp.local, "QM" question PTR _ipps._tcp.local, "QM" question PTR _daap._tcp.local, "QM" question PTR _bond._tcp.local, "QM" question PTR _leap._tcp.local, "QM" question PTR _wled._tcp.local, "QM" question PTR _ipp._tcp.local, "QM" question PTR _elg._tcp.local, "QM" question PTR _hap._udp.local, "QM" question PTR _ssh._tcp.local, "QM" question PTR _nut._tcp.local, "QM" question PTR _api._udp.local, "QM" question PTR Toshiba-Cast-TV-6e9a9b0855bee4e25a4d70e466028920._googlecast._tcp.local PTR Home Assistant Bridge F9AE60._hap._tcp.local PTR Upstairs._hap._tcp.local PTR rachio_local-DB346E._http._tcp.local PTR EWS377APv3._http._tcp.local PTR 43B92CF7-0EC7-5B4B-A902-E402AEB8DFEE._homekit._tcp.local PTR Living Room (2)._mediaremotetv._tcp.local PTR Living Room (2)._airplay._tcp.local PTR Home._home-assistant._tcp.local

----
# Packet 82 from /var/folders/q1/txwvty_x1s15nrvg8_l5k5jw0000gn/T/wireshark_Wi-FiLUXZ80.pcapng
- 82
- 152.396813
- 10.0.1.197
- 224.0.0.251
- MDNS
- 952
- Standard query 0x0000 PTR _googlecast._tcp.local, "QM" question PTR _hap._tcp.local, "QM" question PTR _http._tcp.local, "QM" question PTR _homekit._tcp.local, "QM" question PTR _mediaremotetv._tcp.local, "QM" question PTR _airplay._tcp.local, "QM" question PTR _home-assistant._tcp.local, "QM" question PTR _spotify-connect._tcp.local, "QM" question PTR _xbmc-jsonrpc-h._tcp.local, "QM" question PTR _dvl-deviceapi._tcp.local, "QM" question PTR _enphase-envoy._tcp.local, "QM" question PTR _system-bridge._udp.local, "QM" question PTR _touch-able._tcp.local, "QM" question PTR _axis-video._tcp.local, "QM" question PTR _esphomelib._tcp.local, "QM" question PTR _viziocast._tcp.local, "QM" question PTR _powerview._tcp.local, "QM" question PTR _easylink._tcp.local, "QM" question PTR _plugwise._tcp.local, "QM" question PTR _Volumio._tcp.local, "QM" question PTR _fbx-api._tcp.local, "QM" question PTR _printer._tcp.local, "QM" question PTR _kizbox._tcp.local, "QM" question PTR _dkapi._tcp.local, "QM" question PTR _sonos._tcp.local, "QM" question PTR _miio._udp.local, "QM" question PTR _ipps._tcp.local, "QM" question PTR _daap._tcp.local, "QM" question PTR _bond._tcp.local, "QM" question PTR _leap._tcp.local, "QM" question PTR _wled._tcp.local, "QM" question PTR _ipp._tcp.local, "QM" question PTR _elg._tcp.local, "QM" question PTR _hap._udp.local, "QM" question PTR _ssh._tcp.local, "QM" question PTR _nut._tcp.local, "QM" question PTR _api._udp.local, "QM" question PTR Toshiba-Cast-TV-6e9a9b0855bee4e25a4d70e466028920._googlecast._tcp.local PTR Home Assistant Bridge F9AE60._hap._tcp.local PTR Upstairs._hap._tcp.local PTR rachio_local-DB346E._http._tcp.local PTR EWS377APv3._http._tcp.local PTR 43B92CF7-0EC7-5B4B-A902-E402AEB8DFEE._homekit._tcp.local PTR Living Room (2)._mediaremotetv._tcp.local PTR Living Room (2)._airplay._tcp.local PTR Home._home-assistant._tcp.local

----
# Packet 102 from /var/folders/q1/txwvty_x1s15nrvg8_l5k5jw0000gn/T/wireshark_Wi-FiLUXZ80.pcapng
- 102
- 216.478873
- 10.0.1.197
- 224.0.0.251
- MDNS
- 952
- Standard query 0x0000 PTR _googlecast._tcp.local, "QM" question PTR _hap._tcp.local, "QM" question PTR _http._tcp.local, "QM" question PTR _homekit._tcp.local, "QM" question PTR _mediaremotetv._tcp.local, "QM" question PTR _airplay._tcp.local, "QM" question PTR _home-assistant._tcp.local, "QM" question PTR _spotify-connect._tcp.local, "QM" question PTR _xbmc-jsonrpc-h._tcp.local, "QM" question PTR _dvl-deviceapi._tcp.local, "QM" question PTR _enphase-envoy._tcp.local, "QM" question PTR _system-bridge._udp.local, "QM" question PTR _touch-able._tcp.local, "QM" question PTR _axis-video._tcp.local, "QM" question PTR _esphomelib._tcp.local, "QM" question PTR _viziocast._tcp.local, "QM" question PTR _powerview._tcp.local, "QM" question PTR _easylink._tcp.local, "QM" question PTR _plugwise._tcp.local, "QM" question PTR _Volumio._tcp.local, "QM" question PTR _fbx-api._tcp.local, "QM" question PTR _printer._tcp.local, "QM" question PTR _kizbox._tcp.local, "QM" question PTR _dkapi._tcp.local, "QM" question PTR _sonos._tcp.local, "QM" question PTR _miio._udp.local, "QM" question PTR _ipps._tcp.local, "QM" question PTR _daap._tcp.local, "QM" question PTR _bond._tcp.local, "QM" question PTR _leap._tcp.local, "QM" question PTR _wled._tcp.local, "QM" question PTR _ipp._tcp.local, "QM" question PTR _elg._tcp.local, "QM" question PTR _hap._udp.local, "QM" question PTR _ssh._tcp.local, "QM" question PTR _nut._tcp.local, "QM" question PTR _api._udp.local, "QM" question PTR Toshiba-Cast-TV-6e9a9b0855bee4e25a4d70e466028920._googlecast._tcp.local PTR Home Assistant Bridge F9AE60._hap._tcp.local PTR Upstairs._hap._tcp.local PTR rachio_local-DB346E._http._tcp.local PTR EWS377APv3._http._tcp.local PTR 43B92CF7-0EC7-5B4B-A902-E402AEB8DFEE._homekit._tcp.local PTR Living Room (2)._mediaremotetv._tcp.local PTR Living Room (2)._airplay._tcp.local PTR Home._home-assistant._tcp.local

----
# Packet 132 from /var/folders/q1/txwvty_x1s15nrvg8_l5k5jw0000gn/T/wireshark_Wi-FiLUXZ80.pcapng
- 132
- 344.480022
- 10.0.1.197
- 224.0.0.251
- MDNS
- 952
- Standard query 0x0000 PTR _googlecast._tcp.local, "QM" question PTR _hap._tcp.local, "QM" question PTR _http._tcp.local, "QM" question PTR _homekit._tcp.local, "QM" question PTR _mediaremotetv._tcp.local, "QM" question PTR _airplay._tcp.local, "QM" question PTR _home-assistant._tcp.local, "QM" question PTR _spotify-connect._tcp.local, "QM" question PTR _xbmc-jsonrpc-h._tcp.local, "QM" question PTR _dvl-deviceapi._tcp.local, "QM" question PTR _enphase-envoy._tcp.local, "QM" question PTR _system-bridge._udp.local, "QM" question PTR _touch-able._tcp.local, "QM" question PTR _axis-video._tcp.local, "QM" question PTR _esphomelib._tcp.local, "QM" question PTR _viziocast._tcp.local, "QM" question PTR _powerview._tcp.local, "QM" question PTR _easylink._tcp.local, "QM" question PTR _plugwise._tcp.local, "QM" question PTR _Volumio._tcp.local, "QM" question PTR _fbx-api._tcp.local, "QM" question PTR _printer._tcp.local, "QM" question PTR _kizbox._tcp.local, "QM" question PTR _dkapi._tcp.local, "QM" question PTR _sonos._tcp.local, "QM" question PTR _miio._udp.local, "QM" question PTR _ipps._tcp.local, "QM" question PTR _daap._tcp.local, "QM" question PTR _bond._tcp.local, "QM" question PTR _leap._tcp.local, "QM" question PTR _wled._tcp.local, "QM" question PTR _ipp._tcp.local, "QM" question PTR _elg._tcp.local, "QM" question PTR _hap._udp.local, "QM" question PTR _ssh._tcp.local, "QM" question PTR _nut._tcp.local, "QM" question PTR _api._udp.local, "QM" question PTR Toshiba-Cast-TV-6e9a9b0855bee4e25a4d70e466028920._googlecast._tcp.local PTR Home Assistant Bridge F9AE60._hap._tcp.local PTR Upstairs._hap._tcp.local PTR rachio_local-DB346E._http._tcp.local PTR EWS377APv3._http._tcp.local PTR 43B92CF7-0EC7-5B4B-A902-E402AEB8DFEE._homekit._tcp.local PTR Living Room (2)._mediaremotetv._tcp.local PTR Living Room (2)._airplay._tcp.local PTR Home._home-assistant._tcp.local

@bdraco
Copy link
Member

bdraco commented Aug 29, 2021 via email

@bdraco
Copy link
Member

bdraco commented Aug 29, 2021 via email

@bdraco
Copy link
Member

bdraco commented Aug 29, 2021 via email

@sluramod
Copy link
Author

sluramod commented Aug 29, 2021

This capture was done on a mac wirelessly connected to the same network the phone is connected to. This very same mac looses Home Assistant's record in mdns. I started dns-sd -B _hap._tcp on this mac, then restarted home assistant (Upstairs is Ecobee3):

dns-sd -B _hap._tcp
Browsing for _hap._tcp
DATE: ---Sat 28 Aug 2021---
21:44:34.392  ...STARTING...
Timestamp     A/R    Flags  if Domain               Service Type         Instance Name
21:44:34.393  Add        2   6 local.               _hap._tcp.           Upstairs
21:46:50.360  Add        2   6 local.               _hap._tcp.           Home Assistant Bridge F9AE60
21:47:14.084  Rmv        0   6 local.               _hap._tcp.           Home Assistant Bridge F9AE60

Again, this is the same mac that I used to capture traffic above.

home assistant is listening:

pi@raspberrypi:~ $ sudo lsof -i4 -P|grep 5353
python3   5376      root   10u  IPv4  34176      0t0  UDP *:5353 

@bdraco
Copy link
Member

bdraco commented Aug 30, 2021

What do you have the DTIM period set to?

https://www.sniffwifi.com/2016/05/go-to-sleep-go-to-sleep-go-to-sleep.html#:~:text=Apple%20recommends%20a%20DTIM%20setting,and%20broadcast%20or%20multicast%20data.
https://support.apple.com/en-us/HT202068

I usually recommend testing over ethernet to eliminate WiFi as the source of the problem since any number of issues can cause mDNS traffic to get lost due to devices sleeping and the DTIM period.

@sluramod
Copy link
Author

I cannot change DTIM setting - it’s not available for my AP.

However, I want to point out that Ecobee 3 thermostat works on the same network and never says ‘No Response’ and never disappears from mDns.

at this point I give up. will try future updates, I think the problem is in zeroconf implementation.

@bdraco
Copy link
Member

bdraco commented Aug 30, 2021

I agree the problem is with mdns/zeroconf.

If you do figure out whats going on, please reopen and let us know.

Thanks

@bdraco bdraco closed this as completed Aug 30, 2021
@bdraco
Copy link
Member

bdraco commented Aug 31, 2021 via email

@sluramod
Copy link
Author

@bdraco I think I solved the issue.

I have Raspberry Pi 3 B+ running Home Assistant in docker container connected to ethernet port. I had ipv6 disabled in /boot/cmdline.txt

I found the following: raspberrypi/linux#2566 and raspberrypi/linux#3025

I’m not sure if those are directly related, but after I re-enabled ipv6, the issue is gone using 2021.9.6 docker image. Hopefully the information in this ticket will be helpful to others.

@bdraco
Copy link
Member

bdraco commented Sep 12, 2021

If ipv6 is enabled, zeroconf always broadcasts on all interfaces. https://github.com/home-assistant/core/blob/dev/homeassistant/components/zeroconf/__init__.py#L147

Glad its working for you now 👍

@github-actions github-actions bot locked and limited conversation to collaborators Oct 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.