evcc icon indicating copy to clipboard operation
evcc copied to clipboard

Heating: separate target for surplus and price-driven charging

Open Johannes-del opened this issue 3 months ago • 1 comments

A heating loadpoint has a single limitSoc (for heating that's the target temperature), and both PV surplus and smartCostLimit charge towards it. For a hot water tank those two cases want different targets. Surplus is worth storing high, since the alternative is 8.6 ct/kWh feed-in (fixed EEG rate here, commissioned December 2020), so 60 °C is fine even though the COP drops over the top 10 K. Cheap grid is only worth buying up to what comfort needs, around 50 °C, because the expensive top of the tank is pure loss on grid.

One price limit, one temperature limit, both paths aim at the same 45 °C shown here.

With a single limit I have to pick one of the two, or move it from outside. I do the latter: a script polls evcc every 5 minutes and rewrites limitSoc depending on whether surplus is available right now. Over the last 60 days that was 919 writes, roughly 15 per day, purely to emulate something evcc could decide itself.

Top: four typical days, the target stepping between 45, 50 and 60 as surplus appears and disappears (70 is the weekly legionella run). Bottom: rewrites per day over the whole period.

What I'd like is a second target on the loadpoint that applies while charging is price driven rather than surplus driven, for example smartCostLimitSoc next to limitSoc. Surplus charging keeps using limitSoc, smartCostLimit charging stops at the lower value, unset keeps today's behaviour.

mintemp (#31749, out of #13071) plus limitSoc gets close: floor 50, surplus target 60, smartCostLimit off. But the floor is price blind and forces charging at whatever the hour costs, and with a dynamic tariff that's the part worth avoiding. Only around 14 % of the year sits at or below my 20 ct threshold. What I'm missing is not a floor, it's a lower ceiling for the price driven case.

The optimizer in #32881 leaves heating devices out by design ("Loadpoints the optimizer cannot model, for example heating devices and switch sockets, keep their own price limits"), so it doesn't close this gap. Dropping smartCostLimit entirely loses the winter case, where cheap hours are the only realistic source for days at a time.

Context: Vaillant aroTHERM plus over myVaillant, dynamic tariff, evcc 0.314.0. In the same 60 days there were 56 heat-ups, median 60 minutes, median solar share around 80 percent.

Johannes-del avatar Aug 20 '26 16:08 Johannes-del

Confirmed by reading the code: a loadpoint has a single limitSoc/LimitSoc (core/loadpoint.go), and EffectiveLimitSoc() is used as the stop condition for charging regardless of whether the charge is currently PV-surplus or smartCostLimit-driven (smartCostActive in Update() only gates whether smart-cost charging is allowed to start, it does not change the target). So there is indeed no way today to give the price-driven path a lower ceiling than the surplus path on the same loadpoint — the write-around-the-API workaround described matches the actual code behaviour.

This is a clearly-scoped feature request (a second, optional target such as smartCostLimitSoc that caps price-driven charging while limitSoc keeps capping surplus charging) rather than a bug. Implementing it touches the loadpoint config/settings, the stop-condition logic in core/loadpoint.go, the API (core/loadpoint_api.go, server/http.go, server/openapi.state.yaml), and the UI (assets/js/components/Loadpoints/...), plus the heating-specific target/temperature handling — a real design/scope discussion for maintainers, so I'm not attempting an implementation here.

🤖 Generated with Claude Code

github-actions[bot] avatar Aug 20 '26 16:08 github-actions[bot]