eslavnov / pylips

Control Philips TVs (2015+) and Ambilight (+ Hue) through their reverse-engineered API (+ MQTT support!)
MIT License
334 stars 58 forks source link

[QUESTION] MQTT Power Status during Night #76

Closed popy2k14 closed 3 years ago

popy2k14 commented 3 years ago

Describe the bug Before i'll used pylips my smarthome ping'ed the ethernet interface of my TV's (65PUS8102 & 55PUS9104). If they where offline/online this was a trigger todo certain things (switching lights, ...). Sadly the philips tv has woke up in the night on ~04:00 AM everyday made this useless as a trigger. After activating alexa on the tv, the "deep standby" was deactivated and the power state worked reliable.

After some time i switched to pylips with mqtt for power state (3sec intervall), which also works good (alexa is activated).

So my question is, does the power state also works when alexa is deactivated? So DONT send "on" state @ ~04:00 AM when the TV is doing its magic (channel scanning!?)?

I want to deactivate alexa because i think, since i have activated it, the tv is more unstable (because of long runtime). Also i have some audio dropout's on my HDMI ARC connected audio system. After reboot -> everything is in good shape.

To Reproduce Steps to reproduce the behavior:

  1. deactivate alexa on the tv
  2. setup pylips with mqtt to your smarthome
  3. set an trigger in your smarthome to switch on ligths or do some logging when tv goes on

Expected behavior I'll hope that this works, so i can deactivate alexa and use deep standby again. Also i would throw les energy without alexa.

Hope anyone of you is using this in such way and can give me some hints 👍

thx

popy2k14 commented 3 years ago

My Smarthome has the answer :-)

2020.08.24 04:00:20 1: act_on_PCs_SZ: event: power: on
2020.08.24 04:00:43 1: act_on_PCs_SZ: event: power: off

Sadly pylips is reporting an short on period during the night.

Is there any workaround?

Thanks

eslavnov commented 3 years ago

The power state relies on whatever the TV's API is returning. Any custom logic that you might want to introduce should be handled on your client, not in Pylips itself since it's just a wrapper around the API.

popy2k14 commented 3 years ago

Yeah, I have implemented a workaround in my smarthome or just do not trigger on power event.

Sad that philips has such bugs (or even needs reboots at night to keep things srable)

But sure it's not pylips related 😉