Apple TV not working properly

yes, if I let HA autodiscover it, it definitely finds my AppleTV (and switches on my TV set :frowning:)

1 Like

Hello,

this is what my configuration looks like

media_player:
  - platform: apple_tv
    name: AppleTV Dinning Room
    host: appletv4_dinningroom.kitusnetwork.no-ip.biz
    login_id: MY-LOGIN-ID
    start_off: true

I don’t see any message related to this in the logs view. I’m running hassio and it is a pretty well sealed platform… not sure where to check for logs other than in the section of the web environment.

Hello, I re-added this information to my configuration file and it now displays my AppleTV!! :wink:
Many thanks to everyone in this thread. Your help is much appreciated :slight_smile:

Not sure I follow. Now that I managed to set it up, may I ask what the differences are between HA autodiscovering an AppleTV and manually configuring it like you did?

Many thanks :slight_smile:

You should not add the media_player platform yourself, only the apple_tv: platform as it sets up the media player for you.

I already see the AppleTV on the main screen by adding this configuration found here. Is there anything missing?
thanks

Looks fine to me. Since you have start_off it will always be in off mode until you turn it on. So if you want to see any updates, try turning it on in the UI. You should see a message like “Establishing a connection…” for a long time if it doesn’t work. In that case you’ll have to look in the log.

Hello there,

I just figured that my apple TV was not reached by home assistant, so I started the scan service again and got

Found Apple TVs:
 - Apple TV Fitness at 192.168.1.228 (home sharing disabled)
 - Apple TV Cinema at 192.168.1.227 (home sharing disabled)

I finished to get it working by your suggested workaround:

Disable Home sharing
Restart AppleTV
Enable Home sharing

Now the scan finds my atvs and gives me the login_id.

With this id through the terminal I can control my atv - but it is no longer shown in my hass instance. No media_player is listed. I tried changing the config several times, but no help.
My log gives me:

2018-05-17 13:04:45 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File “/home/smartassi/homeassistant_v2/lib/python3.6/site-packages/homeassistant/components/apple_tv.py”, line 210, in _setup_atv
session = async_get_clientsession(hass)
File “/home/smartassi/homeassistant_v2/lib/python3.6/site-packages/homeassistant/helpers/aiohttp_client.py”, line 38, in async_get_clientsession
hass.data[key] = async_create_clientsession(hass, verify_ssl)
File “/home/smartassi/homeassistant_v2/lib/python3.6/site-packages/homeassistant/helpers/aiohttp_client.py”, line 55, in async_create_clientsession
connector = _async_get_connector(hass, verify_ssl)
File “/home/smartassi/homeassistant_v2/lib/python3.6/site-packages/homeassistant/helpers/aiohttp_client.py”, line 164, in _async_get_connector
connector = aiohttp.TCPConnector(loop=hass.loop, ssl=ssl_context)
TypeError: init() got an unexpected keyword argument ‘ssl’

I am not sure what to do now… :frowning:
Do you have an idea?

hey all,

I more than new to the hassIO world and therefore I try to deal with hardware I already have.
So I installed the apple TV and so far so good. The only problem I encounter are:
1: it never shows what the apple TV plays, except of “not title”
2: the play/pause button doesn’t work. I get the little popup that the command is send, but nothing happens at the apple TV. The prev/next buttons work fine. So a connection is established.

Any suggestions?

I just installed my hassbian system and out of the box it found my two apple tv’s. I am not having the problem that HASS is turning on my TV. So I found this thread.

However I have a problem in that I don’t know the settings for the media_player:
There is nothing in my configuration.yaml file regarding media_player:
A grep of all files in .homeassitant folder finds these entries in entity_registry.yaml

media_player.living_room:
name:
platform: apple_tv
unique_id: 605769f44…
media_player.bedroom:
name:
platform: apple_tv
unique_id: 27dee7fcc…

So how to I configure the start_off:true in configuraion.yaml?
media_player:

  • platform: apple_tv
    name: ???
    host: ???
    login_id: ???
    start_off: true
    I don’t know what my host or login_id should be.
    Should I use the “Living Room” and “Bedroom” values for name?

Hey @smart,

I am not 100% sure but I think you have to configure your apple TV like this:

apple_tv:
  - host: 192.168.1.227
    login_id: !secret APPLE_TV_LOGIN_ID
    name: AppleTv Kino
    start_off: True

so not media_player, platform apple_tv.
Hope it helps - just my 2 cents.

@VolkerRacho Thanks, did see the documentation on how to add apple tv. However that wasnt’ my question. What I was actually asking is "Why do my 2 apple TV’s show up on HA when I never configured them. This is a new install and the two apple tv’s where automatically discovered and added when I turned it on.

The only place a grep for apple finds them is in the entity_registry.yaml and the binary file home-assistang_v2.db which I don’t know how to read yet.
They appear in entity_registry.yaml like this

remote.living_room:
  name:
  platform: apple_tv
  unique_id: 605769f44...
remote.bedroom:
  name:
  platform: apple_tv
  unique_id: 27dee7fcc...
media_player.living_room:
  name:
  platform: apple_tv
  unique_id: 605769f44...
media_player.bedroom:
  name:
  platform: apple_tv
  unique_id: 27dee7fcc...

I think I want to remove them because I don’t find it that useful and when I boot my HA device my apple tv’s turn on which then turns on my TV. My understanding is I can also disable them by setting
start_off: true

I am not sure if I should edit entity_registry.yaml or add something to my config.

This has been a lower priority issue on my new setup so I haven’t tried too many things yet. So far I pretty much can’t get anything working so progress has been painfully slow.

I’m having some problems with the logic here and understanting how this works. I also had problems with HA turning on my appletv and tv so I added start_off: True to the config, problem solved.

However, there is a “remote” with AppleTV toggle in my UI, and it seems if I don’t turn this on manually, none of my automations based on AppleTV will work (if turning on the AppleTv from it’s own remote). Sometimes turning on this toggle will turn on my TV other times not. What is the idea of this “remote” ?

By setting start_off: true you are disabling the remote feature so you will notice the boolean toggle is Off as a current state. This prevents the remote from connecting to your TV and causing it to turn on. However this also disables the remote.

So I think in your automations when you want to take remote actions, first turn on the remote. The next time HA start it will default to Off and not wake your TV.

Personally I have not found the Apple TV interface all that useful so I have not played much with it but this is my general understanding if the way it was behaving when I was trying it.

1 Like