bendavid / aiopylgtv

Library to control webOS based LG Tv devices
MIT License
143 stars 47 forks source link

feat(power): control TV screen #22

Closed khmm12 closed 3 years ago

khmm12 commented 3 years ago

It brings ability to directly turn off/on TV screen. Similar to "Settings -> Energy Saving -> Screen Off".

chros73 commented 3 years ago

Thanks, but this doesn't seem to work on LG Oled B8 with firmware 04.10.25, which model did you try it with? (I registered the client by deleting the existing .aiopylgtv.sqlite file.) To be clear:

aiopylgtvcommand 192.168.1.78 turn_screen_off
None
khmm12 commented 3 years ago

Greetings @chros73 👋

I tested on C9 04.10.03.

turn_screen_off : doesn't do anything

Could you try with extra permissions? (e.g. from lgtv2)

WebOS also supports low-level method com.webos.service.tv.power/turnOffScreen, but it completely turns screen off, so TV doesn't change the power state and doesn't activate screen on remote actions.

If I put the screen to Off state manually under Energy Saving then any command will turn it on again

Which is expected, Webos leaves from Screen Off mode on any button/command with some exceptions like VolUp/VolDown.

The main problem is LG doesn't provide detailed documentation for their API 😞.

ciB89 commented 3 years ago

Does this work on a C8?