Skip to content

EV panel: charge now at a chosen current, and battery boost #58

Description

@frahlg

Two gaps between the EV panel and what the box already serves and accepts.

1. Charge now always asks for full power

src/lib/state/loadpoints.svelte.ts sends loadpoint.hold with power_w: lp.maxChargeW. The box's own page (FTW/web/app.js, buildManualChargeSection) lets the user pick a current between the loadpoint's min and max, converts amps to watts with phases × voltage_v, and sends a persistent hold (hold_s: 0) with phase_mode from the phase count. GET /api/loadpoints already carries min_charge_w, max_charge_w, phases, voltage_v and, while a hold runs, manual_charge_w.

The panel should offer the same slider: default at max, readout "N A · X.X kW", Charge now sends the slider's power. While a hold runs, show the current it runs at, and offer Update and Stop. The box no longer releases a hold at a SoC (srcfl/ftw#1056), so the copy should say the hold runs until the car is full, Stop, or unplug.

2. Battery boost is not drawn

The registry has loadpoint.boost (scope ftw.dispatch.write) and the box implements it (go/internal/appproto/ev.go): id, min_battery_soc_pct, exactly one of duration_s / expires_at_ms, optional ev_target_soc_pct and departure_at_ms, and cancel: true to withdraw. The lease is capped at four hours. GET /api/loadpoints reports battery_boost with state, active, expires_at_ms, min_battery_soc and a stop_reason after a stop.

The store already reads boostActive; the panel only shows a badge. It should let an owner start a boost with a home-battery reserve and a duration, stop one that is running, and say why the box stopped the last one when it reports a reason.

No new registry names are needed for either control.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions