Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Entity does not go in Off state when turned off #42

Open
rafuz opened this issue May 28, 2020 · 17 comments
Open

Entity does not go in Off state when turned off #42

rafuz opened this issue May 28, 2020 · 17 comments

Comments

@rafuz
Copy link

rafuz commented May 28, 2020

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.

@nstrelow
Copy link
Owner

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.

@rafuz
Copy link
Author

rafuz commented May 28, 2020

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?

@nstrelow
Copy link
Owner

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.

@mikicof
Copy link
Contributor

mikicof commented May 28, 2020

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
Copy link
Contributor

mikicof commented May 28, 2020

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

@rafuz
Copy link
Author

rafuz commented May 28, 2020

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?

@mikicof
Copy link
Contributor

mikicof commented May 28, 2020

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

@rafuz
Copy link
Author

rafuz commented May 28, 2020

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
Copy link
Author

rafuz commented May 30, 2020

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

@mikicof Please post the screen :-)

@mikicof
Copy link
Contributor

mikicof commented May 30, 2020

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

On network you can find it below start with wowlan

@rafuz
Copy link
Author

rafuz commented Jun 3, 2020

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.

@nstrelow
Copy link
Owner

nstrelow commented Jun 3, 2020

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.

@rafuz
Copy link
Author

rafuz commented Jun 3, 2020

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?

@mikicof
Copy link
Contributor

mikicof commented Jun 3, 2020

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

@nstrelow
Copy link
Owner

nstrelow commented Jun 4, 2020

@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?

@rafuz
Copy link
Author

rafuz commented Jun 5, 2020

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.

@Xitro01
Copy link

Xitro01 commented Oct 19, 2020

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants