Repository navigation
Conversation
7 tasks done
…eading 0.12.1 released remote control only for target 0. A discharge still wrote AC = curtailed_pv * 0.977 + |target|, so PV stayed crushed. 0.12.2 releases when that discharge is within house load, and otherwise uses an upward-only PV probe capped at nameplate. Signed-off-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Johan Leitet <johan@sourceful-labs.com>
cursor
Bot
force-pushed
the
cursor/foxess-h3-smart-pv-probe-7b81
branch
from
December 5, 2026 14:18
3c5de7d to
ad6a7c7
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.
Summary
Stacked on #293. 0.12.1 only released remote control for target 0. On the 1K5-HI-10-V1, after that overlay restarted at 13:57, core was in self-consumption and asked for discharge, target −740 to −2889 W, never 0.
foxess_hold_releasedstayed 0, remote control stayed on, SoC was 99%, and PV sat at 143–190 W and slid down while several kW of sun were available. The discharge formula is the same ratchet:AC = last_pv_w × 0.977 + |target|, andlast_pv_wwas already curtailed, so PV never got room.Why a probe, not nameplate and not a window maximum
After a restart the only PV samples are the curtailed ones, so the highest reading in a window is still ~190 W. Using nameplate (10 kW) as the PV term would set AC to about
10000 × 0.977 + dischargeand the battery would fill that hole until the array recovered. The probe gives a bounded step instead: the greater of 800 W and half the current reference, capped at nameplate. A curtailed or falling sample never lowers the reference. When PV rises into the offered room, the next poll steps again. When it stops rising, the reference stays one step above the sun, so the battery overshoot is one step, not the nameplate.Behaviour while the pack cannot take surplus
Same latch as 0.12.1: SoC ≥ 98% until SoC ≤ 96%, or DC PV sitting on the last PV cap that was offered.
setpoint = pv_ref × 0.977 + |target|. The first sample is trusted (a steady 3000 W is not treated as curtailed). A slide or a reading sitting on the offered PV cap stepspv_refup and never back down.foxess_pv_ref_wis the PV term after the setpoint refresh.Overlay (includes 0.12.0 and 0.12.1; this branch is based on #293):
https://raw.githubusercontent.com/srcfl/device-drivers/cursor/foxess-h3-smart-pv-probe-7b81/drivers/lua/foxess_h3_smart.lua
Driver evidence
Safety
Control evidence
not yet: the bug is from the live 1K5 after 13:57. The fix isnot yetconfirmed on that hardware. 0.12.1's hold tests and the existing charge/discharge harness still pass.drivers/tests/test_foxess_h3_smart_discharge_pv.py: discharge −740 W with house load 2500 W releases; PV 190 → 150 W at targets −740 then −2889 (load 400 W) writesac(990) + 2889rather thanac(150) + 2889; a following 990 W steps further up and a later 150 W does not pull the term back down; an explicit 600 W curtail cap still wins; a steady 3000 W at SoC 99% still uses that reading for discharge −1000 W.Checks
Signed-off-by.make test-driver ID=foxess_h3_smart— 108 passed, 5 skipped, before the version bump; the same tests pass inmake check.make check— 5594 passed, 927 skipped.What to check on the site
Sun up, SoC near 99%, PV currently ~150–190 W:
foxess_hold_releasedis 1, and PV climbs toward the available sun instead of sliding down.foxess_pv_ref_wsteps up from ~190 (by at least 800 W per poll while PV is still falling or sitting on the offer) and does not follow PV back down. 46003 is aboutfoxess_pv_ref_w × 0.977 + |target|. PV should rise toward the reference over the next few polls, not stay at 150 W.