Sonnenbatterie switches repeatedly to OperatingMode 1 (hold) without active EV charging
Describe the bug
Since updating the SonnenBatterie 10 Performance to firmware 1.4.0 and evcc to 0.316.0, the battery repeatedly switches to OperatingMode 1 (hold) and stops supplying the house load, causing unnecessary grid import.
This also happens when no EV is connected or charging. The issue occurs repeatedly, including during the night.
Before the evcc update, the charging mode was pv; after updating to 0.316.0, I switched to the new smart charging mode.
evcc appears to actively trigger the OperatingMode 1 changes. The attached trace log shows repeated writes of EM_OperatingMode=1 followed by battery mode: hold, and later EM_OperatingMode=2 / battery mode: normal.
I suspect a bug in the interaction between evcc 0.316.0, the new smart charging/battery control logic, and Sonnen firmware 1.4.0.
Steps to reproduce
- Use a SonnenBatterie 10 Performance with firmware 1.4.0.
- Use evcc 0.316.0.
- Configure the EV charging mode as
smart(previouslypv). - Leave the system running normally.
- Disconnect all EVs / have no active EV charging.
- Observe the SonnenBatterie operating mode.
- The battery periodically switches to
OperatingMode 1(hold) and later back to normal. - This can repeat several times, including during the night when no EV is charging.
evcc-20260926-093248-trace.log
Konfiguration yaml: log: debug levels: eebus: trace database: type: sqlite dsn: /var/lib/evcc/evcc.db
Configuration details
* evcc: 0.316.0
* SonnenBatterie: 10 Performance
* Sonnen firmware: 1.4.0
* evcc charging mode: `smart`
* Previous evcc charging mode: `pv`
* ioBroker is used to monitor the SonnenBatterie operating mode and send a Telegram notification whenever `OperatingMode` changes to `1`.
Attached:
* evcc.trace log
* configuration UI
Log details
The ioBroker monitoring script recorded the following transitions to `OperatingMode 1`:
23:07
01:07, 01:09, 01:10
03:11, 03:12
05:13, 05:15, 05:18, 05:20, 05:21
07:22
09:22, 09:24, 09:26
The trace log contains the corresponding events from the morning.
For example, evcc directly writes:
PUT /api/v2/configurations
{"EM_OperatingMode":"1"}
and immediately afterwards:
set battery Sonnenbatterie mode: hold
set battery mode: hold
Later, evcc changes it back:
PUT /api/v2/configurations
{"EM_OperatingMode":"2"}
followed by:
set battery Sonnenbatterie mode: normal
set battery mode: normal
An important detail: a 500 Wh bicycle battery was charged from approximately 15:12 until 21:17. The first subsequent OperatingMode 1 event occurred at 23:07. There was no car connected during the night.
The attached complete trace log contains the detailed sequence of requests and battery state changes.
What type of operating system or environment does evcc run on?
Linux
External automation
- [x] I have made sure that no external automation like HomeAssistant or Node-RED is active or accessing any of the mentioned devices when this issue occurs.
Nightly build
- [x] I have verified that the issue is reproducible with the latest nightly build
Version
No response
Thanks for the detailed report and the trace log.
Looking at the battery-mode logic in core/site_battery.go (requiredBatteryMode/updateBatteryMode), hold can only be selected for the whole site in a few specific cases:
dischargeControlActive()β requires an active loadpoint in statusC(charging) with either a smart-cost limit hit or fast charging activebatteryGridDischargeActive() && evFastChargingActive()β again requires an EV that is fast-charging- the site is (or is about to be) in
chargemode (e.g. a cheap grid-charge tariff window) and a HEMS reports the site as "dimmed" (hems.Dimmed, e.g. an EEBus/Β§14a-style grid-operator power limitation) β this forcesholdinstead ofchargeeven without any EV involved - an external battery mode was set via the MQTT/HTTP API (
SetBatteryModeExternal)
Since you report this happening repeatedly overnight with no EV connected/charging, the first two paths (which need an actively charging EV) don't seem to apply, which points more towards the HEMS-dimmed/grid-charge combination or an external mode setter β notably, your config enables eebus: trace logging, so it looks like an EEBus HEMS integration may be involved.
To narrow this down we'd need a bit more:
- Do you have an EEBus (or SG-ready) HEMS device configured that can "dim"/limit site consumption (e.g. a grid-operator Β§14a controllable-consumption-device box)? If so, is it possibly active overnight?
- Is a dynamic/grid-charge tariff configured for the battery (
batterygridchargelimit) or is "battery discharge control" enabled? The posted config snippet only shows thelog/databasesection β could you share thehems,tariffsandbatterysections of yourevcc.yaml? - Could you paste (inline, as attachments are hard for us to correlate) the ~15β20 debug/trace lines immediately preceding one
"EM_OperatingMode":"1"write, including any lines mentioningbattery mode,HEMS,grid charge,discharge controlorsmart cost? That will show exactly which condition triggeredhold.
With that we should be able to confirm the exact trigger.
π€ Generated with Claude Code
Thanks for the clarification.
I can rule out the EEBUS/HEMS path in my setup:
- I do not have EEBUS configured.
- I do not have a HEMS device configured.
- I do not have any Β§14a / grid-operator controlled device configured.
- The only EEBUS-related entry in my
evcc.yamlis:
log: debug levels: eebus: trace database: type: sqlite dsn: /var/lib/evcc/evcc.db
This was only added to increase logging and does not represent an EEBUS configuration.
Regarding the EV/loadpoint condition:
There was no car connected or charging during the night.
A 500 Wh bicycle battery was charged using a mobile charger in Sofort mode. Charging started at approximately 15:12 and finished at approximately 21:17.
The first OperatingMode 1 notification occurred at 23:07, almost two hours after charging had finished. Further events occurred repeatedly during the night:
23:07 01:07, 01:09, 01:10 03:11, 03:12 05:13, 05:15, 05:18, 05:20, 05:21 07:22 09:22, 09:24, 09:26
So I would be interested in knowing whether evcc still considers the loadpoint active after the charging session has ended, or whether another condition in requiredBatteryMode() can cause hold.
Regarding the external battery mode path: I am not intentionally setting evcc/site/batteryMode via MQTT or the HTTP API. If the trace can show whether the hold was selected internally by requiredBatteryMode() or came from SetBatteryModeExternal, that would probably distinguish the two cases.
I have attached the relevant configuration and trace log. [mqtt ] TRACE 2026/09/26 09:22:52 send evcc/site/forecast/temperature: '' [mqtt ] TRACE 2026/09/26 09:22:52 send evcc/site/batteryGridDischargeActive: 'false' [mqtt ] TRACE 2026/09/26 09:22:52 send evcc/site/forecast/solar: '' [mqtt ] TRACE 2026/09/26 09:22:52 send evcc/site/forecast/planner: '[[1790406000,1790406900,0.287],[1790406900,1790407800,0.287],[1790407800,1790408700,0.287],[1790408700,1790409600,0.287],[1790409600,1790410500,0.287],[1790410500,1790411400,0.287],[1790411400,1790412300,0.287],[1790412300,1790413200,0.287],[1790413200,1790414100,0.287],[1790414100,1790415000,0.287],[1790415000,1790415900,0.287],[1790415900,1790416800,0.287],[1790416800,1790417700,0.287],[1790417700,1790418600,0.287],[1790418600,1790419500,0.287],[1790419500,1790420400,0.287],[1790420400,1790421300,0.287],[1790421300,1790422200,0.287],[1790422200,1790423100,0.287],[1790423100,1790424000,0.287],[1790424000,1790424900,0.287],[1790424900,1790425800,0.287],[1790425800,1790426700,0.287],[1790426700,1790427600,0.287],[1790427600,1790428500,0.287],[1790428500,1790429400,0.287],[1790429400,1790430300,0.287],[1790430300,1790431200,0.287],[1790431200,1790432100,0.287],[1790432100,1790433000,0.287],[1790433000,1790433900,0.287],[1790433900,1790434800,0.287],[1790434800,1790435700,0.287],[1790435700,1790436600,0.287],[1790436600,1790437500,0.287],[1790437500,1790438400,0.287],[1790438400,1790439300,0.287],[1790439300,1790440200,0.287],[1790440200,1790441100,0.287],[1790441100,1790442000,0.287],[1790442000,1790442900,0.287],[1790442900,1790443800,0.287],[1790443800,1790444700,0.287],[1790444700,1790445600,0.287],[1790445600,1790446500,0.287],[1790446500,1790447400,0.287],[1790447400,1790448300,0.287],[1790448300,1790449200,0.287],[1790449200,1790450100,0.287],[1790450100,1790451000,0.287],[1790451000,1790451900,0.287],[1790451900,1790452800,0.287],[1790452800,1790453700,0.287],[1790453700,1790454600,0.287],[1790454600,1790455500,0.287],[1790455500,1790456400,0.287],[1790456400,1790457300,0.287],[1790457300,1790458200,0.287],[1790458200,1790459100,0.287],[1790459100,1790460000,0.287],[1790460000,1790460900,0.287],[1790460900,1790461800,0.287],[1790461800,1790462700,0.287],[1790462700,1790463600,0.287],[1790463600,1790464500,0.287],[1790464500,1790465400,0.287],[1790465400,1790466300,0.287],[1790466300,1790467200,0.287],[1790467200,1790468100,0.287],[1790468100,1790469000,0.287],[1790469000,1790469900,0.287],[1790469900,1790470800,0.287],[1790470800,1790471700,0.287],[1790471700,1790472600,0.287],[1790472600,1790473500,0.287],[1790473500,1790474400,0.287],[1790474400,1790475300,0.287],[1790475300,1790476200,0.287],[1790476200,1790477100,0.287],[1790477100,1790478000,0.287],[1790478000,1790478900,0.287],[1790478900,1790479800,0.287],[1790479800,1790480700,0.287],[1790480700,1790481600,0.287],[1790481600,1790482500,0.287],[1790482500,1790483400,0.287],[1790483400,1790484300,0.287],[1790484300,1790485200,0.287],[1790485200,1790486100,0.287],[1790486100,1790487000,0.287],[1790487000,1790487900,0.287],[1790487900,1790488800,0.287],[1790488800,1790489700,0.287],[1790489700,1790490600,0.287],[1790490600,1790491500,0.287],[1790491500,1790492400,0.287],[1790492400,1790493300,0.287],[1790493300,1790494200,0.287],[1790494200,1790495100,0.287],[1790495100,1790496000,0.287],[1790496000,1790496900,0.287],[1790496900,1790497800,0.287],[1790497800,1790498700,0.287],[1790498700,1790499600,0.287],[1790499600,1790500500,0.287],[1790500500,1790501400,0.287],[1790501400,1790502300,0.287],[1790502300,1790503200,0.287],[1790503200,1790504100,0.287],[1790504100,1790505000,0.287],[1790505000,1790505900,0.287],[1790505900,1790506800,0.287],[1790506800,1790507700,0.287],[1790507700,1790508600,0.287],[1790508600,1790509500,0.287],[1790509500,1790510400,0.287],[1790510400,1790511300,0.287],[1790511300,1790512200,0.287],[1790512200,1790513100,0.287],[1790513100,1790514000,0.287],[1790514000,1790514900,0.287],[1790514900,1790515800,0.287],[1790515800,1790516700,0.287],[1790516700,1790517600,0.287],[1790517600,1790518500,0.287],[1790518500,1790519400,0.287],[1790519400,1790520300,0.287],[1790520300,1790521200,0.287],[1790521200,1790522100,0.287],[1790522100,1790523000,0.287],[1790523000,1790523900,0.287],[1790523900,1790524800,0.287],[1790524800,1790525700,0.287],[1790525700,1790526600,0.287],[1790526600,1790527500,0.287],[1790527500,1790528400,0.287],[1790528400,1790529300,0.287],[1790529300,1790530200,0.287],[1790530200,1790531100,0.287],[1790531100,1790532000,0.287],[1790532000,1790532900,0.287],[1790532900,1790533800,0.287],[1790533800,1790534700,0.287],[1790534700,1790535600,0.287],[1790535600,1790536500,0.287],[1790536500,1790537400,0.287],[1790537400,1790538300,0.287],[1790538300,1790539200,0.287],[1790539200,1790540100,0.287],[1790540100,1790541000,0.287],[1790541000,1790541900,0.287],[1790541900,1790542800,0.287],[1790542800,1790543700,0.287],[1790543700,1790544600,0.287],[1790544600,1790545500,0.287],[1790545500,1790546400,0.287],[1790546400,1790547300,0.287],[1790547300,1790548200,0.287],[1790548200,1790549100,0.287],[1790549100,1790550000,0.287],[1790550000,1790550900,0.287],[1790550900,1790551800,0.287],[1790551800,1790552700,0.287],[1790552700,1790553600,0.287],[1790553600,1790554500,0.287],[1790554500,1790555400,0.287],[1790555400,1790556300,0.287],[1790556300,1790557200,0.287],[1790557200,1790558100,0.287],[1790558100,1790559000,0.287],[1790559000,1790559900,0.287],[1790559900,1790560800,0.287],[1790560800,1790561700,0.287],[1790561700,1790562600,0.287],[1790562600,1790563500,0.287],[1790563500,1790564400,0.287],[1790564400,1790565300,0.287],[1790565300,1790566200,0.287],[1790566200,1790567100,0.287],[1790567100,1790568000,0.287],[1790568000,1790568900,0.287],[1790568900,1790569800,0.287],[1790569800,1790570700,0.287],[1790570700,1790571600,0.287],[1790571600,1790572500,0.287],[1790572500,1790573400,0.287],[1790573400,1790574300,0.287],[1790574300,1790575200,0.287],[1790575200,1790576100,0.287],[1790576100,1790577000,0.287],[1790577000,1790577900,0.287],[1790577900,1790578800,0.287],[1790578800,1790579700,0.287],[1790579700,1790580600,0.287],[1790580600,1790581500,0.287],[1790581500,1790582400,0.287],[1790582400,1790583300,0.287],[1790583300,1790584200,0.287],[1790584200,1790585100,0.287],[1790585100,1790586000,0.287],[1790586000,1790586900,0.287],[1790586900,1790587800,0.287],[1790587800,1790588700,0.287],[1790588700,1790589600,0.287],[1790589600,1790590500,0.287],[1790590500,1790591400,0.287],[1790591400,1790592300,0.287],[1790592300,1790593200,0.287],[1790593200,1790594100,0.287],[1790594100,1790595000,0.287],[1790595000,1790595900,0.287],[1790595900,1790596800,0.287],[1790596800,1790597700,0.287],[1790597700,1790598600,0.287],[1790598600,1790599500,0.287],[1790599500,1790600400,0.287],[1790600400,1790601300,0.287],[1790601300,1790602200,0.287],[1790602200,1790603100,0.287],[1790603100,1790604000,0.287],[1790604000,1790604900,0.287],[1790604900,1790605800,0.287],[1790605800,1790606700,0.287],[1790606700,1790607600,0.287],[1790607600,1790608500,0.287],[1790608500,1790609400,0.287],[1790609400,1790610300,0.287],[1790610300,1790611200,0.287],[1790611200,1790612100,0.287],[1790612100,1790613000,0.287],[1790613000,1790613900,0.287],[1790613900,1790614800,0.287],[1790614800,1790615700,0.287],[1790615700,1790616600,0.287],[1790616600,1790617500,0.287],[1790617500,1790618400,0.287],[1790618400,1790619300,0.287],[1790619300,1790620200,0.287],[1790620200,1790621100,0.287],[1790621100,1790622000,0.287],[1790622000,1790622900,0.287],[1790622900,1790623800,0.287],[1790623800,1790624700,0.287],[1790624700,1790625600,0.287],[1790625600,1790626500,0.287],[1790626500,1790627400,0.287],[1790627400,1790628300,0.287],[1790628300,1790629200,0.287],[1790629200,1790630100,0.287],[1790630100,1790631000,0.287],[1790631000,1790631900,0.287],[1790631900,1790632800,0.287],[1790632800,1790633700,0.287],[1790633700,1790634600,0.287],[1790634600,1790635500,0.287],[1790635500,1790636400,0.287],[1790636400,1790637300,0.287],[1790637300,1790638200,0.287],[1790638200,1790639100,0.287],[1790639100,1790640000,0.287],[1790640000,1790640900,0.287],[1790640900,1790641800,0.287],[1790641800,1790642700,0.287],[1790642700,1790643600,0.287],[1790643600,1790644500,0.287],[1790644500,1790645400,0.287],[1790645400,1790646300,0.287],[1790646300,1790647200,0.287],[1790647200,1790648100,0.287],[1790648100,1790649000,0.287],[1790649000,1790649900,0.287],[1790649900,1790650800,0.287],[1790650800,1790651700,0.287],[...' [mqtt ] TRACE 2026/09/26 09:22:52 send evcc/site/batteryGridDischargeActive: 'false' [httpd ] TRACE 2026/09/26 09:22:52 GET /api/auth/status [httpd ] TRACE 2026/09/26 09:22:52 GET /api/system/log [httpd ] TRACE 2026/09/26 09:22:52 GET /api/system/log/areas [db:3-Sonnenbatterie] TRACE 2026/09/26 09:22:52 PUT http://192.168.178.33/api/v2/configurations [db:3-Sonnenbatterie] TRACE 2026/09/26 09:22:52 {"EM_OperatingMode":"1"}
{"EM_OperatingMode":"1"}
Thanks for ruling out EEBus/HEMS and for the extra detail. I re-read core/site_battery.go closely β the code only has four places that can select hold for the whole site:
dischargeControlActive()βsite.GetBatteryDischargeControl()opt-in is on and some loadpoint reportsStatusCwith eithersmartCostActiveorIsFastChargingActive()(lp.mode == api.ModeNow || lp.planActive || lp.minSocNotReached()).batteryGridDischargeActive && evFastChargingActive()β sameStatusC/fast-charging condition, gated by the "grid discharge" opt-in.hems.Dimmedwhile approachingchargemode β ruled out, no HEMS configured.- An external mode set via
SetBatteryModeExternal(MQTTevcc/site/batteryMode/setor the HTTP battery-mode API) β this has a 60s watchdog: if not refreshed within a minute it auto-resets tonormal. That matches the clustering in your event list very well (e.g.01:07, 01:09, 01:10and05:13β¦05:21β repeats a minute or two apart, then a long gap), which is the signature of something (re-)asserting an external mode rather than of the discharge-control path (which has no such 60s cadence).
Important: dischargeControlActive/evFastChargingActive check every configured loadpoint, not just the one with the EV β so the mobile charger you used for the bike (in Sofort/Now mode) counts too if it's a loadpoint in evcc. If it were still showing StatusC intermittently (e.g. a socket/relay charger flickering near its detection threshold) while its mode was still Now, that alone would make IsFastChargingActive() true and could explain the repeated hold entries.
The pasted log snippet doesn't contain a battery mode:/external battery mode line right before the PUT, so it doesn't let us tell which of these paths fired. To narrow it down, could you:
- Search the full trace log for the literal string
external battery modeand tell us whether it appears around theholdtimestamps (this would confirm/rule out path 4 directly). - Confirm whether "battery discharge control" and/or "grid discharge" are enabled in the UI battery settings (these are runtime toggles, not in
evcc.yaml, so the config you shared doesn't show them). - Share the
loadpoints:section of your config (or the loadpoint list from the UI), specifically whether the mobile/bike charger is a separate loadpoint, and what mode/status it shows once the bike finished charging.
With that we should be able to point to the exact trigger.
π€ Generated with Claude Code
1: [mqtt ] TRACE 2026/09/26 09:22:52 send evcc/site/batteryGridDischargeActive: 'false' [httpd ] TRACE 2026/09/26 09:22:52 GET /api/auth/status [httpd ] TRACE 2026/09/26 09:22:52 GET /api/system/log [httpd ] TRACE 2026/09/26 09:22:52 GET /api/system/log/areas [db:3-Sonnenbatterie] TRACE 2026/09/26 09:22:52 PUT http://192.168.178.33/api/v2/configurations [db:3-Sonnenbatterie] TRACE 2026/09/26 09:22:52 {"EM_OperatingMode":"1"}
{"EM_OperatingMode":"1"} [db:3-Sonnenbatterie] TRACE 2026/09/26 09:22:52 POST http://192.168.178.33/api/v2/setpoint/discharge/0 [db:3-Sonnenbatterie] TRACE 2026/09/26 09:22:52 2
true [db:3-Sonnenbatterie] TRACE 2026/09/26 09:22:52 POST http://192.168.178.33/api/v2/setpoint/charge/0 [db:3-Sonnenbatterie] TRACE 2026/09/26 09:22:52 2
true [site ] DEBUG 2026/09/26 09:22:52 set battery Sonnenbatterie mode: hold [site ] DEBUG 2026/09/26 09:22:52 set battery mode: hold [mqtt ] TRACE 2026/09/26 09:22:52 send evcc/loadpoints/1/suggestion: '' [mqtt ] TRACE 2026/09/26 09:22:52 send evcc/updated: '1790407372' [mqtt ] TRACE 2026/09/26 09:22:52 send evcc/site/batteryMode: 'hold' [mqtt ] TRACE 2026/09/26 09:22:52 send evcc/loadpoints/2/suggestion: '' [httpd ] TRACE 2026/09/26 09:22:52 GET /meta/favicon.ico [httpd ] TRACE 2026/09/26 09:22:52 GET /meta/favicon-16x16.png [httpd ] TRACE 2026/09/26 09:22:52 GET /meta/favicon-32x32.png [httpd ] TRACE 2026/09/26 09:22:52 GET /meta/favicon.ico [httpd ] TRACE 2026/09/26 09:22:52 GET /meta/favicon-16x16.png [httpd ] TRACE 2026/09/26 09:22:52 GET /meta/favicon-32x32.png [httpd ] TRACE 2026/09/26 09:22:57 GET /semp/description.xml [semp ] TRACE 2026/09/26 09:22:57 send: {XMLName:{Space: Local:} Xmlns:urn:schemas-upnp-org:device-1-0 SpecVersion:{Major:1 Minor:0} Device:{DeviceType:urn:schemas-simple-energy-management-protocol:device:Gateway:1 FriendlyName:evcc Manufacturer:evcc.io ModelName:evcc UDN:uuid:3aca7345-6336-40b6-af42-37abcd0a4501 PresentationURL:http://192.168.178.32:7070 ServiceDefinition:{Xmlns:urn:schemas-simple-energy-management-protocol:service-1-0 Server:http://192.168.178.32:7070 BasePath:/semp Transport:HTTP/Pull ExchangeFormat:XML WsVersion:1.1.0} ServiceList:[]}} [httpd ] TRACE 2026/09/26 09:23:01 GET /api/state [site ] DEBUG 2026/09/26 09:23:01 ---- [shelly] TRACE 2026/09/26 09:23:01 POST http://192.168.178.147/rpc/Switch.GetStatus [shelly] TRACE 2026/09/26 09:23:01 {"id":0,"src":"evcc","method":"Switch.GetStatus"}
{"id":0, "source":"HTTP_in", "output":true, "apower":28.7, "voltage":232.5, "current":0.182, "aenergy":{"total":1309.823,"by_minute":[461.613,278.008,7.600],"minute_ts":1790407380},"temperature":{"tC":41.8, "tF":107.2}} [lp-2 ] DEBUG 2026/09/26 09:23:01 charge power: 29W [lp-2 ] DEBUG 2026/09/26 09:23:01 charge currents: [0.182 0 0]A [mqtt ] TRACE 2026/09/26 09:23:01 send evcc/loadpoints/2/chargePower: '28.7' [mqtt ] TRACE 2026/09/26 09:23:01 send evcc/loadpoints/2/chargeCurrents/l1: '0.182' [mqtt ] TRACE 2026/09/26 09:23:01 send evcc/updated: '1790407381' [mqtt ] TRACE 2026/09/26 09:23:01 send evcc/loadpoints/2/chargeCurrents: '0.182' [mqtt ] TRACE 2026/09/26 09:23:01 send evcc/loadpoints/2/chargeCurrents/l2: '0' [mqtt ] TRACE 2026/09/26 09:23:01 send evcc/loadpoints/2/chargeCurrents/l3: '0' [db:10 ] TRACE 2026/09/26 09:23:01 GET http://192.168.178.148/rpc/Shelly.GetStatus [db:10 ] TRACE 2026/09/26 09:23:01
2: {"id":3,"name":"db:3","type":"template","config":{ "template":"sonnenbatterie", "capacity":11, "chargepower":"3300", "defaultmode":"self-consumption", "host":"192.168.178.33", "maxchargepower":"3300", "port":"8080", "token":"***", "usage":"battery" }}
3: EVCC Version v0.316.0
Sonnen Driver: The battery is configured as a template via the WebUI: type: template, template: sonnenbatterie EVCC does not write a separate "using driver sonnen" entry to the log for template drivers.
I think Iβve found the fault. I hadnβt connected a vehicle for charging, but I had a bike battery connected to LP2 via the Shelly. And the setting to prevent the house battery from discharging in fast mode and during scheduled charging had been switched on. The battery was drawing 29W at times, and I suspect thatβs precisely why EVCC temporarily blocked the solar battery. Can you confirm this, or am I mistaken?
/analyze
Confirmed β your theory matches the code exactly.
dischargeControlActive() in core/site_battery.go:270-283 iterates every active loadpoint, not just the one with the "real" EV. For each one it checks:
if lp.GetStatus() == api.StatusC && (smartCostActive || lp.IsFastChargingActive()) {
return true
}
IsFastChargingActive() (core/loadpoint_api.go:898) is:
return lp.mode == api.ModeNow || lp.planActive || lp.minSocNotReached()
So it only checks the loadpoint's mode, not its actual charge power. Your LP2 (the Shelly-relay-controlled bike charger) was set to Sofort/Now mode and reported StatusC (connected/charging) while drawing the 29 W trickle. With "battery discharge control" enabled, that combination alone is enough to make dischargeControlActive() return true for the whole site, forcing hold β completely independent of the 29 W being negligible power. Once the bike charger's relay/status flickered (dropping in and out of StatusC, or the periodic re-evaluation catching it in C state again), hold got re-applied repeatedly, matching your observed clustering of events.
This is expected behavior of "battery discharge control" as currently implemented β it treats any Now-mode loadpoint in StatusC as fast charging, regardless of drawn power β not a bug. To avoid this, either switch LP2 out of Sofort/Now mode (e.g. pv) when charging low-power devices like this, or disable "prevent battery from discharging" for that scenario.
π€ Generated with Claude Code