lukasroegner / homebridge-apple-tv-remote

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

Remote app seems to lose connection with the Apple TV after a while. #22

Closed Sammyjo20 closed 4 years ago

Sammyjo20 commented 4 years ago

There are a couple of issues I've noticed happening so far, my intended use for this is to use my normal Apple TV remote and have this running to use an automation I built that turns on lights behind the TV when the TV is turned on, but I'm having some intermittent issues and I'm not sure if I need to reconfigure something or not, but:

  1. After a period of not using the Apple TV, the homebridge-apple-tv-remote app doesn't register the switch in the "On" position, if I go into the app - the switch is still "Off"

1a. If I then decide to press it on separately, it actually turns off the TV, and puts the switch in the "On" state, which then will turn the TV on/off randomly without me touching it. The only solution is to restart Homebridge.

  1. Similar to the first issue, but when I turn the TV off after watching, the switch isn't put into the "off" position.

Thanks for making such a cool provider for Homebridge!

lukasroegner commented 4 years ago

Hi @Sammyjo20,

I agree that the on/off state can not really be used as a trigger for automations. The events coming from the Apple TV are sometimes not reliable, sometimes delayed. I'm afraid there is nothing that can be really done to enhance it.

I can tell you how I managed to automate my TV "backlight": I added my TV to homebridge (in my case with the homebridge-bravia-tvos plugin) and used changes of the TV (on/off) to switch the backlight on/off. The TV is automatically switch on/off by the Apple TV via HDMI CEC.

I hope that helps you to implement the automation.

Sammyjo20 commented 4 years ago

Thanks for your quick reply Lukas, I'll check that out later today. That sounds awesome! When the automation runs, I make a request to a little node web server I made that checks if it's between sunset/sunrise and then if it is, and it's dark outside the lights turn on. It's super cool, so I'd love it to be reliable.

Thanks again for a cool app +1