Skip to content

FoxESS full-battery refusal is treated as device_fault / not_following (v0.163.0-beta.1) #1993

Open

Description

@Leitet

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

Expected

  • rejected + code=battery_full is a normal operational limit, in the same class as battery_nearly_full / battery_full as limited (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_following or "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 stale at 06:24:56, and mpc: no online battery capacity with SoC — keeping previous plan at 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

  1. Honour rejected + code=battery_full (and similarly battery_nearly_full / battery_nearly_empty) as a normal limit: do not set a command fault, do not exclude the driver, do not raise control.not_following.
  2. 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 as limited / battery_full.

Activity

  1. frahlg commented on Nov 21, 2026

    @frahlg
    Member

    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_full is a normal limit and should not do that. There is no fix yet. The fix should treat rejected with battery_full as a limit, keep the driver in the plan, and stop planning charge near full. We will say here when a PR exists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions