Repository navigation
Conversation
While the site is islanded (package gridstate), the pre-dispatch gate closes with its own reason, off_grid, through the same path a stale site meter takes: every driver gets its driver_default_mode once on entry, so the battery runs on the inverter's backup logic instead of FTW's remote setpoints, and chargers stand down at 0 W, so a car does not drain the battery that keeps the house up. No planned grid import or export runs while it holds. A gate a stale meter or setup already shut keeps that reason. When the grid has been back for a minute, the latch clears and control resumes; the next outage defaults again. The chargers' stand-down names its reason (Controller.SetStandDownReason), and control feedback, the loadpoint status and the web views say "Off the grid" rather than a stale meter. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Proposal on behalf of @Leitet (written by his build assistant), for @frahlg to decide as repo owner. Keep the default exactly as this PR has it: chargers and V2X stand down at 0 W while off grid, and no One addition: a manual force-start. Today operator commands are refused off grid ( Suggested shape, open to your call:
This can be a follow-up PR on top of #2133 if you prefer to keep this one as is. Still nothing goes live before the observe-only grid cut. |
Step 7 of the off-grid work in #2125. Stacked on #2132 (grid state).
Draft by design. The issue requires that no off-grid behaviour merges before an observe-only grid cut on a FoxESS 1K5, with the model, firmware and readings reported (device-drivers#285 lists what to record). This PR waits for that evidence.
Changeset:
minor, for the owner to approve.What it does
off_grid. It is the same path a stale site meter takes, so the behaviour comes from machinery that is already tested:driver_default_modeonce on entry (staleSiteDefaultTracker). The battery then runs on the inverter's own backup logic instead of FTW's remote setpoints, as the issue asks.stop | allowsetting is left out until someone needsallow.SiteDispatchBlocked, the manual V2X command) are refused off grid too.Controller.SetStandDownReason, defaulting tosite_meter_stale). Control feedback, the loadpoint status and the web views say "Off the grid" rather than a stale meter.Needs a browser review
web/app.jsandweb/control-feedback.jsget the "Off the grid" texts. Per AGENTS.md, a human must look at them in a browser.Evidence
go/cmd/ftw/site_dispatch_off_grid_test.go: the gate closes off grid withoff_grid; a stale meter keeps its reason; on grid and unknown leave the gate open; entering defaults each driver once, and the grid's return clears the latch.go/internal/loadpoint/controller_commanded_reason_test.go,TestCommandedReasonOffGrid: a stand-down off grid commands 0 W with reasonoff_grid, and the manual status shows it. An empty reason falls back tosite_meter_stale.node --test web/*.test.mjs …passes 1072 of 1072. The "every reason Core emits has a title and a sentence" test caught the missingoff_gridwords. (npm testneeds Node 21+ for its glob; this host has Node 20.)go test ./internal/loadpoint/ ./internal/api/passes, and./cmd/ftw/passes withumask 022.🤖 Generated with Claude Code