Atvremote scan

When I use the atvremote scan in Cmd I just get an emty result after some seconds. I have an ATV 4 on the same network as my HA.
Anyone have an idea what i am doing wrong?

I have the same, increased the timeout and still the same, did you have any luck?

Actually it turned out that the reserved IP address from the router was xxx.xxxx.xxx.15 for the ATV. Anyhow I saw that the actual address was 25. After correcting this I have no connection problem anymore.
But I am not using it anyway because it is not even possible to turn the ATV on/off and a lot of other things.

That is pretty much all I want to be able to do.

WOL doesn’t seem to wake my Apple TV either, can’t see any settings for this in the ATV either

AFAIK there is not API to force an Apple TV to go to standby. You can press some keys on the remote, but there is no “pure” API that can be called for this. It’s just how it’s designed by Apple - you should not need to turn it off yourself. To wake the device, all is needed is to send a request to it. It can by anything really, like a button press or just “power it on” in the UI as that sets up push updates (which triggers a request). A lot of people using CEC has had issues with this as their devices turn on every time they restart Home Assistant. Again, it’s how Apple has decided that it should work.

Apple uses something called “sleep proxy” to make devices go to deep sleep. It basically means that the device asks someone else to “act on their behalf”, usually an AirPort Extreme/Express. That device takes over responsibility of publishing bonjour services and some ARP-magic is also done with the MAC-addresses, so when you ping the Apple TV you actually ping the sleep proxy. When a request is sent to the Apple TV (i.e. the sleep proxy), the sleep proxy will wake it up and restore everything to default state. I have found that when the Apple TV is in deep sleep, scanning for it might sometimes not work. But that functionality is quite shaky overall so I’m planning on improving the scan support somehow. But it’s not an easy task…

More love and functionality is heading over to the Apple TV platform soon. I’m finishing off device authentication support (so AirPlay works with tvOS 10.2+ again) and support for more buttons. So soon you will be able to call buttons from the remote control using a service in Home Assistant.