lprhodes / homebridge-apple-tv

Apple TV 4th & 5th gen plugin for homebridge: https://github.com/nfarina/homebridge
Apache License 2.0
105 stars 15 forks source link

[Bug] Plugin can miss the AppleTV packets during startup #18

Open normen opened 6 years ago

normen commented 6 years ago

As I found out while investigating issue #9 the AppleTV plugin fails to discover the AppleTV when the homebridge server is very busy during startup. This is probably happening when the plugin doesn't get any CPU cycles while the UDP packet arrives.

As UDP packets are unreliable anyway I suppose having the AppleTV retry discovering the AppleTV after a while would be a good idea?

Thanks for this plugin - I can finally tell Siri to turn on the fireplace ;)

DarKOrange75 commented 5 years ago

This is a real problem on low end computers like Raspberry Pi, 9 times out of 10 it can't find my Apple TV.

Tangston311 commented 5 years ago

I'm experiencing this as well - whenever Homebridge restarts automatically via systemd it often won't find the AppleTV and then the associated accessories will disappear. Kind of prohibits reliable use of the plugin. Would be amazing if there were some retry logic when pairing!