Apple TV turning on randomly after addition of discovery

Anyone else seeing this?

I’m seeing something odd with ATV but not sure if this is it yet. Every once and awhile my TV will jump input to the ATV and loose ARC audio.

Pretty sure it’s the same thing. The ATV is sending power and is selling inputs

Here also turning on, think it comes that hass tried to connect

You are probably experiencing this:

I will try to come up with a work-around for it, but it will not be foolproof. If you do not rely on CEC, try disabling it.

Do all of you have some other Apple device that is always on in your network, like an Airport Express/Extreme?

I have 2 AirPort extreme and a mac mini in the network. Also a hdhomerun for Channels.

Same problem here, Apple TV randomly turns on
Running airport extreme on network too

I do rely on CEC, unfortunately
 I have an Airport Extreme.

If I add the Apple TV component, is there a check that says to ignore ‘known devices’?

There’s not I’m afraid. What you need is an “ignore” setting to discovery, so your devices are not added automatically. I will try to add that as soon as I can.

Maybe I could ask you guys for some help? To potentially fix your issue, I need to verify some behavior. If you could do the following:

  • Figure out IP-address of device (atvremote scan)
  • Make sure device is on
  • Assuming you run on Linux: sudo arp -n
  • Find the row matching your device and take note of the MAC-address (HWaddress). If you cannot see your device, ping it and look again.
  • Put device to sleep
  • Run the commnd above again

Has the MAC-address changed? Hopefully it should be the same as one of your other devices (e.g. AirPort). If you wake up your device, the MAC-address should be restored again. This information would help a lot!

1 Like

The MAC does not change for me but I do have a non-standard setup as the Airport is acting as an Access Point and my router is a pfSense box
 not sure if that causing problems with your potential solution.

That should not be a problem. If you install avahi-utils (sudo apt-get 
) and run:

avahi-browse _sleep-proxy._udp

Do you see your devices (AirPort devices that is)?

Haven’t worked with avahi, so forgive the ignorance
 but after running that command I get:

Failed to create client object: Daemon not running

Darn it, I’m not entirely sure how to fix that either. If you have a mac, you can try this:

dns-sd -B _sleep-proxy._udp.local

Should work too. Also, another question
 If you wake your device, put it to sleep and restart home assistant with either the device configured or discovery enabled, does it wake up?

I can boot up my mac later today to give that a try.

Restarting HA does wake up the ATV with discovery enabled and the device configured.

I don’t think I will come up with something reliable any time soon. BUT I have something else up my sleeves. that is not as nice, but it will work. No doubt. I’ll let you know when I’m done!

Tada: https://github.com/home-assistant/home-assistant/pull/5962

Please try this and report in the PR if it works.

I am suffering this issue constantly. As I am not a developer I am not familiar with Github, how do I access this code to test it? Thanks

It has been submitted as a PR so you should see it soon. Otherwise, you’d want to grab the file here:

https://raw.githubusercontent.com/postlund/home-assistant/19c30d273dfd51399f3d382acd44ce97b953eb3e/homeassistant/components/media_player/apple_tv.py

and drop it into your custom_components/media_player folder and update your configuration.yaml to temporarily test.

Great thanks - testing now


EDIT: After 24 hours or so no issues so far. Thanks!

I had this same issue, testing this fix as well, works great so far!