Carberry Forum

delay in
Page 1 of 1

Author:  Rodney.McKay [ Thu Jan 23, 2020 1:39 am ]
Post subject:  delay in

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, 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?

Author:  Flynn [ Sun Feb 02, 2020 11:02 pm ]
Post subject:  Re: delay in

Hi Rodney,

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

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 :

shutdown -h +5


Author:  Rodney.McKay [ Mon Mar 09, 2020 4:17 am ]
Post subject:  Re: delay in

Thanks anyway for trying to assist, but I did read the man page before posting, and correctly editing the 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
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 before posting the first time, just to be sure.

So anyway, the problem is, the command
shutdown -h #
works in the terminal as expected, but editing the Carberry 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.

Author:  Sportegan [ Sat Mar 21, 2020 1:44 pm ]
Post subject:  Re: delay in

Thanks for the help, Flynn ;)

Author:  Mueeidkhatri [ Wed Aug 26, 2020 11:58 pm ]
Post subject:  lunar new year

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

Author:  Antony44 [ Wed Sep 23, 2020 12:02 pm ]
Post subject:  Re: delay in

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.

Page 1 of 1 All times are UTC + 2 hours
Powered by phpBB® Forum Software © phpBB Group