WIP Screensaver Disable RPI Backlight
#16
(2019-05-08, 20:28)SebastiansIT Wrote: Hi dud3rs,

I doesn't use the python library you use. Instead I call directly shell commands to change the backlight power.
  1.  I have take a short look at the project page of rpi-backlight. Part of this Python package is a CLI. Have you try to call this manually in a SSL-Terminal? Doing so show you the package works or not.
  2. Have you changed the backlight rules like it is mentioned in the installation instructions of rpi-backlight?
  3. Print out the value of your sensor to see if this component works like you expect it?
Hope this helps 

Thanks for your response!  I have actually given up trying to do it the way I described above, and I am instead trying to run my script at startup.  I learned from another thread that if I configure my Raspbian install to load my script automatically when the RPi boots up, that even if I boot into Kodi my script should still run in the background.  I have tried all of your suggestions, and I can confirm that the script works when I run it from the CLI.  However, when I follow the instructions from this tutorial (systemd) the system just freezes up and I have to hard reboot.  I have a RPi 3 with Raspbian and LibreElec installed via NOOBs.  I boot into Raspbian to do all my scripting/testing.  When I think I have it working, I then boot into Kodi, and test it.  It never works, though.  If I boot into Kodi it doesn't freeze, it just doesn't work.  If I boot into Raspbian it will freeze, and I have to disable everything via SSH.  Any ideas?
Reply
#17
Hi dud3rs,
(2019-05-11, 19:03)dud3rs Wrote: ... However, when I follow the instructions from this tutorial (systemd) the system just freezes up and I have to hard reboot.  I have a RPi 3 with Raspbian and LibreElec installed via NOOBs.  I boot into Raspbian to do all my scripting/testing.  When I think I have it working, I then boot into Kodi, and test it.  It never works, though.  If I boot into Kodi it doesn't freeze, it just doesn't work.  If I boot into Raspbian it will freeze, and I have to disable everything via SSH.  Any ideas? 
I'm not sure but your script is endless running and so systemd waits for the return code of you script to do some more initialization of the Raspian. It waits and waits and never run the tasks that give you a prompt or X window login.  At this time you SSH daemon is always startet. You can experiment with the commands screen or nohup (see https://askubuntu.com/questions/88091/ho...background).

I don't know if LibreElec use systemd at all ore in the same way as Raspbian. In LibreElec, more precise in Kodi, exists another mechanism to run scripts on startup: https://wiki.libreelec.tv/autostart.sh?s[]=autostart.
Reply
#18
(2019-05-12, 18:42)SebastiansIT Wrote: Hi dud3rs,
(2019-05-11, 19:03)dud3rs Wrote: ... However, when I follow the instructions from this tutorial (systemd) the system just freezes up and I have to hard reboot.  I have a RPi 3 with Raspbian and LibreElec installed via NOOBs.  I boot into Raspbian to do all my scripting/testing.  When I think I have it working, I then boot into Kodi, and test it.  It never works, though.  If I boot into Kodi it doesn't freeze, it just doesn't work.  If I boot into Raspbian it will freeze, and I have to disable everything via SSH.  Any ideas? 
I'm not sure but your script is endless running and so systemd waits for the return code of you script to do some more initialization of the Raspian. It waits and waits and never run the tasks that give you a prompt or X window login.  At this time you SSH daemon is always startet. You can experiment with the commands screen or nohup (see https://askubuntu.com/questions/88091/ho...background).

I don't know if LibreElec use systemd at all ore in the same way as Raspbian. In LibreElec, more precise in Kodi, exists another mechanism to run scripts on startup: https://wiki.libreelec.tv/autostart.sh?s[]=autostart
Thank you!  I will try these and get back to you.
Reply
#19
Hi Sebastian,

Just wanted to thank you for your Add-on. It is exactly what I was looking for.

Kind regards
Reply
#20
Hello ,

Was failed with last osmc version ( kodi 19.3 )

I just replace in addon.xml :
 
Quote:<import addon="xbmc.python" version="2.25.0"/>
by
Quote:
Code:
<import addon="xbmc.python" version="3.0.0"/>

Still the most simple screensaver for my rasptouch !
Reply
#21
Hi airvb,

I can not test this at the moment. I use a Raspi 3 with LibreELEC 9. Version 10 don't support the Raspi 3. In modern Linux-Kernels Python 3 is the standard. So I think your Solution looks fine for such distributions. 
(2022-02-15, 14:25)airvb Wrote: Hello,

Was failed with last osmc version ( kodi 19.3 )
Thanks for your help.
Reply

Logout Mark Read Team Forum Stats Members Help
Screensaver Disable RPI Backlight2