feat: Add afternoon_probe for outside-window solar charging

- Add afternoonProbeEligible in WINDOW_SOURCEV2.js
- Enable hybrid_probe sourceMode in outside_window when probe conditions met
- Add afternoon probe parameters in INPUTPARSE (inputparse.js + inputparseP2.js)
- Update probeStartOk in BATTERY_CLOUD_LOCKS to accept afternoon probe
- Update blockStillRelevant for probe_failed to include outside_window

Fixes the issue where strong afternoon sun with SOC>85%
was blocked by high cloudDebt and no probe mechanism.
This commit is contained in:
Tallagrand Thierry
2026-06-12 02:45:24 +02:00
parent 0d91819577
commit af87a76a65
5 changed files with 23 additions and 3 deletions

View File

@@ -10,7 +10,7 @@ const nextAllowedWindowStartMs =
const blockActive = blockedUntilMs !== null && blockedUntilMs > nowMs + 1000;
const blockStillRelevant =
lastBlockReason === 'outside_window' ? profile === 'outside_window' :
lastBlockReason === 'probe_failed' ? (profile === 'morning_solar' || profile === 'midday_hc_or_solar') :
lastBlockReason === 'probe_failed' ? (profile === 'morning_solar' || profile === 'midday_hc_or_solar' || profile === 'outside_window') :
lastBlockReason === 'battery_protection_stop' ? (
batteryCurrentA < -batteryNeutralBandA || anyVebusLowBattery || vebusDcVoltageSoftLow
) :
@@ -133,7 +133,7 @@ const gridHoldOk =
const probeStartOk =
sourceMode === 'hybrid_probe' &&
commonSafetyStartOk &&
(morningProbeEligible || middayProbeEligible);
(morningProbeEligible || middayProbeEligible || afternoonProbeEligible);
const probeHoldGuardOk =
commonSafetyHoldOk &&
batteryCurrentA >= profileBatteryDischargeFloorA;

View File

@@ -346,6 +346,10 @@ const params = {
morningProbePvTrendMinW: num(input.morning_probe_pv_trend_min_w, 0),
middayProbePvAvgMinW: Math.max(0, num(input.midday_probe_pv_avg_min_w, 1200)),
afternoonProbePvAvgMinW: Math.max(0, num(input.afternoon_probe_pv_avg_min_w, 1000)),
afternoonProbeSocMin: clamp(num(input.afternoon_probe_soc_min, 85), 0, 100),
afternoonBatteryMaxDischargeA: num(input.afternoon_battery_max_discharge_a, -20),
morningSocMin: clamp(num(input.morning_soc_min, 35), 0, 100),
middaySocMin: clamp(num(input.midday_soc_min, 75), 0, 100),
eveningSocStartMin: clamp(num(input.evening_soc_start_min, 85), 0, 100),

View File

@@ -85,6 +85,10 @@ const params = {
morningProbePvTrendMinW: num(input.morning_probe_pv_trend_min_w, 0),
middayProbePvAvgMinW: Math.max(0, num(input.midday_probe_pv_avg_min_w, 1200)),
afternoonProbePvAvgMinW: Math.max(0, num(input.afternoon_probe_pv_avg_min_w, 1000)),
afternoonProbeSocMin: clamp(num(input.afternoon_probe_soc_min, 85), 0, 100),
afternoonBatteryMaxDischargeA: num(input.afternoon_battery_max_discharge_a, -20),
morningSocMin: clamp(num(input.morning_soc_min, 35), 0, 100),
middaySocMin: clamp(num(input.midday_soc_min, 75), 0, 100),
eveningSocStartMin: clamp(num(input.evening_soc_start_min, 85), 0, 100),