RoadApplePi is a simple to install system for your Raspberry Pi designed to record dashcam videos and engine information from your car in real-time, and then make it all accessable from an easy-to-use Web App that can be viewed on your smartphone or computer.
Demonstration video: https://www.youtube.com/watch?v=-G1HIgr2cvU
RoadApplePi is designed to work with as little or much as you have. Bare minimum, you'll need - A Raspberry Pi. Any model will work, but the RPi Zero W or RPi 3 is recommended since they have Bluetooth and WiFi built in. Otherwise, a USB Bluetooth/WiFi dongle is required - Side note: This software was developed almost entirely on a RPi Zero W with few issues. However, due to the slow processor on this model, some things run slow. The Real-Time dashboard runs around 15 seconds behind, and loading the instrument cluster on recorded videos may take 20-30 seconds (after which, they play fine). If you're opting to use a slower model, I recommend doing the initial setup of a spare Raspberry Pi 2/3 to speed up the software compilation process. After that, the SD Card can be moved to your pi of choice - Class 10 SD Card with Raspbian Stretch (optionally, the lite flavor): This software was written to work on Raspbian Stretch, but it may work on other OSs. YMMV. Also, I recommend using at least a 16GB SD Card to give you enough space for your dashcam recordings. I've been using the same 32GB SD Card for the past 6 months with no issues. This gives me enough space to retain, on average, 3 weeks of recordings. If you need help setting up an SD Card with Raspbian, see here. - A Webcam: All development was done with an old USB webcam, but any webcam should work including Raspberry Pi-specific ones - A power source: Powering the beast is the trickiest part of the whole build. If you're just getting started, I'd recommend a 2A car phone charger with a micro USB cable to power the Pi. This won't automatically/cleanly power off your Pi, but it'll get it powered until you have a better solution in place. See "Power and Time Options" for more details. - Bluetooth ELM327 OBDII adapter (optional) While technically optional, a Bluetooth ELM327 adapter is required to record engine information. They're around $10 on Amazon and completely worth the price.
sudo apt update && sudo apt install git
git clone https://github.com/JVital2013/RoadApplePi
cd RoadApplePi
./setup.sh
sudo reboot
The setup script may take several hours to run, depending on your Raspberry Pi modelhttp://raspberrypi/.
--Note: Your device hostname can be changed by running sudo raspi-config on your pi. I've changed mine to "roadapplepi". A feature to change this from the web app will be added in the futurehttp://raspberrypi/ (or other hostname if you changed it). From the settings menu, pair your pi with the OBDII reader. Most of them use "1234" for the PIN.If you've made it to this point, great! You should have a fully functional black box in your car. However, you have most likely run into two issues
To solve both of these issues, there are two solutions that I recommend
Out of the two, this is the simplest option, although it requires two components. The Mausberry Circuits 3A Car Supply (https://mausberry-circuits.myshopify.com/collections/frontpage/products/3a-car-supply-switch-1) performs two functions: it steps the car voltage down to a Pi-Friendly level, and gracefully shuts the Pi down automatically when the car powers off. On their web site, they mention wiring the device into your battery and ignition. Don't fret, you don't need to go to this extreme: you can use fuse taps to tap an always-on line, and an ignition-powered line in your fusebox. For more details on this, take a look at the SleepyPi 2 option.
Unfortunately, the Mausberry power supply does not contain an RTC, so you'll need to purchase one separately (unless you don't care about incorrect times). For more information, see https://cdn-learn.adafruit.com/downloads/pdf/adding-a-real-time-clock-to-raspberry-pi.pdf.
Fair warning, I haven't actually tried this, but it should work fine.
Although this option is more complicated in initial setup compared to the Mausberry, it's the path I opted for and I've had great success. The SleepyPi 2 (https://spellfoundry.com/product/sleepy-pi-2/) is inherently an Arduino-based "Hat" for the Raspberry Pi that can be programmed as needed. Out-of-the-box, the SleepyPi 2 performs 2 functions that we care about: voltage transformation to Raspberry Pi friendly voltages, and an easy-to-configure RTC. However, it does not automatically power off the Pi when the car is switched off.
- It must be programmed to do this. I've already modified one of Spell Foundry's example programs to do just this, and is the RoadApplePi.ino file in this repository. To flash this sketch onto your Sleepy Pi, see https://spellfoundry.com/sleepy-pi/programming-arduino-ide/.
- You need to build a voltage divider for the program to be able to properly read the current power status of the car. Thanks to Spell Foundry, here's the voltage divider you need to build:

You can build this circuit on whatever you would like, but I used a solderable breadboard. For those less well-versed in reading schematics, here's a quick explanation of what you're doing
- (Not shown in this schematic) Wire an always-hot line from your fuse box to the VIN of the SleepyPi
- Wire an ignition-dependent line into the voltage divider (signified by the 14.4V in the diagram)
- Wire a ground wire from your car into both the voltage divider (very bottom of the diagram) and the 0V part of the power input on the SleepyPi.
- The outputs of the voltage divider are on the right of the diagram. If you're using my SleepyPi sketch, wire the 3.09V output into Pin 14 of the Sleepy Pi, and the 0V output to the SleepyPi's GND
- Once assembled, you're left with a 3-layer sandwich: your raspberry pi, the sleepy pi, and your voltage divider. Here's what mine looks like installed in my car:

RoadApplePi is released under the GPLv3. For more information, see COPYING
The following software has made RoadApplePi possible - FFMpeg (https://www.ffmpeg.org/). Licensed under LGPL - JustGage (http://justgage.com/). Licensed under the MIT License - localForage (https://localforage.github.io/localForage/). Licensed under the Apache License - Open Sans (https://fonts.google.com/specimen/Open+Sans). Licensed under the Apache License
Special thanks to Zipcar for making the dream possible! I'd been playing with the idea for this project for quite some time, when on March 14, 2017, Zipcar ran a competition to give away 314 Raspberry Pi Zero Ws. I was a lucky winner with this idea. Thanks to this stroke of luck, I've been able to share this fun project with you all.
Also, extra special thanks to my wife, who put up with me shoving this project under her nose every time I made a tiny bit of progress.
If you really like this project and want to give back, donations are accepted!
$ claude mcp add RoadApplePi \
-- python -m otcore.mcp_server <graph>