Release Turn Off screensaver
#1
This weekend I released a new screensaver named "Turn Off".

It is available from the default Kodi repository for Krypton and higher.

Its purpose is to turn of the display (TV, projector, monitor) by cutting the HDMI signal or using CEC or DPMS functionality.
In that regard it could work with any brand of display or hardware.

I wrote it because in my case using Raspberry Pi's, the RPi device stays on all the time, but the display never turns off.
Whether that display is a monitor (CEC won't work) or a projector (bad CEC implementation, turns on randomly just when you have left on vacation !!).

So in a way, this is a true "screen saver".

Additionally, it can also turn off audio (think: A/V receiver), log out the current user (think: parental control) or sleep/hibernate/power down your system.

The implementation already works well for specific use-cases I tested, but no doubt you have different hardware and unique instructions to make your display turn off.
I would like to hear from you so we can add this method to the existing screensaver add-on.

Feedback appreciated.
Reply
#2
Hi, working great on odroid with libreelec and hdmi cec, but on another machine, that uses libreelec with display port, I am unable to keep my tv turned off. The only method that do something is DPMS (bulit-in). It turn the display off, but after 5 seconds, it turns back on again. Any suggestions what should I try?
Reply
#3
If you find something that works for you, we can look at how to integrate it.
But I won't be able to help you with this specifically, because I cannot test.

The problem with DPMS on the command-line usually is that the moment you press enter, that key-press itself is the trigger/event that brings the display back.
In that case usually the solution is to sleep a second before running the command, so that the trigger/event has passed when it goes into sleep.

Maybe that could be of help here too.
Could you edit the addon to add a sleep and see if that works ?
Reply
#4
Hello dag-, I just found and tested Turn Off in my "particular" setup. In my kitchen, near the ceiling, I have a monitor that used to be connected to a Rpi by a hdmi/dvi cable (monitor doesn't have hdmi connector) and I had a screensaver that used vcgencmd to kill the signal and it worked just fine.

Recently I replaced the Rpi with an Aml S905X box. Sadly, none of the methods of Turn Off seem to work.

Isn't there a method like vcgencmd that would work on these boxes by just killing the signal?. Thanks
Reply
#5
EDIT: The DPMS (built-in) method seems to do something, but it actually restarts kodi. I tried it with preview and also by letting it go to sleep by itself, same result.
Reply
#6
Just what I was looking for, works perfectly using cec.
A true screensaver, thanks for sharing!
Reply
#7
Hi, tried it on LG 47LM620S, and unfortunately none of the options work. CEC is working, KODI can be controlled via HDMI by the TV's remote, but the TV is not turned off.
Reply
#8
(2019-02-07, 00:49)STEPHANVS Wrote: Hi, tried it on LG 47LM620S, and unfortunately none of the options work. CEC is working, KODI can be controlled via HDMI by the TV's remote, but the TV is not turned off.
 Nevermind, found out, that LG managed to successfully NOT implement turn off via CEC on most TVs older than 2015. Mine is from 2012...
Reply
#9
Did anyone manage to get this working with OSMC?
No matter which option I try, cec wont turn the tv to standby on my pi3b+ Sad
Reply
#10
Hi dagwieers, thanks you for your nice add-on.
I have a problem with "Power off system" function on my Android device. It's rooted but KODI failed to invoke su.
I read the code and make it work again, here is what I modified.
Code:

screensaver.turnoff/screensaver.py

...
            run_builtin('Reboot')
        elif power_method == '6':  # PowerDown (built-in)
            run_builtin('PowerDown')
        elif power_method == '7':  # Android POWER key event (using input)
            # run_command(['su', '-c', 'input keyevent KEYCODE_POWER'], shell=True)
            # This is the way that invokes Magisk su
            run_command(['su', '-c', 'input keyevent KEYCODE_POWER'])

    def onAction(self, action):
...
I don't know if you still maintain this add-on or not. If yes, please add a option like "Android POWER key event (using input)(alternative)"
Thanks again for this useful add-on.
Reply
#11
@Arokhaerr That might as well be the fault of your TV, or could be related to your CEC configuration.

@Aerotinge Can you open a feature request on GitHub? The add-on is still maintained, but doesn't need a lot of work.
Reply
#12
So I'm trying to get some power saving features working and this would be ideal. Is there a reason it doesn't seem to kick in during playback?

I.e. I often pause a show and walk away from the TV forgetting to turn it off. I'd like to have it turn off the screen after x amount of time but atm the functionality seems to be disabled during playback. It (and the option to turn off the screen in CEC settings) seem to work just fine as long as I'm not playing anything.
Reply
#13
@tuna8311 The problem is with Kodi really. It activates Dim, rather than the configured screensaver. It think this is fixed in Kodi Matrix.
Reply
#14
(2020-05-09, 15:11)dag- Wrote: @tuna8311 The problem is with Kodi really. It activates Dim, rather than the configured screensaver. It think this is fixed in Kodi Matrix.
Same thing is happening on LibreElec Rpi...sometimes it works and sometimes I find it dimmed even when nothing is playing...ex today I left LE taking a backup...when I came back it was dimmed about 3 hours after..Strange thing is every time i test it with 1 minute to turn on screensaver it always works  Devil Rolleyes
Reply
#15
(2020-05-09, 21:16)mariofenech Wrote:
(2020-05-09, 15:11)dag- Wrote: @tuna8311 The problem is with Kodi really. It activates Dim, rather than the configured screensaver. It think this is fixed in Kodi Matrix.
Same thing is happening on LibreElec Rpi...sometimes it works and sometimes I find it dimmed even when nothing is playing...ex today I left LE taking a backup...when I came back it was dimmed about 3 hours after..Strange thing is every time i test it with 1 minute to turn on screensaver it always works  Devil Rolleyes  
Dim is activated when the video is paused, or when a pop-up appeared.
See issue 16123 (GH issue)
Reply
 
Thread Rating:
  • 0 Vote(s) - 0 Average



Logout Mark Read Team Forum Stats Members Help
Turn Off screensaver00
This forum uses Lukasz Tkacz MyBB addons.