Hi all, I am trying to add my AppleTV to HASS, as described here: https://home-assistant.io/components/apple_tv/
I need to retrieve a loginid. The easiest way should be to call the apple_tv_scan under the apple_tv domain, listed under services.
But I don’t have the option to select apple_tv over there. How am I supposed to do this?
I found out that the only wat to get the apple_tv_scan service, is by addind apple_tv: to my config, and including the login_id: with fake data. But if I do the apple_tv_scan, no devices are found. Also with atvremote scan I get no results.
The thing that did kind of work, is apple_tv_authorize. When I did that a pin code appeared on my tv screen and after enteirng that I got a success message. But that was not enough to get it working.
What version HA did you use? The issue with not being able to add just apple_tv: was fixed in 0.54. The authorize-thing is only for AirPlay, so that makes no difference in itself. Biggest problem as I see it is that Bonjour/zeroconf is not very reliable. In a lot of cases the device is not found and I’m not really sure how to fix that.
Regarding disabling and enabling home sharing, that is a good trick that seems to work for a lot of people. I should add that to the documentation.
I’m on version 0.53.1. But one of the things I treid is updating my Home Assistant. But now you are speaking about version 0.54. So I don’t really get that. I was asuming I was on the latest version.
I did not know any other people had the same solution of disabling and enabling home sharing. I came up with that myself. Could have saved me a lot of trouble if I read it somewhere lol.
to my configuration.yaml file in 0.58.0 gave me the apple_tv domain and services on the little remote services view on the HASS UI… however, even though I have home sharing enabled, it still doesn’t find my Apple TV.
I’ve tried disabling and reenabling home sharing, and rebooting.
If I use the pyatv - atvremote CLI command, it discovers my Apple TV, but it says that home sharing is disabled and does not give a login ID.
$ atvremote scan
Found Apple TVs:
- Apple TV at 192.168.86.61 (home sharing disabled)
So, I tried using atvremote pair, and that gave me a login ID (in a different format than the examples, but it was still a login ID).
$ atvremote pair
Use pin 1234 to pair with "pyatv" (press ENTER to stop)
Using pairing guid: 0xABC2809CA8188XXX
Note: If remote does not show up, try rebooting your Apple TV
Pairing seems to have succeeded, yey!
You may now use this login id: 0xABC2809CA8188XXX
I added that to my config, to find media_player.apple_tv and remote.apple_tv in my devices list, but HASS is still unable to connect to or control the apple tv.
For me, atvremote pair does not make anything appear on the TV so I can not get any further there either… (I assume the pin should be put in on the TV?)
The reason for atvremote not finding the device is because Home Sharing is disabled in some way. By “in some way” I mean that something is not working as intended and it’s likely a bug or unintended behavior in tvOS (or you have actually disabled it). It seems like others have seen this too:
I had the same issue and disabled HS, rebooted and enabled it again. Has been working flawlessly on my device for over a week. Results seems to differ for different users and I do not know that else to do other than keep trying. I’ll see if I can get some time and start working on the MRP support again, that would remove need for HS altogether.