Camble safe shutdown script help
-
- Posts: 18
- Joined: Fri May 11, 2018 11:26 pm
Camble safe shutdown script help
Hi everyone im after some help.
Command prompt stuff is new to me and i am having some issues running the script for the generic safe shutdown. Ive edited the script and im up to the following step:
echo "@reboot /usr/bin/nice -n 19 /usr/bin/python ~/Safe-Power-Monitor/safe_power_monitor.py" >> mycron; crontab mycron;rm mycron
If you would prefer to test the script first, run it once without adding to startup.
Note: if you chose to let the script alter /boot/config.txt for you, it will still reboot at this point, but will not run on startup.
python ~/Safe-Power-Monitor/safe_power_monitor.py
Are all the characters nominated physically entered? For example " or >>
Where it says to put " it shows up as @ and where it says to put @ it shows up as "
I've typed exactly as it says and it just puts me back to the retro pie command prompt.
Thanks for your help
Command prompt stuff is new to me and i am having some issues running the script for the generic safe shutdown. Ive edited the script and im up to the following step:
echo "@reboot /usr/bin/nice -n 19 /usr/bin/python ~/Safe-Power-Monitor/safe_power_monitor.py" >> mycron; crontab mycron;rm mycron
If you would prefer to test the script first, run it once without adding to startup.
Note: if you chose to let the script alter /boot/config.txt for you, it will still reboot at this point, but will not run on startup.
python ~/Safe-Power-Monitor/safe_power_monitor.py
Are all the characters nominated physically entered? For example " or >>
Where it says to put " it shows up as @ and where it says to put @ it shows up as "
I've typed exactly as it says and it just puts me back to the retro pie command prompt.
Thanks for your help
-
- Posts: 18
- Joined: Fri May 11, 2018 11:26 pm
Re: Camble safe shutdown script help
Never mind.
I used ssh and copy paste from github rather than direct type at command prompt on pi.
I also swapped to the GBZ monitor instead.
Now I've discovered my GBZ no longer powers up through the gearbest booster :/
I used ssh and copy paste from github rather than direct type at command prompt on pi.
I also swapped to the GBZ monitor instead.
Now I've discovered my GBZ no longer powers up through the gearbest booster :/
Re: Camble safe shutdown script help
Hi, I'm also a software newbie and beating my head against a wall at getting Camble's safeshutdown script to autostart on boot.
For some reason it just won't start on boot - or, if it is, it isn't working! I've uninstalled and reinstalled the script from GitHub but still no joy. If I ssh in and run the safe power monitor py file then it works a charm but only that one time, obviously.
This is my first, and likely only, Gameboy zero build (for my kids) and everything else is running fine, much to my shock. Camble's board and software is great-if only I could get it to autostart each time! Any help greatly appreciated. Cheers.
For some reason it just won't start on boot - or, if it is, it isn't working! I've uninstalled and reinstalled the script from GitHub but still no joy. If I ssh in and run the safe power monitor py file then it works a charm but only that one time, obviously.
This is my first, and likely only, Gameboy zero build (for my kids) and everything else is running fine, much to my shock. Camble's board and software is great-if only I could get it to autostart each time! Any help greatly appreciated. Cheers.
- YaYa
- Posts: 1719
- Joined: Mon Jun 26, 2017 12:42 pm
- Location: brittany - France
- Has thanked: 871 times
- Been thanked: 689 times
- Contact:
Re: Camble safe shutdown script help
Does the script loads or not, let’s start from here !
After boot, type top in the command line to see running processes.... tell us if the script is running
After boot, type top in the command line to see running processes.... tell us if the script is running
Re: Camble safe shutdown script help
Thanks! I just tried that and the script isn’t showing.
My /boot/config.txt file has the following line in it:
dtoverlay=gpio-poweroff:gpiopin="22",active_low="y"
And the most recent entries in the log.txt file are:
2018-09-17 14:13:33 [80] Reading /boot/config.txt took 0.2353 seconds.
2018-09-17 14:13:33 [30] Adafruit PowerBoost is selected.
2018-09-17 15:27:35 [11] Safe Power Monitor script running.
2018-09-17 15:27:35 [80] Reading /boot/config.txt took 0.7256 seconds.
2018-09-17 15:27:35 [30] Adafruit PowerBoost is selected.
My crontab file just has this one entry:
@reboot /usr/bin/nice -n 19 /usr/bin/python ~/Safe-Power-Monitor/safe_power_monitor.py
I just don’t know what else to do to get this to the script to start on boot. I can run it from the command line and it works like a charm then.
Thanks
My /boot/config.txt file has the following line in it:
dtoverlay=gpio-poweroff:gpiopin="22",active_low="y"
And the most recent entries in the log.txt file are:
2018-09-17 14:13:33 [80] Reading /boot/config.txt took 0.2353 seconds.
2018-09-17 14:13:33 [30] Adafruit PowerBoost is selected.
2018-09-17 15:27:35 [11] Safe Power Monitor script running.
2018-09-17 15:27:35 [80] Reading /boot/config.txt took 0.7256 seconds.
2018-09-17 15:27:35 [30] Adafruit PowerBoost is selected.
My crontab file just has this one entry:
@reboot /usr/bin/nice -n 19 /usr/bin/python ~/Safe-Power-Monitor/safe_power_monitor.py
I just don’t know what else to do to get this to the script to start on boot. I can run it from the command line and it works like a charm then.
Thanks
Re: Camble safe shutdown script help
I have the exact same problem: When starting the script manually everthing works perfect. But I don't get it to start automaticaly when booting up the pi.
Anyone an idea what to do?
Anyone an idea what to do?
Re: Camble safe shutdown script help
Wahey, I’m not alone! If anyone can help with this then it’d let me regard the build as finished. My kids have learned to manually shutdown using the menu system but it’d be so much simpler if they could just use the switch; darent let their pals near it meantime...
Re: Camble safe shutdown script help
So what happens, if you turn use the switch? Does it turn the system off?
Because when I use the switch, nothing happens. I then can shutdown the pi and after that I hear the sound of the power beeing disconected. If i shut the pi down without using the switch first, it ends in a screen with text. In that stage I can use the switch to turn the thing off.
Because when I use the switch, nothing happens. I then can shutdown the pi and after that I hear the sound of the power beeing disconected. If i shut the pi down without using the switch first, it ends in a screen with text. In that stage I can use the switch to turn the thing off.
Re: Camble safe shutdown script help
Hi Alesch, when I use the switch it turns on and boots normally - but it doesn’t auto run Camble’s python script. If I want to switch it off then the manual switch does nothing unless I've gone through the RetroPie menus and selected shutdown - at that point it will shutdown but keep the screen going unless I then turn it off using the switch. In other words, it does exactly the same as yours does.
Whereas if I boot up, ssh in and manually run the python script and then use the manual switch, it commences a software shutdown, just as it should. The problem for me is that I can’t seem to get the script to auto run on boot. It works fine once it’s up and running in the background. I’ve done fresh installs from Camble’s github but it hasn’t fixed the auto run issue.
Cheers
Andrew
Whereas if I boot up, ssh in and manually run the python script and then use the manual switch, it commences a software shutdown, just as it should. The problem for me is that I can’t seem to get the script to auto run on boot. It works fine once it’s up and running in the background. I’ve done fresh installs from Camble’s github but it hasn’t fixed the auto run issue.
Cheers
Andrew
Re: Camble safe shutdown script help
Im having this exact problem as well. Has there been a solution?
Who is online
Users browsing this forum: No registered users and 1 guest