Apple TV component does not work on TVos 13

Hi fellow HA users. I wanted to mention that the Apple TV component is currently not working if you are running TVos13. Obviously TVos13 is in Beta so it might be the reason it doesn’t work. Or Apple has changed the way the device works. Either way this is a little warning for people that want to try TVos13 and have automations with them. As well as a note to the developers of that component that it might need some changes due to TVos13.

Update: Beta 2 did not seem to fix this, this problem still persists (I have tried re-enabling home sharing, giving new IP’s etc. The ATV’s just do not get recognized at all nor found).

5 Likes

Apparently a service has been removed related to home sharing in tvos 13, this means the Apple component will no longer work. I’m not entirely sure as I have raised an issue on github at the pyatv repo. The developer did respond to me, however the response has been deleted a day after.

Hopefully it’s fixed soon. Perhaps it has something to do with he fact you can have multiple accounts on TVOS 13? I

Yesterday apple release tvOS13 and apple tv component is no longer working.
I saw some weeks ago a custom component that someone develop to support new features of tvOS, but I can’t find it any longer :frowning:

I found this github page: https://github.com/chamberlain2007/apple_tv_mrp/ But I can not find it in Hacs and haven’t tried the manual install yet. Will try this later today hopefully.

That component is currently a hit or miss. For some it works for some it doesnt. For me it doesnt :sweat_smile::joy:

Hmmm. After doing the scan and adding the information to my config, I see my Apple TV media player update when I play something. I did not have to authenticate. See last reaction here: https://github.com/chamberlain2007/apple_tv_mrp/issues/1

Doesn’t work for me. Also 4K atv. It wants to authenticate. Without it the state stays “unknown” for me.

Can I perhaps have to do with the fact you may have setup multiple accounts on your Apple TV? It works fine on my 4K here, with the latest version of TvOS 13. Is homesharing enabled?

Ah yes I have multiple accounts set up. Home Sharing is enabled. But that won’t make a difference as Home Sharing is no longer supported by Apple.

I could try to remove an account and try again.

Not sure that is the problem though. I only have one account setup. Perhaps that is the difference.

Ok I was totally wrong. It appears it does let me see the playing/paused state. Which is awesome (I still have multiusers setup on my ATV). I haven’t tried the non4K ATV yet but will try that tomorrow.

Though it will still need authentication to do airplay from HA or if I’d want a camera stream to show. No cover art is shown when using mini-media-player. I will test the standard mediaplayer tomorrow.

Subscribing. Really hope we can get auth working with multiple users

Does it work for single user then? (I haven’t tried this) but I get my playing/paused/stopped states now and the remote works again which were my main concerns for now. And these work fine, except when HA starts and the device is off, it will show state once the device starts doing something.

Sadly I also ran into this issue. My ATV is not working in HA anymore after it auto updated to iOS 13.
I only have my own account configured on the ATV but have 5 more people in Apple Home Sharing. Nothing is found when scanning for ATV devices but it will let me authenticate, showing the PIN code on the screen. Also my Plex app is showing up as working from the ATV.

I really hope this will get some attention as the automation to dimm the lights when playing a movie, is the main reason for me getting HA accepted within the family :slight_smile:

Had I known that iOS 13 would break this function, I had disabled auto updates on the ATV!

There will be a fix soon.

If anyone is interested, I was able to get 2 AppleTV 4Ks working in HA using a combination of the apple_tv_mrp custom-component from Chamberlain2007 for the initial connection and a forked version of pyatv to get the Airplay credentials. I’m on tvOS 13.2 and now have 2 fully functioning and tested ‘media_player’ entities and 2 ‘remote’ entities. And that is with multiple users on each ATV.

I can write up what I did if anyone wants to go through the steps. It is a little tedious but works like a charm so far. You will need to assign a static IP to your ATV and if the integration breaks will need to rescan and update the PORT number in your configuration.yaml, seeing as how this port number reportedly can change under certain circumstances. However, should be a good fix for the time being until an official integration comes out.

1 Like

I am interested in how you paired it yes XD. At the moment I can only read states like play/pause (and luckily my automations work on them) But restarting the ATV will indeed change their ports. Annoying but it’s ok. Could you tell us how you did the pairing?

Yeah, a bit of a pain if you have to have to go in and change the port number if you restart AppleTV but luckily thats something I very rarely do to begin with. but anyways…

1 - Follow the steps listed to install ‘apple_tv_mrp’ all the way down to where you have to run the ‘authenticate’ service. I could not get this to work for me. HASSIO kept giving me errors so I went a different route.
2 - Go here - https://github.com/postlund/pyatv and use this page as a reference if needed.
3. Run these commands in the linux command line or on MacOS. I did mine on MacOS and didn’t have to fumble around installing additional packages and whatnot. This will install a developer version of pyatv and run in a virtual env using the setup script provided.

git clone https://github.com/postlund/pyatv.git
cd pyatv
./setup_dev_env.sh
source bin/activate

Run:
atvremote -a scan

This will list any HomePods and AppleTVs the program can find on your network. Make note of the IP of the AppleTV you are wanting to pair. It should be the same as identified in Step 1.

Run:
atvremote -a pair

This is where I had a little trouble at first. The only way I could get it to pair specifically to the device I wanted out of 5 compatible devices on my network was to make sure nothing was playing on the other 4 and then play music or movie or whatever on the device I wanted to pair. At this point a 4 digit pairing code will show up on the ATV which you then enter into the command line. After that it should pair and generate a (very long) credential that you can now add into your configuration.yaml file.

Follow those steps for each device you want to pair to get a unique credential for each device. After that its smooth sailing and you should have individual media_player and remote entities to use for each device.

Let me know if any of that doesn’t make sense or I am mistaken about something. But thats exactly what I did and it works flawlessly.

2 Likes

Works great! Thanks :wink: