Probable solution for those having issues with Apple TV (tvOS 13) with HA on Docker

Hey guys!

Yesterday I’ve been struck by an idea of what would be the probable solution and it turns out it worked for me.

I’m running Home-Assistant on Docker from within an Intel NUC. I’ve never been able to find the Apple TV while I was able to detect it manually from outside the Docker container.

If you are running several Docker containers on the same hardware, chances are that you actually reserved the port 8123 for HA usage. If you did, then the command line in order to create the Docker container would have the -p 8123:8123 command in it.

I figured out that would be the problem as the only to communicate with the container is by going through the port 8123. Therefore, only having 8123 as a communication won’t allow any reliable discovery or anything else outside of the Docker network.

I then decided to stop all containers on my Intel NUC, deleted my HA container and recreated it --net=host and voilà, the AppleTV is now being discovered and I can control it remotely no problems!

The actual command I typed in was:
sudo docker run -d --name="home-assistant" --net=host --restart=always --device=/dev/ttyACM0 --device=/dev/ttyUSB0 -v /home/jayf/Dockerconf/HomeAssistant:/config -v /var/run/docker.sock:/var/run/docker.sock -e "TZ=America/Montreal" -p 8123:8123 homeassistant/home-assistant

The --device=/dev/ttyACM0 is being used for my Z-Wave USB dongle. Obviously, the specified port in that command will be ignored as --net=host is being used.

Hopefully it will help others!

what version of HA are you running? I haven’t looked at the 0.103.0 release notes, but I can say 0.102.3 does not work with an AppleTV on tvOS 13. I have always used --net=host and my AppleTV stopped being controllable from HA when I updated it. There is a custom component appletv_mrp: that does work.

I’m using 0.103.0, the latest version.

And yeah, I actually forgot to add I was using a custom component as well… not the Appletv_MRP but that one. This component actually replace the Apple_tv component when copied over on the custom_components folder.

Anyhow I found this component to be working fine as opposed to appletv_mrp component you told me about.

Sorry for the confusion, I actually copy/pasted the post I made on GitHub so the people having Docker and ATV not working has somewhere to look at before posting anything.

1 Like