
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
| Name | Unit | Access | Address (Hidden until you enter your email) | Function (hidden) | Type (hidden) |
|---|---|---|---|---|---|
| id | Read | ||||
| l | Read | ||||
| wchamax | W | Read and write | |||
| wchagra | % WChaMax/sec | Read and write | |||
| wdischagra | % WChaMax/sec | Read and write | |||
| storctl_mod | Read and write | ||||
| vachamax | VA | Read and write | |||
| minrsvpct | % WChaMax | Read and write | |||
| chastate | % AhrRtg | Read | |||
| storaval | AH | Read | |||
| inbatv | V | Read | |||
| chast | Read | ||||
| outwrte | % WDisChaMax | Read and write | |||
| inwrte | % WChaMax | Read and write | |||
| inoutwrte_wintms | Secs | Read and write | |||
| inoutwrte_rvrttms | Secs | Read and write | |||
| inoutwrte_rmptms | Secs | Read and write | |||
| chagriset | Read and write | ||||
| wchamax_sf | Read | ||||
| wchadischagra_sf | Read | ||||
| vachamax_sf | Read | ||||
| minrsvpct_sf | Read | ||||
| chastate_sf | Read | ||||
| storaval_sf | Read | ||||
| inbatv_sf | Read | ||||
| inoutwrte_sf | 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.
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
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.
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.
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).
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.
Knowledge base articles for this device

SunSpec Modbus: one register map for many inverters
SunSpec Modbus is the open register map SMA, Fronius, SolarEdge and Kostal share. The layout, int+SF vs float, the TCP port per brand and reading a mixed fleet.
Fronius Modbus: read a Symo GEN24 over Modbus TCP
Fronius Modbus explained: enable Modbus TCP on the Symo GEN24 on port 502, choose between int+SF and float, read the right SunSpec registers and scale them correctly. Practical guide for solar installers.
SMA Modbus: reading a Sunny Boy over Modbus TCP (installers)
SMA Modbus explained: enable the Modbus TCP server on port 502, choose between the SMA profile (unit ID 3) and SunSpec (unit ID 126), read the right registers, and handle the NaN values at night. Practical guide for installers.
Want to see how it works?








