Repository navigation
Conversation
A PV reference above the measurement is extra battery discharge on this inverter. 0.12.3 writes measured PV plus the target, and it waits out a cycling house load before it releases or re-enters remote control. 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-bat-bound-7b81
branch
from
December 5, 2026 14:18
7444bf6 to
8b409d7
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 #295. 0.12.2 was rolled back on the 1K5-HI-10-V1 (14:31–14:47, low sun, PV 83→34 W, SoC 98→96%).
What worked: release when discharge was inside house load (log 14:35:33,
hold_released1).What did not.
pv_refstepped to 882 W at 14:33:42 and PV did not follow. The AC setpoint is the inverter's active power, so the battery filled the gap while remote control was on:Release and remote also flapped as house load cycled through 0.7 / 1.2 / 1.8–2.2 kW around the target. After 14:43:47
hold_releasedwas 0 (SoC had reached the 96% exit) andpv_reffell back to the measurement.Why the probe is gone
A higher PV term only helps if the array takes it in the same cycle. On this inverter it does not: the extra watts come out of the battery. Bounding the setpoint to
house load + |target|would still allow that whenever |target| is already an export, and it would not cap the 14:41 case (load 677 W, target 1523 W, a load+|target| ceiling is still far above measured PV + |target|). The bound that matches the failure is on the battery itself.Behaviour
pv_refabove the measurement is snapped down before the write.foxess_pv_ref_wtracks the measurement.Overlay (includes 0.12.0–0.12.2; this branch is based on #295):
https://raw.githubusercontent.com/srcfl/device-drivers/cursor/foxess-h3-smart-bat-bound-7b81/drivers/lua/foxess_h3_smart.lua
Driver evidence
Safety
Control evidence
not yet: the overshoot and the flap are from the live 0.12.2 run. The fix isnot yetconfirmed on hardware.drivers/tests/test_foxess_h3_smart_discharge_pv.pyreplays PV ~80 W not following a high reference, targets −1.3 to −1.8 kW and load 677 W, and checks implied battery discharge ≤ |target| + 200 W. Load alternating 2200/700 W around −1500 W does not flap. Release takes 3 polls inside the margin and survives 11 export-side polls; the 12th re-enters with a bounded setpoint. Hold, charge refusal, explicit curtail and the steady 3000 W discharge still pass.Checks
Signed-off-by.make check— 5595 passed, 927 skipped.What to check tomorrow
Low or ordinary sun, SoC above 96%, core sending a discharge around 1–2 kW:
foxess_pv_ref_wmatches measured PV. It must not sit hundreds of watts above the array.foxess_discharge_releasedis 1. A few polls where load drops back below the target do not turn remote control on again.