Great to see the implementation of the Apple TV platform! Just using it for state information at the moment and dimming lights during playback/bringing them back up to full brightness when stopped/paused.
I’ve been seeing erratic performance of this automation and it appears that it’s due to HA timing out when trying to connect. The automations appear to be working fine, the lights will dim when playback on the appleTV starts, but quickly they will go back up to full brightness- correctly triggering a scene per the automation as I believe “playing” is nolonger the current state from the apple tv. The logbook shows the apple TV and the automation working correctly- however it is just happening way to frequently. My logs are full of:
17-02-13 01:39:34 WARNING (MainThread) [homeassistant.components.media_player.apple_tv] timed out while connecting to Apple TV 17-02-13 01:39:45 WARNING (MainThread) [homeassistant.components.media_player.apple_tv] timed out while connecting to Apple TV 17-02-13 01:39:56 WARNING (MainThread) [homeassistant.components.media_player.apple_tv] timed out while connecting to Apple TV 17-02-13 01:40:07 WARNING (MainThread) [homeassistant.components.media_player.apple_tv] timed out while connecting to Apple TV 17-02-13 01:40:12 ERROR (MainThread) [homeassistant.components.media_player.apple_tv] failed to connect to Apple TV ([Errno 113] Cannot connect to host 10.0.0.93:3689 ssl:False [Can not connect to 10.0.0.93:3689 [Connect call failed ('10.0.0.93', 3689)]]) 17-02-13 03:39:21 WARNING (MainThread) [homeassistant.components.media_player.apple_tv] timed out while connecting to Apple TV 17-02-13 03:39:33 WARNING (MainThread) [homeassistant.components.media_player.apple_tv] timed out while connecting to Apple TV 17-02-13 04:27:33 WARNING (MainThread) [homeassistant.components.media_player.apple_tv] timed out while connecting to Apple TV 17-02-13 04:27:44 WARNING (MainThread) [homeassistant.components.media_player.apple_tv] timed out while connecting to Apple TV 17-02-13 04:27:55 WARNING (MainThread) [homeassistant.components.media_player.apple_tv] timed out while connecting to Apple TV 17-02-13 04:28:06 WARNING (MainThread) [homeassistant.components.media_player.apple_tv] timed out while connecting to Apple TV 17-02-13 04:28:16 WARNING (MainThread) [homeassistant.components.media_player.apple_tv] timed out while connecting to Apple TV 17-02-13 04:28:27 WARNING (MainThread) [homeassistant.components.media_player.apple_tv] timed out while connecting to Apple TV 17-02-13 04:28:38 WARNING (MainThread) [homeassistant.components.media_player.apple_tv] timed out while connecting to Apple TV 17-02-13 04:28:49 WARNING (MainThread) [homeassistant.components.media_player.apple_tv] timed out while connecting to Apple TV 17-02-13 06:12:00 WARNING (MainThread) [homeassistant.components.media_player.apple_tv] timed out while connecting to Apple TV 17-02-13 06:12:11 WARNING (MainThread) [homeassistant.components.media_player.apple_tv] timed out while connecting to Apple TV 17-02-13 06:12:22 WARNING (MainThread) [homeassistant.components.media_player.apple_tv] timed out while connecting to Apple TV 17-02-13 06:12:33 WARNING (MainThread) [homeassistant.components.media_player.apple_tv] timed out while connecting to Apple TV 17-02-13 06:12:44 WARNING (MainThread) [homeassistant.components.media_player.apple_tv] timed out while connecting to Apple TV 17-02-13 06:12:55 WARNING (MainThread) [homeassistant.components.media_player.apple_tv] timed out while connecting to Apple TV 17-02-13 06:13:06 WARNING (MainThread) [homeassistant.components.media_player.apple_tv] timed out while connecting to Apple TV 17-02-13 06:13:17 WARNING (MainThread) [homeassistant.components.media_player.apple_tv] timed out while connecting to Apple TV 17-02-13 06:13:28 WARNING (MainThread) [homeassistant.components.media_player.apple_tv] timed out while connecting to Apple TV 17-02-13 06:13:39 WARNING (MainThread) [homeassistant.components.media_player.apple_tv] timed out while connecting to Apple TV 17-02-13 06:13:50 WARNING (MainThread) [homeassistant.components.media_player.apple_tv] timed out while connecting to Apple TV 17-02-13 07:27:51 WARNING (MainThread) [homeassistant.components.media_player.apple_tv] timed out while connecting to Apple TV 17-02-13 07:28:02 WARNING (MainThread) [homeassistant.components.media_player.apple_tv] timed out while connecting to Apple TV 17-02-13 09:02:36 WARNING (MainThread) [homeassistant.components.media_player.apple_tv] timed out while connecting to Apple TV 17-02-13 09:02:46 WARNING (MainThread) [homeassistant.components.media_player.apple_tv] timed out while connecting to Apple TV 17-02-13 09:02:57 WARNING (MainThread) [homeassistant.components.media_player.apple_tv] timed out while connecting to Apple TV 17-02-13 09:03:08 WARNING (MainThread) [homeassistant.components.media_player.apple_tv] timed out while connecting to Apple TV 17-02-13 09:03:19 WARNING (MainThread) [homeassistant.components.media_player.apple_tv] timed out while connecting to Apple TV 17-02-13 09:03:30 WARNING (MainThread) [homeassistant.components.media_player.apple_tv] timed out while connecting to Apple TV 17-02-13 09:03:41 WARNING (MainThread) [homeassistant.components.media_player.apple_tv] timed out while connecting to Apple TV 17-02-13 09:03:52 WARNING (MainThread) [homeassistant.components.media_player.apple_tv] timed out while connecting to Apple TV 17-02-13 09:04:03 WARNING (MainThread) [homeassistant.components.media_player.apple_tv] timed out while connecting to Apple TV 17-02-13 09:04:14 WARNING (MainThread) [homeassistant.components.media_player.apple_tv] timed out while connecting to Apple TV 17-02-13 09:04:25 WARNING (MainThread) [homeassistant.components.media_player.apple_tv] timed out while connecting to Apple TV 17-02-13 15:07:08 WARNING (MainThread) [homeassistant.components.media_player.apple_tv] timed out while connecting to Apple TV 17-02-13 15:07:19 WARNING (MainThread) [homeassistant.components.media_player.apple_tv] timed out while connecting to Apple TV 17-02-13 15:07:30 WARNING (MainThread) [homeassistant.components.media_player.apple_tv] timed out while connecting to Apple TV 17-02-13 15:07:41 WARNING (MainThread) [homeassistant.components.media_player.apple_tv] timed out while connecting to Apple TV 17-02-13 15:07:52 WARNING (MainThread) [homeassistant.components.media_player.apple_tv] timed out while connecting to Apple TV 17-02-13 15:08:03 WARNING (MainThread) [homeassistant.components.media_player.apple_tv] timed out while connecting to Apple TV 17-02-13 15:08:14 WARNING (MainThread) [homeassistant.components.media_player.apple_tv] timed out while connecting to Apple TV 17-02-13 15:08:25 WARNING (MainThread) [homeassistant.components.media_player.apple_tv] timed out while connecting to Apple TV 17-02-13 15:08:36 WARNING (MainThread) [homeassistant.components.media_player.apple_tv] timed out while connecting to Apple TV 17-02-13 15:08:47 WARNING (MainThread) [homeassistant.components.media_player.apple_tv] timed out while connecting to Apple TV 17-02-13 15:08:58 WARNING (MainThread) [homeassistant.components.media_player.apple_tv] timed out while connecting to Apple TV 17-02-13 15:09:09 WARNING (MainThread) [homeassistant.components.media_player.apple_tv] timed out while connecting to Apple TV 17-02-13 15:09:20 WARNING (MainThread) [homeassistant.components.media_player.apple_tv] timed out while connecting to Apple TV 17-02-13 15:09:31 WARNING (MainThread) [homeassistant.components.media_player.apple_tv] timed out while connecting to Apple TV 17-02-13 15:09:43 WARNING (MainThread) [homeassistant.components.media_player.apple_tv] timed out while connecting to Apple TV 17-02-13 15:09:54 WARNING (MainThread) [homeassistant.components.media_player.apple_tv] timed out while connecting to Apple TV 17-02-13 15:10:05 WARNING (MainThread) [homeassistant.components.media_player.apple_tv] timed out while connecting to Apple TV
Is there any value I can set to extend the polling time or is there anything I can do to ensure my automations run smoother? I’ll post those automation snippets if desired/helpful.
For what it’s worth- I see this issue with the ChromeCast as well and others in the forum have posted the same errors i’ve been seeing (chromecast.py socket timeouts). I have not had this problem with Kodi- HA does not appear to timeout on that platform.
Thanks!