SofarSolar SofarSolar Inverter (battery) Modbus RTU template

SofarSolar Inverter (battery)

The SofarSolar Inverter (battery) is a hybrid solar inverter with integrated battery management, used in residential and small commercial PV installations that pair solar generation with energy storage. This template connects via Modbus RTU over the inverter's RS485 port and reads two key battery registers: battery power at address 525 and battery state of charge at address 528. With these values in the ModbusCloud portal, installers can track real-time charge and discharge activity and battery fill level without relying on the proprietary SolarMan cloud. The template gives you a direct, local data path that stays online independently of third-party services.

Protocol
Modbus RTU
Connection
RS485
Registers
2, read only
Compatible models
Inverter · Hybrid Inverter
Last updated

Registers (2)

2 read, 0 write

NameUnitAccessAddress (Hidden until you enter your email)Function (hidden)Type (hidden)
powerWRead
soc%Read

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

  • Monitor battery state of charge continuously to detect abnormal overnight self-discharge before it affects backup capacity.
  • Track battery power flow to verify that solar excess is being directed into storage as expected.
  • Alert on sustained discharge power when the battery is below a set state-of-charge threshold to prevent deep discharge.
  • Compare daily discharge patterns across multiple SofarSolar sites to identify underperforming installations.
  • Report battery utilisation over time to building owners as part of periodic energy performance reviews.

Installation

  1. Enable Modbus RTU on the SofarSolar inverter: on the inverter's LCD panel, navigate to the communication or Modbus settings section and confirm that RS485 communication is active with slave address 1 and baud rate 9600, 8 data bits, no parity, 1 stop bit.

  2. Wire the RS485 port: connect the inverter's A+ and B- terminals to the corresponding terminals on the ModbusCloud Gateway using a shielded twisted-pair cable; keep the cable run as short as practical and add a 120-ohm termination resistor if the bus has multiple devices.

  3. In the ModbusCloud portal, add a new gateway, then open the template library and import the SofarSolar Inverter (battery) template; assign the correct Modbus unit ID (default 1) and confirm the RTU baud rate matches the inverter setting.

  4. Verify the connection by checking the live register view in the portal: address 525 should show a non-zero power value when the battery is actively charging or discharging, and address 528 should show a state-of-charge value between 0 and 100.

Things to watch for

The gateway connects but both registers return zero or no data.

Confirm the Modbus slave address on the inverter matches the unit ID configured in the portal (default is 1). Also verify baud rate is set to 9600 with 8N1 framing on both sides. A mismatch on either setting will cause silent failures where the bus is physically active but no valid response is returned.

Register values appear but the power reading looks wrong or inverted.

Register 525 is a signed int16, so a value read as a large positive number may actually be a negative value in two's complement, indicating charging. Verify that your Modbus master is interpreting the register as int16, not uint16. SofarSolar uses big-endian byte order on this register.

Communication drops intermittently on the RS485 bus.

Check wiring polarity first: on the SofarSolar RJ45 RS485 socket, pins 2, 3, and 4 are A+ and pins 1, 5, and 6 are B-. Swapping A and B is a common cause of intermittent failures. Add a 120-ohm termination resistor at the far end of the bus if more than one device is connected, and keep stub lengths short.

The register map varies between firmware versions. Which version is required?

SofarSolar's Modbus register addresses differ between inverter families and firmware generations. Addresses 525 and 528 correspond to the battery series addressed by this OpenEMS-derived template. If your inverter returns unexpected values or errors, check the serial number against the official SofarSolar Modbus protocol document for your specific model series to confirm register compatibility.

Want to see how it works?

Electrician working in an open distribution board