Page 1 of 1

scripting Screen brightness

Posted: Sat Apr 04, 2020 2:36 pm
by philgei
Hi,

I wondered, if it was possible to change the screen brightness with one single command.

My goal is to set the screen brightness so 0 instantly without hammering the remote.

Would love if you guys could push me in the right direction :)

Re: scripting Screen brightness

Posted: Sat Apr 24, 2021 11:20 am
by Hypfer
I've wrote a small application that provides control over the desired setting of my F-Series TV via HTTP REST.
It achieves that by abusing libBackPicSet viewtopic.php?t=9861

Control is done by dumping the current settings, changing the byte that represents the backlight setting and restoring the edited backup file.
Unfortunately, since this is an F-Series TV, I do need to switch inputs for changes to take effect so I just run two samyGorc commands to switch to Analog and then back to HDMI in.
This works fine for my setup since I only use my TV as an HDMI screen. ymmv


Since there's source code available for libBackPicSet, the proper solution would of course be to understand that, extract the relevant logic and build your own lib that just sets the backlight value.

Unfortunately though, documentation for samyGO overall isn't that great so the chance that I mess up something while doing that is rather large.
Maybe that could be a solution that avoids the automatic input switching

Maybe @zoelechat can help out here?

Re: scripting Screen brightness

Posted: Sat Apr 24, 2021 8:36 pm
by zoelechat
libBackPicSet has not been designed to dynamically change picture settings, it dumps and restores nvram and TV applies settings when it wants (->on source change). Changing only one value on the fly would need a totally different (and surely less overkill) approach.
Anyway if the point is to adjust backlight, you can use e-saving feature (=KEY_ESAVING you can map or send with samyGOrc).
About "documentation" (API LOL), nothing really specific to SamyGO there, just reverse engineering and C language :)