Repository navigation
Conversation
8 tasks done
…tail PV Target 0 wrote AC = PV times 0.977. On a full battery that cap pulls PV down and the next poll writes a lower cap. 0.12.1 stands down to self-use instead, with SoC hysteresis, and leaves an explicit curtail cap where core set it. 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-hold-ratchet-7b81
branch
from
December 5, 2026 14:18
7fc2d64 to
b01ebd2
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 #292. Does not change the EPS / off-grid behaviour from 0.12.0.
Hold-at-zero (
target_w = 0) wrote 46003/46004 =last_pv_w * 0.977. That register is the inverter's AC active power, export-positive. At SoC 99% the pack cannot store the surplus, so the inverter curtails PV down to the cap. The next poll reads the curtailed PV and writes a cap 2.3% lower. On Johan's 1K5-HI-10-V1 on 2026-12-03, after returning to grid, the setpoint walked 791 → 914 → 550 → 343 → 308 → 275 W from 13:02 while about 2.4–3 kW of sun was available (cloud_pct0) and the house imported 0.9–3 kW. Spot price 352 öre, no negative slots, core dispatchtarget_w0,clampedfalse, no curtailment. The same formula is in 0.11.0 and 0.12.0.0.12.1:
foxess_hold_releasedis 1 while the stand-down is latched, 0 otherwise.Overlay (includes the 0.12.0 EPS changes, this branch is based on #292):
https://raw.githubusercontent.com/srcfl/device-drivers/cursor/foxess-h3-smart-hold-ratchet-7b81/drivers/lua/foxess_h3_smart.lua
Driver evidence
Safety
Control evidence
not yet(the path staysexperimental): the bug is from live 1K5-HI-10-V1 operation on 2026-12-03. The fix itself isnot yetconfirmed on that hardware. Discharge, charge and the existing hold at SoC 93% are unchanged and still covered bytest_foxess_h3_smart_control.py.drivers/tests/test_foxess_h3_smart_hold.py: the old ratchet sequence (2931, 2864, 2798, 2734 from 3000 W), a full pack that never writes 46003, PV forced equal to the cap, SoC hysteresis 99 → 97 → 96, SoC 97 with no prior full reading, idle battery with PV still above the cap, an explicit 600 W curtail cap that does not walk down, and discharge at SoC 99% both before and after a release.Checks
Signed-off-by.make test-driver ID=foxess_h3_smart— 103 passed, 5 skipped.make check— 5589 passed, 927 skipped.What to check on Johan's site
With this file as overlay, sun up, SoC near 99%, core sending battery target 0 and no curtailment:
foxess_hold_releasedis 1. The log line says hold-at-zero is releasing remote control. PV stays at the available array power instead of walking down, and the house stops importing that missing PV.