Skip to content

feat(web): UI controls for EV loadpoint target SoC + deadline #175

Closed

Description

@frahlg

Why

Field test by @erikarenhill surfaced that without a user-set `target_soc_pct` + `target_time` on a loadpoint, the planner has no urgency penalty for the EV and rationally defers charging — especially in arbitrage mode, where idle PV can be exported for revenue instead of going into the car.

Backend is fully wired:

  • `POST /api/loadpoints/{id}/target` in `go/internal/api/api.go:1758`
  • `loadpoint.Manager.SetTarget(id, socPct, targetTime)`
  • Triggers an MPC replan on success
  • Loadpoint manager persists `targetSoCPct` + `targetTime` fields

What's missing: any UI to call that endpoint. No buttons, forms, or modals. Users have to curl the API to set a target.

What to build

On the loadpoint card / EV charging view:

  • Target SoC input (integer %, clamped 0–100)
  • Target time input (date + time picker, "by when")
  • Save button that POSTs to `/api/loadpoints/{id}/target`
  • Display current target (SoC % + time remaining) when set
  • "Clear target" button so users can drop the deadline

Optional nice-to-haves:

  • Quick presets (80 % by 07:00, 100 % by 18:00, etc.)
  • Visual indicator when the current plan can't hit the target (the DP has a "shortfall" concept — see `mpc.go:445–450`)

Knock-on effect

This unblocks EV charging in arbitrage mode. Erik reported arbitrage "doesn't work" for EV — it's not broken, it just has no incentive to charge without a deadline. With a target set, the DP gets a 4× mean-price shortfall penalty and commits.

Reported by

@erikarenhill (Discord field test):

Nästa finding, posta SoC target för EV Charging saknar ju helt GUI eller automatik — därför den också slår av

Activity

  1. frahlg commented on Jul 11, 2026

    @frahlg
    MemberAuthor

    Implemented in the merged EV target UI work (#176): the dashboard now exposes target SoC and deadline controls wired to the loadpoint target API.

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