Repository navigation
Description
Summary
On FTW v0.163.0-beta.1, a FoxESS H3-Smart / 1K5 driver correctly refuses forced charge at SoC >= 99% with status=rejected, code=battery_full. Core then treats that refusal as a command fault: it excludes the device from dispatch and plan, reverts it to autonomous default, and raises control.not_following / device_fault.
This is a core (and planner) bug, not a driver bug.
Environment
- Core: v0.163.0-beta.1 (
d0924f7728190b72d9b9f31ac510062778407310) - Source: https://github.com/srcfl/ftw/tree/v0.163.0-beta.1
- Optimizer: 0.7.0
- Driver: bundled
foxess_h3_smart0.9.6, configured namefoxess(production, FoxESS H3-Smart / 1K5-HI) - Garage charger not involved
- Timezone: Europe/Stockholm (CET)
- Evidence from
/api/support/report,/api/notifications/historyand the control journal on a real home site
Expected
rejected+code=battery_fullis a normal operational limit, in the same class asbattery_nearly_full/battery_fullaslimited(info), not an alarm.- The planner / dispatcher should stop requesting charge around 99% SoC (or honour the driver's refusal) and idle or cover house load. Discharge must remain allowed.
- The driver should stay in dispatch and plan. FTW should not raise
control.not_followingor "A device is not following FTW".
Observed, 10 Nov 2026
- 06:15–06:30: the plan still wanted to charge from cheap import (~2.9 kW; slot planned 450 Wh, measured 2 Wh, marked under_delivered). Battery SoC was ~99%.
- The FoxESS driver refused forced charge at 06:15:06, 06:15:11, 06:20:21 and 06:25:31, with
driver_command: battery is full; refusing forced charge. - After three refusals, FTW excluded foxess from dispatch and plan (
driver refused control — excluding from dispatch + plan until it accepts a command again) and reverted it to autonomous default (driver cannot actuate — reverting it to its autonomous default). - While excluded, the inverter started covering house load (typically −400 to −500 W, peaks around −1.3 kW) while FTW was still asking for a small charge. That was raised as
not_following/device_fault(alarm 06:15:21–06:30:51) and as notification 06:26:17, priority 4: "A device is not following FTW" / "foxess does not do what FTW asks." - Side effect:
mpc plan staleat 06:24:56, andmpc: no online battery capacity with SoC — keeping previous planat 06:25:16. - At 06:30 the plan switched to discharge to cover load. The battery followed (asked about −432 W, measured about −478 W) and the alarm cleared at 06:30:51.
The support report collapses the same refusal as "driver send ×6 over 6.9 h" and "driver refused control ×3 over 10 min". The same notification also went out several times on 7 Nov (09:57, 11:11, 12:11, 13:11, 19:14) and 8 Nov (01:56, 02:57, 04:42, 06:27, 08:56); those earlier events were not all verified as this full-battery path (a separate ~500 W charge shortfall was also in play those days).
Why this is a core bug
The FoxESS driver refuses forced charge at SoC >= 99% on purpose. Under remote control the inverter ignores its own Max SoC; this pack reached 100% under an FTW charge on 2026-08-05. driver_command_v2 returns:
{ status = "rejected", code = "battery_full", message = "battery is full; refusing forced charge", device_state = settled_state }FTW already has battery_full as a normal limited / info reason in control feedback (go/internal/api/api_control_feedback.go), but that path only fires when core itself has paused charging and the command is accepted at ~0 W:
coreReason == "battery_full" && cmd.Result == "accepted" && |sentW| < 1
Core's own full-battery pause uses socCeiling(), which defaults to 1.0 (100%), with resume at 99% (go/internal/control/battery_full.go, dispatch.go). So at 99% SoC the planner can still request charge, the driver rejects it, and isCommandRefusal in go/cmd/ftw/driver_failure_default.go treats almost any rejection as a control refusal. After driverRefusalLimit (3) refusals, SetDriverCommandFault marks the device unable to actuate and it is dropped from dispatch and plan.
A driver-side workaround (accept a 0 W hold instead of rejected) should not be required: the driver is already using the structured battery_full code that core documents as a limit.
Suggested fix
- Honour
rejected+code=battery_full(and similarlybattery_nearly_full/battery_nearly_empty) as a normal limit: do not set a command fault, do not exclude the driver, do not raisecontrol.not_following. - Stop requesting charge once SoC reaches the driver's full threshold (~99%), while still allowing discharge. Align
socCeiling()with that, or clamp charge to 0 W and classify aslimited/battery_full.
Activity
frahlg commentedon Nov 21, 2026
We found the cause in the code: a refused command counts as a fault. After repeated refusals Core drops the device from dispatch and the plan and returns it to its own default. A refusal with
battery_fullis a normal limit and should not do that. There is no fix yet. The fix should treatrejectedwithbattery_fullas a limit, keep the driver in the plan, and stop planning charge near full. We will say here when a PR exists.fix(control): a full battery refusing charge is a limit, not a fault
fix(control): a full battery refusing charge is a limit, not a fault (#…