Skip to content

feat(drivers): bundle the TeslaMate, Tesla Fleet and VW Group vehicle drivers - #1449

Draft
frahlg wants to merge 1 commit into
masterfrom
feat/bundle-vehicle-drivers
Draft

frahlg wants to merge 1 commit into
masterfrom
feat/bundle-vehicle-drivers

Conversation

@frahlg

@frahlg frahlg commented Sep 26, 2026

Copy link
Copy Markdown
Member

Moves the device-drivers pin from 92adaf0 to eeb3e06 and adds three read-only vehicle drivers to the bundle: teslamate_vehicle, tesla_cloud and vag_vehicle. Refs #1442: they read vehicle SoC through vendor drivers that emit DerVehicle, with no Home Assistant ingest in Core.

Between the two pins nothing else under drivers/lua changed, so no bundled driver moves.

Owner decision

  • The changeset is minor, which the owner approves in the PR.

  • Bundling is not needed to test. All three are in the signed drivers-beta channel, and one site can install one without a new Core:

    curl -X POST http://127.0.0.1:8080/api/device_repository/drivers/vag_vehicle/install \
      -H 'Content-Type: application/json' -d '{"channel":"beta","version":"0.1.1"}'

    Bundled, every box carries three drivers that no one has yet run against a car. They do nothing until configured.

The drivers

Driver Version Source Reads
teslamate_vehicle 0.1.0 srcfl/device-drivers#139 The owner's TeslaMate MQTT broker; subscribe only
tesla_cloud 0.1.0 srcfl/device-drivers#140 Tesla Fleet API: a free state check every 5 minutes, and the billed vehicle_data only for an awake car, every 4 minutes while it charges and every 20 otherwise. The signed artifact may POST only to /oauth2/v3/token.
vag_vehicle 0.1.1 srcfl/device-drivers#141, #142 VW Group EU Data Act portal with a pasted session cookie; unzips each 15-minute file in Lua, up to 2 MiB

None wakes a car or starts a charge. Settings has no form for them; they are set up in YAML, as each driver's header comment shows.

Evidence

  • scripts/sync-bundled-drivers.sh wrote 43 drivers from eeb3e06. The three new files are byte-identical to device-drivers main.
  • go test ./internal/drivers: passes, including TestBundledDriversMeetStartupContract for all 43.
  • make verify: vet, tests and build clean (71 packages). The first run failed only because go/internal/fleetping/shipped_gen.go, the list of shipped driver IDs, is generated from the pin; it is regenerated here with go generate ./internal/fleetping/....
  • A throwaway test, not committed, loaded each driver with NewLuaDriver in FTW's own host (gopher-lua, json_decode, emit, telemetry store), with only HTTP and MQTT stubbed:
    • Every reading reached the telemetry store, with SoC as a fraction (0.67 for the Tesla drivers, 0.63 for VAG).
    • tesla_cloud set make Tesla, the VIN, model "Model 3" from the VIN, and a 60 s poll interval. Its calls were one token POST, one state GET and one vehicle_data GET.
    • vag_vehicle took 55 ms per poll for 100 kB of JSON and 0.6 s for 1 MB on an Apple M-series core, and refused a 5 MB file. That run is what found the gopher-lua registry overflow that fix(vag_vehicle): unzip without overflowing gopher-lua's value stack device-drivers#142 fixes.
  • No car, TeslaMate broker, Fleet API account or VW portal has run any of them yet.

Paired with srcfl/device-drivers#139, #140, #141 and #142, all merged.

🤖 Generated with Claude Code

Move the device-drivers pin from 92adaf0 to eeb3e06 and bundle
teslamate_vehicle, tesla_cloud and vag_vehicle. Nothing else under
drivers/lua changed between the two commits, so no bundled driver
moves. fleetping's list of shipped driver IDs is regenerated from the
pin.

Refs #1442

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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