Note: I’m using the official HA docker image.
I have this weird issue. HomeAssistant detects my AppleTV without any problem, and I can see it’s state from within the HA web interface.
However, after watching a few episodes on NetFlix with my AppleTV, HomeAssistant is no longer able to connect to the ATV. It gives me the message “Establishing a connection to the AppleTV”. Rebooting HomeAssistant solves the issue for me.
I also tried to define my appletv manually:
apple_tv:
- host: 192.168.30.122
login_id: 00000001-f255-xxxx-xxxx-d57da19c43b9
A few suspicious thing show up in my logs:
017-08-23 20:53:19 ERROR (Recorder) [homeassistant.core] Error doing job: Future exception was never retrieved
Traceback (most recent call last):
File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 55, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/app/homeassistant/components/apple_tv.py", line 97, in request_configuration
fields=[{'id': 'pin', 'name': 'PIN Code', 'type': 'password'}]
TypeError: request_config() got multiple values for argument 'description'
and
2017-08-21 14:07:37 WARNING (MainThread) [homeassistant.components.media_player.apple_tv] A <class 'pyatv.exceptions.AuthenticationError'> error occurred: failed to login: 400
2017-08-21 14:07:47 WARNING (MainThread) [homeassistant.components.media_player.apple_tv] A <class 'pyatv.exceptions.AuthenticationError'> error occurred: failed to login: 400
2017-08-21 14:07:57 WARNING (MainThread) [homeassistant.components.media_player.apple_tv] A <class 'pyatv.exceptions.AuthenticationError'> error occurred: failed to login: 400
I don’t see a reason why the authentication could fail, since it wa working fine a few hours ago, and as I said, restarting HA fixes the issue again (for a while).
I also tried pairing HA with my AppleTV, but that doesn’t work either. I see the PIN code on my ATV screen, but no dialog pops up in HA to enter the PIN code.