foxess_h3_smart 0.9.4: night grid charging never worked — accept the charge and wait for the BMS to wake - #96
Conversation
|
Automated review pass: Holding on one thing: this driver's manifest still declares Not merging until that's confirmed — flagging for a maintainer to close the loop on the hardware result. Generated by Claude Code |
|
The hold is correct — thank you for applying the repo's own standard. Confirming the timeline honestly: the night-charge-accept path has not yet run on hardware; last night was the failure that motivated the fix, and 0.9.4 did not exist yet. The Plan to close the loop, running today on the discovering site (the 1K5-HI-10-V1):
Will report back with data. 🤖 Generated with Claude Code |
7fae749 to
cc0d002
Compare
|
Rebased onto current New head: Still held for tonight's hardware result on the night-charge-accept path before merge. Note: the PR text and commit say the failure was observed 2026-09-08, which is in the future (today is 2026-08-19). Commit message left as written. |
… wake (0.9.4) Grid charging at night never worked. The BMS-ceiling guard read Pwr_limit_Bat_up milliseconds after writing the session enable, but the inverter sleeps in standby at night and its master samples the RC block slowly, so the register still reported the sleeping value; the guard refused, the host reverted the driver, and the release put the inverter straight back to sleep -- every retry slot, all night. Observed 2026-09-08: five hours of refusals at 10% SoC with a 20 C pack. The unguarded v0.2.0 had night-imported happily, and the reference implementation drives the session continuously rather than gate on a first read. A night charge that meets a floor-level limit is now accepted as pending: hold AC = 0 (no import, no discharge, session keeps the inverter awake), re-read the limit every poll, apply the true setpoint the moment the BMS wakes, give up after a 3 min patience window. Daylight behaviour unchanged: an awake inverter reporting a floor-level limit is a real refusal. The v2 entrypoint returns accepted/charge_pending_bms_wake for the pending state. New metric foxess_bms_charge_limit_w every poll makes the BMS ceiling a time series instead of a mystery. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Leitet <johan@sourceful-labs.com>
cc0d002 to
41be46a
Compare
|
Hardware result, as promised — night grid charging validated on the discovering 1K5-HI-10-V1 tonight:
Honest scoping of what tonight proved: the inverter was awake (actively discharging) when commanded, so the BMS limit read live immediately and the setpoint applied at once — the standby wake-pending path did not need to engage in this run. It remains covered by the five harness tests, and the new
🤖 Generated with Claude Code |
Found by the operator on live hardware (2026-09-08): the planner scheduled cheap night charging; the driver refused every slot for five hours with "battery is not accepting charge now" — at 10% SoC with a 20 °C pack. PV-surplus charging worked; grid charging did not, and never had.
Mechanism. The BMS-ceiling guard reads
Pwr_limit_Bat_up(46018) immediately after writing the remote-control enable. At night the inverter sleeps in standby, and its master samples the RC block slowly — the same hardware fact behind the 60 s timeout floor — so the register still reports the sleeping value. The guard refuses, the host reverts the driver to default, the release write puts the inverter back to sleep, and the next retry repeats the cycle. Daylight charging always worked because the inverter was already awake. Two corroborations: the unguarded v0.2.0 build night-imported happily (the infamous Day-2 runaway ran all night), and nathanmarlor/foxess_modbus drives its session continuously every poll rather than gating on a first read.Fix. A night charge that meets a floor-level limit is accepted as pending: the driver holds AC = 0 — no import, no discharge, the active session keeps the inverter awake — re-reads the limit on every poll refresh, applies the true setpoint the moment the BMS wakes, and gives up only after a 3-minute patience window (a genuine cold/fault hold). Daylight behaviour is unchanged: an awake inverter reporting a floor-level limit is a real refusal, and native self-use handles surplus better than a fight. The v2 entrypoint reports the pending state as
accepted/charge_pending_bms_wake— the contract's word for "heard you, not done yet".Observability. New metric
foxess_bms_charge_limit_wemitted every poll — the night of refusals was undiagnosable precisely because this register was only read inside command paths.Five new harness tests: hold-and-wait, apply-on-wake, patience expiry, daylight refusal unchanged, and the v2 pending result. 68 total pass. Hardware validation happens tonight on the discovering site's cheap slots.
🤖 Generated with Claude Code