evcc icon indicating copy to clipboard operation
evcc copied to clipboard

Support grid capacity tariffs

Open andig opened this issue 1 month ago • 41 comments

Adding Austria to the list of countries with power-based grid fees.

From 2027, Austria introduces a new grid fee structure for all households (SNE-G-V by E-Control, the national regulator). Each grid operator must switch between 1 Jan 2027 and 1 Jul 2028 at the latest, so this will affect basically every evcc user in Austria.

How it works:

  • A new Leistungspreis (power price) is billed on the highest 15-minute average grid import per calendar month, at any time of day.
  • According to E-Control's simulation there are two tiers, roughly €34/kW/year up to 10 kW and about double above 10 kW (final values pending).
  • The share of power-based grid costs will rise step by step to about 50 %.

This is essentially the same mechanism as the Flemish capacity tariff (#21970). An 11 kW wallbox plus a heat pump and base load easily creates monthly peaks of 15 kW or more, which will cost several hundred euros per year.

Time-of-use grid rates (summer 10–16, winter 23–05) can already be modelled with fixed tariff zones. What is missing is native monthly peak awareness:

  • Track the highest 15-min average grid import of the current month.
  • Allow charging up to that peak without restriction, since anything below it costs nothing extra.
  • Reset to a configurable baseline on the 1st of each month, with an optional hard cap (e.g. 10 kW tier boundary).
  • Ideally, use a 15-min rolling average instead of instantaneous power before throttling (see #24122).

I understand the current recommendation is to set circuit maxPower externally via MQTT/HTTP (e.g. from Home Assistant), and that works. But with Belgium, Norway, Australia and now Austria all moving to peak-based grid fees, a built-in solution would help a lot of users who don't run a separate automation platform.

Sources:

Originally posted by @longtom99 in #14261

andig avatar Oct 14 '26 10:10 andig

Feature request for monthly peak awareness (15-min average grid import) to support power-based grid fees such as the upcoming Austrian tariff. Nothing in the circuit logic (core/circuit) tracks a monthly peak today; the current approach is setting circuit maxPower externally, as you describe. This needs design discussion, so no fix is attempted here.

Related: #21970 (Flemish peak tariff, closed), #24122 (delay/averaging before enforcing circuit maxPower, closed as stale).

🤖 Generated with Claude Code

github-actions[bot] avatar Oct 14 '26 10:10 github-actions[bot]

Adding Norway to this, since the mechanism is already live here and differs from the Austrian/Flemish model in one important respect: the peak window is a clock hour, not 15 minutes.

How the Norwegian capacity tariff works today

  • The tier is set from the average of the three highest hourly energy values (kWh/h) in the month, taken from three different days. Energy per hour is what counts, not instantaneous power: 4 kW spread evenly across an hour and a 14 kW spike inside the same hour land in the same tier.
  • Because it is a top-3 average, a single bad hour is weighted 1/3 and does not by itself move you up a tier. What does bite if one overshoots at the beginning of the month...
  • Windows are clock hours (00-01, 01-02, ...), not a rolling window.
  • Ladders are usually 0-2 / 2-5 / 5-10 / 10-15 / 15-20 kWh/h, but every company sets its own.
  • Households are still settled hourly. Since the day-ahead market went 15-minute, hourly-read customers get the hourly price (the four quarter values are summed per hour); 15-minute registration is currently only proposed for commercial customers above 100 000 kWh/year.

Current workaround I compute available power for the rest of the hour with https://github.com/epaulsen/energytariff and feed it to the circuit via GetMaxPower over MQTT - same pattern as described in #14261. It works well with my Easee chargers and the water heater to stay in the right tariff. One practical detail: the target has to sit below the tier boundary, e.g. 4.8 instead of 5.0 kWh/h, because small overshoots otherwise tip you into the next tier. so either having it customizable as a float or calculating for this when suggesting boundaries for the user would be advisable.

What I would like to see in evcc

  • A tier/ladder config (thresholds, optionally prices) so evcc knows the boundaries instead of just a single maxPower.
  • An hour-aligned energy accumulator with monthly reset, plus tracking of the running top-3-of-three-days average - which also enables the "peak is already paid for, lift the limit for the rest of the month" behaviour discussed in #14261.
  • Use the planner/optimiser to schedule charging inside the remaining kWh/h budget, based on historical base load.
  • Adjust charging power instead of stopping the session when another consumer switches on.
  • If the budget is exceeded anyway within that hour, shed by priority (priorities already exist).

Swoop86 avatar Oct 14 '26 10:10 Swoop86

Interesting model, but quite pricey if you went all-in for electrification of mobility + heat.

Monthly 15-min average peak could be queried from history.

For "allow charging up to that peak" we have to keep control delays in mind.

Let's say my peak is 6,2 kW this month, then my theoretical maximum would be 6,99 before next 35€ kW-fee is charged.

If we got 1kW of household energy, we should not control Wallbox with 5,99kW as the slighted peak increase in household will lead to the average rising.

The standard 30s evcc control behavior, together with the technical delay that a Wallbox/car need to apply a changed current, will lead to relevant delays before the charging energy is actually reduced.

We should keep an "safety buffer" in mind so these control delays don't lead to an exceed of targeted 15-min avg peak. Depending on how high your peak household energy demand is, users can adjust that.

If you got a 25 kW flow heater you better put a bigger buffer into this value.

ScumbagSteve avatar Oct 14 '26 10:10 ScumbagSteve

From what I understand there are a few aspects to the solution:

  1. Understand the desirable maximum: some sort of rolling value, maybe seeded by an available minimum, resetting at times (month start).
  2. Include the associated costs in the tariff: this should at least include the current costs since it may impact optimizer decisions.
  3. Make additional costs in case of rising demand visible to the optimizer. May be optional.
  4. Limit the actual consumption to the desirable maximum: the usual mechanism would be the load management's grid limit. That would however enforce the limit. Is that desirable? An alternative solution is the optimizer's peak shaving.

My assumption as usual is that there won't be a one size fits all.

andig avatar Oct 14 '26 11:10 andig

Personally I don't think this will be solvable for optimizer. If 1 kW of additional peak means 34€ it will never go above the existing limit.

Optimizer only takes into account a small time window. To really calculate if the 34€ are worth it, you need to consider the saving for the year that one more kW peak will give you (you can then create savings by using cheap energy rates more efficiently) but this strongly depends on the flexible demand you have over the year.

I am not sure if it's worth giving these choices to optimizer, as it can't calculate the best financial strategy anyways.

I think we have to come to a grid limit and then just consider this as given in optimizer logic.

ScumbagSteve avatar Oct 14 '26 11:10 ScumbagSteve

I think the limit should be a hard limit that evcc tries to enforce. What would be nice to have is guidance from the optimizer, saying "hey, your limit is unrealistic based on your historical data and you need to step up to the next limit".

Swoop86 avatar Oct 14 '26 11:10 Swoop86

Let's say my peak is 6,2 kW this month, then my theoretical maximum would be 6,99 before next 35€ kW-fee is charged.

Not sure how this works in other countries, but in belgium there's no brackets. The price/kW is just multiplied by the actual peak value. So a 6.2kW peak should result in €217 (6.2 x 35) instead of €210 (6 x 35). Assuming the theoretical max would result in €244.64 (6.99 x 35) instead.

As pointed out above, there probably isn't a one size fits all, perhaps in the future there will be some kind of standard on that front, but it's quite unlikely imo.

I kind of agree with @ScumbagSteve that the optimizer shouldn't make this decision on cost, it should just try to keep the limit, if for whatever reason the peak can't be enforced (sometimes you just can't avoid it), for example because you need to charge your car now at max speed while other (non-controllable) household items are working, so be it.

Tommatheussen avatar Oct 14 '26 11:10 Tommatheussen

Thanks for picking this up! Regarding "enforce the limit – is that desirable?", from an Austrian perspective:

  • Yes, enforced, but against grid import only. If it reuses circuit maxPower on the grid meter, a low target (e.g. a 2 kW baseline in summer) blocks PV surplus charging from starting while the home battery absorbs the surplus (#33187). So the peak target should be separate from maxPower (the hard fuse of the connection) and let surplus/battery logic (prioritySoc/bufferSoc) still start charging.
  • Fixed quarter-hours: the Austrian smart meter registers clock-aligned 15-min intervals (:00, :15, :30, :45), similar to the clock-hour windows in Norway. Knowing the remaining energy budget for the current quarter-hour would allow charging a bit more early in the interval and throttling towards the end.
  • Billing: as far as I know Austria also charges per kW of the measured peak (like Belgium, no rounding to whole kW), with a higher rate above 10 kW. Final details come with the tariff ordinance (SNE-T-V) in December.
  • +1 to the safety buffer from @ScumbagSteve, configurable per installation (heat pump or flow heater switching on).
  • Already-paid peak: once the month's peak is set, everything up to that level is free for the rest of the month, so the target should rise with the actual peak and reset on the 1st.

Agree with @Tommatheussen and @Swoop86 that the optimizer should simply treat the limit as given and not trade it off against cost. If it can't be held (e.g. charging at full speed is needed right now), so be it. A hint like "your limit is unrealistic based on history" would be a nice addition.

longtom99 avatar Oct 14 '26 11:10 longtom99

I kind of agree with @ScumbagSteve that the optimizer shouldn't make this decision on cost, it should just try to keep the limit, if for whatever reason the peak can't be enforced (sometimes you just can't avoid it), for example because you need to charge your car now at max speed while other (non-controllable) household items are working, so be it.

This sounds like "hold the limit" (which is load management) but don't do if you can't (which load management doesn't provide) is catch 22. Who says what's acceptable? If you just want to keep import flat use optimizer with peak shaving. but that won't guarantee that user-provided demands or fast charging don't kill your limits.

That said it's either or: enforce or not.

Update unless of course you'd make that an "advisory only" limit for the optimizer. Yet another mechanism and won't do anything outside optimizer.

andig avatar Oct 14 '26 11:10 andig

@andig agreed, it has to be one or the other. I'd go with enforce, scoped to what evcc controls:

  • Enforce via load management, but as a separate peak target next to maxPower (the hard fuse). It only limits grid import caused by evcc-controlled loads; if non-controllable household load alone exceeds it, evcc throttles its loadpoints to min/off – same as load management today. No "unless you can't" exception needed.
  • Who decides what's acceptable: the user, explicitly. E.g. a mode or toggle (fast charging / boost) that knowingly ignores the peak target. That is a clear rule instead of a heuristic.
  • Already-paid peak: if the peak is exceeded anyway (household load or a deliberate override), the target rises to the new monthly peak, since that is already paid for, and resets on the 1st to a configurable baseline (2 kW AT, 2.5 kW BE).
  • Surplus must still start: the peak target must apply to grid import only, so PV/battery surplus charging isn't blocked while the battery charges (#33187).
  • Safety buffer as suggested by @ScumbagSteve, configurable per installation.

The optimizer can then treat the peak target as a given constraint, as @Swoop86 suggested, without having to weigh costs.

longtom99 avatar Oct 14 '26 11:10 longtom99

The optimizer can then treat the peak target as a given constraint, as @Swoop86 suggested, without having to weigh costs.

It already does so wrt to the load management's grid circuit limit.

unless of course you'd make that an "advisory only" limit for the optimizer. Yet another mechanism and won't do anything outside optimizer.

Which would mean the optimizer gets an additional limit not coming from load management; lower limit wins on the optimizer side; load management remains unaffected. Maybe in a second step.

andig avatar Oct 14 '26 11:10 andig

@longtom99 just as comment, as I have seen many misunderstandings in Austrian discussions regarding the 10kw "boarder":

That's just the limit where every single kw gets double then price. So there will be another price for per kw power in the range from 2-10 and 2x the price above.

But calculated on monthly level. So if price is e.g. 31€ per kw per year, it will be 2,6€ per month, per kw. 5kw would then be 13€ for the month (where the peak is happening) So calculation should not be to complicated.

We just need to define somewhere what it costs and consider the factor 2 above 10

SolarPower2024 avatar Oct 14 '26 12:10 SolarPower2024

@SolarPower2024 thanks, that's what I meant by "two tiers": a marginal rate, not a bracket. So per month:

cost = rate/12 × min(peak, 10 kW) + 2 × rate/12 × max(peak − 10 kW, 0), with peak ≥ 2 kW (minimum).

That's a simple piecewise-linear cost per kW which could be configured as e.g. rate, threshold and factor, and also covers Belgium (single rate, 2.5 kW minimum, no threshold).

longtom99 avatar Oct 14 '26 13:10 longtom99

I fully support the intention of eventually arriving at the ideal solution. That said, I currently have a working solution that covers the “follow the peak” use case quite well for me. There is only one minor issue: evcc controls charging a little too aggressively.

As mentioned before, I use a script that reads my DSMR data once a day and writes a value to a file, which evcc then reads through the maxPower parameter.

I also think @ScumbagSteve issue may be less significant than it appears (please correct me if I’m wrong), since the peak is calculated as an average over a 15-minute interval.

This brings me to my main issue. If you accept, for example, a 3.5 kW peak at the beginning of the month, evcc can be rather aggressive in stopping and restarting charging whenever something like an oven or pump switches on. On the other hand, I can confirm that since using this setup,

  • my peak has NEVER been caused by an active EV charger.
  • my peak which i cause at any point in time during the month is being benefited from by evcc since it follows that peak

So the concept works very well and evcc is extremely effective at enforcing the limit. The only real issue is the rather aggressive switching behavior because it is a protection rather than a part of a softer steering/control logic.

I therefore like the hard-limit approach mentioned by @swoop86, but I think it could be enhanced with some elasticity in the start/stop behavior. If we could read the current running peak from register 1-0:1.4.0, as @tommatheussen suggested, perhaps that value could be incorporated into the control loop to delay stopping or restarting charging by several seconds or even minutes, @andig?

@andig, for now I’ve learned to live with setting a peak that is acceptable to me and results in reasonably stable charging behavior. During winter, however, with ovens, induction cooktops and air conditioners used for heating, I regularly have to proactively increase that limit or manually stop the charging, accepting that I will end up with a higher peak for that month or I have to remember to restart the charging later on that evening. Ovens are especially troublesome because their 2 kW heating elements continuously cycle on and off. Combined with an induction cooktop, this can be particularly bad for the switching behavior.

@longtom99, I solve the grid import issue by disabling battery discharge while in “fast mode”. This also allows you to take advantage of scheduled charging during low-price periods. Or am I misunderstanding what you mean?

In Belgium, our 15-minute intervals also start at 00, 15, 30, and 45.

We don’t have an “already paid peak” that is billed in whole-kW increments, though. Instead, our grid tariff is based on the average of 12 peaks, multiplied by the applicable grid tariff.

hyperbart avatar Oct 14 '26 13:10 hyperbart

@hyperbart thanks, two clarifications:

  • Battery: that point came from @TweetsOfNiklas's setup (#33187): in pv mode, while the home battery is charging and absorbs the surplus, the grid meter shows little export, so a low grid limit prevents the loadpoint from starting. Disabling battery discharge in fast mode doesn't cover that case. (I don't have a home battery myself.)
  • Already-paid peak: I didn't mean whole-kW increments. Just that once this month's peak is set, consumption up to that level doesn't add cost for the rest of the month. That should apply in Belgium as well, since each month's peak enters your 12-month average.

Your switching issue is exactly why I mentioned the fixed quarter-hours: since only the average over the clock-aligned 15-min interval counts, evcc could track the energy already used in the current interval (or read 1-0:1.4.0 where available) and only throttle when the interval budget is actually at risk. Short spikes from an oven or induction cooktop wouldn't need an immediate stop/start then.

longtom99 avatar Oct 14 '26 14:10 longtom99

I just read up on that issue. I agree with Andi's comment that this is not an issue or "works as intended". So if it is okay I am not taking that into consideration in this debate (yet).

Yes, indeed, "already punished for causing a certain peak" does not cause any other "punishment" for that month assuming you stay below said caused peak. Living like a law abiding citizen for a whole month, charging with low power, only to cause a peak at the 28th of the month 🗯️ 😠 , I comfort myself that if those are the things that annoy me my life is going pretty great 😉

@andig , what's your take on the progressive average and the control loop? Could you take that into consideration or would you rather start with the "hard limit" which I am functionally achieving right now and do the progressive average later on? Reason why I am asking is that I am not able to think of an elegant pseudo code for this on the top of my mind, so I am curious to your take on it.

hyperbart avatar Oct 14 '26 14:10 hyperbart

Regarding my battery issue: I have my inverter set to Peak Shaving mode, that means: It charges and discharges the battery like normal, but you can also set a Minimum SoC. And when this is reached it will allow the house to use grid until a certain power. In the summer months I have it set at under 15% and 1kW. And I just looked back, from June to September I never had more than 1kW. Therefore I would set EVCC maxPower also to 1kW. Because, when I set it to 5kW (minimum at 3-phase is 4,2kW) it would drain the battery even lower than 15%, make it empty and use 4kW from the grid. But on the other side maxPower: 1kW won't start the charge in the morning when 6kW are going to the battery, even though it is beyond the preferrable SoC Limit of the battery.

I mean, I can automate it via HomeAssistant. Having a proper system in place inside of EVCC would be better.

TweetsOfNiklas avatar Oct 14 '26 21:10 TweetsOfNiklas

@TweetsOfNiklas @longtom99 seems OT here but evcc recognizes battery charging as "available" power and would start vehicle charging instead. If not that's a separate issue.

andig avatar Oct 15 '26 07:10 andig

Imho, the current grid cirquit load management acts on the actual power drawn in that instant. Capacity management is about shaping the load over the next 15 minute interval based on the remaining power budget over that interval.

ddeconin-gh avatar Oct 15 '26 10:10 ddeconin-gh

I would see that as an improvement over a hard limit, i.e. 2nd step.

andig avatar Oct 15 '26 10:10 andig