# 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-13 — Server Web UI shows raw coordinates instead of geocoded location on trips - **Status**: `IN PROGRESS` - **Reported**: 2026-08-12 - **Affected trips**: 18517, 18516 (and possibly others) - **Symptom**: The trip detail/replay page shows raw (x, y) coordinates instead of reverse-geocoded location names (street/city/address). - **Root cause**: Server `_geocode_cached()` returned `None` when both Nominatim and reverse_geocoder failed to produce a label. The `/api/geocode` endpoint then returned HTTP 204 with no body. The frontend JS treated 204 as success, called `r.json()` on empty body → threw → showed raw-coordinate fallback. The Pi version always returned a label string (with coordinate fallback) and never 204. - **Fix**: - Server `_geocode_cached()` now always returns a non-empty string — coordinate fallback (`lat, lon`) when both geocoders fail, matching Pi behavior. - Server `/api/geocode` always returns HTTP 200 with `{label: "..."}` (never 204). - Server `/api/geocode/batch` always includes every coord key in the result dict. - Server Nominatim call now uses `jsonv2` + `accept-language=en` (aligned with Pi). - Server reverse_geocoder now uses `mode=1` (aligned with Pi). - Pi `_geocode_cached()` now checks for empty reverse_geocoder label before returning (same guard the server has), falling through to coordinate string. --- ## Resolved ### BUG-01 — WiFi/hotspot unreachable from phone while cell data is on - **Status**: `CLOSED` 2026-08-11 - **Fix**: Dual-radio — wlan0="yaris 911" at 10.42.0.1 (password "yaris911!"), wlan1=uplink. Never touches wlan0. Phone-hotspot auto-connect on wlan1 within ~60s, falls back to home-wifi. Settings page shows in-car access card. - **Verification**: iOS + Android connect to AP, `yaris.local` resolves. Phone-hotspot uplink tested: auto-connects when hotspot enabled, falls back when disabled. wlan0 AP stays up throughout. ### BUG-02 — Micro-USB power port on the Pi is physically damaged - **Status**: `CLOSED` 2026-08-11 - **Fix**: Hard-wired 5V/GND directly to GPIO header — red to Pin 2 (5V), black to Pin 6 (GND), bypassing the worn micro-USB port. - **Verification**: `vcgencmd get_throttled` returns `0x0` — no undervoltage, no throttling. Pi runs at full 1.2 GHz. GPS has fix. ### 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-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. `_to_tz_aware()` in `app_upload.py` converts naive SQLite timestamps to TZ-aware ISO before upload (`2026-08-10 19:27:30` → `2026-08-10T19:27:30-04:00`). 2. One-time SQL migration on Unraid: shifted 3,593 tracking rows +4h EDT, cleared deleted-trip markers, recomputed 43 trips from corrected data. - **Verification**: Server trips now show Aug 10 at 7:27 PM / 7:58 PM (was 3:27 / 3:58). ### BUG-12 — Dashboard OBD shows "—" while Status page shows correct OBD state - **Status**: `CLOSED` 2026-08-11 - **Commit**: `91281b1` - **Fix**: Added `/api/obd/status` endpoint. Dashboard calls `refreshObdStatus()` on load + every 15s. Socket events still update in real-time. Side fix: `Number()` wrap on API string lat/lon prevents crash. Socket `gps_location` now passes lat/lon to `renderGpsStatus` (`a4a92cc`). - **Verification**: Dashboard shows "Adapter only" matching Status page. GPS lat/lon display correctly. Confirmed on live Pi. ### BUG-02 — Micro-USB power port on the Pi is physically damaged - **Status**: `CLOSED` 2026-08-11 - **Fix**: Hard-wired 5V/GND directly to GPIO header — red to Pin 2 (5V), black to Pin 6 (GND), bypassing the worn micro-USB port. - **Verification**: `vcgencmd get_throttled` returns `0x0` — no undervoltage, no throttling. GPS has fix. Pi runs at full 1.2 GHz. ### 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/`, 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.