evandcoleman / homebridge-theater-mode

A homebridge plugin to make your HomeKit devices react to the play/pause state of your Apple TV. Configured via the Home app.
MIT License
97 stars 15 forks source link

Slow Or Not Triggering Events #8

Closed AustinRobinson closed 5 years ago

AustinRobinson commented 6 years ago

Is there any way I can speed this up and make it more reliable?

AustinRobinson commented 6 years ago

When I run

appletv --credentials <credentials-from-pairing> state

sometimes it will not work and keep printing the same state over and over again but most of the time it works almost flawlessly with having the correct state and under one second delay. I can get this to work in the home app but it's not as fast (up to a full minute if not more.) What I don't understand is why can it be so fast using the the command line interface but not in the "homebridge-theater-mode" plugin. Any help would be appreciated.

AustinRobinson commented 6 years ago

I just did some more experimenting and it seems to only work if you enable theater mode while the Apple TV is in either a play or paused state. If you enable theater mode or run

appletv --credentials <credentials-from-pairing> state

while in a stopped state, it has a lot of delays and most the time, return the incorrect state.

evandcoleman commented 5 years ago

I've encountered this a few times in my testing and I'd just attributed it to a flakey new protocol. It's been a while so I may take another stab in the future to see if things have changed.