SunSpec SunSpec Model 3 — Secure Dataset Read Request Modbus TCP template

SunSpec Model 3 — Secure Dataset Read Request

SunSpec Model 3 is a protocol-level model defined by the SunSpec Alliance for issuing cryptographically authenticated dataset read requests over Modbus TCP. It is used with SunSpec-compliant DER devices such as inverters, battery storage systems, and energy meters that implement the Secure SunSpec Modbus specification. The template exposes the full request structure: the target model index, up to 50 data-point offsets, a client-supplied timestamp and millisecond component for replay protection, a sequence number, a role authorization field, and the algorithm identifier and signature-length registers. It gives integrators a direct view into the secure read handshake without opening the SunSpec specification document.

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

Registers (59)

59 read, 55 write

NameUnitAccessAddress (Hidden until you enter your email)Function (hidden)Type (hidden)
idRead
lRead
xRead and write
off1Read and write
off2Read and write
off3Read and write
off4Read and write
off5Read and write
off6Read and write
off7Read and write
off8Read and write
off9Read and write
off10Read and write
off11Read and write
off12Read and write
off13Read and write
off14Read and write
off15Read and write
off16Read and write
off17Read and write
off18Read and write
off19Read and write
off20Read and write
off21Read and write
off22Read and write
off23Read and write
off24Read and write
off25Read and write
off26Read and write
off27Read and write
off28Read and write
off29Read and write
off30Read and write
off31Read and write
off32Read and write
off33Read and write
off34Read and write
off35Read and write
off36Read and write
off37Read and write
off38Read and write
off39Read and write
off40Read and write
off41Read and write
off42Read and write
off43Read and write
off44Read and write
off45Read and write
off46Read and write
off47Read and write
off48Read and write
off49Read and write
off50Read and write
tsRead and write
msRead and write
seqRead and write
roleRead and write
algRead
nRead

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

  • Verify that a DER device returns a correctly signed dataset response when polled via Modbus TCP.
  • Monitor the sequence number register to detect skipped or replayed secure read transactions over time.
  • Track the role register to confirm that client authorization levels are set correctly before issuing control commands.
  • Audit the algorithm register to verify which signature algorithm is active on a connected SunSpec device.
  • Compare timestamp and millisecond registers against server time to identify clock-drift issues on DER equipment.

Installation

  1. Enable Secure SunSpec Modbus on the target DER device under its communication or security settings, and confirm the device supports Model 3 by checking its model list starting at the SunSpec base address.

  2. Connect the device to the same LAN as the ModbusCloud Gateway using a standard Ethernet cable, and ensure TCP port 502 (or 802 for mbaps) is reachable from the Gateway.

  3. In your ModbusCloud portal, add the Gateway, import the SunSpec Model 3 template, and assign the correct unit ID used by the target device (commonly 1 or 126 depending on manufacturer).

  4. Spot-check the id register: it must read 3, and the l register must match the documented block length; if either reads 0xFFFF the model is not implemented on this device.

Things to watch for

The id register returns 0xFFFF. What does that mean?

A value of 0xFFFF in any SunSpec model header register means the model is not implemented on this device. Confirm the device firmware supports the Secure SunSpec Modbus specification and that you are addressing the correct base register offset where Model 3 sits in the device's model chain.

All off1 through off50 registers read zero. Is that normal?

Yes, until a client writes the desired point offsets into those RW registers, they default to zero. Write the offsets of the data points you want included in the signed response before triggering a read. Writing all zeros will result in an empty or invalid signed dataset response from the device.

The device rejects my secure read request with an exception code. Why?

The most common cause is a stale or mismatched timestamp in the ts and ms registers. The device checks the client-supplied timestamp against its own clock to prevent replay attacks. Ensure your Gateway clock is synchronized via NTP, and that the ts value you write is current within the device's accepted tolerance window.

Is it safe to write the role and seq registers repeatedly in a polling loop?

Write the role register only when changing authorization level; do not write it in every poll cycle. The seq register must be incremented with each new request, not held constant. Writing role with an invalid or unsupported value will cause the device to return a Modbus exception, and repeated invalid writes may trigger a security lockout depending on the device implementation.

Want to see how it works?

Electrician working in an open distribution board