Skip to content

fix(vehicle): recover telemetry without requiring fresh SoC - #1521

Merged
frahlg merged 3 commits into
masterfrom
codex/tesla-telemetry-recovery-20261006
Oct 6, 2026
Merged

frahlg merged 3 commits into
masterfrom
codex/tesla-telemetry-recovery-20261006

Conversation

@frahlg

@frahlg frahlg commented Oct 6, 2026 •

Copy link
Copy Markdown
Member

Vehicle telemetry refresh no longer requires the fresh SoC it is trying to recover. Core selects an enabled configured vehicle that explicitly declares telemetry_wake, independently of the planning and charge_start picker. Without an explicit binding, multiple vehicles or connected loadpoints produce an ambiguity error. Read-only and observe-only drivers remain ineligible.

The Lua host adds Unix time and a durable telemetry-wake reservation keyed by hardware identity. It commits attempts before network I/O, permits at most three in 30 minutes with a 90-second gap, and retains the budget across restart and rename. Goal refresh does not reset charge_start counters. A requested read interval now reaches the active driver timer.

Vehicle SoC may carry its source timestamp. Core rejects invalid, future and repeated timestamps as new observations, preserves the last trusted value and writes SoC history at source time. The startup replan waits for usable fresh SoC, so an old cached response cannot consume the recovery trigger.

Refs #1253. Paired with srcfl/device-drivers#167 (Tesla driver 0.2.5). The bundle is pinned to the merged driver commit c9de25106b07071fde55c9f8f5e95b69c58e6fc9 and carries Tesla 0.2.5. The existing 40-driver list stays in place. The pin also takes the already merged Heishamon 0.8.0 and MyUplink 1.2.3 updates; the MyUplink change adds F750 validation metadata. #1449 overlaps this pin but keeps its unique three-driver addition and minor changeset; its next rebase must retain this newer pin. The owner requested installation of this fix. Keep #1253 open until Tesla BLE hardware acceptance.

Validation: make verify on the combined bundle; the Heishamon integration test checks the heating view's outdoor-temperature and heat-mode power fields; full-stack FTW_E2E=1 go test ./test/e2e -timeout 180s; targeted race tests across state, telemetry, loadpoint, drivers and cmd/ftw. Regressions cover persisted/concurrent wake budgets and write failure, source freshness and full-car recovery, missing/stale SoC recipient selection, multi-vehicle ambiguity, read-only boundaries, independent charge_start counters, caller deadlines, prompt reads and rename. A local combined probe loads the paired real driver in Core's Lua VM against a fake HTTP proxy and DB; no Tesla or production box received commands.

Signed-off-by: Fredrik Ahlgren <fredrik@sourceful-labs.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

frahlg added 2 commits October 6, 2026 11:20
Signed-off-by: Fredrik Ahlgren <fredrik@sourceful-labs.com>
Signed-off-by: Fredrik Ahlgren <fredrik@sourceful-labs.com>
@frahlg
frahlg merged commit bb99ad1 into master Oct 6, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant