DEBUG: Discovering devices for 3 seconds
DEBUG: Auto-discovered service Living Room TV at 192.168.X.X (hsgid: 00000000-0763-7101-c2b7-b1f779354111)
DEBUG: Auto-discovered service Office at 192.168.X.X (hsgid: 00000000-0763-7101-c2b7-b1f779354111)
ERROR: Found more than one Apple TV; specify one using --address and --login_id
Found Apple TVs:
- Living Room TV at 192.168.X.X (login id: 00000000-0763-7101-c2b7-b1f779354111)
- Office at 192.168.X.X (login id: 00000000-0763-7101-c2b7-b1f779354111)
DEBUG: Already logged in, re-using seasion id 35
DEBUG: GET URL: http://192.168.X.X:3689/ctrl-int/1/nowplayingartwork?mw=1024&mh=576&session-id=35
DEBUG: Data[0]: b''
DEBUG: _get_request: b''
No artwork is currently available.
Cool, then it might have been fixed after the actual 0.38 release. A few things didn’t make it in time The “timed out” errors will probably never go away and they will look a bit different now. But they are usually not a problem since they should only occur when device is in standby or offline for some other reason. So we should be fine
But it should not behave like that. Can you enable the pyatv logs just so we can see if it performs any excessive requests? Just to understand the situation. Now, you are watching something but have put it in pause mode? Does it always do this even if you are not playing anything?
Ok, very strange. I don’t see this at all with my device. One thing I would like to try is pairing and see if that helps. Current support in pyatv is not ideal and I’m gonna push some improvements to it. Still not 100% done, also want to incorporate this support into Home Assistant.
But in the meantime, I just released pyatv 0.2.2, maybe you can install that in a venv or so and try to pair (just atvremote pair) and use the randomized pairing guid you get? Would be interesting to see if it helps.
Can you try to do something with atvremote when you see these errors? A theory I have is that a re-login would help and maybe if you login from somewhere else, Home Assistant would perform a new login since the session it uses would no longer be valid. So basically, run Home Assistant as usual and just run “atvremote -a playing” or so in another shell. Hopefully you should find a log printout along the line “implicitly logged out” in your log. If this works, I can add a check I pyatv do a re-login of error 400 happens.
@aaronwolen@Jer78 I couldn’t find a specific thread about the dancing media player component, that I’m also experiencing, so I started one! Media_Player Dancing
So I was working on HA again today, and noticed the good ole “400” error. In another terminal, I ran “atvremote -a playing”, but I did not see the “implicitly logged out” message in my logs.
Here’s what I did see…
17-04-09 19:34:00 WARNING (MainThread) [homeassistant.components.media_player.apple_tv] A <class 'pyatv.exceptions.AuthenticationError'> error occurred: failed to login: 400
17-04-09 19:34:10 WARNING (MainThread) [homeassistant.components.media_player.apple_tv] A <class 'pyatv.exceptions.AuthenticationError'> error occurred: failed to login: 400
17-04-09 19:34:20 WARNING (MainThread) [homeassistant.components.media_player.apple_tv] A <class 'pyatv.exceptions.AuthenticationError'> error occurred: failed to login: 400
17-04-09 19:34:30 WARNING (MainThread) [homeassistant.components.media_player.apple_tv] A <class 'pyatv.exceptions.AuthenticationError'> error occurred: failed to login: 400
17-04-09 19:34:40 WARNING (MainThread) [homeassistant.components.media_player.apple_tv] A <class 'pyatv.exceptions.AuthenticationError'> error occurred: failed to login: 400
Apr 9 19:34:40 droid hass[7767]: #033[33m17-04-09 19:34:40 WARNING (MainThread) [homeassistant.components.media_player.apple_tv] A <class 'pyatv.exceptions.AuthenticationError'> error occurred: failed to login: 400#033[0m
17-04-09 19:34:50 WARNING (MainThread) [homeassistant.components.media_player.apple_tv] A <class 'pyatv.exceptions.AuthenticationError'> error occurred: failed to login: 400
Apr 9 19:34:50 droid hass[7767]: #033[33m17-04-09 19:34:50 WARNING (MainThread) [homeassistant.components.media_player.apple_tv] A <class 'pyatv.exceptions.AuthenticationError'> error occurred: failed to login: 400#033[0m
Apr 9 19:35:00 droid hass[7767]: #033[33m17-04-09 19:35:00 WARNING (MainThread) [homeassistant.components.media_player.apple_tv] A <class 'pyatv.exceptions.AuthenticationError'> error occurred: failed to login: 400#033[0m
17-04-09 19:35:00 WARNING (MainThread) [homeassistant.components.media_player.apple_tv] A <class 'pyatv.exceptions.AuthenticationError'> error occurred: failed to login: 400
17-04-09 19:35:10 WARNING (MainThread) [homeassistant.components.media_player.apple_tv] A <class 'pyatv.exceptions.AuthenticationError'> error occurred: failed to login: 400
Apr 9 19:35:10 droid hass[7767]: #033[33m17-04-09 19:35:10 WARNING (MainThread) [homeassistant.components.media_player.apple_tv] A <class 'pyatv.exceptions.AuthenticationError'> error occurred: failed to login: 400#033[0m
17-04-09 19:35:20 WARNING (MainThread) [homeassistant.components.media_player.apple_tv] A <class 'pyatv.exceptions.AuthenticationError'> error occurred: failed to login: 400
Apr 9 19:35:20 droid hass[7767]: #033[33m17-04-09 19:35:20 WARNING (MainThread) [homeassistant.components.media_player.apple_tv] A <class 'pyatv.exceptions.AuthenticationError'> error occurred: failed to login: 400#033[0m