[Sold Out] Safe Shutdown v1.0 for BangGood/GearBest/Generic power Supply

Completed sale threads will be moved here to keep things tidy in the main For Sale forum.
User avatar
winnetouch
Posts: 157
Joined: Mon Jul 11, 2016 10:56 am
Has thanked: 2 times
Been thanked: 30 times

Re: [Sold Out] Safe Shutdown v1.0 for BangGood/GearBest/Generic power Supply

Post by winnetouch » Sat Mar 21, 2020 7:09 am

Ok. I'm back. I reopened my GB Zero, flashed the SD card to star anew, enabled WIFI and SSH, then got to work. Before adding the script the switch worked like a regular on/off switch. Then I followed the instructions here: https://github.com/Camble/Safe-Power-Monitor

I changed AdafruitPowerBoost = True to AdafruitPowerBoost = False

then I added dtoverlay=gpio-poweroff:gpiopin=22,active_low="y" to /boot/config.txt

To be honest I can't remember if I had to do anything special here to add the script to startup. It just says add the script to startup.

EDIT: BTW, the way it stands now it still doesn't work.

EDIT2: I did as you suggested.
Screenshot_1.png
Screenshot_1.png (10.21 KiB) Viewed 111 times

the_darkman
Posts: 5
Joined: Wed Dec 05, 2018 8:47 am
Has thanked: 1 time
Been thanked: 2 times

Re: [Sold Out] Safe Shutdown v1.0 for BangGood/GearBest/Generic power Supply

Post by the_darkman » Sat Mar 21, 2020 7:48 am

This grep output shows that the script is not running, so clearly there could be nothing working.

Please check the section https://github.com/Camble/Safe-Power-Mo ... the-script ... There you see that it has to be added as a cron job in your crontab by executing this line:

Code: Select all

echo "@reboot /usr/bin/nice -n 19 /usr/bin/python ~/Safe-Power-Monitor/safe_power_monitor.py" >> mycron; crontab mycron;rm mycron
Than reboot and do this grep command again. It should show more than only itself

hth
the_darkman

User avatar
winnetouch
Posts: 157
Joined: Mon Jul 11, 2016 10:56 am
Has thanked: 2 times
Been thanked: 30 times

Re: [Sold Out] Safe Shutdown v1.0 for BangGood/GearBest/Generic power Supply

Post by winnetouch » Sat Mar 21, 2020 10:26 am

OMG! HOW DID I MISS THAT? I read the entire thing. Had it working on a previous build even! Thanks man. I guess I have some new toys to tinker with during my countries self isolation period. Stay safe people!

EDIT: And it's a dud again. Sometimes it works sometimes it doesn't. Oh, well I guess it's better then nothing :P

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest