
SunSpec Model 804 — Lithium-Ion String Model
SunSpec Model 804 is the Lithium-Ion String Model, an open interoperability standard published by the SunSpec Alliance for monitoring and controlling a single battery string within a multi-string energy storage system. The template reads string-level state of charge, depth of discharge, state of health, cycle count, DC current and voltage, per-cell minimum and maximum voltages with module location, module temperature extremes, contactor and event status over Modbus TCP. Write registers allow enabling or disabling the string and commanding the physical contactor. Import this template to track string health and detect imbalances across a battery bank in your ModbusCloud portal.
- Protocol
- Modbus TCP
- Connection
- Ethernet, Modbus TCP
- Registers
- 37, read and write
- Brand
- SunSpec
- Last updated
Registers (37)
37 read, 2 write
| Name | Unit | Access | Address (Hidden until you enter your email) | Function (hidden) | Type (hidden) |
|---|---|---|---|---|---|
| id | Read | ||||
| l | Read | ||||
| idx | Read | ||||
| nmod | Read | ||||
| st | Read | ||||
| confail | Read | ||||
| ncellbal | Read | ||||
| soc | % | Read | |||
| dod | % | Read | |||
| ncyc | count | Read | |||
| soh | % | Read | |||
| a | A | Read | |||
| v | V | Read | |||
| cellvmax | V | Read | |||
| cellvmaxmod | Read | ||||
| cellvmin | V | Read | |||
| cellvminmod | Read | ||||
| cellvavg | V | Read | |||
| modtmpmax | °C | Read | |||
| modtmpmaxmod | Read | ||||
| modtmpmin | °C | Read | |||
| modtmpminmod | Read | ||||
| modtmpavg | °C | Read | |||
| const | Read | ||||
| evt1 | Read | ||||
| evt2 | Read | ||||
| evtvnd1 | Read | ||||
| evtvnd2 | Read | ||||
| setena | Read and write | ||||
| setcon | Read and write | ||||
| soc_sf | Read | ||||
| soh_sf | Read | ||||
| dod_sf | Read | ||||
| a_sf | Read | ||||
| v_sf | Read | ||||
| cellv_sf | Read | ||||
| modtmp_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 string state of charge and state of health over time to detect capacity fade early.
- Alert on cell voltage spread between cellvmax and cellvmin to catch balancing failures before damage occurs.
- Track cumulative cycle count per string to compare aging between parallel strings in the same bank.
- Verify module temperature extremes modtmpmax and modtmpmin remain within safe operating limits during charge cycles.
- Report contactor status and event flags to confirm successful string connection after a maintenance shutdown.
Installation
Enable Modbus TCP on the battery management system or gateway device, typically found under the communication or Modbus section of the device web interface or display panel.
Connect the BMS or energy storage system to the same LAN as the ModbusCloud Gateway, ensuring TCP port 502 is reachable and no firewall blocks the connection.
In the ModbusCloud portal, add a new device, import the SunSpec Model 804 template, and assign the correct unit ID matching the Modbus slave ID configured on the BMS.
After the first poll cycle, open the register table and spot-check the soc and v registers against the BMS display to confirm correct unit ID, base address, and scale factor alignment.
Things to watch for
All measurement registers read zero or show unexpected values. Why?
SunSpec Model 804 uses signed scale-factor registers (soc_sf, v_sf, cellv_sf, etc.) that must be read and applied to the raw integer value. If your Modbus client reads the raw register without applying the corresponding scale factor exponent, every value will appear incorrect. Confirm that the template scale-factor registers are being polled and applied.
The gateway connects but the string status register st returns 0xFFFF. What now?
A value of 0xFFFF for a uint32 or uint16 in SunSpec indicates 'Not Implemented.' The BMS serving this string may not have implemented the st register. Check the BMS firmware version and SunSpec implementation notes. Try polling the id register first: if it returns 804, the model is present but individual optional points may still be unimplemented.
Why does the contactor not close after I write to setcon?
The SunSpec specification requires the string to be enabled before a connect command via setcon is accepted. If setena has not been set to the enabled state first, the contactor command will fail and the CONTACTOR_STATUS bit in the st register will not be set. Write the correct enable value to setena, then issue the setcon connect command.
Is it safe to write to setena and setcon during live operation?
Writing to setena or setcon commands physical contactors and directly affects whether the battery string is electrically connected. Issuing these commands during active charge or discharge can interrupt power flow, trigger BMS protection faults, or in some implementations, risk equipment damage. Test write commands only during planned maintenance windows and confirm with the BMS manufacturer that remote contactor control is supported and warranted.
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?








