Replies: 2 comments
|
Note on repo choice: |
0 replies
That has been fixed in nightly. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
What I observed
On evcc 0.315.0 with the experimental battery optimizer enabled, I noticed the home battery was being held over night instead of discharging, even though the Solcast solar forecast for the next day guaranteed a full recharge.
Tracing the optimizer request/response (
evoptin/api/state, captured every 15 min over several nights) showed the optimizer was working against a 20 % lower / 95 % upper SoC bound for the home battery:The optimizer therefore stopped discharging as SoC approached 20 %, and recommended
holdfor the rest of the night.Where the 20 %/95 % does NOT come from
I initially assumed these limits were read from the inverter. They are not. From the SMA parameter export of the same inverter:
BatUsDm.DschProDmMin)BatChaSttMin)BatChaSttMax)So the inverter allows external (Modbus) battery control across the full 0–100 % range and only hardware-protects the bottom 2 %. There is no 20 % or 95 % anywhere in the inverter configuration. The
sma-hybridtemplate only reads the SoC register (30845);minsoc/maxsocare pure evcc config params, not Modbus reads.Conclusion: the 20 %/95 % is an evcc-side default that applies when the battery
minsoc/maxsocfields are left blank — it is not derived from the battery system.The fix (and proof it is the cause)
I set the battery config fields explicitly to minsoc = 0, maxsoc = 100. The optimizer request changed immediately:
The inverter's own 2 % deep-discharge protection remains the real hardware floor, so nothing is at risk — but the optimizer can now use the full usable range.
Why this is easy to miss (the actual point)
25(min) /95(max).For a battery whose hardware already protects itself (SMA: 2 %), this silently leaves a meaningful slice of usable capacity unused overnight and pushes the house onto grid import earlier than necessary.
Suggestion
Small, non-breaking improvements, any of these would help:
20/95as the actual default value rather than a25/95placeholder), orDschProDmMin), consider using that as the default lower bound instead of a fixed 20 %.Question to maintainers
Could you confirm the exact source of the blank-field default (20 %/95 %)? I could trace the optimizer mapping (
core/site_optimizer.gobatteryRequest,minSoc/maxSoc→SMin/SMax, withmaxSoc == 0 → 100) and the decorator (meter/usage_battery.go,batterySocLimits.Decoratorreturnsnilwhen both are 0), but I could not pin down where the literal 20 %/95 % is injected when the fields are blank. Understanding that would let me document it correctly for other SMA/BYD users.Evidence attached / available
evoptrequest snapshots before (blank → 20/95) and after (0/100) — captured via/api/stateAll reactions