Files
yaris-obd/readme.md
T
Mathieu MoranandCopilot 261ef3f4db Revive yaris-obd: USB OBD adapter, real GPS/GNSS, offline map, hotspot, SQLite logging, dashcam retrieval
Squashed rewrite of the project revival work (replaces prior history on this
branch to remove personal data that had been accidentally committed - real
LAN IP, GPS coordinates, home WiFi SSID, and phone model). See PLAN.md for
full phase-by-phase details. Summary:

- Phase 2: adapt app_obd.py for a USB OBD-II adapter (was Bluetooth-only),
  auto-detect /dev/ttyUSB*, fix several pre-existing crash bugs.
- Phase 3/4: make the web UI work fully offline (vendored Socket.IO/Leaflet/
  Chart.js/FontAwesome, offline map tile downloader script, live GPS marker
  tracking fix).
- Phase 5: systemd deployment/autostart on the Pi.
- Phase 6: WiFi hotspot mode via NetworkManager (auto-switch between home
  WiFi and a local AP for in-car web UI access), mDNS hostname + port 80
  redirect so the UI is reachable at a plain hostname with no port number.
- Phase 7: fix app_db.py/app_sql.py bugs, wire up local SQLite trip logging.
- Phase 8: brand-agnostic USB dashcam file retrieval (lsblk transport-based
  detection, works with any dashcam brand/folder layout).
- Rewritten readme.md with a proper project overview.

Co-authored-by: Copilot <[email protected]>
2026-08-08 18:01:35 -04:00

74 lines
2.9 KiB
Markdown

# yaris-obd 🚗📡
A Raspberry Pi 3-based OBD-II + GPS tracker for my 2013 Toyota Yaris — reads live vehicle data
over USB, tracks position with a SIM868 GNSS/GSM HAT, and serves it all from a local web UI you
can pull up on your phone by connecting to the car's own WiFi hotspot. Fully usable offline: no
internet needed in the car, offline map tiles included. Also handles pulling dashcam footage off
a USB dashcam for local/remote backup.
<table>
<tr>
<td width="120">
<a href="https://open.spotify.com/playlist/5u9vSw39FrIz7KghBkmgH4">
<img src="https://image-cdn-fa.spotifycdn.com/image/ab67706c0000d72c979ac180a23a70139d1ebd81" width="100" />
</a>
</td>
<td>
**rené lévesque bangers**
i have a dream
[![Listen on Spotify](https://img.shields.io/badge/Listen_on-Spotify-1DB954?style=for-the-badge&logo=spotify&logoColor=white)](https://open.spotify.com/playlist/5u9vSw39FrIz7KghBkmgH4)
</td>
</tr>
</table>
## Screenshot
![UI](https://github.com/quoije/yaris-obd/blob/698adee41532fed0ba1a7fe0ab83b26d569764cb/pics/ui.png)
## Features
- 📊 **Live OBD-II data** (speed, RPM, DTC codes) over a cheap USB ELM327-compatible adapter
- 🛰️ **Real GPS tracking** via a Waveshare SIM868 GNSS/GSM/Bluetooth HAT, plotted live on an
offline Leaflet map (pre-cached map tiles — no internet needed in the car)
- 📶 **Self-hosted WiFi hotspot** so you can load the web UI on your phone from inside the car,
with automatic fallback to your home WiFi when in range (`http://yaris.local` — no port number)
- 🎥 **Dashcam file retrieval** — detects a USB dashcam automatically (any brand/folder layout,
no hardcoded device path) and copies its footage locally
- 🗄️ Local SQLite trip logging, with an optional MongoDB remote sync path
- 🔌 Runs fully headless as a `systemd` service, autostarting on boot
## Hardware
| Part | Notes |
| --- | --- |
| Raspberry Pi 3 Model B | Web UI host + hotspot |
| Waveshare SIM868 HAT | GNSS (GPS) + GSM/GPRS, unused Bluetooth |
| USB OBD-II adapter | PL2303-based, ELM327-compatible (originally Bluetooth, switched to USB) |
| USB dashcam | Any brand — detected as generic USB mass storage |
| 2013 Toyota Yaris | The patient |
See [PLAN.md](./PLAN.md) for full hardware bring-up notes (SIM868 jumper/UART setup, antenna
gotchas, etc.) and the detailed project history.
## Getting started
```bash
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python3 app.py
```
The app serves on `http://<host>:5000`. On the Pi it also runs as a `systemd` service
(see [deploy/](./deploy)) and is reachable with no port number at `http://yaris.local` once the
mDNS + port-redirect setup described in [PLAN.md](./PLAN.md) is installed.
## Project status
This project was revived after a couple of years on the shelf. Progress is tracked phase-by-phase
in [PLAN.md](./PLAN.md) — currently through **Phase 8** (dashcam retrieval), with the remote
server/upload phase still to come.