[Pre-Order] Safe Shutdown Switch (PowerBoost Version) - Closed

Completed sale threads will be moved here to keep things tidy in the main For Sale forum.
DarrylUK
Posts: 62
Joined: Thu Jul 21, 2016 2:09 pm
Has thanked: 14 times
Been thanked: 20 times

Re: [Pre-Order] Safe Shutdown Switch (PowerBoost Version) - Closed

Post by DarrylUK » Fri Oct 07, 2016 1:05 am

Camble wrote:
DarrylUK wrote: It didn't play the video :-/
Are you using my modified script?
I used the script on the front page from GitHub. It seems like the safe shutdown is working:

https://youtu.be/lQSvvaFD_x8

I've left it on now on the menu, I'll see what happens when it's low again.

DarrylUK
Posts: 62
Joined: Thu Jul 21, 2016 2:09 pm
Has thanked: 14 times
Been thanked: 20 times

Re: [Pre-Order] Safe Shutdown Switch (PowerBoost Version) - Closed

Post by DarrylUK » Fri Oct 07, 2016 3:24 am

Honestly I have no idea what's happening. I rebooted after posting the video and the shutdown script isn't working.

When I launch the monitor manually via the below:

Code: Select all

python ~/GBZ-Power-Monitor_PB/gbz_power_monitor.py
I'm not presented with anything at the prompt (is that correct?). If I power off whilst in this state there's a half second delay or so and then it just cuts power. If I stop the script via ctrl + c I get the attached message. Is that expected?
gbz.jpg
gbz.jpg (99.11 KiB) Viewed 9764 times
This is the code used to add it to the startup process:

Code: Select all

echo "@reboot     /usr/bin/nice -n 19 /usr/bin/python ~/GBZ-Power-Monitor_PB/gbz_power_monitor.py" >> mycron; crontab mycron;rm mycron
I just don't know at this point if it's the script that's not running or if it's not being added to the startup process correctly.

User avatar
Camble
Posts: 885
Joined: Thu May 05, 2016 2:31 am
Location: Scotland
Has thanked: 269 times
Been thanked: 488 times

Re: [Pre-Order] Safe Shutdown Switch (PowerBoost Version) - Closed

Post by Camble » Fri Oct 07, 2016 3:35 am

DarrylUK wrote: I'm not presented with anything at the prompt (is that correct?).
Yes
DarrylUK wrote: If I power off whilst in this state there's a half second delay or so and then it just cuts power. If I stop the script via ctrl + c I get the attached message. Is that expected?
Yes
DarrylUK wrote: I just don't know at this point if it's the script that's not running or if it's not being added to the startup process correctly.
Clear your cron jobs with:

Code: Select all

crontab -r
Then add the job again. See if that helps.

DarrylUK
Posts: 62
Joined: Thu Jul 21, 2016 2:09 pm
Has thanked: 14 times
Been thanked: 20 times

Re: [Pre-Order] Safe Shutdown Switch (PowerBoost Version) - Closed

Post by DarrylUK » Fri Oct 07, 2016 4:37 am

Camble wrote:
DarrylUK wrote: I'm not presented with anything at the prompt (is that correct?).
Yes
DarrylUK wrote: If I power off whilst in this state there's a half second delay or so and then it just cuts power. If I stop the script via ctrl + c I get the attached message. Is that expected?
Yes
DarrylUK wrote: I just don't know at this point if it's the script that's not running or if it's not being added to the startup process correctly.
Clear your cron jobs with:

Code: Select all

crontab -r
Then add the job again. See if that helps.
I've removed and re-added it, it doesn't seem to be working at all. Is there a way to verify the script is running apart from physically turning the device off?

User avatar
Camble
Posts: 885
Joined: Thu May 05, 2016 2:31 am
Location: Scotland
Has thanked: 269 times
Been thanked: 488 times

Re: [Pre-Order] Safe Shutdown Switch (PowerBoost Version) - Closed

Post by Camble » Fri Oct 07, 2016 4:43 am

