Summary
Currently peak shaving is based on the aggregate P1/grid value only.
That works for limiting overall import from the grid, but it does not protect against a single phase exceeding its fuse. In a 3-phase installation, the aggregate can still look acceptable while one individual phase is severely overloaded.
This improvement is to extend the existing peak-shaving logic so it can also perform per-phase peak shaving when per-phase sensors are available.
Scope
This issue is specifically about the existing peak-shaving behavior around:
- Limit power from grid
- Enable import peak shaving
- (and the corresponding export shaving, less likely to be an issue)
If Phase 1 / Phase 2 / Phase 3 sensors are configured, and per-phase peak shaving is enabled, the controller should also consider the load on each individual phase and shave peaks that exceed the configured per-phase safety rating.
A common case in the Netherlands is a 25A per-phase connection, so this is mainly about preventing a single phase from exceeding that limit even when total grid import is still within the aggregate target.
Requested functionality
Add an optional mode that extends import peak shaving from:
- aggregate-only peak shaving
to:
- aggregate peak shaving plus
- per-phase peak shaving
Expected behavior
When all of the following are true:
- Enable import peak shaving is enabled
- per-phase sensors are provided
- per-phase peak shaving is enabled
then the strategy should:
- Continue respecting the existing aggregate Limit power from grid
- Also monitor L1 / L2 / L3 individually
- Increase battery discharge (or throttle charging) when needed to keep any individual phase below its configured maximum
- Base the control decision on the individual phases, not just the aggregate total & apply logic to batteries known to operate on the phase that needs shaving
In other words: if one phase is above its allowed threshold, the controller should react even if the aggregate import is still below the current grid limit.
Proposed configuration
This likely builds on the earlier per-phase sensor/config work and should remain fully backward compatible.
Suggested additions:
Control logic suggestion
At a high level, the controller could determine the required battery response as the maximum of:
- discharge/throttling needed to stay below the aggregate Limit power from grid
- discharge/throttling needed to keep Phase 1 below max power per phase
- discharge/throttling needed to keep Phase 2 below max power per phase
- discharge/throttling needed to keep Phase 3 below max power per phase
That way:
- aggregate protection still works as today
- per-phase protection becomes an additional constraint
- the battery responds to whichever limit is violated first
Why this matters
Aggregate-only shaving is economically useful, but it is not enough for electrical protection in a 3-phase setup.
Per-phase shaving would help with:
- avoiding overload on a single phase
- better support for uneven household loads across phases
- safer use in homes with a common 25A per-phase limit
- laying the groundwork for more advanced phase-aware control later
Backward compatibility
This should not change behavior for existing users unless they explicitly configure per-phase sensors and enable the feature.
Expected compatibility behavior:
- no phase sensors configured → current aggregate-only behavior remains unchanged
- phase sensors configured but feature disabled → current behavior remains unchanged
- phase sensors configured and feature enabled → aggregate + per-phase shaving becomes active
Possible acceptance criteria
- Existing aggregate import peak shaving continues to behave as it does today
- Per-phase peak shaving can be enabled independently
- Per-phase logic is only active when L1 / L2 / L3 sensors are available
- Controller reacts when any single phase exceeds the configured max power per phase
- Controller still respects aggregate Limit power from grid
- Effective battery power request is based on the most restrictive constraint
- No regressions for single-phase or aggregate-only setups
Summary
Currently peak shaving is based on the aggregate P1/grid value only.
That works for limiting overall import from the grid, but it does not protect against a single phase exceeding its fuse. In a 3-phase installation, the aggregate can still look acceptable while one individual phase is severely overloaded.
This improvement is to extend the existing peak-shaving logic so it can also perform per-phase peak shaving when per-phase sensors are available.
Scope
This issue is specifically about the existing peak-shaving behavior around:
If Phase 1 / Phase 2 / Phase 3 sensors are configured, and per-phase peak shaving is enabled, the controller should also consider the load on each individual phase and shave peaks that exceed the configured per-phase safety rating.
A common case in the Netherlands is a 25A per-phase connection, so this is mainly about preventing a single phase from exceeding that limit even when total grid import is still within the aggregate target.
Requested functionality
Add an optional mode that extends import peak shaving from:
to:
Expected behavior
When all of the following are true:
then the strategy should:
In other words: if one phase is above its allowed threshold, the controller should react even if the aggregate import is still below the current grid limit.
Proposed configuration
This likely builds on the earlier per-phase sensor/config work and should remain fully backward compatible.
Suggested additions:
falseby defaultControl logic suggestion
At a high level, the controller could determine the required battery response as the maximum of:
That way:
Why this matters
Aggregate-only shaving is economically useful, but it is not enough for electrical protection in a 3-phase setup.
Per-phase shaving would help with:
Backward compatibility
This should not change behavior for existing users unless they explicitly configure per-phase sensors and enable the feature.
Expected compatibility behavior:
Possible acceptance criteria