Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .changeset/boost-survives-binding-fuse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"ftw": patch
---

A battery boost keeps running while the main fuse or the hourly import limit
holds the car back. FTW used to refuse or stop a boost exactly then, with
"fuse protection stopped it", although that is when the home battery helps
most. The car's limit still comes from the measured site meter, so the fuse
is protected as before.
10 changes: 3 additions & 7 deletions go/cmd/ftw/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2074,7 +2074,6 @@ func main() {
lpController.SetBatteryBoostSafety(func(id string, lease loadpoint.BatteryBoostLease) loadpoint.BatteryBoostStopReason {
ctrlMu.Lock()
mode := ctrl.Mode
fuseBlocked, importBlocked := ctrl.FuseSaturated, ctrl.FuseSaturatedByImport
_, batteryHeld := ctrl.GetBatteryManualHold(time.Now())
siteMeter := ctrl.SiteMeterDriver
ctrlMu.Unlock()
Expand All @@ -2084,12 +2083,9 @@ func main() {
if batteryHeld {
return loadpoint.BatteryBoostStoppedBatteryHold
}
if fuseBlocked && importBlocked {
return loadpoint.BatteryBoostStoppedImportLimit
}
if fuseBlocked {
return loadpoint.BatteryBoostStoppedFuseSafety
}
// A binding fuse or import limit is no reason to stop: the car's
// limit comes from the measured meter either way, and the battery's
// discharge is what makes room under it.
cfgMu.RLock()
watchdog := time.Duration(cfg.Site.WatchdogTimeoutS) * time.Second
staticFloor := make(map[string]float64, len(cfg.Batteries))
Expand Down
Loading