lukasroegner / homebridge-apple-tv-remote

Plugin for controlling Apple TVs in homebridge.
MIT License
132 stars 13 forks source link

Need to click twice on the home app switch to power on or off the Apple TV #96

Open tmenguy opened 3 years ago

tmenguy commented 3 years ago

Hi,

Setup : Apple TV 4K latest iOS 14, Hoobs 3.3.5, your great plugin : 0.12.2

First thanks a lot for the plugin!

I've enabled only the onOff switch in the config : the state of the apple TV is incorrect in the home app switch, but what is interesting is that I need to press the switch twice (so toggling it state from close to open to close) to power on or off the apple tv.

here is the log: I press first the switch : it changes its state but the apple tv power state is not changing, then I press again : the button change it state back ... but the apple tv is now chaning its power state!

10/04/2021, 01:50:22 [Apple TV Platform] [Apple TV Salon] On/off switch changed to true 10/04/2021, 01:50:22 [Apple TV Platform] [Apple TV Salon] Getting power state... 10/04/2021, 01:50:22 [Apple TV Platform] [Apple TV Salon] Returning cached value true for power state 10/04/2021, 01:50:26 [Apple TV Platform] [Apple TV Salon] On/off switch changed to false 10/04/2021, 01:50:26 [Apple TV Platform] [Apple TV Salon] Getting power state... 10/04/2021, 01:50:26 [Apple TV Platform] [Apple TV Salon] Returning cached value true for power state 10/04/2021, 01:50:26 [Apple TV Platform] [Apple TV Salon] Pressing key topmenu... 10/04/2021, 01:50:28 [Apple TV Platform] [Apple TV Salon] Pressing key select...

Is it related to the issues seen by others here?

More than happy to help if you need/want more infos Lukas, and thanks again for your work

BR Thomas

tmenguy commented 3 years ago

Tried something else : unplugged the HDMI (perhaps an issue with the HDMI CEC of the TV/Apple TV? It is an LG Oled with homekit support) ... and this time if I use the switch (the homebridge one in the home app) each time I set it to off it shut down the apple TV for a few second ... and the TV sets back on on its own few seconds later.