
SunSpec Model 802 — Battery Base Model
SunSpec Model 802 is the Battery Base Model defined by the SunSpec Alliance, the mandatory foundation register block that all SunSpec-compliant battery storage systems must expose. Using Modbus TCP, this template reads nameplate ratings (amp-hour and watt-hour capacity, maximum charge and discharge power), live measurements (state of charge, depth of discharge, state of health, cycle count, DC voltage, current, and power), cell-level voltage extremes, and event bitfields for fault detection. Write registers allow remote control of reserve SoC limits, operation commands, inverter state, and alarm resets. One template covers any SunSpec 802-compliant battery regardless of chemistry or manufacturer.
- Protocol
- Modbus TCP
- Connection
- Ethernet, Modbus TCP
- Registers
- 58, read and write
- Brand
- SunSpec
- Last updated
Registers (58)
58 read, 6 write
| Name | Unit | Access | Address (Hidden until you enter your email) | Function (hidden) | Type (hidden) |
|---|---|---|---|---|---|
| id | Read | ||||
| l | Read | ||||
| ahrtg | Ah | Read | |||
| whrtg | Wh | Read | |||
| wchartemax | W | Read | |||
| wdischartemax | W | Read | |||
| discharte | %WHRtg | Read | |||
| socmax | %WHRtg | Read | |||
| socmin | %WHRtg | Read | |||
| socrsvmax | %WHRtg | Read and write | |||
| socrsvmin | %WHRtg | Read and write | |||
| soc | %WHRtg | Read | |||
| dod | % | Read | |||
| soh | % | Read | |||
| ncyc | count | Read | |||
| chast | Read | ||||
| locremctl | Read | ||||
| hb | Read | ||||
| ctrlhb | Read and write | ||||
| almrst | Read and write | ||||
| typ | Read | ||||
| state | Read | ||||
| statevnd | Read | ||||
| warrdt | Read | ||||
| evt1 | Read | ||||
| evt2 | Read | ||||
| evtvnd1 | Read | ||||
| evtvnd2 | Read | ||||
| v | V | Read | |||
| vmax | V | Read | |||
| vmin | V | Read | |||
| cellvmax | V | Read | |||
| cellvmaxstr | Read | ||||
| cellvmaxmod | Read | ||||
| cellvmin | V | Read | |||
| cellvminstr | Read | ||||
| cellvminmod | Read | ||||
| cellvavg | V | Read | |||
| a | A | Read | |||
| achamax | A | Read | |||
| adischamax | A | Read | |||
| w | W | Read | |||
| reqinvstate | Read | ||||
| reqw | W | Read | |||
| setop | Read and write | ||||
| setinvstate | Read and write | ||||
| ahrtg_sf | Read | ||||
| whrtg_sf | Read | ||||
| wchadischamax_sf | Read | ||||
| discharte_sf | Read | ||||
| soc_sf | Read | ||||
| dod_sf | Read | ||||
| soh_sf | Read | ||||
| v_sf | Read | ||||
| cellv_sf | Read | ||||
| a_sf | Read | ||||
| amax_sf | Read | ||||
| w_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 state of charge and depth of discharge continuously to detect abnormal depletion patterns between charge cycles.
- Track state-of-health and cycle count over months to identify capacity fade before it affects site autonomy.
- Alert on evt1 or evt2 bitfield changes to catch battery bank faults such as over-temperature or voltage imbalance early.
- Compare cellvmax and cellvmin over time to spot cell or string imbalance that signals maintenance is due.
- Verify that reserve SoC setpoints socrsvmin and socrsvmax remain within expected bounds after any remote configuration change.
Installation
Enable Modbus TCP on the battery system or its inverter gateway by navigating to the communication or Modbus section of the device web interface or display panel and confirming port 502 is active.
Connect the battery management system or inverter to the same local network as the ModbusCloud Gateway, ensuring no firewall blocks TCP port 502 between the two devices.
In the ModbusCloud portal, add a new device, select the ModbusCloud Gateway as the transport, import the SunSpec Model 802 template, and set the correct Modbus unit ID matching the battery slave address.
Confirm the connection by reading registers id (address 0) and l (address 1): id must return 802 and l must return the documented block length; then spot-check soc (address 11) against the battery display.
Things to watch for
All register values read as 0x8000 or 0xFFFF. What is wrong?
Those are SunSpec 'Not Implemented' sentinel values, meaning the battery does not expose that data point for its chemistry or configuration. Unsupported optional registers in Model 802 must be set to the appropriate unimplemented value per the SunSpec specification. Check whether your battery model documents which points are mandatory versus optional.
Voltage and current readings look wrong by a factor of 10 or 100.
Every measurement register in Model 802 has a paired scale-factor register (v_sf, a_sf, w_sf, etc.). The raw register value must be multiplied by 10 raised to the power of the signed scale factor. Confirm that your portal or polling client is applying the correct sf register to each measurement rather than treating the raw value as the final number.
The gateway connects but no data appears after importing the template.
SunSpec devices place Model 802 at a dynamic offset within the holding register space, not at a fixed absolute address. The SunSpec scan must first locate the SunS marker (0x5375 0x6E53) at address 40000, 0, or 50000, then walk the model chain to find Model 802. If the polling client uses a hard-coded start address it will miss the block. Verify the unit ID and confirm the SunSpec scan completes before reading offsets.
Is it safe to write socrsvmin, socrsvmax, setop, or setinvstate remotely?
Use caution with all write registers. Writing setop or setinvstate can trigger immediate connect, disconnect, or charge commands on the battery bank, which may trip protection circuits or violate the battery management system's operating envelope. Confirm acceptable ranges with the battery manufacturer before writing, and coordinate with on-site personnel when issuing commands remotely.
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?








