Skip to content

SolaxModbus: load_first mode disables battery discharge (EMS rate written as 0) #165

Description

@bess-agent

Bug

SolaxModbusGrowattController.apply_period() calls _write_period_to_hardware(controller, False, 0) for all modes, including load_first.

_write_period_to_hardware calls set_discharging_power_rate(discharge_rate). When discharge_rate=0 is written to the EMS discharging rate register, the inverter disables discharge entirely — defeating Load First's inverter-native discharge control.

Impact

Any period whose strategic intent maps to load_first (IDLE, LOAD_SUPPORT, SOLAR_STORAGE) will have the EMS discharge rate zeroed, preventing the battery from discharging during those periods.

Root Cause

In core/bess/solax_modbus_growatt_controller.py (apply_period), _write_period_to_hardware was called unconditionally after the TOU segment update block, regardless of mode.

Fix

Gate _write_period_to_hardware on mode != "load_first". Load First relies on inverter-native discharge control; the EMS rate register must not be touched.

Fix is on branch fix/solax-ems-discharge-rate with a regression test.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bot-analyzedTriage bot has processed this issuebugSomething isn't workingneeds-debug-logWaiting for user to provide debug export

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions