Early Access: Scripting and Display Off / Energy Saving Feature
-
@Lolonois I gave it a quick look. The actually script execution portion looks pretty similar to what I implemented. What I have is a bit more comprehensive. It covers more events of interest beyond wake/sleep. I'd prefer to get that merged first and then have you update your PR to work with it. I am going to try to make time this weekend and dust if off and get it ready.
-
@Lolonois said in Display Off / Energy Saving Feature:
where to fulfill the pre-req that the path are created during ES setup and
how to deploy a short readme in this folder during setup to explain when the scripts are called and that they have to have the executable flag setI think both can be done through the ES scriptmodule installation, though I think there should be a sample
scripts
folder, including a README.EDIT: Why enable it just for the RPI ? I think we might find alternatives for Odroid, PC (Ubuntu, Debians).
-
@jdrassa quite impressive list of events,did not knew all of them. Thanks for sharing and documenting them in one place.
While your PR is pending I will adapt mine to be applicable on top of yours. -
@mitu said in Display Off / Energy Saving Feature:
Why enable it just for the RPI ?
With the more generic scripting approach there is no need to do so, right.
Whenever a maker of a Arcade wants that there should be some action on event x then she/he had put a script into the respective folder deliberatly. Without any script there is no action on any platform/arch although the event was fired.Thanks.
-
@jdrassa I am done with aligning my PR with yours. Changes include:
- renamed "DisplayOffTime" to "SystemSleepTime"
- Initially the SystemSleepTime is zero, thus off/no event fired. Once the user sets a value > 0 he/she gets a one time note to check the Retropie Wiki how to put events into user-action (i.e. providing a script in the appropriate folder).
- removed limitation to
_RPI_
Now, for the tricky part: How to get it into the mainline?
I see these options:
- Wait until jdrassa's PR #551 is accepted, then push-force mine #550 to reflect my additions on top of jdrassa's PR.
- @jdrassa you may provide me write access to PR #551 so I could integrate my additions
- Some other option I am not aware of.
@BuZz et al: What is the suggested way the retropie repo owner do prefer?
Thanks.
-
IMHO you should have a separate PR building off @jdrassa's additions and force-push on your existing PR.
-
@mitu and all my PR 550 now integrates @jdrassa scripting framework/API PR 551.
Please see jdrassa's wiki page on the scripting support.
Additions to PR 551 from jdrassa include:
- added GUI to configure time when station enters "sleep" state when no user interaction
- only honor executable scripts/binaries for event system calls
- added extra events when screensaver starts and gets stopped (currently not yet documented in the wiki page above)
The events I focused on are:
screensaver-start
fired on screensaver activation
screensaver-stop
fired on screensaver deactivation
sleep
fired when station is without user input for a specified time (see PR)
wake
fired when station returns from sleep (i.e. user input)For early access users:
git clone https://github.com/RetroPie/EmulationStation.git cd EmulationStation git fetch origin pull/550/head:event-scripting git checkout event-scripting cmake . && make ./emulationstation --debug
Please share your questions, suggestions, findings aso. here.
-
@Lolonois said in Early Access: Scripting and Display Off / Energy Saving Feature:
screensaver-start fired on screensaver activation
screensaver-stop fired on screensaver deactivation
sleep fired when station is without user input for a specified time (see PR)
wake fired when station returns from sleep (i.e. user input)The ScreenSaver Options are very usefull. Is it intended to work on all ScreenSavers (DIM, Black Screen, Video and Picture) if this works on all I think I'll write a small script for the video collections @Malixx ... they can be found here and then the videos files do not need to be linked to gameslists and can work as own module ;)
-
@cyperghost said in Early Access: Scripting and Display Off / Energy Saving Feature:
Is it intended to work on all ScreenSavers ?
Yes. No distinction between type of screensaver (video, slideshow, dim, blank). Currently the type is not passed as argument for a script.
-
Update: Please use PR 560 (note the 6) from now on for testing. Needed to reapply PR since fork and upstream diverted too much. So:
git clone --recursive https://github.com/RetroPie/EmulationStation.git cd EmulationStation git fetch origin pull/560/head:event-scripting git checkout event-scripting cmake . && make ./emulationstation --debug
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.