-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
PV target current ramps to max while the charger pauses the vehicle for a phase switch #32857
Replies: 1 comment · 6 replies
|
Could you add a debug log that shows the problem, with lp and site included? |
All reactions
|
Here is the debug log, on evcc 0.313.3 with The recalculation at the moment of the switch is correct (10.3A). The problem One note on the numbers: Correction to my original post: I wrote that only upswitching is harmful. The The suggestion from the original post still looks right to me: while |
All reactions
I am just seeing an excerpt, do you have the full log? |
All reactions
|
Sorry — that was my own reformatting, not the journal. Here is the raw log. Scope: from the car being plugged in (14:24:23) to after both phase switches One line my excerpt dropped that you probably want to see, at the moment of the Setup for context: WARP3 Smart, which reports no power, energy or currents, so Full journal, 2026-08-17 14:24:23 – 14:46:53 (501 lines) |
All reactions
|
Looks like the charger stays in Status C - charging while pausing for phase switching, this is why the mitigation if Line 1303 in 4cc75b1
IMHO, your proposal sounds fine, but it could maybe be enhanced by limiting it to chargers without meter, since they are not affected as far as I understand. This would limit the consequences, allowing those charger to adapt quickly when the switch is completed, wdyt? |
All reactions
|
Confirmed, and it is visible in the log I posted: On limiting it to chargers without a meter: agreed, and the code supports it. One thing I would rather flag before a patch than after: this charger's pause is longer than A clamp gated on For what it is worth, Happy to test a patch either way — debug logging is still enabled here. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Summary
On a 1p→3p phase switch, the charger disconnects CP and pauses the vehicle for ~60 s. During that pause the vehicle draws nothing, so the grid meter reports the full PV surplus.
pvMaxCurrent()keeps integrating that surplus into the target current and ramps it tomaxCurrent. When the vehicle resumes, it draws the full offered current on three phases — here 16 A × 3p ≈ 11 kW against a 5.8 kW surplus, producing a ~4.8 kW grid import spike for 30–60 s until the control loop recovers.The switch itself works correctly. This is about the current that is offered while the vehicle is paused.
Measured (production system, real hardware)
Wallbox TinkerForge WARP3 Charger Smart (fw 2.12.1),
type: warp-ws, Renault ZOE Z.E. 50, evcc 0.313.1, grid meter via MQTT (SML reader, 10 s cadence), no charge meter (charger: power ✗ energy ✗ currents ✗ phases ✓,meters: charge ✗).Values read from the evcc API and from the charger's own REST API in parallel.
car (real)is derived asPV − house + grid.Rows 2–3 are the CP-disconnect pause: the vehicle is off, the grid shows the full surplus, and the offered current is raised from 8.33 A to the 16 A maximum. Row 4 is the vehicle resuming at that current on three phases.
The arithmetic matches the code exactly:
effectiveCurrent 8.33 A + powerToCurrent(5527 W, 3p) 8.01 A = 16.34 A, capped tomaxCurrent= 16 A.Reproduced on the next upshift 17 minutes later, same pattern:
Where it comes from (core/loadpoint.go, identical in 0.313.1 and master)
scalePhases()records the switch timestamp:phaseSwitchCompleted()then returns false forphaseSwitchDuration = 60 * time.Second. That guard is applied to the phase decision only:but not to the current calculation that follows:
So for the 60 s in which evcc already distrusts its own phase measurement, it still trusts
sitePower— although the vehicle is paused by the charger and the reading is not representative.The
scaledTo == 3correction (effectiveCurrent /= maxActivePhases()) applies only in the cycle that performs the switch, not to the cycles during the pause.The existing mitigation in
effectiveCurrent()requires per-phase currents from the charger. The WARP3 Smart reports none, so evcc falls back to
offeredCurrent.Impact
Only the upshift direction is harmful. On 3p→1p the same ramp happens, but 16 A on one phase is 3.7 kW and stays within the surplus. On 1p→3p the same 16 A becomes 11 kW.
Energy is small (~40 Wh per event), but it happens on every upshift, and on a system near the 3p threshold that is several times a day. It also defeats the purpose of PV-only charging for the duration of the spike.
Proposed direction
Do not ramp up while the phase switch is settling — the measurement the ramp is based on describes a paused vehicle. Allowing a decrease is still safe:
With the values above this holds the offered current at the post-switch value (8 A → 5.5 kW on 3p) against an actual 5.6 kW surplus, instead of 16 A → 11 kW.
Happy to open a PR with tests if you consider this worth fixing, and to run any requested measurement on this hardware.
Environment
masterby source comparison)type: warp-wswithenergyManagerUri(WARP3 Charger Smart, fw 2.12.1)All reactions