SunSpec SunSpec Model 305 — GPS Modbus TCP template

SunSpec Model 305 — GPS

SunSpec Model 305 is the GPS environmental model defined by the SunSpec Alliance for distributed energy resource devices. It exposes location and time data from an on-device GPS receiver over Modbus TCP, delivering UTC time, UTC date, a free-text location label, latitude, longitude, and altitude. The template reads all eight registers in the model's fixed block, giving your ModbusCloud Gateway a precise, timestamped geographic reference for any SunSpec-compliant inverter, meter, or controller that implements Model 305. This makes site identification and time-synchronisation auditing straightforward without manual configuration.

Protocol
Modbus TCP
Connection
Ethernet, Modbus TCP
Registers
8, read only
Brand
SunSpec
Last updated

Registers (8)

8 read, 0 write

NameUnitAccessAddress (Hidden until you enter your email)Function (hidden)Type (hidden)
idRead
lRead
tmhhmmss.sssZRead
dateYYYYMMDDRead
loctextRead
latDegreesRead
longDegreesRead
altmetersRead

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 each SunSpec device reports the correct site coordinates to confirm installation records match physical location.
  • Track GPS-sourced UTC timestamps to audit time-synchronisation accuracy across multi-device energy installations.
  • Compare latitude and longitude values against expected coordinates to detect unauthorised device relocation.
  • Monitor altitude registers to cross-check installation elevation data used in irradiance or performance models.
  • Alert on missing or stale date and time values to catch GPS signal loss before it affects production logging.

Installation

  1. Confirm the target device implements SunSpec Model 305 by consulting its SunSpec PICS document or Modbus register map; not all SunSpec devices include the GPS environmental block.

  2. Connect the device to the same Ethernet network as the ModbusCloud Gateway, ensuring Modbus TCP port 502 is reachable and no firewall rule blocks the connection.

  3. In the ModbusCloud portal, add a new device, import the SunSpec Model 305 GPS template, and set the Modbus unit ID to match the device's configured slave address (commonly 1 or 126 for SunSpec profiles).

  4. Poll the id register at offset 0 and confirm the returned value is 305; then spot-check the lat and long registers to verify coordinate plausibility before enabling scheduled logging.

Things to watch for

Why do the id and l registers return unexpected values?

SunSpec devices chain multiple models in memory starting at address 0, 40000, or 50000. If you target offset 0 but the device places Model 305 further along the chain, the id register will reflect a different model. Scan the device map from its base address to locate the block where id equals 305.

The lat and long registers read zero even though the device has GPS.

A value of zero for a signed int32 coordinate is valid mathematically but usually indicates the GPS receiver has not yet acquired a fix. Allow several minutes after power-up for satellite acquisition, and ensure the antenna has an unobstructed sky view. Persistent zeros suggest antenna or firmware issues.

The tm register returns garbled characters instead of a time string.

Model 305 stores time as a multi-register string in hhmmss.sssZ format across six consecutive 16-bit registers. Some Modbus masters read only one register. Ensure your read request covers the full six-register span starting at address 2, and that your client interprets the result as a contiguous ASCII string, not individual integers.

Latitude starts at address 32 but my tool expects offset 22. Which is correct?

There is a known discrepancy between the SunSpec Environmental Model PDF (which places Latitude at offset 22) and the authoritative SMDX and XLS specifications (which place it at offset 32, matching this template). Trust the SMDX-derived register addresses used here; they align with the OpenEMS implementation.

Want to see how it works?

Electrician working in an open distribution board