Carberry Forum

Carberry Development Forum
It is currently Wed Sep 30, 2020 10:24 am

All times are UTC + 2 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: delay in shutdown.sh
PostPosted: Thu Jan 23, 2020 1:39 am 
Offline

Joined: Thu Jan 23, 2020 1:20 am
Posts: 2
After a few weeks with Raspberry Pi, Carberry, and a 4x50W amplifier installed in my car, I'm very happy with my purchase but I've decided that I don't want it to shutdown so soon when the engine turns off. Frequently when I use my car, it's to make multiple short stops and I would prefer to pause the playing song when I park then resume when I return, without waiting for the unit to power on again.
I've tried changing "shutdown -h now" to "shutdown -h 123" in shutdown.sh, but it still powers off within about a minute after power to the ignition wire on the Carberry harness goes off - about the same time as it took with "now" for poweroff to complete. What am I missing?


Top
 Profile  
 
 Post subject: Re: delay in shutdown.sh
PostPosted: Sun Feb 02, 2020 11:02 pm 
Offline

Joined: Mon Oct 28, 2019 6:26 pm
Posts: 2
Hi Rodney,

shutdown is a Linux command, from the man page you have the following details :

Quote:
The time string may either be in the format "hh:mm" for hour/minutes
specifying the time to execute the shutdown at, specified in 24h clock format.
Alternatively it may be in the syntax "+m" referring to the specified number
of minutes m from now. "now" is an alias for "+0", i.e. for triggering an
immediate shutdown. If no time argument is specified, "+1" is implied.


So, if you want to power it off after 5 minutes, use :

Code:
shutdown -h +5


Regards


Top
 Profile  
 
 Post subject: Re: delay in shutdown.sh
PostPosted: Mon Mar 09, 2020 4:17 am 
Offline

Joined: Thu Jan 23, 2020 1:20 am
Posts: 2
Thanks anyway for trying to assist, but I did read the man page before posting, and correctly editing the shutdown.sh script has no effect. Replies from anybody who has attempted to reproduce the problem, with details about what you observed, would be appreciated. By the way, although it's included in the man page, the "+" in
Code:
shutdown -h +t
(where t is some # of minutes) is optional, so I generally don't bother to include "+" in my shutdown commands, but I did try both ways in my edits to shutdown.sh before posting the first time, just to be sure.

So anyway, the problem is, the command
Code:
shutdown -h #
works in the terminal as expected, but editing the Carberry shutdown.sh script to delay shutdown has no effect; something is still sending a shutdown immediately command, as evidenced by the fact that the power is off within a minute after the ignition is switched off. I'm guessing one would also need to edit the Carberry daemon in some way, but due to its complexity I don't want to spend the time to verify or disprove that, and then figure out what code to edit and how. For now, I've acquired an alternative 12v -> 5v power control PCB which definitely does support delayed shutdown, from another manufacturer. It doesn't have any of Carberry's other functionality, but for the "daily driver" multimedia Pi in my dashboard, delayed shutdown is a must have, and I'll use my Carberry in the garage only, connected to another Pi, to read OBD codes and hopefully, eventually, to clear erroneous trouble codes rather than pay a mechanic for an hour of labor, just to flip a bit. Still, it would be nice to get delayed shutdown working with the Carberry someday, so the unit permanently installed in the dash could also be my diagnostic computer.


Top
 Profile  
 
 Post subject: Re: delay in shutdown.sh
PostPosted: Sat Mar 21, 2020 1:44 pm 
Offline

Joined: Sat Mar 21, 2020 1:25 pm
Posts: 3
Thanks for the help, Flynn ;)


Top
 Profile  
 
 Post subject: lunar new year
PostPosted: Wed Aug 26, 2020 11:58 pm 
Offline

Joined: Wed Aug 26, 2020 11:57 pm
Posts: 1
I wanted to thank you for this great read!! I definitely enjoying every little bit of it I have you bookmarked to check out new stuff you post.
lunar new year


Top
 Profile  
 
 Post subject: Re: delay in shutdown.sh
PostPosted: Wed Sep 23, 2020 12:02 pm 
Offline

Joined: Mon Apr 06, 2020 3:41 pm
Posts: 4
At this point I have purchased an alternative 12V -> 5V power management PCB that definitely supports delayed shutdown from another manufacturer. It doesn't have other Carberry features, but the multimedia Pi "daily driver" needs to have a delayed shutdown in my dashboard for the multimedia Pi and I will only use my Carberry in the garage, connected to another Pi to read OBD codes and hopefully eventually remove erroneous trouble codes rather than paying a mechanic for an hour of work just to flip a little.

_________________
https://www.telecomasia.net/tropicana-c ... eview.html


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC + 2 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group