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

State tile to sleep/wake Apple TV #7

Open epheterson opened 6 years ago

epheterson commented 6 years ago

It'd be cool if there were one tile representing the power state of the Apple TV that, when tapped, toggled the state.

Can we query on/off state of Apple TV to properly light up the tile?

MrDrache333 commented 6 years ago

You can get the current state with connected HDMI eith cec-utils...there is an homebridge-plugin for that...you can put your tv, your appletv and your Raspberry in the HDMI slots on your TV and control each of them using this cec Protocol...but i dont know one for over the air...you can of cause wake your AppleTV by sending a ping cmd to a specific port...but to get the actual state?...

MrDrache333 commented 6 years ago

Also, check out the newest Beta of iOS 11.4 and tvOS...there is an HomeKit integration with exact these features (also Play and Pause) at default

jlian commented 6 years ago

+1 on this enhancement. It's basically the only thing I need.

The story I'm trying to enable is when I get home I want my TV and Apple TV to both turn on automatically based on location.

Today I'm using Logitech Harmony, but that doesn't have state detection and goes out of sync with the actual state of the Apple TV, which prevents the automation from triggering properly.

In the other thread https://github.com/lprhodes/homebridge-apple-tv/issues/4 @lprhodes and @edc1591 commented that this is possible.

epheterson commented 6 years ago

@jlian, FWIW I do have this working with the CEC state of my TV via: https://github.com/SeydX/homebridge-sonybravia-platform

I also think it’d be nice to do here. Check if there’s a plug-in for your TV that may enable this as well.