Camble safe shutdown script help

Having trouble with your GBZ build? Ask your questions here!
Post Reply
Slimpreaper
Posts: 10
Joined: Fri May 11, 2018 11:26 pm

Camble safe shutdown script help

Post by Slimpreaper » Fri Sep 14, 2018 12:55 am

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

Slimpreaper
Posts: 10
Joined: Fri May 11, 2018 11:26 pm

Re: Camble safe shutdown script help

Post by Slimpreaper » Fri Sep 14, 2018 4:17 pm

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

Old man
Posts: 2
Joined: Mon Sep 17, 2018 7:42 am

Re: Camble safe shutdown script help

Post by Old man » Mon Sep 17, 2018 7:54 am

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.

User avatar
YaYa
Posts: 1979
Joined: Mon Jun 26, 2017 12:42 pm
Location: brittany - France
Has thanked: 927 times
Been thanked: 818 times
Contact:

Re: Camble safe shutdown script help

Post by YaYa » Mon Sep 17, 2018 9:55 am

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

Old man
Posts: 2
Joined: Mon Sep 17, 2018 7:42 am

Re: Camble safe shutdown script help

Post by Old man » Wed Sep 19, 2018 2:05 pm

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

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests