SunSpec SunSpec Model 124 — Storage Modbus TCP template

SunSpec Model 124 — Storage

SunSpec Model 124 is the Basic Storage Controls model defined by the SunSpec Alliance, used to monitor and control battery storage systems connected to compatible hybrid and storage inverters over Modbus TCP. The template reads charge state, available capacity, and internal battery voltage, and exposes read-write setpoints for maximum charge power, charge and discharge ramp rates, minimum reserve percentage, and charge/discharge power windows via InWRte and OutWRte. The StorCtl_Mod bitfield activates or deactivates charge and discharge modes at the inverter. Importing this SunSpec Model 124 template into your ModbusCloud portal delivers immediate visibility and remote control of battery storage behaviour across any SunSpec-compliant device.

Protocol
Modbus TCP
Connection
Ethernet, Modbus TCP
Registers
26, read and write
Brand
SunSpec
Last updated

Registers (26)

26 read, 12 write

NameUnitAccessAddress (Hidden until you enter your email)Function (hidden)Type (hidden)
idRead
lRead
wchamaxWRead and write
wchagra% WChaMax/secRead and write
wdischagra% WChaMax/secRead and write
storctl_modRead and write
vachamaxVARead and write
minrsvpct% WChaMaxRead and write
chastate% AhrRtgRead
storavalAHRead
inbatvVRead
chastRead
outwrte% WDisChaMaxRead and write
inwrte % WChaMaxRead and write
inoutwrte_wintmsSecsRead and write
inoutwrte_rvrttmsSecsRead and write
inoutwrte_rmptmsSecsRead and write
chagrisetRead and write
wchamax_sfRead
wchadischagra_sfRead
vachamax_sfRead
minrsvpct_sfRead
chastate_sfRead
storaval_sfRead
inbatv_sfRead
inoutwrte_sfRead

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 ChaState over time to detect gradual capacity fade in residential or commercial battery systems.
  • Alert on ChaSt transitioning to EMPTY unexpectedly during peak grid-demand periods to prevent supply interruptions.
  • Track InBatV trends across days to verify battery health and flag abnormal voltage deviations.
  • Verify MinRsvPct is holding its setpoint after a firmware update to confirm reserve settings were not reset.
  • Compare StorAval before and after discharge cycles to quantify usable capacity delivered per cycle.

Installation

  1. Enable Modbus TCP on your inverter or storage system by navigating to the communication or Modbus section of the device web interface and activating the Modbus TCP server; note the IP address and confirm port 502 is open.

  2. Connect the device to the same LAN segment as the ModbusCloud Gateway, or ensure routed IP access between the Gateway and the device; verify the device responds to a ping before proceeding.

  3. In the ModbusCloud portal, add the device as a new Modbus TCP node, import the SunSpec Model 124 template with one click, then assign the correct unit ID as configured on the inverter (commonly 126 for SMA devices; check your device documentation).

  4. Spot-check the connection by reading the id register and confirming the value is 124, then verify ChaState and InBatV return plausible live readings before enabling any write setpoints.

Things to watch for

All registers return NaN. What is causing this?

Some inverter implementations include the Model 124 block for compatibility but populate all registers with NaN values when no battery is physically connected or licensed. Confirm a battery storage unit is installed, commissioned, and reporting to the inverter before expecting valid readings in this model.

Scale factor registers return negative values. Are my readings wrong?

No. SunSpec scale factors are signed integers used as powers of ten. A value of -1 means divide the raw register value by 10, -2 means divide by 100. Always multiply the raw register value by 10 raised to the scale factor before displaying the result. The ModbusCloud portal applies this automatically when the template is configured correctly.

InWRte and OutWRte writes are accepted but the inverter ignores them.

Write setpoints in Model 124 only take effect when StorCtl_Mod is set to activate the corresponding mode: bit 0 for charge control, bit 1 for discharge control. Write the required bitfield value to StorCtl_Mod first, then confirm the ChaGriSet register permits the intended charging source. Also verify the inverter web interface has remote Modbus control enabled.

Is it safe to write InWRte, OutWRte, or WChaMax repeatedly from automation?

Use caution. Some inverter manufacturers explicitly warn that cyclically writing non-exempt RW registers can wear the device flash memory. Use the InOutWRte_RvrtTms reversion timeout so setpoints expire safely rather than issuing continuous writes. Always test write operations in a controlled environment and consult the specific inverter documentation before deploying automated setpoint changes.

Want to see how it works?

Electrician working in an open distribution board