Files
yaris-obd/BUGS.md
T

6.3 KiB
Raw Blame History

yaris-obd Bug Tracker

Standalone bug/issue tracker. One ## BUG-XX per issue. Numbering sequential. Status: OPEN → IN PROGRESS → CLOSED (with commit ref + verification). When CLOSED, move the entire entry to Resolved — don't duplicate.


Open bugs

BUG-01 — WiFi/hotspot unreachable from phone while cell data is on

  • Status: IN PROGRESS (AP tested, phone-hotspot uplink awaits test)
  • Fix applied: Dual-radio — wlan0="yaris 911" at 10.42.0.1 (password "yaris911!"), wlan1=uplink. AP verified: iOS + Android connect, yaris.local resolves.
  • Test steps for phone-hotspot uplink:
    1. Settings → "Phone hotspot internet" → enter hotspot name + password → Save
    2. Click "Wait for hotspot" (or wait ~60s for auto-detect)
    3. Turn on phone hotspot → Pi should auto-connect on wlan1
    4. Check Settings: mode should show "Phone hotspot", internet reachable
    5. Turn off phone hotspot → Pi falls back to home-wifi
    6. Verify wlan0 AP stays up throughout (connect another device to confirm)

BUG-02 — Micro-USB power port on the Pi is physically damaged

  • Status: OPEN
  • Severity: Hardware
  • Area: Hardware / power
  • Phase: Phase 26
  • Symptom: Pi's micro-USB 5V connector is worn — unreliable under vibration.
  • Fix scope: Owner hard-wires 5V/GND to GPIO header (pins 2/4 for 5V).

BUG-06 — Server timestamps are shifted (naive local time stored as UTC)

  • Status: CLOSED 2026-08-11
  • Commit: 7ce2a1e (upload fix), manual migration on server
  • Fix:
    1. New _to_tz_aware() helper in app_upload.py converts naive SQLite timestamps to timezone-aware ISO strings before upload (e.g., 2026-08-10 19:27:30 → 2026-08-10T19:27:30-04:00). Already-aware timestamps pass through unchanged.
    2. One-time SQL migration on the Unraid server shifted all existing tracking_points.recorded_at and trips.start_time/end_time by +4 hours (EDT), cleared deleted-trip markers, and recomputed all trips. Result: 3593 tracking rows and 43 trips corrected.
  • Verification: Server trip history now shows Aug 10 trips at 7:27 PM and 7:58 PM (was 3:27 PM / 3:58 PM). Confirmed 2026-08-11.

BUG-12 — Dashboard OBD shows "—" while Status page shows correct OBD state

  • Status: CLOSED 2026-08-11
  • Commit: 91281b1
  • Symptom: Dashboard OBD card showed "—" (blank) even though the Status page correctly reported adapter present at /dev/ttyUSB0 (disconnected from car).
  • Root cause: Dashboard relied solely on Socket.IO obd_status events. If the page loaded after the initial event fired, the card stayed at the HTML default. Status page queried _obd_status() directly.
  • Fix: Added /api/obd/status endpoint. Dashboard calls refreshObdStatus() on load + every 15s. Socket events still update in real-time.
  • Side fix: renderGpsStatus() crashed on status.latitude.toFixed because the API returns lat/lon as strings — fixed with Number() wrapper.
  • Verification: Dashboard shows "Disconnected" matching Status page. GPS no longer crashes. Confirmed on live Pi 2026-08-11.

Resolved

BUG-03 — DTC/MIL codes never persisted

  • Status: CLOSED 2026-08-11
  • Commit: e2f2314
  • Fix: save_dtc_state() persists MIL+codes each poll. /api/dtc falls back to get_persisted_dtc_state() when OBD offline. Cleared codes tracked via IS_SET timestamps.
  • Verification: Deployed to Pi, /api/dtc returns persisted snapshot, stats show active_dtc: 0.

BUG-04 — Server merges two trips into one

  • Status: CLOSED 2026-08-11
  • Commit: 96fb897
  • Fix: Replaced time-gap splitting with Pi's motion-aware logic: OBD > 1 km/h primary, GPS >= 8m × 3 consecutive fallback, 5-min inactivity gap.
  • Verification: Server trips cleared + recomputed. 17 trips on both Pi and server.

BUG-05 — Server route replay speed_source always "gps"

  • Status: CLOSED 2026-08-11
  • Commit: e2f2314
  • Fix: "obd" if speed > 0 else "gps" matching Pi logic.
  • Verification: Docker rebuild, /health OK LAN + Cloudflare.

BUG-11 — Dashboard GPS shows "Stale fix" while Status shows "Live fix"

  • Status: CLOSED 2026-08-11
  • Commit: 9733036
  • Fix: renderGpsStatus() now reads status.latitude/status.longitude from the /api/gps/status response (not just socket events). Status page now uses the same 30s staleness threshold (fix_age_seconds > 30 → "Stale fix") instead of calling any fix "Live" regardless of age.
  • Verification: Deployed to Pi, dashboard GPS card now shows lat/lon coordinates even when fix is stale. Both pages agree on fix status.

BUG-07 — Trip replay on portal sometimes does nothing

  • Status: CLOSED 2026-08-11
  • Commit: fa93384
  • Fix: Full rewrite of static/js/history.js: unified AbortController cancels fetch
    • all downstream rendering on trip switch; 300ms debounce prevents double-tap stacking; loading spinner on map + .table-active row highlight give clear feedback; geocode preload starts immediately before map rendering so cache is warm for the scrubber; signal.aborted guards after every async step (route build, fitBounds, timeline init).
  • Verification: Deployed to Pi and server. Rapid trip-switching no longer freezes. Verified on both platforms 2026-08-11.

BUG-08 — No trip deletion on local Pi

  • Status: CLOSED 2026-08-11
  • Commit: c5c478b
  • Fix: deletable macro, window.confirmDelete, DELETE /api/trip/<id>, configurable data-delete-url in shared history.js. Raw tracking preserved.
  • Verification: Trip 1967 deleted (18→17 trips), 2028 tracking rows preserved.

BUG-09 — Server trip scrubber geocoding is slow

  • Status: CLOSED 2026-08-11
  • Fix: preloadGeocodes() batch-fetches all unique coords (concurrency 4) on trip load. geocodePoint() checks in-memory cache first.
  • Verification: preloadGeocodes present in history.js on both Pi and server Docker container.

BUG-10 — GPS-only false trips when car not connected

  • Status: CLOSED 2026-08-11
  • Fix: _car_ever_connected flag in app_obd.py. build_trip_summaries() returns empty list when car was never connected.
  • Verification: Pi bench-test shows 0 trips. No OBD = no GPS-only trips.