Skip to content

FoxESS Avocado: add battery force discharge mode - #33977

Merged
premultiply merged 2 commits into
masterfrom
fix/issue-33976
Sep 24, 2026
Merged

premultiply merged 2 commits into
masterfrom
fix/issue-33976

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

fixes #33976

Adds a case: 5 (force discharge) branch to the batterymode watchdog/switch in templates/definition/meter/fox-ess-avocado.yaml, mirroring the existing case: 3 (force charge) pattern:

  • Register 46001 (Remote Control Mode) = 5 (target:battery, generation system disabled, enabled), per the official Solakon ONE Modbus protocol.
  • Register 46002 (Remote Timeout Set) = 60, same as the other cases.
  • Register 46003 (Remote Active Power) = .maxdischargepower.
  • Adds an explicit maxdischargepower param override (default: 800, required: true), since the battery-params preset leaves it optional with no default, and it's now referenced by the template.

case: 5 matches api.BatteryDischarge in the Go enum and the existing zendure-solarflow-battery.yaml template, which uses the same convention.

Not yet tested on real hardware — this was proposed as-is by the issue reporter, derived from the official protocol document and the existing case: 2 pattern. Opening as draft for review/testing before merge, as requested in the issue.

🤖 Generated with Claude Code

@premultiply
premultiply self-requested a review September 24, 2026 04:32
@premultiply premultiply self-assigned this Sep 24, 2026
@premultiply premultiply added the devices Specific device support label Sep 24, 2026
@premultiply premultiply changed the title FoxESS Avocado/Solakon ONE: add battery mode case 5 (force discharge) FoxESS Avocado: add battery force discharge mode Sep 24, 2026
@premultiply
premultiply marked this pull request as ready for review September 24, 2026 04:37
@premultiply
premultiply enabled auto-merge (squash) September 24, 2026 04:38

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!

Sourcery assessment

Needs a human reviewer. If the Modbus values are wrong, the new mode can command the battery to discharge at the configured power, consuming stored energy before the command times out. Reverting prevents future force-discharge commands, but it cannot restore energy already discharged; the impact is bounded and recoverable by recharging.


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

@premultiply
premultiply merged commit 70f3999 into master Sep 24, 2026
13 checks passed
@premultiply
premultiply deleted the fix/issue-33976 branch September 24, 2026 04:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

devices Specific device support

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request - Add case 5 to Solakon One

1 participant