• Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login
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 1.9k 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.
  • C
    cyperghost @jdrassa
    last edited by cyperghost 18 Mar 2019, 20:32

    @jdrassa Please do this and hopefully a PR will be accepted ;) Scripts can be utilized then to make live easier (or pure hell if something goes wrong)
    On the other hand it can suffer the same fate as the runcommand USER MENU (!? - sorry if I'm wrong here but afaik just a bunch of users use this fantastic entry point for setting up some stuff)

    1 Reply Last reply Reply Quote 1
    • L
      Lolonois
      last edited by 18 Mar 2019, 23:44

      @mitu Thanks for the suggestions. Using scripts is ok as long the Arcade/Retropie owner controls who can access them and has control which get deployed.

      One more reason that users must understand that a Retropie should never connected directly to the Internet, at least not without precaution (read: hardening) of the OOTB configuration. But that's the flipside of the medal.

      1 Reply Last reply Reply Quote 0
      • L
        Lolonois
        last edited by 22 Mar 2019, 13:10

        Just filed the PR #550.

        Can you (maybe @mitu) please advise

        • 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

        Thanks and I am happy about feedback regarding the proposed changes.
        @jdrassa do you have something to amend by addition?

        J M 2 Replies Last reply 22 Mar 2019, 13:38 Reply Quote 1
        • J
          jdrassa @Lolonois
          last edited by 22 Mar 2019, 13:38

          @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

          L 1 Reply Last reply 26 Mar 2019, 07:17 Reply Quote 0
          • M
            mitu Global Moderator @Lolonois
            last edited by mitu 22 Mar 2019, 13:39

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

            L 1 Reply Last reply 26 Mar 2019, 07:26 Reply Quote 0
            • L
              Lolonois @jdrassa
              last edited by 26 Mar 2019, 07:17

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

              L 1 Reply Last reply 30 Mar 2019, 16:56 Reply Quote 0
              • L
                Lolonois @mitu
                last edited by 26 Mar 2019, 07:26

                @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
                • L
                  Lolonois @Lolonois
                  last edited by 30 Mar 2019, 16:56

                  @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
                  • M
                    mitu Global Moderator
                    last edited by 1 Apr 2019, 17:24

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

                    L 1 Reply Last reply 5 Apr 2019, 19:07 Reply Quote 0
                    • L
                      Lolonois @mitu
                      last edited by 5 Apr 2019, 19:07

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

                      C 1 Reply Last reply 5 Apr 2019, 19:29 Reply Quote 2
                      • C
                        cyperghost @Lolonois
                        last edited by cyperghost 4 May 2019, 20:32 5 Apr 2019, 19:29

                        @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
                        • L
                          Lolonois
                          last edited by 5 Apr 2019, 19:53

                          @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
                          • L
                            Lolonois
                            last edited by Lolonois 21 Apr 2019, 21:02

                            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.

                              This community forum collects and processes your personal information.
                              consent.not_received