Commit Graph
129 Commits
Author SHA1 Message Date
Mathieu Moran f6a50b6bc1 docs: BUG-06 closed — migration shifted 3593 rows +4h EDT, recomputed 43 trips, times now correct 2026-08-11 14:53:18 -04:00
Mathieu Moran 7ce2a1e5f5 fix: BUG-06 — convert naive Pi timestamps to TZ-aware before upload so Postgres TIMESTAMPTZ stores correct instant 2026-08-11 14:47:37 -04:00
Mathieu Moran 7a6de8b589 docs: BUG-07 closed — history.js rewrite verified on Pi and server 2026-08-11 14:33:38 -04:00
Mathieu Moran fa93384a8e Rewrite history.js: loading spinner, active-row highlight, unified state, 300ms debounce, signal guards throughout trip loader 2026-08-11 05:37:15 -04:00
Mathieu Moran e6bc488e84 docs: update Phase 26 with dual-radio + trip fix details 2026-08-11 03:57:06 -04:00
Mathieu Moran ae7f6358b2 docs: update BUG-01 dual-radio fix status 2026-08-11 03:46:18 -04:00
Mathieu Moran f9d967e71c docs: update Phase 26 bug count in PLAN.md 2026-08-11 03:02:02 -04:00
Mathieu Moran f7d305a036 docs: update Phase 26, simplify readme project status, de-emoji 2026-08-11 02:57:01 -04:00
Mathieu Moran e733ab1ac1 docs: update Phase 26 progress, de-emoji readme, refresh status 2026-08-11 02:50:57 -04:00
Mathieu Moran 786d5b8f3e docs: close BUG-03/05, add Phase 27 features + renumber Android to Phase 28 2026-08-11 02:04:55 -04:00
Mathieu Moran aa1f247d80 docs(bugs): record Phase 26 deploy/verify status for BUG-03 and BUG-05
Amend the Phase 26 progress note: BUG-03 was deployed to the Pi (pulled to
4f975ad, service active, /api/health ok) and real in-car behavior verification
is still pending; BUG-05 is code-ready but the unraid/server side is not yet
deployed (needs docker compose build api && docker compose up -d api).
2026-08-11 01:23:39 -04:00
Mathieu Moran 4f975ad079 docs(bugs): mark BUG-03 and BUG-05 FIXED (e2f2314) + update PLAN Phase 26
BUGS.md: BUG-03 and BUG-05 status -> FIXED with commit ref and fix summary.
PLAN.md: Phase 26 items 3 and 5 marked FIXED; add progress note.
2026-08-11 00:48:05 -04:00
Mathieu Moran 3e626830d5 docs: sign off Phase 25 road test, add BUGS.md, renumber Android to Phase 27 2026-08-10 23:42:39 -04:00
Mathieu MoranandCopilot d216aac97e Refresh docs and reorder roadmap
Co-authored-by: Copilot <[email protected]>
2026-08-10 18:48:59 -04:00
Mathieu MoranandCopilot 457e3dcc08 Record dashboard card order swap
Co-authored-by: Copilot <[email protected]>
2026-08-10 18:43:46 -04:00
Mathieu MoranandCopilot 6ee6215662 Record status action verification
Co-authored-by: Copilot <[email protected]>
2026-08-10 18:41:34 -04:00
Mathieu MoranandCopilot 8907c51016 Add status page quick actions
Co-authored-by: Copilot <[email protected]>
2026-08-10 18:40:22 -04:00
Mathieu MoranandCopilot ef38ec92b4 Record status page verification
Co-authored-by: Copilot <[email protected]>
2026-08-10 18:38:16 -04:00
Mathieu MoranandCopilot 5406935bf5 Add Pi status page
Co-authored-by: Copilot <[email protected]>
2026-08-10 18:37:26 -04:00
Mathieu MoranandCopilot a7302229d1 Tighten Pi dashboard layout
Co-authored-by: Copilot <[email protected]>
2026-08-10 18:25:30 -04:00
Mathieu MoranandCopilot f6de658a88 docs: record live Pi GPS status check
- note that GPS thread is alive on the Pi but has no current fix
- clarify that missing live updates are currently due to absent GNSS fix data

Co-authored-by: Copilot <[email protected]>
2026-08-10 18:18:50 -04:00
Mathieu MoranandCopilot be40bbc15f feat: add GPS status endpoint and dashboard indicator
- add /api/gps/status for thread/fix-age visibility
- surface GPS status in Pi health and live GPS cards
- add tests for app_gps status snapshots

Co-authored-by: Copilot <[email protected]>
2026-08-10 18:18:14 -04:00
Mathieu MoranandCopilot 675bffb4a4 feat: add server-side device deletion
- add portal API and UI action to delete non-default devices
- protect the configured portal default device from deletion
- document that trip/history pages still scope to the single DEVICE_NAME

Co-authored-by: Copilot <[email protected]>
2026-08-10 18:09:15 -04:00
Mathieu MoranandCopilot 690cf0a5d4 docs: record live Phase 25.5c deployment validation
- mark Phase 25.5c complete in PLAN
- record unraid migration/deploy and Pi API smoke tests
- note sync-ack metadata and temp provisioning helper validation

Co-authored-by: Copilot <[email protected]>
2026-08-10 18:05:39 -04:00
Mathieu MoranandCopilot ba682fbf3a feat: add multi-device provisioning and local remote-config UI
- add multi-device portal device management, key rotation, and sync request APIs
- add Pi settings UI for remote server URL, device name, and API key
- add local test-connection and sync-now actions
- make upload and config sync reuse dynamic shared credentials
- add Phase 25.5c migration and docs updates

Co-authored-by: Copilot <[email protected]>
2026-08-10 18:02:09 -04:00
Mathieu MoranandCopilot fbc41a5db5 docs: record live Phase 25.5b sync verification
- update plan with live portal route deployment status
- document fixed Pi sync blockers and successful round-trip test
- refresh passing test count after runtime sync coverage additions

Co-authored-by: Copilot <[email protected]>
2026-08-10 17:48:42 -04:00
Mathieu MoranandCopilot a114939914 fix: authenticate device config sync like upload client
- send X-Device-Name and X-Api-Key to /api/device-config
- require YARIS_DEVICE_NAME alongside shared upload creds
- fix server create_device output to match actual Pi env names
- document shared upload/config sync credential requirements

Co-authored-by: Copilot <[email protected]>
2026-08-10 17:42:40 -04:00
Mathieu MoranandCopilot 5a5058adca fix: reuse upload credentials for device config sync
- load server sync creds from db/upload_creds.env like uploads do
- fall back from YARIS_DEVICE_KEY to existing YARIS_API_KEY
- document shared credential flow for server-synced identity
- add test coverage for sync credential fallback

Co-authored-by: Copilot <[email protected]>
2026-08-10 17:37:52 -04:00
Mathieu MoranandCopilot 585da18225 feat: add remote device settings portal and Pi hot reload
- add /settings/device portal page and portal device-config GET endpoint
- add portal navigation and client-side device settings editor UI
- hot-reload Account/Car display config after local saves and server syncs
- document portal workflow and Phase 25.5b completion
- add runtime reload tests for account, car, and sync callback

Co-authored-by: Copilot <[email protected]>
2026-08-10 17:34:22 -04:00
Mathieu MoranandCopilot c4ccc3efb9 docs: record verified Pi and unraid deployment state
- note verified Pi IP after WiFi card change
- record successful 2026-08-10 Pi/unraid rollout
- document unraid checkout divergence and temp-clone deploy workaround

Co-authored-by: Copilot <[email protected]>
2026-08-10 17:26:17 -04:00
Mathieu MoranandCopilot cd004fbdde fix: wire Phase 25.5a deploy docs and sync connectivity
- use app_network status for device sync connectivity checks
- mount migrate_phase25_5a.sql in server docker compose
- document manual server upgrade migration steps
- record verified Pi and unraid SSH access details in PLAN

Co-authored-by: Copilot <[email protected]>
2026-08-10 17:22:02 -04:00
Mathieu MoranandCopilot 0bda44a7bc Phase 25.5a: Server-side device config API and Pi sync thread
- Created app_device_sync.py: background sync thread with connectivity-driven scheduling (5min online, 60sec backoff when offline)
- Server /api/device-config endpoints: GET for Pi device auth, POST for admin user auth
- Database migration adds config_version, owner_name, car_model, device_name, avatar_path to devices table
- Pi syncs config from server on network availability; offline-first design (loads from local JSON at startup)
- Settings UI fields read-only when server sync enabled

All 63 tests passing. Ready for testing with actual server connection.

Co-authored-by: Copilot <[email protected]>
2026-08-10 17:17:04 -04:00
Mathieu MoranandCopilot ed78700005 docs: update Phase 25.5 to reflect settings UI implementation
- Settings UI now implemented for device config editing
- Sync toggle blocks field edits when enabled
- All behaviors tested and verified on Pi
- Phase 25.5a will add server-side config endpoints and connection-driven sync

Co-authored-by: Copilot <[email protected]>
2026-08-10 16:44:03 -04:00
Mathieu MoranandCopilot c65a635906 implement: Phase 25.5 device config from JSON file
- Create config/device.json with owner_name, car_model, device_name, avatar_path
- Update app_account.py to load owner_name and avatar_path from config
- Update app_car.py to load car_model and device_name from config
- Update base.html template to use avatar_path from config instead of hardcoded
- Add graceful fallback to hardcoded defaults if config file missing
- Document in deploy/readme.md and readme.md how to customize device identity
- Update PLAN.md Phase 25.5 to reflect current implementation and future server sync

Benefits:
- No code edits needed to customize Pi (edit JSON file only)
- Offline-first: all values loaded from local file at startup
- Connection-driven sync planned for Phase 25.5a (sync when internet available, not on timer)
- Server becomes source of truth after Phase 25.5a implementation

All 63 tests passing. Database filename still based on owner_name, with migration warning in docs.

Co-authored-by: Copilot <[email protected]>
2026-08-10 16:31:59 -04:00
Mathieu MoranandCopilot 69beb07430 docs: add Phase 25.5 device config sync plan
Plan for replacing hardcoded user/car/avatar with managed server-synced configuration, enabling multi-device and zero-code-edit deployment scenarios.

Co-authored-by: Copilot <[email protected]>
2026-08-10 16:21:49 -04:00
Mathieu MoranandCopilot ae0bcc7ea8 Add fresh-Pi deploy guide and uplink consistency fixes
- add deploy/readme.md with full fresh install + quick bootstrap block
- update README with deploy guide link and hardware photo
- fix app_network interface detection for wlan1-first setup
- make dispatcher hook handle wlan0 and wlan1
- update PLAN.md with Phase 24.8 completion notes

Co-authored-by: Copilot <[email protected]>
2026-08-10 15:54:36 -04:00
Mathieu MoranandCopilot a7ab088cf5 docs: update PLAN.md and readme for phases 24.5-24.7
- PLAN.md: add Phase 24.7 section (diagnose.sh, map tile fixes, app.py cleanup)
- readme.md: update project status to reflect phases 24-24.7 complete,
  add remote portal to features list, add diagnostics/recovery section

Co-authored-by: Copilot <[email protected]>
2026-08-10 05:55:37 -04:00
Mathieu MoranandCopilot c03cd6d48d fix: add OBD_SKIP_VOLTAGE_CHECK support for clone ELM327 adapters
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]>
2026-08-10 05:26:40 -04:00
Mathieu MoranandCopilot a56e4252d3 docs: document Phase 24.5 code audit in PLAN.md
Co-authored-by: Copilot <[email protected]>
2026-08-10 05:17:32 -04:00
Mathieu MoranandCopilot f30143c7b7 docs: document Phase 24 bug fixes and UI polish in PLAN.md
Co-authored-by: Copilot <[email protected]>
2026-08-10 05:07:20 -04:00
Mathieu MoranandCopilot c4dfcbaf25 Phase 24: remote trip + dashcam portal
- Add Flask-Login browser session auth (separate from device X-Api-Key auth)
  - modules/user_auth.py: User model, require_login decorator, bcrypt helpers
  - /login with CSRF token, /logout
  - scripts/create_user.py to provision admin user

- Add server-side trip computation from tracking_points
  - db.compute_trips_for_device(): gap > 5 min = new trip, haversine distance,
    upserts into trips table, auto-triggered in bg thread after each upload batch
  - db.list_trips(), db.get_trip_route(): same JSON shape as Pi API
  - db.get_overview_stats(): aggregated totals for overview page
  - db.list_dashcam_files(), db.get_dashcam_file(): browse/stream helpers

- Add web portal to server/app.py
  - Overview page (/): stat cards + recent trips + recent clips
  - Trip history (/history): reuses Pi history.js + data-list.js unchanged
    via /api/trips + /api/trip/<id> compatibility aliases
  - Dashcam archive (/dashcam): file list + inline video player
  - /api/v1/portal/dashcam/stream/<id>: Range-request streaming, path traversal guard
  - /api/geocode: same Nominatim→reverse_geocoder offline fallback as Pi

- Add server templates (server/templates/)
  - base.html: shared shell with 'Remote server' badge in sidebar + mobile topbar
  - login.html, index.html, history.html, dashcam.html, components.html

- DB schema: users + trips tables added to init.sql (fresh deploys) +
  migrate_phase24.sql (existing deployments)

- Infrastructure: Dockerfile uses repo-root build context to copy shared
  static/ assets; docker-compose updated; SECRET_KEY + DEVICE_NAME in .env;
  requirements: Flask-Login, bcrypt, reverse_geocoder

Co-authored-by: Copilot <[email protected]>
2026-08-10 03:58:45 -04:00
Mathieu MoranandCopilot 51c6be3a94 docs: update PLAN.md phase 23.5, README features/hardware/status, new screenshots
- PLAN.md: Phase 23.5 documents all work from this session
- README: hardware table adds T3U, features add geocoding/offline maps/T3U, status updated
- pics/ui.png: desktop + mobile side-by-side screenshot (updated)

Co-authored-by: Copilot <[email protected]>
2026-08-10 03:43:09 -04:00
Mathieu MoranandCopilot 35ec705fe2 docs: update PLAN.md Phase 23 completion and README project status
Phase 23 section updated with full list of changes from all polish passes:
Overview stats card, speed chart rework, mobile dashcam table fixes,
trip history mobile layout, notification badge fix, footer text.
README project status updated to reflect Phases 1-23 complete.

Co-authored-by: Copilot <[email protected]>
2026-08-09 23:56:47 -04:00
Mathieu MoranandCopilot 6a519dbf9e PLAN: mark Phase 23 done
Co-authored-by: Copilot <[email protected]>
2026-08-09 22:59:08 -04:00
Mathieu MoranandCopilot cdb032b888 Add phone hotspot uplink
Prefer a configured phone hotspot for outbound synchronization, preserve secure write-only credentials, and recover through home WiFi or the local Pi hotspot.

Co-authored-by: Copilot <[email protected]>
2026-08-09 22:48:11 -04:00
Mathieu MoranandCopilot 5c707fe295 Plan phone hotspot uplink
Co-authored-by: Copilot <[email protected]>
2026-08-09 21:29:08 -04:00
Mathieu MoranandCopilot 3a6f12ba9d Add local settings management
Add cellular-first ntfy delivery with WiFi fallback and safe SIM868 HTTP header framing.

Co-authored-by: Copilot <[email protected]>
2026-08-09 21:26:15 -04:00
Mathieu MoranandCopilot b77ed838bd Clarify pre-install vehicle testing
Co-authored-by: Copilot <[email protected]>
2026-08-09 20:37:43 -04:00
Mathieu MoranandCopilot acf24be89e Plan final Yaris acceptance test
Co-authored-by: Copilot <[email protected]>
2026-08-09 20:35:52 -04:00
Mathieu MoranandCopilot 592a123c77 Expand remote portal dashcam scope
Co-authored-by: Copilot <[email protected]>
2026-08-09 20:33:42 -04:00