Counterfeit ELM327 chips (common in cheap PL2303 USB adapters) often report bad/zero voltage even when the OBD connection is working. python-obd's check_voltage=True default rejects these. Add OBD_SKIP_VOLTAGE_CHECK=1 env var to pass check_voltage=False to obd.OBD(), documented in yaris-obd.service. Also document Phase 24.6 Yaris 2013 compatibility analysis in PLAN.md. Co-authored-by: Copilot <[email protected]>
35 lines
1.4 KiB
Desktop File
35 lines
1.4 KiB
Desktop File
[Unit]
|
|
Description=Yaris OBD/GPS tracker web UI
|
|
After=network-online.target
|
|
Wants=network-online.target
|
|
|
|
[Service]
|
|
Type=simple
|
|
User=yaris
|
|
Group=yaris
|
|
WorkingDirectory=/home/yaris/app/yaris-obd
|
|
# Unbuffered stdout so print() diagnostics (GPS/GNSS status, etc.) actually reach
|
|
# the log file promptly instead of sitting in Python's stdout buffer indefinitely
|
|
# when it's redirected to a file instead of a TTY.
|
|
Environment=PYTHONUNBUFFERED=1
|
|
# Once OBD is confirmed working on this car, pin the protocol to skip the
|
|
# 3-5s auto-detect probe on every ignition-on: e.g. OBD_PROTOCOL=6 for
|
|
# ISO 15765-4 CAN 11-bit 500kbps (correct for 2013 Toyota Yaris).
|
|
# Leave unset during initial setup so auto-detect can find the right value.
|
|
#Environment=OBD_PROTOCOL=6
|
|
# If the cheap ELM327 adapter reports bad voltage and fails to connect,
|
|
# set this to 1 to skip the voltage check (common with counterfeit ELM chips).
|
|
#Environment=OBD_SKIP_VOLTAGE_CHECK=1
|
|
ExecStart=/home/yaris/app/yaris-obd/venv/bin/python app.py
|
|
Restart=on-failure
|
|
RestartSec=5
|
|
# Give the app a few seconds after boot for USB/serial devices to enumerate
|
|
# before the first connection attempt - it retries gracefully either way,
|
|
# but this avoids needless noisy "no connection" logs on every cold boot.
|
|
ExecStartPre=/bin/sleep 5
|
|
StandardOutput=append:/home/yaris/app/yaris-obd/yaris-obd.log
|
|
StandardError=append:/home/yaris/app/yaris-obd/yaris-obd.log
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|