
SMA Smart Energy Hybrid Inverter (battery)
The SMA Smart Energy Hybrid Inverter is a grid-tied PV inverter with integrated battery management, used in residential and small commercial energy storage systems. This Modbus TCP template reads battery charge power, discharge power, cumulative discharge energy, and state of charge from the SMA device. It also exposes the full BMS control register group: operating mode, minimum and maximum charge power, minimum and maximum discharge power, and grid exchange setpoint. Connecting via ModbusCloud Gateway, installers gain continuous visibility and remote control over battery operation without manual on-site access.
- Protocol
- Modbus TCP
- Connection
- Ethernet, Modbus TCP
- Registers
- 10, read and write
- Brand
- SMA
- Last updated
Registers (10)
4 read, 6 write
| Name | Unit | Access | Address (Hidden until you enter your email) | Function (hidden) | Type (hidden) |
|---|---|---|---|---|---|
| power_a | W | Read | |||
| power_b | W | Read | |||
| energy | Wh | Read | |||
| soc | % | Read | |||
| batterymode_a | Write | ||||
| batterymode_b | W | Write | |||
| batterymode_c | W | Write | |||
| batterymode_d | W | Write | |||
| batterymode_e | W | Write | |||
| batterymode_f | W | Write |
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.
Use cases
- Monitor battery state of charge continuously to detect gradual capacity degradation across seasons.
- Track real-time charge and discharge power to verify the battery responds correctly to PV surplus.
- Alert on unexpected battery discharge during peak-tariff periods to flag energy management misconfigurations.
- Compare cumulative discharge energy against expected throughput to schedule preventive maintenance visits.
- Verify that remote BMS operating mode changes take effect within expected time after writing setpoint registers.
Installation
Enable Modbus TCP on the SMA inverter by logging into the device web interface and activating the Modbus server under the External Communication or Modbus section. The interface is deactivated by default.
Connect the SMA inverter to the same local network as the ModbusCloud Gateway using a standard Ethernet cable, and note the inverter's IP address.
In the ModbusCloud portal, add a new Gateway, import the SMA Smart Energy Hybrid Inverter (battery) template, and set the unit ID to match the value configured on the inverter (default is 3).
Spot-check the soc register (address 30845) in the live register view to confirm values are being received. A steady percentage value confirms a working Modbus TCP connection.
Things to watch for
Why do some registers return NaN instead of a value?
SMA inverters return NaN for registers that have no valid data at the current moment. The battery charge and discharge power registers (31393 and 31395) return NaN when no battery inverter is installed or when the battery is idle at night. Check that the battery subsystem is active and physically connected.
The gateway connects but no register values appear. What now?
The Modbus interface on SMA inverters is deactivated by default. Log into the inverter web interface, navigate to the communication or Modbus section, and enable the Modbus TCP server. Also confirm the unit ID in the portal matches the unit ID set on the inverter. A mismatch returns Modbus error code 11.
Write commands to the batterymode registers appear to do nothing.
All six BMS control registers (40236, 40793, 40795, 40797, 40799, and 40801) must be written together as a group. Writing only one register without updating the others within 60 seconds causes the inverter to ignore the command. Send all six values in sequence within that window.
Are there risks to writing the batterymode setpoint registers frequently?
Yes. Incorrect setpoints can push the battery outside its safe operating envelope and may affect warranty coverage. Write registers cyclically only at reasonable intervals (every 15 to 20 seconds is typical in practice) and always restore all six registers to their default values (40236 = 2424) before disconnecting your control client. ModbusCloud writes registers at most once per minute, so it cannot match this typical interval and control through ModbusCloud is not guaranteed.
Knowledge base articles for this device
Want to see how it works?












