Auto-off After Idle?
-
Just bought a remote retropi board from MLS to allow me to power my system off/on from the couch with a remote, but I'm worried about one other thing. My kids may forget to turn the pi off, and I don't see an auto-off function. It could just sit for days in the menu if I don't address this. What are some good options as a safety precaution?
-
@AlphaBetaPie is there a problem with it staying on? raspberry pis are designed for always-on function. they use very little power - a few pounds/dollars a year.
-
My pi-hole runs 24/7 and my retropie is almost always on as well. I've had no problems with either yet
-
As the other said, I usually leave the PI on, without any screensaver active. When it's idle, it just dims the screen and the TV has an auto-shutdown (2h maybe) so there's minimal power consumption.
There's no out-of-the-box functionality to 'shutdown-after-idle', but EmulationStation has some scripting options which you can use. On the
sleep
event, you can trigger a script that safely shuts down RetroPie - I recommend @cyperghost's shutdown script - and with a large enough timeout (1h ?). -
@mitu I would use cron-job and the on-end and on-start scripts.If an emulator starts then delete the file/tmp/time.left
If an emulator stops then create file/tmp/time.left
cron job the age of file every 5minutes and if it's older then x minutes use the script ;)@mitu Wow I missed the script events somehow --- awesome ;)
-
Thanks, I'm willing to give that a shot. I've never used scripts with ES before, but I think I can figure it out. However, I'm not seeing what I need on @cyperghost's profile. Is there a direct link to the script I can download?
-
@cyperghost's shutdown script is at https://github.com/crcerror/ES-generic-shutdown.
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.