Repository navigation
fix(ferroamp): force idle on zero target, do not delegate to auto - #290
Merged
Merged
Conversation
When the dispatch layer commanded power_w=0 the driver used to publish `auto`, putting the EnergyHub into autonomous self- consumption. That silently overrode every planner slot that wanted the battery idle so PV surplus could export — Ferroamp kept covering local load and discharged ~500 W against target 0. Live system on 2026-05-24 ran a planner_self plan with PV export windows while the battery quietly discharged through them, exporting 27 kWh at low prices and leaving Ferroamp at 45% SoC by evening. Now publish `discharge` with arg=0 on zero target — equivalent to Sungrow's forced-idle path (commit 7e59f93). The watchdog default-mode and cleanup paths still publish `auto`, so a stale EMS still falls back to autonomous self-consumption. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
frahlg
added a commit
that referenced
this pull request
Nov 30, 2026
…#2141) A restart while no car was plugged in left the Easee charger's power unknown until a car arrived (srcfl/device-drivers#289). Home use then went unknown, History lost those hours and the daily saving went negative. The pin moves to srcfl/device-drivers@f7102be (#290); no other bundled driver changes. Signed-off-by: Fredrik Ahlgren <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
drivers/ferroamp.luapublishedautoonpower_w=0, handing control back to the EnergyHub's autonomous self-consumption. That silently overrode every planner slot that wanted the battery held idle for PV export — Ferroamp covered local load instead and discharged ~500 W against target 0.dischargewitharg=0— explicit forced-idle, equivalent to Sungrow's path from 7e59f93. Watchdog default-mode and cleanup still publishauto, so a stale EMS still falls back to autonomous.Live evidence (2026-05-24, homelab-rpi)
Sungrow honoured target=0 (already fixed in 7e59f93). Ferroamp did not — it discharged 526 W. Plan slot wanted
battery_w=0, reason: "idle — export PV surplus"; Ferroamp instead ran its own self-consumption.Test plan
go test ./internal/drivers/ -run TestFerroamp -count=1go test ./... -count=1bat_wfollowstarget_w=0within one dispatch tick🤖 Generated with Claude Code