It looks like Go has adopted 15s TCP keepalives as a default for _all_
TCP connections, which is quite dumb if you ask me.
https://github.com/golang/go/issues/48622
For the HAP server's side, it degrades iOS battery life significantly by
waking the device every 15s to respond to these packets. In the case as
a normal MQTT client, it increases traffic on top of the 60s keepalive
we've already set at the application layer. In both cases, the solution
is to just explicitly disable TCP keepalives.
Upgrade hap to the latest version that contains the fixbrutella/hap#36.
Devices that have not received an update since a fixed timeout (24 hrs
for now), based on its last_seen time, will be marked as "not
responding" in the Home app. With this I can identify which devices are
unreachable or dead.
Also needed to upgrade hap with the fix for brutella/hap#30, or the
entire bridge will stop working.