Tackling Graceful Shutdowns on the GBZ

Various user-contributed guides for software-related things
User avatar
Max
Posts: 25
Joined: Sat May 07, 2016 4:03 am
Location: Toulouse, France
Has thanked: 5 times
Been thanked: 5 times

Re: Tackling Graceful Shutdowns on the GBZ

Post by Max » Fri May 20, 2016 2:18 am

This is really awesome ! In a few months, with all the custom PCB, it will be plug and play to make GBZ :lol:

prerunnerseth
Posts: 279
Joined: Fri May 06, 2016 5:36 pm
Has thanked: 16 times
Been thanked: 229 times

Re: Tackling Graceful Shutdowns on the GBZ

Post by prerunnerseth » Fri May 20, 2016 6:28 am

Popcorn wrote:@prerunnerseth you should look at producing this as a commercial product. I bet the GBZ isn't the only project this could be applied to. Pretty much all battery powered IoT devices need this. Amazing work!
My Thoughts exactly. I fully plan to sell these on a commercial scale.

Popcorn wrote:
prerunnerseth wrote:@popcorn

I have my circuit running wonderfully, but having and have the Kill command running awesome too using GPIO power-off. ONly thing I'm missing is the daemon to detect when to shutdown from a command from the controller. Can you share where you found the information?

THanks

I think i found it... are you using the python script?
Whoops. Just saw this. (I was vacationing the last couple days so not reading everything). I'm using a Python script currently but have a proper daemon setup. It's a mish mash of code out there. Will post it when I'm happy with it.
The python script works great and is very simple, but if you come up with a better method, that would be great too.
Last edited by prerunnerseth on Fri May 20, 2016 6:30 am, edited 1 time in total.

80sRetro
Posts: 15
Joined: Tue May 17, 2016 3:25 pm
Been thanked: 4 times

Re: Tackling Graceful Shutdowns on the GBZ

Post by 80sRetro » Fri May 20, 2016 7:00 pm

I did find this, which should work for your design as well.
https://github.com/t-richards/mausberry-switch

User avatar
Popcorn
Trailblazer
Trailblazer
Posts: 354
Joined: Thu May 05, 2016 12:58 am
Location: Berlin
Has thanked: 29 times
Been thanked: 71 times

Re: Tackling Graceful Shutdowns on the GBZ

Post by Popcorn » Fri May 20, 2016 7:43 pm

Thanks but, I am not prepared to pay $25usd+ with shipping for this. I am not gonna pay more than a powerboost just for a low battery warning. My goal is to use a low footprint solution, and use what we have, and not spend more than $10 total. I'm currently testing with a transistor switch that costs about $0.10. I will ensure it is 100% and then post step-by-step instructions, probably by early next week.

80sRetro
Posts: 15
Joined: Tue May 17, 2016 3:25 pm
Been thanked: 4 times

Re: Tackling Graceful Shutdowns on the GBZ

Post by 80sRetro » Fri May 20, 2016 8:03 pm

Popcorn wrote:Thanks but, I am not prepared to pay $25usd+ with shipping for this. I am not gonna pay more than a powerboost just for a low battery warning. My goal is to use a low footprint solution, and use what we have, and not spend more than $10 total. I'm currently testing with a transistor switch that costs about $0.10. I will ensure it is 100% and then post step-by-step instructions, probably by early next week.
I am only referring to the daemon not the switch itself.

User avatar
Popcorn
Trailblazer
Trailblazer
Posts: 354
Joined: Thu May 05, 2016 12:58 am
Location: Berlin
Has thanked: 29 times
Been thanked: 71 times

Re: Tackling Graceful Shutdowns on the GBZ

Post by Popcorn » Sat May 21, 2016 1:00 am

80sRetro wrote:
Popcorn wrote:Thanks but, I am not prepared to pay $25usd+ with shipping for this. I am not gonna pay more than a powerboost just for a low battery warning. My goal is to use a low footprint solution, and use what we have, and not spend more than $10 total. I'm currently testing with a transistor switch that costs about $0.10. I will ensure it is 100% and then post step-by-step instructions, probably by early next week.
I am only referring to the daemon not the switch itself.
Ahh cool. Thanks!

User avatar
Ganreizu
Posts: 552
Joined: Thu May 05, 2016 8:20 am
Has thanked: 168 times
Been thanked: 97 times

Re: Tackling Graceful Shutdowns on the GBZ

Post by Ganreizu » Sat May 21, 2016 9:53 am

80sRetro wrote:I am only referring to the daemon not the switch itself.
Obviously since i'm quoting you i know that you weren't talking about the switch but just in case i wanted to mention that i bought a mausberry circuits switch for a different project and had a somewhat bad experience. I emailed them with no response and they took a significant amount of time to ship it out, so if you need their switches i suggest keeping your business with them down to a minimum.

User avatar
Max
Posts: 25
Joined: Sat May 07, 2016 4:03 am
Location: Toulouse, France
Has thanked: 5 times
Been thanked: 5 times

Re: Tackling Graceful Shutdowns on the GBZ

Post by Max » Sat May 21, 2016 3:31 pm

@popcorn & @prerunnerseth

How your solution works when you turn on the switch (accidentally) when the raspberry did not completely shutdown ?

User avatar
Ganreizu
Posts: 552
Joined: Thu May 05, 2016 8:20 am
Has thanked: 168 times
Been thanked: 97 times

Re: Tackling Graceful Shutdowns on the GBZ

Post by Ganreizu » Sat May 21, 2016 3:41 pm

Max wrote:@popcorn & @prerunnerseth

How your solution works when you turn on the switch (accidentally) when the raspberry did not completely shutdown ?
I want to echo this question and ask the opposite. What happens when you flip it on and off immediately? I'm guessing both are bad things to do.

prerunnerseth
Posts: 279
Joined: Fri May 06, 2016 5:36 pm
Has thanked: 16 times
Been thanked: 229 times

Re: Tackling Graceful Shutdowns on the GBZ

Post by prerunnerseth » Sat May 21, 2016 6:29 pm

Ganreizu wrote:
Max wrote:@popcorn & @prerunnerseth

How your solution works when you turn on the switch (accidentally) when the raspberry did not completely shutdown ?
I want to echo this question and ask the opposite. What happens when you flip it on and off immediately? I'm guessing both are bad things to do.
This is something I've been playing with a bit. flipping it off then immediately back on again I havent tried yet. I have tried turning it on then back off. The only issue with this is that depending on how long your Pi take to boot, it will time out and shut off anyways. If it has not timed out, then it will just immediately shut off once it has finished booting. I may just make the timer really long. it is only for cases where the Pi is frozen anyways.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest