Commit Graph
1 Commits
Author SHA1 Message Date
tajniak81andClaude Opus 5.5 3db12dba63 Connected cars: update the odometer automatically
The provider tab gets an "Update odometer automatically" switch and an
interval (30 minutes to a week, daily by default). The API Server does
the updating on the scheduler's ticker, so it carries on with no page
open: every five minutes it takes the provider's odometer for each due
car and stores it when it is ahead, never backwards, the same as the
Update odometer button.

The setting belongs to the car. Readings are fetched under the account
of whoever switched it on, and stop if that user can no longer edit the
car. Each attempt and its error, if any, are stored on the car and shown
under the switch. The switch also shows when the provider can't be
reached, so updates that are failing can still be switched off.

New car fields odometer_auto_sync, odometer_sync_minutes,
odometer_sync_by, odometer_synced_at and odometer_sync_error; new route
PUT /api/cars/{id}/provider/auto-sync. Unlinking leaves the setting as
it is; the sweep only looks at linked cars.

launch.json gains api-server-8081 / web-app-8081 for when 8080 is taken.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 12:07:02 +01:00