Apple TV component does not work on TVos 13

I’m working on fixing this “the right” way, with slow pace. But progress will be posted here:

Hi I am trying to follow your guide on my mac, but when I run ./setup_dev_env.sh i terminal i get the following virtualenv: command not found
can you help me what I am doing wrong

I’m assuming you are trying to do run it from within the HASS frontend in the “Terminal” add-on or SSH into it? If so, and its the usual Alpine Linux distribution then virtualenv is not included with that distribution as far as I know. You will have to find the package that it’s included in and add it using apk add and then the package name. If you aren’t able to find it or its not compatible with Alpine Linux then just run it from outside the Home Assistant environment. The pyatv program doesn’t do anything on the Home Assistant side for the integration. You would just have to copy and paste the credentials the program provides after pairing with your Apple TV into your configuration.yaml file or secrets.yaml file, whichever you are using.

I am trying to run the commands from my mac machine is that not possible

I did the whole procedure above on my Mac without having to install any additional packages. Where are you getting stuck?

when I am trying to run this ./setup_dev_env.sh i get an error saying virtualenv: command not found

And you are running it from the MacOS Terminal window? Not from within Home Assistant or ssh’d into Hassio?

yes I am running from a terminal i MacOS
image

Try sudo pip install virtualenv, then try running that command again.

I get pip command not found

lol, you are going to have to install pip package as well, and possibly python before that if you don’t have that installed.

https://pypi.org/project/pip/ - this page will help you get it installed.

I think is working now :slight_smile: :slight_smile: sorry my bad :slight_smile: Windows man :slight_smile:

Ah good, and no worries. Always a bit of a learning curve on Mac and Linux with you Windows guys. :wink:

I now have the credentials for all 4 of my apple tv, when you put it in configuration. yaml do you olso have a login id?? or just the credentials

Borg. The “credentials” are only for AirPlay. The other ones are for controlling and getting device state.

The location of the install script hass changed now:

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

I had the same problem, i did use the custom component: apple_tv_mrp
You can have the entity_id listed but you cant AUTH with the component.
I did that Thomas post.
with pyatv tool i was able to get the credentials:

9da9667d2b9b1cbbc52903b2d71b7baf9c1337c810276b202e9de6d8402f3c00:55d7db8c19eb614859974a9af86c358bb932a3f8d6c24e30c14a6cd32a2210af:62316535623632332d633434372d346165622d623534632d646336656634653436666335:39333233653861612d303338662d346431392d386538632d37663163323462316164XXXX

and paste it into the config file, with that you can use remote so… Remote ok.
the Issue is that i wasnt able to use airplay to play media (m8u channel). it never worked because of non authentication problem…
i find out that using pyatv
$ atvremote auth
i will get an airplay credential
FB10021B2FC89823:51E6D788E9E7E1053C2D442F296226AE459AE19DF3596CF1088990C1F011XXXX
i use this one with the original Apple_TV component and i worked for purpose of airplay media player.
so now i have media_player.appletv_airplay and media_player.appletv_remote
i know is not the best way but is what i have for now…
i hope this information could be useful…

just checkin in on this thread - I am also trying to find my ATV 4K w/ tvos13. I do the ‘apple_tv.apple_tv_scan’ under developer tools but am coming up with no devices detected. Is this still an open issue with HA?

Could you share a config sample ?

It doesn’t work with tvOS 13, you will have to wait until I have fixed that.

Status is posted here: