This project reads OBD2 values from a WiFi ELM327 adapter and shows them on a custom dashboard.
- The Raspberry Pi screen shows a fullscreen dashboard automatically at boot.
- The same data is available on your smartphone from the Pi web server.
- Works on Raspberry Pi OS Lite (32-bit) with Python.
- Pi connects to OBD adapter WiFi (
wlan0). - Python backend polls OBD2 PIDs over TCP (
app/telemetry.py). - Backend serves live state via HTTP API (
/api/state). - Dashboard web UI (local kiosk + phone browser) polls API and renders stats.
Use two WiFi interfaces:
wlan0: OBD adapter connection.wlan1(USB dongle): hotspot for your phone.
See docs/network_setup.md for full setup.
app/
config.py
telemetry.py
server.py
static/
index.html
styles.css
app.js
scripts/
start-kiosk.sh
systemd/
pidash.service
pidash-kiosk.service
docs/
network_setup.md
run.py
cd /home/pi/tacho
bash install.shThis installs packages, creates .venv, installs Python deps, installs/enables systemd services, and starts the dashboard.
You still need to verify .env (especially OBD_HOST and OBD_PORT).
- Install packages:
sudo apt update
sudo apt upgrade -y
sudo apt install -y git python3-venv python3-pip curl xserver-xorg xinit openbox chromium || sudo apt install -y git python3-venv python3-pip curl xserver-xorg xinit openbox chromium-browser- Create virtual env and install Python deps:
cd /home/pi/tacho
python3 -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt
cp .env.example .env- Edit
.envvalues:
OBD_HOST=192.168.0.10
OBD_PORT=35000
POLL_INTERVAL=0.40
RECONNECT_DELAY=3.0
HTTP_HOST=0.0.0.0
HTTP_PORT=8080
SIMULATE=false- Make kiosk script executable:
chmod +x /home/pi/tacho/scripts/start-kiosk.sh- Install systemd services:
sudo cp /home/pi/tacho/systemd/pidash.service /etc/systemd/system/pidash.service
sudo cp /home/pi/tacho/systemd/pidash-kiosk.service /etc/systemd/system/pidash-kiosk.service
sudo systemctl daemon-reload
sudo systemctl enable pidash pidash-kiosk
sudo systemctl start pidash pidash-kiosk- Check service status:
systemctl status pidash --no-pager
systemctl status pidash-kiosk --no-pagerWhen the car powers the Pi:
- Pi boots.
pidashbackend service starts.pidash-kioskstarts Chromium fullscreen on HDMI.- Dashboard appears automatically.
- Same network:
http://<PI-IP>:8080 - Pi hotspot setup:
http://192.168.50.1:8080
Set in .env:
SIMULATE=trueRestart services:
sudo systemctl restart pidash pidash-kioskjournalctl -u pidash -f
journalctl -u pidash-kiosk -fUse this as an auxiliary display only. Mount hardware securely and avoid interacting with the dashboard while driving.