Detect when Apple TV is turned on or off

I use an Apple TV (gen 4) as my only source when watching TV. In the TV room I also have a heat pump that is normally running at full fan speed, in order to get the best possible distribution of heat.
However, when I’m watching TV I turn down the fan speed, in order to lower the noise.

So is there a way that Homey can detect when the Apple TV is turned on or off? Homey already talks to the heat pump, so it’s easy to create a flow that controls the fan speed once it knows the status of the Apple TV.

Can you run shortcuts on Apple TV? If so, you can see if there’s a shortcut action available that matches what you want (either “turn off” or “stop watching” or something similar) and send a webhook request to Homey when that happens.

Or maybe you can use a power plug on your Apple TV which measures energy…

1 Like

Or with the app ‘Net Scan’, based on the (fixed) IP adres of your Apple TV (Online or Not Online).

Net Scan seems like a possibility. Tried with IP, but that didn’t work. The Apple TV doesn’t seem to go offline even when turned off.
At least Net Scan doesn’t detect that it’s turned off, and it also responds to ping.
So I’ll have to see if there’s a port that I can use

Unfortunately, it seems that the Apple TV always listens to the ports it is using, even when it is turned off. So maybe I’ll have to go for a power plug then.

It depends on what you mean by “turned off”. A device like the Apple TV is never really turned off, unless you take it off power.

Exactly! The Apple TV never really turns off.
After a power cycle it needs a couple of minutes to boot, so cutting the power is not an option

New to Homey and has exactly the same question as the thread title but I also have some other options that I can explore.

We use Apple TV with sound out to Sonos speakers (over Air Play 2) and picture out to a projector, projecting on a motorized screen. We have an old Logitech Harmony 555 to lower the screen, and turn on the projector with one button.

I would really like to detect when the apple tv, or projector is turned on in order to trigger other Sonos speakers to be paused and a number of lights to be turned off. I don’t care how the Homey learns that I am about to watch something on the Apple TV but needs some advice on the easiest route. I tried to add the IR functionality for Apple TV in Home but no success, I then tried to add the Logitech Harmony 555 to Homey but cannot seem to find this remote.
Haven’t looked for the Sanyo PLV Z800 to be added yet, maybe this is an opportunity.
So in short, if Homey can understand if either:

  1. Apple TV is awake
  2. The projector is on
  3. The Logitech Harmony 555 sends the startup command for the projector screen and the projector
    I can use this as a starting point to set other actions in motion.

Can anyone tell me the best way forward?

I ended up using a power plug on the TV. Since the TV uses less that one watt when turned off, and 70-100 watts when turned on, it is easy to detect if it is turned on or off.
Just make sure that you use a power plug that can measure the power consumption, otherwise it is no use :wink:

Good to know this works. I had expected Homey to be able to pickup the state of either the Apple TV, the projector or the remote but maybe this is a simpler and better solution.
Sometimes it is better to do what works than fighting to do what you think should work…

1 Like

Any solution without buying an extra plug? I am sure there is a solution, but not able to think into the right direction. Probably with bluetooth even, or apple automations?

Does anybody has an idea?

I have no answer to your question and can only second what you are saying, it seems odd that Homey cannot effectively pick up the state of an Apple TV, seeing that this is a well connected device which state is an important starting point for many automation ideas.

As I did not come up with any better solutions though I did what was suggested above and got a plug, and first put it between the socket and the Apple TV but this didi not work as the Apple TV even when on only draws minimal power, between 1 and 10 W according to my plug and even putting an action threshold at 5W did not work as the power consumption fluctuates back to a very low value after a short while. I then put the new plug between the socket and my projector, as I turn on the projector with my “smart” old logitech control in a combined sweep together with my motorized screen and the Apple TV. This works fine and I can now create new flows based on the Apple TV being on (while in fact it is based on the projector being on, but since this coincides nicely with what I want it works).

Just wanted to share my experience, so that if someone else can get inspired, that’s great!

Hi. Thanks a lot . The plug thing works and I agree, a simple solution. But I actually do not want to abuse (or buy) a plug for something, which can be solved by software.

I assume via shortcuts (apple) there might be an option. But not clear how that might work.

I don’t have an Apple TV. But I assume you also have an iPhone?

Is this not possible with an iPhone/iPad and Homekit? Is there no automation possible that when Apple TV is on then send Webhook to Homey. This is possible with other homekit accessoires, but I don’t know if homekit gets notified when AppleTV is turned on?

Even if there was an app able to interact with the Apple TV, apparently it’s just not possible to find out the current state of the device:

Thats exactly the problem. Apple TV is not a device in Homekit, it is just the hub. So the Apple TV cannot trigger anything (at least thats how it looks to me)

1 Like

I had the same issue. I have an LG tv, so I tried the LG Homey app. It signals turn tv on or off, but not when it is turned on via HDMI. So still not a solution. will do the power plug thing.

I have the Harmony hub and remote to all my media devices and can with the harmony app in HP23 easily determine when Apple TV is activated