RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login

    Early Access: Scripting and Display Off / Energy Saving Feature

    Scheduled Pinned Locked Moved Ideas and Development
    powersaverc++emustationdisplay control
    16 Posts 4 Posters 2.2k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      jdrassa @Lolonois
      last edited by

      @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.

      Get latest build of EmulationStation for Windows here

      LolonoisL 1 Reply Last reply Reply Quote 0
      • mituM
        mitu Global Moderator @Lolonois
        last edited by mitu

        @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 set

        I 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).

        LolonoisL 1 Reply Last reply Reply Quote 0
        • LolonoisL
          Lolonois @jdrassa
          last edited by

          @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.

          LolonoisL 1 Reply Last reply Reply Quote 0
          • LolonoisL
            Lolonois @mitu
            last edited by

            @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.

            1 Reply Last reply Reply Quote 0
            • LolonoisL
              Lolonois @Lolonois
              last edited by

              @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.

              1 Reply Last reply Reply Quote 0
              • mituM
                mitu Global Moderator
                last edited by

                IMHO you should have a separate PR building off @jdrassa's additions and force-push on your existing PR.

                LolonoisL 1 Reply Last reply Reply Quote 0
                • LolonoisL
                  Lolonois @mitu
                  last edited by

                  @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:

                  1. added GUI to configure time when station enters "sleep" state when no user interaction
                  2. only honor executable scripts/binaries for event system calls
                  3. 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.

                  cyperghostC 1 Reply Last reply Reply Quote 2
                  • cyperghostC
                    cyperghost @Lolonois
                    last edited by cyperghost

                    @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 ;)

                    1 Reply Last reply Reply Quote 2
                    • LolonoisL
                      Lolonois
                      last edited by

                      @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.

                      1 Reply Last reply Reply Quote 0
                      • LolonoisL
                        Lolonois
                        last edited by Lolonois

                        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
                        
                        1 Reply Last reply Reply Quote 1
                        • First post
                          Last post

                        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.