diff --git a/.changeset/surplus-auto-three-phases.md b/.changeset/surplus-auto-three-phases.md new file mode 100644 index 000000000..cd757d02b --- /dev/null +++ b/.changeset/surplus-auto-three-phases.md @@ -0,0 +1,5 @@ +--- +"ftw": patch +--- + +With phase mode auto, solar-only charging now runs on three phases when the spare solar is above the three-phase minimum, 6 A on each phase (4,140 W at 230 V). Before, a plan that showed little or no solar could keep the car on one phase all day, even with 9 kW spare. The spare solar measured now counts as part of the forecast, and a one-phase choice for the day gives way once the spare solar is above the minimum again. Each change between one and three phases still holds for at least 30 minutes, and a single high reading does not switch to three phases. A step of 16 A on one phase (3,680 W) no longer counts as a three-phase step, so 3.7 to 4.1 kW of spare solar stays on one phase. diff --git a/go/internal/loadpoint/controller.go b/go/internal/loadpoint/controller.go index 9e61d60e8..f5fb3b740 100644 --- a/go/internal/loadpoint/controller.go +++ b/go/internal/loadpoint/controller.go @@ -233,6 +233,10 @@ func (w *surplusWindow) push(v float64) float64 { if w.n < surplusWindowSize { w.n++ } + return w.mean() +} + +func (w *surplusWindow) mean() float64 { var sum float64 for i := 0; i < w.n; i++ { sum += w.buf[i] @@ -2037,10 +2041,10 @@ func (c *Controller) computeSurplusCmd(now time.Time, lpCfg Config, wantW float6 } // pickSurplusSteps returns the step set surplus_only should snap to -// for this loadpoint. Default is 3Φ-eligible only (the no-flap rule); -// when the day's peak forecast surplus can't sustain a 3Φ minimum, -// we fall back to all allowed steps and STICK there for the session -// — re-upgrading would just cycle the contactor when clouds shift. +// for this loadpoint. Default is 3Φ-eligible only: three phases from 6 A +// each. Below that minimum surplus may use all allowed steps, so one +// phase. A switch either way holds for phaseSwitchMinHold, or the +// contactor cycles when clouds shift. // // `now` is the dispatch tick's time, threaded down from Tick → // computeSurplusCmd / wake-kick so day-rollover unlock + lock-set @@ -2048,7 +2052,7 @@ func (c *Controller) computeSurplusCmd(now time.Time, lpCfg Config, wantW float6 // can drive it deterministically. func (c *Controller) pickSurplusSteps(now time.Time, lpCfg Config) []float64 { if c == nil { - return surplus3PhaseSteps(lpCfg) + return surplus3PhaseSteps(lpCfg, SiteFuse{}) } if len(lpCfg.AllowedStepsW) == 0 { // No step table, no one-phase ladder to fall back to: a one-phase @@ -2062,7 +2066,7 @@ func (c *Controller) pickSurplusSteps(now time.Time, lpCfg Config) []float64 { c.phaseLockMu.Unlock() return nil } - steps3 := surplus3PhaseSteps(lpCfg) + steps3 := surplus3PhaseSteps(lpCfg, c.siteFuse()) minStep3 := surplusMinStepW(lpCfg, steps3) // 3Φ-only charger: an operator who pinned "3p" is telling us the @@ -2082,6 +2086,10 @@ func (c *Controller) pickSurplusSteps(now time.Time, lpCfg Config) []float64 { return steps3 } + // The surplus measured now. Each forecast below starts now, so its + // peak is never less than this. + live, liveOK := c.liveSurplusW(lpCfg.ID) + c.phaseLockMu.Lock() locked := c.phaseLocked1P[lpCfg.ID] lockedAt := c.phaseLockedAt[lpCfg.ID] @@ -2104,6 +2112,17 @@ func (c *Controller) pickSurplusSteps(now time.Time, lpCfg Config) []float64 { return steps3 } } + // Measured surplus above the 3Φ minimum ends the lock once it has + // held for phaseSwitchMinHold. Three phases then hold as long. + if locked && minStep3 > 0 && liveOK && live >= minStep3 && now.Sub(lockedAt) >= phaseSwitchMinHold { + delete(c.phaseLocked1P, lpCfg.ID) + delete(c.phaseLockedAt, lpCfg.ID) + c.selectPhaseLocked(lpCfg.ID, true, now) + c.phaseLockMu.Unlock() + slog.Info("loadpoint surplus_only unlocked: live surplus covers 3Φ", + "lp", lpCfg.ID, "live_surplus_w", live, "min_3p_step_w", minStep3) + return steps3 + } c.phaseLockMu.Unlock() if locked { @@ -2125,26 +2144,17 @@ func (c *Controller) pickSurplusSteps(now time.Time, lpCfg Config) []float64 { // Gated on "no prior decision" so we don't flap mid-session: once // we've committed to a phase, the dwell-hold + forecast logic // downstream keep us there for the session. - if minStep3 > 0 && c.siteSurplusForEVW != nil { + if liveOK && live >= minStep3 { c.phaseLockMu.Lock() _, hasPrev := c.phaseSelected3P[lpCfg.ID] + if !hasPrev { + c.selectPhaseLocked(lpCfg.ID, true, now) + } c.phaseLockMu.Unlock() if !hasPrev { - if liveSurplus, ok := c.siteSurplusForEVW(); ok && - !math.IsNaN(liveSurplus) && !math.IsInf(liveSurplus, 0) && - liveSurplus >= minStep3 { - c.phaseLockMu.Lock() - if c.phaseSelected3P == nil { - c.phaseSelected3P = map[string]bool{} - c.phaseSelectedAt = map[string]time.Time{} - } - c.phaseSelected3P[lpCfg.ID] = true - c.phaseSelectedAt[lpCfg.ID] = now - c.phaseLockMu.Unlock() - slog.Info("loadpoint surplus_only: 3Φ at session start (live surplus override)", - "lp", lpCfg.ID, "live_surplus_w", liveSurplus, "min_3p_step_w", minStep3) - return steps3 - } + slog.Info("loadpoint surplus_only: 3Φ at session start (live surplus override)", + "lp", lpCfg.ID, "live_surplus_w", live, "min_3p_step_w", minStep3) + return steps3 } } @@ -2166,6 +2176,9 @@ func (c *Controller) pickSurplusSteps(now time.Time, lpCfg Config) []float64 { if c.nearTermPeakSurplusW != nil { const nearTermWindow = 30 * time.Minute nearPeak, peakOK := c.nearTermPeakSurplusW(nearTermWindow) + if peakOK && liveOK && live > nearPeak { + nearPeak = live + } c.phaseLockMu.Lock() prevSelected3P, hasPrev := c.phaseSelected3P[lpCfg.ID] @@ -2199,12 +2212,7 @@ func (c *Controller) pickSurplusSteps(now time.Time, lpCfg Config) []float64 { recordDecision = selected3P != prevSelected3P } if recordDecision { - if c.phaseSelected3P == nil { - c.phaseSelected3P = map[string]bool{} - c.phaseSelectedAt = map[string]time.Time{} - } - c.phaseSelected3P[lpCfg.ID] = selected3P - c.phaseSelectedAt[lpCfg.ID] = now + c.selectPhaseLocked(lpCfg.ID, selected3P, now) } c.phaseLockMu.Unlock() @@ -2236,6 +2244,9 @@ afterNearTerm: if !ok { return steps3 } + if liveOK && live > peak { + peak = live + } if peak >= minStep3 { return steps3 } @@ -2250,8 +2261,12 @@ afterNearTerm: if !lpCfg.SurplusOnly { return lpCfg.AllowedStepsW } - // Lock to 1Φ for the rest of the day. + // Lock to 1Φ for the rest of the day, once a 3Φ choice has held. c.phaseLockMu.Lock() + if c.phaseSelected3P[lpCfg.ID] && now.Sub(c.phaseSelectedAt[lpCfg.ID]) < phaseSwitchMinHold { + c.phaseLockMu.Unlock() + return steps3 + } if c.phaseLocked1P == nil { c.phaseLocked1P = map[string]bool{} c.phaseLockedAt = map[string]time.Time{} @@ -2348,34 +2363,50 @@ func sameLocalDay(a, b time.Time) bool { return la.Year() == lb.Year() && la.Month() == lb.Month() && la.Day() == lb.Day() } -// surplus3PhaseSteps returns AllowedStepsW filtered down to entries -// at or above the loadpoint's PhaseSplitW (default 3680 W) — i.e. the -// steps the driver will deliver on 3Φ. 0 is always included so -// "pause" is still a representable command. +// surplus3PhaseSteps returns the steps the driver will deliver on 3Φ: +// those planned charging gets, from 6 A on each phase. 3,680 W is 16 A on +// one phase, not 5.3 A on three. 0 is always included so "pause" is still +// a representable command. // // When PhaseMode is "1p" we don't filter — the operator explicitly // locked the install to 1Φ, so a 3Φ-only set would just wedge the // loadpoint at 0. -func surplus3PhaseSteps(lpCfg Config) []float64 { +func surplus3PhaseSteps(lpCfg Config, site SiteFuse) []float64 { if lpCfg.PhaseMode == "1p" || len(lpCfg.AllowedStepsW) == 0 { // Without a step table the charger takes any power from its // minimum to its maximum, as SnapChargeW reads no steps. return lpCfg.AllowedStepsW } - split := lpCfg.PhaseSplitW - if split <= 0 { - split = defaultPhaseSplitW + return PlanningSteps(lpCfg, site) +} + +// liveSurplusW is the EV-available surplus now, never above the average +// the pause gate keeps: one high reading must not switch to three phases, +// and a drop shows at once. +func (c *Controller) liveSurplusW(id string) (float64, bool) { + if c.siteSurplusForEVW == nil { + return 0, false } - out := []float64{0} - for _, s := range lpCfg.AllowedStepsW { - if s == 0 { - continue - } - if s >= split { - out = append(out, s) - } + w, ok := c.siteSurplusForEVW() + if !ok || !finite(w) { + return 0, false + } + c.surplusMu.Lock() + defer c.surplusMu.Unlock() + if win := c.surplusWin[id]; win != nil && win.n > 0 { + w = math.Min(w, win.mean()) + } + return w, true +} + +// selectPhaseLocked records a surplus phase choice; phaseLockMu is held. +func (c *Controller) selectPhaseLocked(id string, threePhase bool, now time.Time) { + if c.phaseSelected3P == nil { + c.phaseSelected3P = map[string]bool{} + c.phaseSelectedAt = map[string]time.Time{} } - return out + c.phaseSelected3P[id] = threePhase + c.phaseSelectedAt[id] = now } // surplusMinStepW is the least surplus may order: the smallest step, or diff --git a/go/internal/loadpoint/controller_phase_choice_test.go b/go/internal/loadpoint/controller_phase_choice_test.go index 804f24036..28d818990 100644 --- a/go/internal/loadpoint/controller_phase_choice_test.go +++ b/go/internal/loadpoint/controller_phase_choice_test.go @@ -194,17 +194,20 @@ func commandAmps(cmd sentCommand) float64 { } // Simulatorprov 21 Oct 2026, case s5s: surplus only, 9.3 kW of surplus and -// a plan that shows no PV. The day's 1p lock hands back every step, so 1p +// a plan that shows no PV. The day's 1p lock handed back every step, so 1p // went out at 5,750 W with the 25 A fuse as its only limit: 25 A on one -// phase of a 16 A charger. A one-phase charger left on an empty mode gets -// the same lock and must keep its full 16 A. +// phase of a 16 A charger. The surplus is above the three-phase minimum, so +// a three-phase charger runs on three phases. A one-phase charger left on +// an empty mode must keep its full 16 A. func TestSurplusOnePhaseOfferStaysWithinTheCharger(t *testing.T) { for _, tc := range []struct { - name string - cfg Config + name string + cfg Config + phase string + wantW float64 }{ - {"16 A three-phase charger, auto", Config{MinChargeW: 4140, MaxChargeW: 11040, PhaseMode: "auto", AllowedStepsW: threePhaseSteps}}, - {"16 A one-phase charger, empty mode", Config{MinChargeW: 1380, MaxChargeW: 3680, AllowedStepsW: onePhaseSteps}}, + {"16 A three-phase charger, auto", Config{MinChargeW: 4140, MaxChargeW: 11040, PhaseMode: "auto", AllowedStepsW: threePhaseSteps}, "3p", 8970}, + {"16 A one-phase charger, empty mode", Config{MinChargeW: 1380, MaxChargeW: 3680, AllowedStepsW: onePhaseSteps}, "1p", 3680}, } { t.Run(tc.name, func(t *testing.T) { now := time.Date(2026, 10, 21, 12, 0, 0, 0, time.Local) @@ -223,7 +226,6 @@ func TestSurplusOnePhaseOfferStaysWithinTheCharger(t *testing.T) { samples[cfg.DriverName] = EVSample{Connected: true, RequestActive: true, PowerW: cmd.power} now = now.Add(5 * time.Second) } - onePhase := 0 for _, cmd := range sender.calls { if cmd.action != "ev_set_current" { continue @@ -231,16 +233,13 @@ func TestSurplusOnePhaseOfferStaysWithinTheCharger(t *testing.T) { if a := commandAmps(cmd); a > 16+1e-9 { t.Fatalf("offer %+v is %.1f A per phase to a 16 A charger", cmd, a) } - if cmd.phaseMode == "1p" { - onePhase++ - if cmd.maxAmpsPerPhase > 16+1e-9 { - t.Fatalf("1p offer %+v allows %.1f A per phase", cmd, cmd.maxAmpsPerPhase) - } + if cmd.phaseMode == "1p" && cmd.maxAmpsPerPhase > 16+1e-9 { + t.Fatalf("1p offer %+v allows %.1f A per phase", cmd, cmd.maxAmpsPerPhase) } } last, ok := lastSetCurrent(sender.calls) - if onePhase == 0 || !ok || last.phaseMode != "1p" || last.power != 3680 { - t.Fatalf("%d 1p offers, last %+v; want the 1p lock to charge at 3,680 W (16 A)", onePhase, last) + if !ok || last.phaseMode != tc.phase || last.power != tc.wantW { + t.Fatalf("last offer %+v; want %.0f W on %s", last, tc.wantW, tc.phase) } }) } diff --git a/go/internal/loadpoint/controller_surplus_phases_test.go b/go/internal/loadpoint/controller_surplus_phases_test.go new file mode 100644 index 000000000..a253dda8e --- /dev/null +++ b/go/internal/loadpoint/controller_surplus_phases_test.go @@ -0,0 +1,139 @@ +package loadpoint + +import ( + "context" + "testing" + "time" +) + +// surplusRun ticks a surplus-only loadpoint every 5 s against a fixed live +// surplus and a plan that shows no PV, as the site rig's planner does, and +// returns every current order sent. +func surplusRun(t *testing.T, cfg Config, surplusW float64, d time.Duration) []sentCommand { + t.Helper() + return surplusRunAt(t, cfg, func(time.Duration) float64 { return surplusW }, d) +} + +// surplusRunAt is surplusRun with the surplus a function of the time since +// the plug-in. +func surplusRunAt(t *testing.T, cfg Config, surplusAt func(time.Duration) float64, d time.Duration) []sentCommand { + t.Helper() + cfg.ID, cfg.DriverName, cfg.SurplusOnly = "garage", "evse", true + samples := map[string]EVSample{cfg.DriverName: {Connected: true, RequestActive: true}} + sender := &fakeSender{} + c := newTestController(t, []Config{cfg}, nil, samples, sender) + c.SetSiteFuse(SiteFuse{MaxAmps: 25, Voltage: 230, PhaseCnt: 3}) + start := time.Date(2026, 10, 25, 11, 0, 0, 0, time.Local) + now := start + c.SetSiteSurplusForEV(func() (float64, bool) { return surplusAt(now.Sub(start)), true }) + c.SetNearTermPeakSurplusW(func(time.Duration) (float64, bool) { return 0, true }) + c.SetPeakRemainingSurplusW(func() (float64, bool) { return 0, true }) + var orders []sentCommand + for ; now.Sub(start) < d; now = now.Add(5 * time.Second) { + before := len(sender.calls) + c.Tick(context.Background(), now) + for _, cmd := range sender.calls[before:] { + if cmd.action == "ev_set_current" { + orders = append(orders, cmd) + } + } + last, _ := lastSetCurrent(sender.calls) + samples[cfg.DriverName] = EVSample{Connected: true, RequestActive: true, PowerW: last.power} + } + if len(orders) == 0 { + t.Fatal("no current order sent") + } + return orders +} + +// Site rig s5s: auto with Easee's steps stayed on one phase at 9.3 kW of +// surplus. The live surplus picked three phases at the first tick; the +// next tick the plan, which showed no PV, set the day's one-phase lock. +// A forecast window starts now, so it cannot be below the surplus measured +// now: the charge stays on three phases, past the 30 min hold too. +func TestSurplusAboveTheThreePhaseMinimumRunsThreePhases(t *testing.T) { + cfg := Config{MinChargeW: 4140, MaxChargeW: 11040, PhaseMode: "auto", AllowedStepsW: threePhaseSteps} + orders := surplusRun(t, cfg, 9310, phaseSwitchMinHold+15*time.Minute) + for i, cmd := range orders { + if a := commandAmps(cmd); cmd.phaseMode != "3p" || a < 6 || a > 16 || cmd.power > 9310 { + t.Fatalf("order %d of %d: %+v (%.1f A); want three phases at 6-16 A within the 9,310 W surplus", i, len(orders), cmd, a) + } + } +} + +// Site rig s5t: 3.8 kW of surplus is under the three-phase minimum of +// 4,140 W, so the charge runs on one phase. Easee's table has 3,680 W, 16 A +// on one phase; counting it as a three-phase step sent 4,140 W on three +// phases at the first tick, which imports. +func TestSurplusBelowTheThreePhaseMinimumRunsOnePhase(t *testing.T) { + cfg := Config{MinChargeW: 4140, MaxChargeW: 11040, PhaseMode: "auto", AllowedStepsW: threePhaseSteps} + for i, cmd := range surplusRun(t, cfg, 3810, 2*time.Minute) { + if cmd.power > 0 && (cmd.phaseMode != "1p" || cmd.power > 3810) { + t.Fatalf("order %d: %+v; want one phase within the surplus, under the three-phase minimum", i, cmd) + } + } +} + +// When the hold ends, one high reading must not switch to three phases: +// the reading counts only up to the average the pause gate keeps. Three +// phases at 1.5 kW of surplus pause the car for the next 30 min. +func TestSurplusOneHighReadingKeepsOnePhase(t *testing.T) { + cfg := Config{MinChargeW: 1380, MaxChargeW: 11040, PhaseMode: "auto", AllowedStepsW: threePhaseSteps} + surplus := func(at time.Duration) float64 { + if at == phaseSwitchMinHold { + return 4300 + } + return 1500 + } + for i, cmd := range surplusRunAt(t, cfg, surplus, phaseSwitchMinHold+5*time.Minute) { + if cmd.phaseMode != "1p" || cmd.power == 0 { + t.Fatalf("order %d: %+v; want one phase charging through one high reading", i, cmd) + } + } +} + +// One phase yields to measured surplus above the three-phase minimum once +// the 30 min hold has passed, and three phases then hold for 30 min too. +// With a near-term forecast the dwell holds the choice; without one the +// day's one-phase lock does. +func TestSurplusOnePhaseYieldsAfterTheHold(t *testing.T) { + for _, nearTerm := range []bool{true, false} { + name := "day_lock" + if nearTerm { + name = "near_term_dwell" + } + t.Run(name, func(t *testing.T) { + c := NewController(NewManager(), nil, nil, nil) + cfg := Config{ID: "garage", SurplusOnly: true, MinChargeW: 1380, MaxChargeW: 11040, + PhaseMode: "auto", AllowedStepsW: threePhaseSteps} + live := 2000.0 + c.SetSiteSurplusForEV(func() (float64, bool) { return live, true }) + if nearTerm { + c.SetNearTermPeakSurplusW(func(time.Duration) (float64, bool) { return 0, true }) + } + c.SetPeakRemainingSurplusW(func() (float64, bool) { return 0, true }) + start := time.Date(2026, 10, 25, 11, 0, 0, 0, time.Local) + onePhase := func(at time.Duration) bool { + return smallestNonZero(c.pickSurplusSteps(start.Add(at), cfg)) < 4140 + } + + if !onePhase(0) || c.surplusLockedTo1P(cfg.ID) == nearTerm { + t.Fatal("2 kW of surplus and no PV in the plan: want one phase") + } + live = 9000 + if !onePhase(10 * time.Minute) { + t.Fatal("one phase must hold for 30 min") + } + if onePhase(phaseSwitchMinHold+time.Minute) || c.surplusLockedTo1P(cfg.ID) || c.dwellSelectedPhaseMode(cfg.ID) != "3p" { + t.Fatal("9 kW of surplus after the hold: want three phases") + } + live = 2000 + if onePhase(phaseSwitchMinHold + 2*time.Minute) { + t.Fatal("three phases must hold for 30 min") + } + if !onePhase(2*phaseSwitchMinHold + 2*time.Minute) { + t.Fatal("2 kW of surplus after the second hold: want one phase again") + } + }) + } +} diff --git a/go/internal/loadpoint/controller_surplus_test.go b/go/internal/loadpoint/controller_surplus_test.go index cdaf6f303..c5cac98ff 100644 --- a/go/internal/loadpoint/controller_surplus_test.go +++ b/go/internal/loadpoint/controller_surplus_test.go @@ -8,7 +8,7 @@ import ( // surplusTestConfig returns a loadpoint config typical for the // surplus_only tests: 3Φ-eligible steps at 4140 W and 6900 W (Easee 6 A // and 10 A on three phases at 230 V), 1Φ-eligible at 1380 W (6 A on one -// phase). The default phase split is 3680 W, so {1380} is 1Φ-only and +// phase). Three phases start at 6 A each, so {1380} is 1Φ-only and // {4140, 6900} are 3Φ-eligible. func surplusTestConfig() Config { return Config{ @@ -342,7 +342,7 @@ func TestPickSurplusSteps_ThreePhaseOnlyNeverLocks1P(t *testing.T) { cfg := surplusTestConfig() cfg.PhaseMode = "3p" - steps3 := surplus3PhaseSteps(cfg) + steps3 := surplus3PhaseSteps(cfg, SiteFuse{}) // Forecast is bad — an "auto" loadpoint would lock 1Φ here. c.SetPeakRemainingSurplusW(func() (float64, bool) { return 1000, true }) @@ -396,7 +396,7 @@ func TestPickSurplusSteps_NearTermDwell(t *testing.T) { }) day1 := time.Date(2026, 5, 3, 9, 0, 0, 0, time.Local) - steps3 := surplus3PhaseSteps(cfg) + steps3 := surplus3PhaseSteps(cfg, SiteFuse{}) minStep3 := smallestNonZero(steps3) // First call — near-term forecast comfortably above minStep3 → 3Φ-only. diff --git a/go/internal/loadpoint/loadpoint.go b/go/internal/loadpoint/loadpoint.go index 7bcb105fa..e532d9d3a 100644 --- a/go/internal/loadpoint/loadpoint.go +++ b/go/internal/loadpoint/loadpoint.go @@ -65,8 +65,8 @@ type Config struct { // PhaseSplitW is the wantW threshold below which "auto" picks 1Φ. // Zero defaults to 3680 W — the ceiling a 16 A fuse can sustain - // on a single phase. Also used to classify AllowedStepsW entries: - // steps ≤ split are 1Φ-eligible, > split are 3Φ-eligible. + // on a single phase. It does not classify AllowedStepsW: planned and + // surplus charging count a step as 3Φ from 6 A on each phase. PhaseSplitW float64 `yaml:"phase_split_w,omitempty" json:"phase_split_w,omitempty"` // MinPhaseHoldS is the minimum dwell time before the controller diff --git a/go/test/site/README.md b/go/test/site/README.md index 125f87119..ee938f6a7 100644 --- a/go/test/site/README.md +++ b/go/test/site/README.md @@ -83,7 +83,7 @@ tick as 2 s more. | `s2-16` Charge now during export | 16 A, 1 A house, 7 kW PV, full battery: 9.1 A export per phase | car starts within 60 s (**known**: export counted as import); fuse holds | | | `s3-16`, `s3-25` Load step | car and a 3 kW battery hold charging, then 13 A (16 A) or 21 A (25 A) per phase for 180 s | fuse holds; over the limit at most 7 s after the step | yes | | `s4-25`, `s4b-25` Saved unlock | `surplus_unlock_bat_soc` 0.9 saved, not armed; Charge now 3p, and bare (s4b) | no stops; no offer drops to 0 W; full power over the last minute | | -| `s5-25`, `s5s-25` Surplus only | 25 A, 9.3 kW surplus, `auto`; s5 without steps, s5s with Easee's | no offer above 16 A; fuse holds; only 6–16 A; ≥ 4 140 W 90 % of the time (**known** in s5s) | | +| `s5-25`, `s5s-25` Surplus only | 25 A, 9.3 kW surplus, `auto`; s5 without steps, s5s with Easee's | no offer above 16 A; fuse holds; only 6–16 A; ≥ 4 140 W 90 % of the time | | | `s5t-25` Surplus with a goal | as s5s with a goal, 3.8 kW of export, a charger that switches phases | no offer above 16 A; fuse holds; ≥ 6 A on one phase 90 % of the time | | | `s6-25` Inverter offline | 1.5 kW PV, the inverter silent for 300 s | Home use shown and marked estimated throughout; measured before and after; never estimated while every driver reads | | | `s7-25` Restart | Charge now, 15 min, Core down 20 s, 420 s after | the day's Home use is kept; Home use back within 30 s; Charge now never below 4 140 W; full power within 420 s | | diff --git a/go/test/site/scenarios_test.go b/go/test/site/scenarios_test.go index 952d779f1..0e3258df4 100644 --- a/go/test/site/scenarios_test.go +++ b/go/test/site/scenarios_test.go @@ -51,8 +51,7 @@ var scenarios = []scenario{ {name: "s5-25", dir: "s5-surplus-auto-25A", minutes: 5.2, run: func(c *runCtx) (map[string]any, error) { return s5(c, 25, nil) }, judge: judgeS5}, {name: "s5s-25", dir: "s5s-surplus-auto-steps-25A", minutes: 5.2, - run: func(c *runCtx) (map[string]any, error) { return s5(c, 25, easeeSteps) }, judge: judgeS5, - known: map[string]string{"charges at least the minimum 90 % of the time": "phase mode auto stays on 1p under 9 kW surplus (R1); next beta"}}, + run: func(c *runCtx) (map[string]any, error) { return s5(c, 25, easeeSteps) }, judge: judgeS5}, {name: "s6-25", dir: "s6-inverter-offline-25A", minutes: 7.7, run: func(c *runCtx) (map[string]any, error) { return s6(c, 25) }, judge: judgeS6}, {name: "s7-25", dir: "s7-restart-25A", minutes: 23,