WIP Screensaver Disable RPI Backlight - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26) +---- Forum: Screensavers and visualisations (https://forum.kodi.tv/forumdisplay.php?fid=38) +---- Thread: WIP Screensaver Disable RPI Backlight (/showthread.php?tid=289480) Pages:
1
2
|
Screensaver Disable RPI Backlight - SebastiansIT - 2016-09-04 Hello, I use a Raspberry Pi 3 together width the official 7" Display and Kodi as an audio player. At the beginning I use the screensaver "Black". But there are two problems width this: 1. The display isn't really black because the backlight is always on. So, you can see the display glowing in a dark room. 2. Touching the Display stops the screensaver and, in addition, starts the action on the screen behind the screensaver. Because of this I often switch to another song when I touch the display. To get a better solution I wrote a new Screensaver: The Disable RPI Backlight Screensaver This Screensaver only supports Kodi, installed on a Linux distribution (i.E. LibreElec), running on a Raspberry Pi connected to the official 7" Display. When somebody is out there with such a set-up, please test it and tell me your opinion. Thanks. The plugin can downloaded from Github: https://github.com/sebastiansIT/RPI-Display-Backlight-Controller-for-Kodi/raw/v0.1.1/build/screensaver.rpi-backlight-disabler.zip The source code is under GPLv3 also on Github: https://github.com/sebastiansIT/RPI-Display-Backlight-Controller-for-Kodi/tree/master/sources/screensaver.rpi-backlight-disabler RE: Screensaver Disable RPI Backlight - florca - 2016-11-15 Thanks for this - just what I was looking for, although I've adapted it slightly so that it works with a "standard" external HDMI EnergyStar-compliant monitor. To do this replace two lines in screensaver.py: Code: shellCommand = 'echo 1 > /sys/class/backlight/rpi_backlight/bl_power' Code: shellCommand = 'echo 0 > /sys/class/backlight/rpi_backlight/bl_power' with... Code: shellCommand = 'vcgencmd display_power 0' Code: shellCommand = 'vcgencmd display_power 1' which toggles the HDMI monitor powersaving / standby on & off from my Slice (RPi-based player) Also - the current downloadable ZIP packaging won't allow the Addon to be manually installed, at least under Kodi 17. Needs to be structured as per here: http://stackoverflow.com/questions/28286113/xbmc-kodi-error-adding-addon-structure-incorrect with all files in a top-level folder within the ZIP named as per the Addon. Thanks for a VERY useful addon, Brgds Phil RE: Screensaver Disable RPI Backlight - SebastiansIT - 2017-03-06 To support the package structure of Kodi 17.0, I have released an update to version 0.1.1. It's functional the same as the version 0.1.0, only changed the addon.xml and the packaging. RE: Screensaver Disable RPI Backlight - airvb - 2017-03-26 Hello, to get yr screen saver works on OpenElec, OSMC, LibreElec you need to be root to send the command i propose this Code: def onInit(self): inspired by https://github.com/marklam/PiTsOff/blob/master/screensaver.pitsoff/screensaver.py Working on my OSMC box ! @+ RE: Screensaver Disable RPI Backlight - SebastiansIT - 2017-03-27 Hi airvb, thanks for your tip. Can you tell me in which distribution Kodi isn't run with the root account? I use LibreElec at the moment and it works well without sudo. RE: Screensaver Disable RPI Backlight - airvb - 2017-03-27 (2017-03-27, 19:11)SebastiansIT Wrote: Hi airvb, I try again with OSMC fresh install without sudo tip , not working Ok with sudo ! RE: Screensaver Disable RPI Backlight - doerek - 2017-07-29 (2016-09-04, 12:34)SebastiansIT Wrote: Hello, I just tried your Addon with "OpenELEC-RPi2.arm-8.0.4.img" (Krypton) and its working just fine. (Raspberry Pi 3 + 7" Pi touchscreen) Thank you! RE: Screensaver Disable RPI Backlight - doerek - 2017-07-29 Is there a way to integrate this method into the Shutdown-script? (Openelec 8.0.4 / Kodi Krypton) btw. Your screensaver is working perfectly...Thank you again. It would be really nice to have an option within your Screensaver to select a "starting screensaver") This way you could start the selected "starting Screensaver" first, and after XY-Min. your Screensaver starts-up to disable the Screen. Just a small idea because i like to display different informations as Screensaver like Weather, Time, Date ... greetings from Germany Danke nochmal RE: Screensaver Disable RPI Backlight - SebastiansIT - 2017-08-03 Hi Doerek, which method to you wish to integrate on shut down? Disabling the Display is a natural feature of power less devices I don't know if a screensaver can control another screensaver. I think the other way is much easier to implement: Look for your favourite screensaver and ask the author to integrate a function to dim the display after x minutes. Thanks (also from Germany) for your feedback. RE: Screensaver Disable RPI Backlight - doerek - 2017-08-21 (2017-08-03, 19:32)SebastiansIT Wrote: Hi Doerek, Hi, I thought perhaps there could be a quick'n dirty (easy) way to disable the Touchscreens' Backlight right before the Pi shuts down completly. (Openelec 17; Krypton) Because...if you power down the Pi and leave it connected to the power supply, you get a non-stopping white/Black flicker on the Screen. (for example: integrate parts of your code into the shutdown process, or something like that) Up-to-date Raspbian handles the shutdown perfectly...as far i remember On the other Hand, i think this is actually the work of the "Openelec guys". Nevermind... (2017-08-03, 19:32)SebastiansIT Wrote: I don't know if a screensaver can control another screensaver. I think the other way is much easier to implement: Look for your favourite screensaver and ask the author to integrate a function to dim the display after x minutes.Yeah...i know what you mean. It was just a quick thought on how you could keep using any Screensaver (e.g. your favorite, that displays information) and still have the Screen turn off after some Time. no matter which one one is your Favorite btw. There should be a Repo where we can download your screensaver, just for good measures, I've tested countless Kodi builds in the last Year(s) and your addon is the key to actually use any of them with the 7" Touchscreen as a dedicaded Mediacenter, because none of them offerd an option to turn off the Screen. RE: Screensaver Disable RPI Backlight - SebastiansIT - 2017-08-21 (2017-08-21, 14:09)doerek Wrote: I thought perhaps there could be a quick'n dirty (easy) way to disable the Touchscreens' Backlight right before the Pi shuts down completly. (Openelec 17; Krypton) I have write you a shut-down script for LibreELEC (OpenELEC should also work). This Script disables the backlight. Copy the Script to /storage/.config and it would work. For more Information about shut-down scripts see "Kodi 17 - Script when kodi shutdown" RE: Screensaver Disable RPI Backlight - JojoWi - 2018-04-09 Thank you very much for this Screensaver Addon! It works great with LibreELEC 8.2.4 on my raspi 1B together with the official 7" touchscreen. RE: Screensaver Disable RPI Backlight - Timor - 2018-04-15 Works like a charm on RPi 3b/7" Touchscreen with LibreElec 8.2.5. Thanks a lot for providing us with a simple yet very useful add-on! RE: Screensaver Disable RPI Backlight - dud3rs - 2019-05-07 (2016-09-04, 12:34)SebastiansIT Wrote: Hello, Hello! Your screensaver looks great! I have the same setup: Raspberry Pi with official 7" display, and I'm trying to adjust the backlight based on ambient light using the VCNL4010 from adafruit. I have a script that works when I execute it in Raspbian, but I can't get it to work in Kodi (LibreElec). Can you please help me? My script that works in Raspbian is:
I execute it in Kodi via SSH on Windows 7 with this command: kodi-send --action="RunScript(/pathtoscript/scriptname)" But it doesn't work. With Kodi running on my RPi, the screen does wake up from sleep mode once I run the script, but it's unresponsive to changes in light. I know this is a little off topic, and years old, but I'm desperate for help. Can you please help me? RE: Screensaver Disable RPI Backlight - SebastiansIT - 2019-05-08 Hi dud3rs, I doesn't use the python library you use. Instead I call directly shell commands to change the backlight power.
|