Lighting automation triggered by Apple TV status

I recently saw this cool lighting automation Reed did with HA

I was wondering if this kind of automation is possible with Hubitat and my Apple TV?
How to set up (trigger) automation based upon the "play/pause" status of my Apple TV?

I’ve not looked at the link (I’m lazy). My guess is that if you needed a trigger from HE based on the ATV Play/Pause, you would create a virtual switch in Hubitat and expose it to HomeKit. In the Home app you could possibly create an automation so that when the ATV played, that virtual switch turns on. You’d then have your trigger in RM or RL as that virtual switch turning on. Just to test it, here I’m setting the ATV On to turn my Lounge Lamp on (rather than a virtual switch). You’d do a second automation in Home to map ATV pause to Off:

Thanks for your input. For some reason I am unable to select my Apple TV in the home app > automation. Will need to look into that :thinking:

Ahh - I've just checked and neither can I, so there's nothing wrong in your setup....

That 'Lounge Watch Apple TV' accessory that I picked is a child device switch created by the Logitech Harmony Remote integration. It's something I use to turn things on and off in automations when I leave the house or run a Goodnight or Good Morning routine.

I'm sure it will be possible somehow...

@James_be

I've just had a little search. Apple TV cannot be used as a trigger directly in Homekit. However if you have Homebridge running on an always on device, there's a plugin that can be added that exposes the Apple TV as a switch in Home. That switch would then be used in the Home automation mirroring to a virtual switch in Hubitat, which in turn would trigger your lighting automation. Homebridge can be used alongside the Hubitat Homekit integration without issue. I have Homebridge running on a Pi solely to run a plugin for my Honeywell EvoHome heating thermostats that don't play nicely with the Hubitat integration.

1 Like

Right now i use power usage of my TV as a trigger for my Apple TV. It’s been consistent, works well and in my home i always use them together.

I used to use lux from the small led on the Apple TV to trigger automations. Should you go this route use a plug in device and shield both devices from any outside light as the AppleTV led only emits ~1 lux. It’s a bit more tricky to setup and as long as your Apple TV can remain hidden and undisturbed it will work well.

Finally i’ve used various Apple TV plugins on homebridge and homeassistant and synced the status back to hubitat. While i’ve been able to get this to work and i can get Apple TV play/pause status it’s never been stable over an extended period of time. YMMV. There is HADB to bring over HA devices to Hubitat and their is a hubitat integration for HA to bring in Hubitat devices to HA.

I go about it from the opposite direction. I put the home into theater mode and it triggers everything from there. So my lights do their thing while everything powers up. When the Apple TV powers up it automatically turns on the Onkyo and switches the input. This is all built an and requires no automation on my part.

A side note - today I said "Siri, play Mozart on the central" and it started up the Apple TV named central which started up the Onkyo and started playing on my in ceiling speakers. No automation involved. It just does it.

The part about changing the lights on pause and resume I like. That's something I'll have to look into. My lights do behave differently in theater mode but not to that granularity. For example, the kitchen lights dim and go to a color but they some on low and white if a motion sensor is triggered. It would be nice if the living room reacted differently to the play/pause state.

The other nice idea in that video is basing the control on the app selected. If I'm just playing music during the day I don't what theater lighting. Since I start from the Hubitat side it isn't too difficult but I like the granularity. Normally if I'm interacting with the Apple TV then I'm watching something, otherwise it is just playing music. Easy enough when I set my mode on Hubitat. I can see wanting different lighting based on app but so far that's not been an issue.

Good video for some ideas.

I’ve done this in Node-Red with the HA nodes. I’m pretty sure Hubitat does not have a way to control or detect the current gen appleTV. In node red I have integrated hubitat, logitech harmony, appletv, and kodi to all play nice together. when I turn on appletv or kodi, the lights dim, the shades close, and the stereo/projector all turn on. lights turn on when paused/stopped, slowly dim when hitting play, dim quicker when resuming from pause,

1 Like