@DarrylUK Honestly, I'm not sure. I haven't done much software stuff with the Pi yet. The bulk of that work was by @Popcorn. I just tweaked the script for this board.

DarrylUK
Posts: 62
Joined: Thu Jul 21, 2016 2:09 pm
Has thanked: 14 times
Been thanked: 20 times

Re: [Pre-Order] Safe Shutdown Switch (PowerBoost Version) - Closed

Post by DarrylUK » Fri Oct 07, 2016 4:57 am

I will try a clean install of retropie and the script tomorrow. I'll let you know how it goes.

User avatar
HoolyHoo
Posts: 766
Joined: Sat Jul 09, 2016 9:34 pm
Has thanked: 206 times
Been thanked: 741 times

Re: [Pre-Order] Safe Shutdown Switch (PowerBoost Version) - Closed

Post by HoolyHoo » Fri Oct 07, 2016 6:32 am

DarrylUK wrote:
Camble wrote:
DarrylUK wrote: I'm not presented with anything at the prompt (is that correct?).
Yes
DarrylUK wrote: If I power off whilst in this state there's a half second delay or so and then it just cuts power. If I stop the script via ctrl + c I get the attached message. Is that expected?
Yes
DarrylUK wrote: I just don't know at this point if it's the script that's not running or if it's not being added to the startup process correctly.
Clear your cron jobs with:

Code: Select all

crontab -r
Then add the job again. See if that helps.
I've removed and re-added it, it doesn't seem to be working at all. Is there a way to verify the script is running apart from physically turning the device off?
Typing, ps aux | grep python, at the command prompt should give you all running Python scripts and their paths.

DarrylUK
Posts: 62
Joined: Thu Jul 21, 2016 2:09 pm
Has thanked: 14 times
Been thanked: 20 times

Re: [Pre-Order] Safe Shutdown Switch (PowerBoost Version) - Closed

Post by DarrylUK » Fri Oct 07, 2016 7:39 am

HoolyHoo wrote:
DarrylUK wrote:
Camble wrote: Yes

Yes



Clear your cron jobs with:

Code: Select all

crontab -r
Then add the job again. See if that helps.
I've removed and re-added it, it doesn't seem to be working at all. Is there a way to verify the script is running apart from physically turning the device off?

Typing, ps aux | grep python, at the command prompt should give you all running Python scripts and their paths.
Thanks for that. I just ran it and it showed 2 instances of it running. I cleared my cron jobs, rebooted, verified no scripts were running, added it once, rebooted, checked again and it shows 2 scripts running.

Does that tie up with you @Camble?


Edit, I'm not sure if it makes a difference that it's being powered on in a low battery state. I'm charging it now to see.
Attachments
IMG_0139.JPG
IMG_0139.JPG (3.28 MiB) Viewed 9727 times

DarrylUK
Posts: 62
Joined: Thu Jul 21, 2016 2:09 pm
Has thanked: 14 times
Been thanked: 20 times

Re: [Pre-Order] Safe Shutdown Switch (PowerBoost Version) - Closed

Post by DarrylUK » Fri Oct 07, 2016 11:11 am

I have reflashed Retropie 4.0.2, installed the script, verified that it's running on startup and when I flick the switch, it turns straight off. I think I'm ready to call it a day with this.

Has it got anything to do with it being installed locally (e.g. permissions)? I download the GBZ-Power-Monitor_PB folder from github, copy it to the correct location on the SD card, the script is running on startup. All of the solder joints are good, it has even worked previously (the shutdown switch part). What could have happened for it to have stopped working?

User avatar
Camble
Posts: 885
Joined: Thu May 05, 2016 2:31 am
Location: Scotland
Has thanked: 269 times
Been thanked: 488 times

Re: [Pre-Order] Safe Shutdown Switch (PowerBoost Version) - Closed

Post by Camble » Fri Oct 07, 2016 11:45 am

DarrylUK wrote:Does that tie up with you @Camble?
Just set it back up and checked. Yes, it's listed twice.

Just noticed you mentioned the battery is low. Which GPIO pin are you using for the keep alive?

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest