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!
