suborb / philips_android_tv

Tools to control Philips 2016 Android TVs
GNU General Public License v2.0
121 stars 61 forks source link

Several timeouts after OFF the TV #8

Open gjdass opened 6 years ago

gjdass commented 6 years ago

Hey.

Thanks for your work !!! πŸ‘

I managed to make it work for my 2016 model and HA does see the TV. I enabled wake on lan feature on the TV system in order to have a good state in HA (on or off). I turned out that when the TV is ON, no problem, all functions are working (sound, and turn it off). But once I turn it off, HA still see the TV as "on" and I got timeout exceptions in my info panel (HA).

2017-11-15 00:33:43 WARNING (Thread-28) [pychromecast.socket_client] Heartbeat timeout, resetting connection 
2017-11-15 00:33:43 WARNING (Thread-30) [pychromecast.socket_client] Heartbeat timeout, resetting connection 
2017-11-15 00:33:43 WARNING (Thread-29) [pychromecast.socket_client] Heartbeat timeout, resetting connection 
2017-11-15 00:33:46 ERROR (MainThread) [homeassistant.helpers.entity] Update for media_player.philips_tv fails 
[...]

If I wait long enough, I can turn it on again from HA, but still with a lot of exceptions, and a wrong status (always "on").

Is it something you other people experienced ?

Thanks.

fliphess commented 6 years ago

It seems to me that this is "as intended" as the TV disables all network connectivity after going to standby.

I managed to re-enable the TV faster using Wake on Lan and then wait untill the ping reply comes back and then sending a standby signal to get the TV running again, which is faster than waiting, but not as fast as picking up the remote and pressing poweron :)