Help - Search - Members - Calendar
Full Version: Free 'Car Shutdown Detector' Windows Service
Mobile Electronics Australia > Mobile Electronics Discussion > Car Computing Discussion
shaneh20
Here's a nice little windows service i wrote that detects when your cars ignition is off and initiates a shutdown, hibernate or standby.

Click to view attachment

I use it instead of my OPUS's shutdown 'pulse' as i find this gets annoying, but it may be used in conjunction with it (or whatever other shutdown controller you use) if you wish.

Its main purpose is to help prevent your carpc from staying on after you've turned your ignition off, which can often flatten batteries pretty quickly. This problem is mainly caused by crappy app's that prevent windows from performing a shutdown, hibernate or standby.

Hardware shutdown controllers like the one found in the OPUS, do not deal with this problem. They are more of a 'last resort' as they only shutdown your carpc when the battery level gets too low. I found out the hard way, that this voltage level is too low as i could not start my car even though the OPUS did its job and turned the carpc off.

By combining both this windows service and your hardware shutdown controller, you're greatly reducing the chance that your carpc remains on after you've walked away from your car.

Of course, there are scenarios that this service cant control eg. windows locks up during the shutdown procedure. At this point, your carpc probably wont respond to your hardware shutdown controller's shutdown pulse. This is when its 'last resort' low battery failsafe needs to work.

There isn't any documentation as yet but its pretty easy to configure. Treat the following as a rough readme:

******************************
It will install a windows service named "Car Shutdown Detector". A .config file is installed in the "Program Files\SMH\Car Shutdown Detector" folder containing the following settings:

DSRDownShutdownLimit:
Number of seconds to wait after the ignition is turned off before starting the friendly shutdown/hibernate/standby procedure. If a crappy app prevents this from happening and the ignition is still off after this time limit elapses a second time, a 'forceful' shutdown/hibernate/standby is initiated. This forces windows to ignore the crappy app.

StartupShutdownLimit:
Number of seconds to wait after the service is started before checking the ignition. Best to keep this at 2 minutes to give your carpc enough time to boot and login when not connected to your cars ignition (eg. when tinkering with it on your kitchen table). Otherwise, you'll find your carpc shutting down before you've got enough time to go into Admin Tools->Services to stop the service!
(NOTE: The 'Car Shutdown Detector' service starts when the login window is displayed at startup, so this timer starts counting from this point. Even if you dont login it will still be doing its thing in the background)

ComPort:
The port you've got your 'ignition circuit' connected to (see below for this circuit).

ShutdownType:
Can be either "Shutdown", "Hibernate", "LogOff", "PowerOff", "Reboot" or "Suspend". Obviously LogOff and Reboot are useless for this and should not be used.


NOTE: The service needs to be restarted for the settings to take effect.


For all of this to work you need to have the following basic circuit connected to the COM port specified above (and yeah, i know: i draw like a 2 yr old):
Click to view attachment


Also, make sure you stick a diode on the relay switch to protect the things connected to it. If anything dies, I can not be held responsible. I've been using this for 2 years now and it works a treat.

Enjoy!
Marc
Thanks for sharing!!! smile.gif
Andrew S
Excelent tool - will test it out.
Big Paul
all im getting is corupt file sad.gif
shaneh20
QUOTE (Big Paul @ Jul 6 2006, 11:21 PM) *
all im getting is corupt file sad.gif


hmm, i'm not sure why. I'm guessing this is when you try and unzip it.

Maybe try holding your ALT key when you click the link to avoid any download managers as they sometimes corrupt files. Other than that i'm not sure cos it downloads, unzips & installs fine for me.

If you cant get it going, you may PM your email address to me and i can send it to you
Big Paul
PM'd smile.gif also tried opening it straight from the web page, but i just get corrupt file sad.gif
Big Paul
Hi Shane,
received your email, the zip file worked perfect. Thanks

Regards,
Paul
kingsly
Any chance of someone re-hosting this file possibly, im getting corrupt zip file, or if some one can please point me to a similar type prog that would b great.. cheers
Dogo
the attachment in the first post worked fine for me.

Shane, would you share the source code ?
kingsly
got it guys, i just tryed downloading it from another pc worked.



cheers
shaneh20
QUOTE (Dogo @ Aug 21 2007, 02:30 PM) *
the attachment in the first post worked fine for me.

Shane, would you share the source code ?



PM me your email address and i'll send it to you.

For those having trouble downloading this, PM me your address and i'll send it to you also.



PS: Sorry to those that PM'd me last year. I totally forgot about this post and havent checked my msg's for a while.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.