Apple TV4 connection problem

I have used the atvremote scan to get login.id.
I have then made the following entry in the yaml file.
media_player:

  • platform: apple_tv
    host: 192.168.1.15
    login_id: 00000000-4f29-bf14-6115-d4e18ad447e4
    name: ATV

But it will not connect when running HA.
The follwing log entry keeps coming.
17-04-02 15:53:59 WARNING (MainThread) [homeassistant.components.media_player.apple_tv] A <class ‘aiohttp.errors.ClientOSError’> error occurred: [Errno 113] Cannot connect to host 192.168.1.15:3689 ssl:False [Can not connect to 192.168.1.15:3689 [Connect call failed (‘192.168.1.15’, 3689)]]

Anyone got an idea what is wrong?

Error number 113 means “No route to host”. Can you ping your Apple TV correctly?

I am not at home these days but i am pretty sure that I have tried to ping it successfully. I also guess that there must be some connection since I am able to find it using the atvremote scan.

It’s more complicated than one might think :slight_smile: Discovery is done using bonjour/zeroconf. If you have a device that support the “sleep proxy” service, like an AirPort Express/Extreme, then he Apple TV can turn itself completely off a and let the sleep proxy announce its presence. It’s later woken using something resembling wake-on-lan. I’ve had issues where they kind got out of sync, so I had to reboot the Apple TV and the AirPort to make it work again. First of all, do you have an AirPort device or some other apple product that is always on?

I actually Got an AirPort Extreme. I have tried to restart both the AirPort and Apple TV but no change :-/

Am I the only one which has experienced this connection error 103?

What’s the output of “atvremote --debug scan”?

pi@hassbian:~ $ atvremote --debug scan
DEBUG: Discovering devices for 3 seconds
DEBUG: Auto-discovered service Apple TV at 192.168.1.25 (hsgid: 00000000-4f29-bf 14-6115-d4e18ad447e4)
Found Apple TVs:

  • Apple TV at 192.168.1.25 (login id: 00000000-4f29-bf14-6115-d4e18ad447e4)

I have now solved the problem.
The reserved IP address from the router was xxx.xxxx.xxx.15 and I used that for HA. Anyhow I now see that the actual address is 25. When using this there is no connection problem anymore.
But I cannot control anything anyway. I see coverart when playing back a movie from plex but not from any other app and I am not even able to pause the movie from plex. I cannot turn off ATV either from the frontend.
What is possible controlling on ATV 4? I would very much like to be able to turn on/off the device, choose source and so on.