Skip to content

fix(charging): carry two-phase cars through plans, current limits and Easee - #1792

Draft
frahlg wants to merge 1 commit into
codex/two-phase-depsfrom
codex/two-phase-charging
Draft

frahlg wants to merge 1 commit into
codex/two-phase-depsfrom
codex/two-phase-charging

Conversation

@frahlg

@frahlg frahlg commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

A two-phase car on a three-phase site was planned and commanded as three-phase. Core rejected phases: 2 on the car, so selecting a lower maximum power alone could not fix the current conversion.

This change carries the car's two-phase choice through its session, planner steps, manual offers, API amp slider and fuse accounting. At 230 V, 10 A is 4,600 W on two phases. The site's wiring stays three-phase. It bounds offers by the car's maximum and legal whole amps, keeps explicit one-phase charging available, and discards an old command's phase credit when the car's declared count changes. Removing the car restores the charger's configured limits.

Paired driver: srcfl/device-drivers#189. drivers/BUNDLED_SOURCE.json pins its exact head 75aeab7d6e92dc41098c627ad666cad539f73b34; the generated Lua snapshot was fetched and tested.

Dependencies

This draft targets codex/two-phase-deps, master c14d31d3 with #1789's fuse-protection work merged for testing. The diff contains only this charging change. Preserve #1789, then rebase and retarget this PR to master after it lands. Merge the paired driver after its dependencies, then update this pin to the driver merge commit before Core merges.

Validation

  • Planning, current-ceiling and driver-command regressions fail on the previous behavior and pass with the change.
  • Tests cover car validation and persistence, car-to-session binding and reset, planner steps, manual limits, 230/240 V, one-phase fallback, per-phase fuse current and pending offers, API conversion and the pinned Lua driver.
  • Focused charging/car/control/API/planning suites pass.
  • Targeted race checks pass in loadpoint, cars, control, API, drivers and cmd/ftw.
  • Web suite: 871 passed. The manual-control test renders the real function and checks that displayed 10 A sends power_w: 4600 with phase_mode: 2p.
  • Browser check of the real manual-control function with simulated status: 10 A / 4.6 kW rendered and sent correctly. Human UI inspection remains pending.
  • GOFLAGS=-p=2 make verify: passed on final head 677ba887, including Go tests, vet, build, Docker context, solver and protocol boundary checks.
  • Core's GitHub workflows target master and have no PR run on this temporary base. Refresh CI when this PR is rebased and retargeted.

Hardware acceptance remains pending on an Easee with the two-phase V60: confirm model year/firmware, phase-to-neutral voltage, offered and measured phase currents, total AC power, pause/resume and one-phase fallback. The model uses two phase-to-neutral loads; no physical support claim follows from these tests. No box was updated or release published.

Signed-off-by: Fredrik Ahlgren <fredrik@sourceful-labs.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