Commit Graph
7 Commits
Author SHA1 Message Date
ems-agentandClaude fa11dc3d85 EV-05 round 7: Solar watches while not writing; shadow start writes nothing
checks / unit (pull_request) Successful in 24m28s
infra-pin / fresh (pull_request) Successful in 2s
Review of b4a222f, brief v6 Expected 11 (owner 2026-11-18):
- Solar keeps watching for another writer while it is not writing (Stop,
  shadow, safety stop), so hold is true for every reader: the exit, the
  shutdown, the peak alarms, and Start afterwards.
- car_solar_can_cut() also needs Solar to be writing: the peak alarms stand
  as in Off and the quarter is banked.
- A start or restart in Solar with shadow on writes nothing (the
  not-writing 0 A is owed only when Solar had the charger before).
- Once that exit 0 A is taken, nothing more is written, shutdown included.

Tests: alarm rows for Stop, shadow on and safety stop against an Off twin;
shutdown after another writer in shadow and Stop; a start in shadow with the
car already charging; Start after a stop; two variants inside the 30 s watch.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-11-18 20:17:58 +01:00
ems-agentandClaude b4a222f9e8 EV-05 round 6: grade the car out only while Solar can cut it
checks / unit (pull_request) Successful in 25m32s
infra-pin / fresh (pull_request) Successful in 1s
Review of 69f5818:
- Solar grades the car out of the peak alarms only while it can really cut
  it (not under another writer's hold, a refused or given-up write, an
  untaken way-out 0 A, a charger fault, an unreadable charger). Otherwise
  the alarms stand as in Off and the quarter is banked as the car's.
- A battery refusing to give counts for nothing at every N (N=1:
  Controller.batt_refused); the site safety stops leave none able; a
  battery switched Off still counts (the guard draws on it).
- Only pressing Solar lifts Solar's other-writer hold: leaving Solar, or
  setting Manual's values, no longer writes over another writer (N10).

Tests: Solar vs Off twins for another writer, a refused cut write and a
refused fault 0 A; N=1 refusing battery against a car-Off twin; N10 on every
exit and on Manual value changes; the able_w cap; batteries switched Off.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-11-18 18:50:37 +01:00
ems-agentandClaude 69f58181bc EV-05 round 5: headroom counts only the batteries that can give
checks / unit (pull_request) Successful in 24m24s
infra-pin / fresh (pull_request) Successful in 2s
Review of 8818768: the headroom test compared the output with the site
rating, which still counted a battery refusing to give (SAFETY-73) or under
a safety stop, so the 15 s wait ran at the real maximum (N4). Now only the
units that can give (above their cut-out, not refusing, not stopped,
switched on) count, in what they give and in their ratings.

Tests: R5a (A refuses, B at full rating, against a car-Off twin: the cut at
910, period 3361 W), R5b (headroom and a slow battery: the cut at exactly
15 s), R5c (floor-limited alone decides: cut at once). DOCS wrapped to 79.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-11-18 17:27:17 +01:00
ems-agentandClaude 8818768dab EV-05 round 4: the cut waits only while the batteries have headroom
checks / unit (pull_request) Successful in 23m43s
infra-pin / fresh (pull_request) Successful in 1s
Review of d2504ef, brief v5 Expected 8 (owner 2026-11-18): the 15 s wait
needs batteries that can still raise their output: above the cut-out, the
guard neither saturated nor floor-limited, and their output more than 100 W
under what they can give. Otherwise the car is cut at once.

Tests: R4/N4 rows against a car-Off twin (house to 25900 and 25950 W, aim
3400 W) land under the aim; T21/T22 cut at once beyond the batteries; the
T21b catch rows and T44 (0 cut pauses) stay green.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-11-18 16:02:01 +01:00
ems-agentandClaude d2504efa82 EV-05 round 3: a refused way-out 0 A is tried again; one cut per excess
checks / unit (pull_request) Successful in 24m5s
infra-pin / fresh (pull_request) Successful in 2s
Review of 17a7b29:
- Critical: every way out of Solar (Off, Stop, shadow, safety stop, charger
  error, stuck reading, no car) now owes a 0 A until the charger takes it:
  tried again 60 s apart, 3 times (EV-04's rule), then the gave-up row and
  CHARGER_REFUSED; never over another writer. Shutdown does not trust last_a
  while a write of ours is unconfirmed. The card no longer says paused while
  the 0 A is not taken.
- Major: an excess episode is taken off the car once, measured from the car's
  power when it began, until the car shows it and 15 s more.

Tests: refused-then-accepted 0 A for each exit, a 0 A never taken, shutdown
during a start write's read-back, a cut from 16 A with a slow car; the fuzz
checks refused exits of every kind (N9).

Co-Authored-By: Claude <noreply@anthropic.com>
2026-11-18 12:15:00 +01:00
ems-agentandClaude 17a7b299d2 EV-05 round 2: the peak cut waits 15 s while a battery can give
checks / unit (pull_request) Successful in 23m32s
infra-pin / fresh (pull_request) Successful in 1s
Owner 2026-11-18 (dev finding 1, brief v4 Expected 8): while a battery is
above its cut-out, the car's peak cut waits until the guard has wanted power
for 15 s in a row (CUT_WAIT_S), so a cloud edge the batteries catch does not
pause the car. It cuts at once with no battery able, or with 120 s or less of
the 15-minute period left (CUT_NEAR_END_S: waiting 15 s then costs at most
8/7 of the cut, taken off the car at once).

Tests: T21/T22 cut at 15 s and not sooner, the period lands under the aim;
T21b a house step and a cloud edge the batteries catch: no cut, no pause;
T24 (c) late in the period: the cut at once, under the aim; T12's cut row
with the batteries at their cut-out. The harness's battery level model was
1000x too fast (round 1); fixed. The 10-hour day: 0 cut pauses in both
priorities.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-11-18 10:13:02 +01:00
ems-agentandClaude 29480fda47 EV-05: car Solar mode (spare sun to the car, Batteries or Car first, cut first for the peak)
checks / unit (pull_request) Failing after 24m58s
infra-pin / fresh (pull_request) Successful in 1s
Solar charges the car from the signed spare sun (car + battery charge - grid
import), less the batteries' room (Batteries first) and the sun kept back,
whole amps rounded down, at most one change per 30 s and only on 1 A. It
starts after ev_start_min of enough sun, holds 6 A for ev_pause_min, then 0 A.
Auto phases through EV-04's safe sequence (4.5 kW / 3 min up, 4.0 kW / 5 min
down, one switch per 10 min). What the peak guard would ask the batteries for
is taken off the car first, at once. Every way out of Solar ends at 0 A,
written once; at shutdown before the inverters go to 0 W.

- app/carmode.py: SolarPlan (pure) and SolarWriter (ManualWriter's one write
  site, its sequence and watch); spare_w, car_target_w, amps_for.
- app/ctl_car.py: Solar inputs, the cut, the solar kWh, EV-15's grace for
  Solar's own 0 A, no "set by the car" for Solar; main.py: shutdown order.
- Home card, HA select.goodwe_car_sun_first, sensor car_today_solar_kwh,
  three options with defaults, strings EN/NL, DOCS, DECISIONS, CHANGELOG.
- test_ev05.py, test_ev05_long.py, tools/ev05_sun.py; test_ev03/ev04 checks
  that pinned "Solar is refused" / "three entities" updated.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-11-17 23:54:06 +01:00