Confirm the inverter's Modbus TCP address (default port 502) and unit ID (commonly 1 or 126 depending on vendor); ensure network connectivity and that the device has Modbus TCP enabled.
Connect a Modbus TCP client (e.g., pymodbus in Python) and read the SunSpec start register sequence: read holding registers at base address 40000 (or 0 in zero-indexed libraries) and verify the first two registers contain the SunSpec identifier value 0x53756e53 ('SunS').
Walk the model chain starting at register 40002: read the model ID (first register of each block) and length (second register), then advance by length+2 to find the next model until you reach model ID 0xFFFF (end marker).
For common inverter data, locate Model 101 (single-phase) or Model 103 (three-phase) for AC measurements; read registers for AC power (watts), AC current, voltage, frequency, and energy lifetime; apply the scale factor (SF) registers that accompany each value group.
For DC input data, read the appropriate registers in the same model block; use the SunSpec Model 101/103 register map from sunspec.org to identify register offsets and data types.
Known gotchas
Scale factors (SF) in SunSpec are signed integers that represent powers of 10; a raw register value must be multiplied by 10^SF to get the actual engineering value — omitting this step produces values off by orders of magnitude and is one of the most common implementation errors.
The SunSpec base address varies by vendor: some devices start at Modbus address 40000, others at 40001, and some expose the SunSpec block at a different offset entirely — always locate the 'SunS' marker dynamically rather than hardcoding register offsets.
Some inverters require a minimum polling interval and will close the Modbus TCP connection or return errors if polled too frequently; respect vendor-specified minimum intervals (often 1-5 seconds) and implement connection recovery logic.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp