ha_philips_android_tv icon indicating copy to clipboard operation
ha_philips_android_tv copied to clipboard

Entity does not go in Off state when turned off

Open rafuz opened this issue 4 years ago • 17 comments

From the latest update on this integration my Philips 32PFS6402/12 does not show "Off" state:

image

The TV turns off and on from home assistant but when turned off it does show only "unavailable" state. Before it was working correctly.

rafuz avatar May 28 '20 07:05 rafuz

Thank you for reporting. #38 Made some changes, because the TV would show off, when the API was not reachable, but the TV was actually on. The change puts the TV into UNKOWN state when the API is not reachable.

UNKNOWN makes sense, because when the API is not reachable, the TV could be off or on or it could have a different problem. We just do not know the state of the device when the API is not reachable.

What are the downsides of having the state UNKNOWN? The UI still shows as playing something? Or can you not turn it on again?

The advantages are that should the API have connection issues, the UI goes into unknown instead of off.

Maybe @mikicof can add his thoughts.

nstrelow avatar May 28 '20 12:05 nstrelow

Ok, I undestand why it shows Unknown and not Off. This could be something related to my configuration. I have connected the TV to cabled ethernet and I see that it goes in sleep mode as soon as it is turned off. In sleep mode the API does not respond. I can't turn it on when it is unavailable but maybe this is related to the api not reachable. There is way to turn it on using a magic packet on wired lan? Can we find an alternative way to mark the entity "Off" when the TV goes in sleep mode?

rafuz avatar May 28 '20 13:05 rafuz

It should support Wake On LAN/WLAN, but it was always not 100% working reliably. I cannot test anything right now sadly, but maybe in the next 3 weeks.

It may be better to display the state OFF, when API is not reachable.

nstrelow avatar May 28 '20 13:05 nstrelow

In my case having the state to OFF when unreachable would break the automations (and for all models PUS7304), it seems that when unknown doesn't make the call to turn on and maybe a better solution would be to make the call independently from the state

mikicof avatar May 28 '20 13:05 mikicof

Anyway, @rafuz, check your configuration if you have enabled start with chromecast, in my case wowlan wasn't working until i've enabled that.

mikicof avatar May 28 '20 13:05 mikicof

Anyway, @rafuz, check your configuration if you have enabled start with chromecast, in my case wowlan wasn't working until i've enabled that.

What is start with chromecast?

rafuz avatar May 28 '20 13:05 rafuz

I don't have the TV at the moment, I'll send a screenshot when home

mikicof avatar May 28 '20 13:05 mikicof

Is it an option of the TV? Maybe on my model it is not available. It was not updated to Android TV 8 last year.

rafuz avatar May 28 '20 13:05 rafuz

I don't have the TV at the moment, I'll send a screenshot when home

@mikicof Please post the screen :-)

rafuz avatar May 30 '20 14:05 rafuz

IMG_0071 sorry, completely forgot about it, also sorry about the spanish language

On network you can find it below start with wowlan

mikicof avatar May 30 '20 18:05 mikicof

Thank you for the screen but I can confirm that on my model I don't have this option. I still can't turn on the TV remotely when connected by lan cable. If I use Wifi it works but I don't have good coverage in the point where the tv is installed and I usually use cables for everything fixed to a wall.

rafuz avatar Jun 03 '20 06:06 rafuz

Ok so for you: Wake WoWLAN works, but LAN does not and you prefer LAN. Good to know.

Also in your problem is: "In sleep mode the API does not respond." And this was working before? Then we will revert the change with STATE_UNKNOWN.

nstrelow avatar Jun 03 '20 08:06 nstrelow

Actual state is:

  • API does not reply from deep sleep on cable connection.

  • No option for chromecast wakeup

  • No wake up from cable connection. On WoWLan works

  • State Unknown breaks some of my automation.

Maybe the state (off or unknown) could be set as a custom config?

rafuz avatar Jun 03 '20 10:06 rafuz

Maybe if the api version is different we could change if to set state unknown or off so it will work for both tv's

mikicof avatar Jun 03 '20 10:06 mikicof

@rafuz Was the Wake up for cable working before? How is State Unknown breaking your automation ?

I think the best way is to revert the behavior and add a custom config.

@mikicof Your suggestion would be perfect, but I think we have not enough data to decide what works for which TV. Do you want to have a look at integration a custom config option?

nstrelow avatar Jun 04 '20 07:06 nstrelow

Wake up on cable never worked for me, but this could be related to my network infrastructure. I use wireless bridges in some points of my property and I know that WoL packets cannont cross them.

I used the Off state to activate some automation. I can modify them to a "not on" state but it is not the same.

rafuz avatar Jun 05 '20 16:06 rafuz

I actually have the exact same set-up as rafuz, and am using the 'not on' state now as well, but that's not perfect. Setting the state to off on different API versions would be great, or a custom config parameter that changes unknown to off. If help, or information is needed, please let me know!

Xitro01 avatar Oct 19 '20 19:10 Xitro01