I am trying to build a dash cam, and I am trying wrap my head around getting my rpi powered by my car and it knowing when to shutdown safely and start up?
My current scenario is, I put key in my car, and turn a little bit, electronics turn on (stereo etc), then I go to start ignition, electronics turn off briefly then come back on after the car is running.
I am thinking maybe I can use a battery pack for a cell phone, for that pause of power... but if its connected to a battery pack, when the system is "shutdown" (sudo halt), does it pull power from the pack? Will it know to turn on in the first place if the pack is connected to the car's cigar plug through a 5v adapter?
Second problem, safe shutdown. I turn off my car, now the battery pack is powering my rpi, how does my rpi know to begin safe shutdown once the car is off?
I've been looking around for tutorials for this, as there must be tons of car rpi owners.. but I can't find anything tackling these issues.