SofarSolar SofarSolar HYD 5…20K-3PH (battery) Modbus RTU template

SofarSolar HYD 5…20K-3PH (battery)

The SofarSolar HYD 5...20K-3PH is a three-phase hybrid inverter for grid-tied solar and battery storage installations, combining PV input, battery management, and an integrated EPS port for backup power. This ModbusCloud template targets the battery management interface of the HYD 5...20K-3PH over Modbus RTU via the inverter's RS485 COM port. It exposes the battery operating mode setpoint, letting your control system switch the inverter between self-use, feed-in priority, time-of-use, and off-grid modes remotely. Remote mode control reduces manual intervention and enables automated energy dispatch strategies across sites.

Protocol
Modbus RTU
Connection
RS485
Registers
1, read and write
Compatible models
HYD 5…20K-3PH · HYD 3…6K-EP · SOFAR 80…136KTL · SOFAR 5…24KTL-G3
Last updated

Registers (1)

0 read, 1 write

NameUnitAccessAddress (Hidden until you enter your email)Function (hidden)Type (hidden)
batterymodeWrite

Loading registers…

Send your device list

If a device is not in the library yet, we build the template for free as soon as we have the register data.

Number of installations (optional)

Use cases

  • Switch the HYD 5...20K-3PH to self-use mode automatically at sunrise to maximize on-site solar consumption.
  • Set feed-in priority mode during midday peak tariff windows to maximize grid export revenue.
  • Activate off-grid (EPS) mode via an alert-triggered automation when grid instability is detected.
  • Compare battery mode states across multiple SofarSolar sites in the ModbusCloud multi-site dashboard.
  • Verify that a scheduled mode change was written correctly by reading back the batterymode register after each dispatch command.

Installation

  1. Enable RS485 Modbus communication on the HYD 5...20K-3PH via the inverter's LCD menu under the communication or Modbus settings section, and confirm the unit ID (default 1) and baud rate (9600, 8N1).

  2. Wire the RS485 A+ and B- terminals from the inverter's COM port RJ45 connector to the ModbusCloud Gateway RS485 input, adding a 120-ohm termination resistor at the far end of the bus if the inverter is the last device.

  3. In the ModbusCloud portal, add the ModbusCloud Gateway, import the SofarSolar HYD 5...20K-3PH (battery) template, and assign the correct Modbus unit ID matching the inverter's LCD setting.

  4. Spot-check communication by issuing a test write of a known safe value to the batterymode register and confirm the inverter LCD reflects the mode change within a few seconds.

Things to watch for

The gateway connects but the batterymode write has no effect. Why?

SofarSolar HYD inverters may require function code 0x13 (decimal 19) for certain write operations in the remote control register range, rather than the standard FC 16. If your gateway is sending FC 16 and the inverter does not acknowledge, check the firmware version and consult the SofarSolar Modbus protocol document for your specific firmware revision.

RS485 communication is unstable or produces frequent timeouts. What should I check?

Confirm wiring polarity: A+ and B- must not be swapped. Use 9600 baud, 8 data bits, no parity, 1 stop bit. Add a 120-ohm termination resistor at the bus endpoint. Avoid unshielded cable runs longer than a few metres near AC wiring, and verify that only one Modbus master is polling the bus at a time.

The register value reads back garbage after a write. What is wrong?

The HYD 5-20K-3PH protocol uses big-endian byte order: the high byte is transmitted first. If your polling tool or integration sends bytes in little-endian order, the inverter will reject or misinterpret the command. Verify your Modbus library's byte-swap setting and cross-check with the SofarSolar protocol document for the correct data field order.

Is it safe to write arbitrary values to the batterymode register?

No. Writing unsupported or out-of-range values to the batterymode setpoint register can force the inverter into an unintended operating state, potentially tripping protection limits, interrupting backup power, or voiding warranty. Always confirm valid mode codes against the SofarSolar Modbus documentation before sending any write command, and test in a controlled condition first.

Want to see how it works?

Electrician working in an open distribution board