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
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 sorry my bad Windows man
Ah good, and no worries. Always a bit of a learning curve on Mac and Linux with you Windows guys.
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
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:
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
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: