Repository navigation
Conversation
0.12.3 kept discharge inside the target, then flipped mode four times in three minutes when SoC hit 96% and the target wobbled between 0 and a few hundred watts of charge. 0.12.4 stays in the chosen mode for 120 s, clears a stale remote setpoint on start, and lets pv_ref decay instead of sticking to a curtailed sample. Signed-off-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Johan Leitet <johan@sourceful-labs.com> Signed-off-by: Cursor Agent <cursoragent@cursor.com>
cursor
Bot
force-pushed
the
cursor/foxess-h3-smart-mode-dwell-7b81
branch
from
December 5, 2026 14:18
4591c51 to
46be264
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #296 (0.12.3). Draft. Do not merge.
What 0.12.3 did on Dragonsreach (5 Dec)
0.12.3 was live from 11:37:45. Discharge stayed within |target| + 200 W until 12:33. At 12:40:11 the monitor rolled it back: four mode changes in 180 s, shortest dwell 20 s, as SoC reached 96% and the near-full latch engaged. Core's target flipped between 0 and +300–450 W while house load swung 1.2–2.1 kW every 20–40 s, and the driver followed every swing (remote control, hold, release). No Modbus blackouts and no faults. Max SoC was 96%, so the ≥98% curtail cap, charge refusal and solar lock were not exercised.
Right after the restart, 11:38:00–11:38:30, the battery discharged 1.2–2.3 kW at target 0 because the driver ran on a setpoint the previous process had left in the inverter.
pv_refcan also stick, including on a curtailed sample.What 0.12.4 changes
pv_refis replaced only by a measurement that is not sitting on the last written AC cap while the pack is near full. Otherwise it decays 20% per poll and is cleared rather than landing on the curtailed sample. The metric is published every poll, including 0 when the reference has been cleared, so a stale value does not sit there.Tests
make check: 5599 passed, 927 skipped.New cases replay the 12:36–12:40 pattern (SoC 96%, target 0 ↔ +300–450 W, load 1.2–2.1 kW every 30 s) and expect at most one mode change in 180 s. A −2000 W discharge into a 3000 W house load releases on the next poll, not after two minutes. A restart with 46001 = 1 and 46004 = 2500 writes 46001 = 0 before any read. A PV sample sitting on the last cap at SoC 98% does not stick in
pv_ref.Hardware check, after Johan says yes
Steward installs this only on an explicit yes. Do not install from this PR.
foxess_pv_ref_wshould fall, not stick, when PV is sitting on the last AC cap at a full pack.