Every device. One tool. Pay once. Modbus · BACnet · Siemens S7 · one-time licence · also from us: BACManager ↗

SMA Sunny Tripower Modbus TCP: Unit ID 3, 32-Bit Registers, NaN at Night

An SMA Sunny Tripower speaks Modbus TCP on port 502 — once someone has switched the server on, because it ships switched off. SMA's own register profile then answers on unit ID 3, with register numbers that go on the wire exactly as SMA lists them, every value 32 bits wide, and a fixed “not a number” pattern whenever a value does not exist, for example AC power at night. This guide reads a Sunny Tripower CORE1 with SMA's own register list: switching Modbus on, the registers a dashboard needs, how to decode them and the mistakes that make the numbers look wrong.

ModbusManager Pro dashboard for an SMA Sunny Tripower CORE1-US: AC power gauge 41.85 kW, condition Ok, operating status MPP, grid relay closed, derating not active, phase voltages 277.40, 277.10 and 277.70 V at 60.00 Hz, phase currents 50.29, 50.34 and 50.23 A, power factor 1.000, DC total 42704 W, efficiency 98.0 %, internal temperature 47.3 °C, DC link 812.4 V, insulation 3.25 MΩ, total yield 186452 kWh, six DC inputs from 7054 to 7210 W, and a DC and AC power trend
The free workspace below on a simulated STP 50-US-40 — SMA registers on unit 3, polled every 10 s.

Switch the Modbus Server On

SMA's interface document is plain about it: the Modbus TCP and UDP servers are deactivated by default. On the inverter's web interface:

  1. Log in as Installer.
  2. Device Parameters › [Edit parameters] › group External Communication.
  3. Modbus › TCP Server: Activated = Yes, port 502 (the default).
  4. [Save all].

After that every value that is not protected by the Grid Guard code can be read without a password. SMA also says to check that Modbus is still on after resetting the inverter to factory settings. Sunny Explorer has the same parameters. UDP is only for writing (broadcast commands); for reading use TCP.

Unit ID 3 — and 126 for SunSpec

ProfileUnit IDRegisters
SMA Modbus profile3 (settable 3–123)SMA's own numbers, 30xxx measured values, 40xxx parameters
SunSpec profileSMA unit ID + 123 = 126SunSpec models from register 40001
Unit ID query1FC03 at 42109: serial number (2), SusyID (1), unit ID (1)

This page uses the SMA profile. For SunSpec on SMA, Fronius and SolarEdge see the SunSpec guide. The two are not interchangeable: SunSpec questions sent to unit 3, or SMA register numbers sent to unit 126, get the wrong answer or none.

Addresses, Widths and Decimals

NaN: Values That Do Not Exist

TypeNaN on the wireWhat a naive tag shows
S328000 0000−2147483648 W (AC power at night)
U32FFFF FFFF42949672.95 V for a FIX2 voltage
U32 status00FF FFFD16777213 “information not available”
U64FFFF FFFF FFFF FFFFa huge counter
S16 / U168000 / FFFF−32768 / 65535

Read a block that holds at least one defined register and SMA answers with NaN in the gaps; read only undefined registers and you get an exception. The workspace's script turns the S32 NaN into 0 so the gauge and trend drop to zero at night instead of minus two billion.

Key Registers (STP 50-US-40, SMA Profile)

From SMA's register list for the Sunny Tripower CORE1-US (list version 1.1, firmware 01.05.05.R). Unit ID 3; each register number is also the wire address.

RegisterTypeValueUnit
30053U32Device type (9339 = STP50-US-40)code
30057U32Serial number–
30201U32Condition: 35 Fault, 303 Off, 307 Ok, 455 Warningcode
30217U32Grid relay: 51 Closed, 311 Opencode
30219U32Derating: 884 not active, 557 temperature, 1705 frequency, 3520 voltagecode
30225U32 FIX0Insulation resistanceΩ
30231 / 30233U32 FIX0Maximum active power device / set active power limitW
30513U64 FIX0Total yieldWh
30529 / 30531U32 FIX0Total yield (32-bit copies)Wh / kWh
30769 / 30771 / 30773S32 FIX3 / FIX2 / FIX0DC current / voltage / power, first DC inputA / V / W
30775S32 FIX0AC active power (total)W
30777 / 30779 / 30781S32 FIX0Power L1 / L2 / L3W
30783 / 30785 / 30787U32 FIX2Grid voltage L1 / L2 / L3 to neutralV
30789 / 30791 / 30793U32 FIX2Grid voltage L1-L2 / L2-L3 / L3-L1V
30803U32 FIX2Grid frequencyHz
30805 / 30813S32 FIX0Reactive power / apparent power (per phase from 30807 / 30815)VAr / VA
30949U32 FIX3Displacement power factor–
30953S32 TEMPInternal temperature°C
30957…30973S32DC current / voltage / power of the 2nd, 3rd and 4th DC inputA / V / W
31209…31219S32DC current / voltage / power of the 5th and 6th DC inputA / V / W
30975S32 FIX2Intermediate circuit (DC link) voltageV
30977 / 30979 / 30981S32 FIX3Grid current L1 / L2 / L3A
40029U32Operating status: 295 MPP, 381 Stop, 1392 Fault, 1393 Waiting for PV voltage, 1469 Shut down, 1480 Waiting for utilities company, 2119 Deratingcode

Not certain: SMA's list gives the six DC triplets the same name (“DC voltage input” and so on), so which inverter input letter each block belongs to is not stated; this page calls them inputs 1–6 in list order. This list has no daily-yield register. Other Sunny Tripower models (STP xxTL-30, CORE1 50-40, Sunny Tripower X) use the same SMA profile numbers for most of these values, but each model has its own list — check yours before relying on a register.

Worked Frame: AC Power

Read 30775, two registers, unit ID 3, function code 03:

Request   00 01 00 00 00 06 03 03 78 37 00 02
          transaction 0001, protocol 0000, length 6, unit 03, FC 03, address 0x7837 = 30775, 2 registers
Response  00 01 00 00 00 07 03 03 04 00 00 A3 7A
          4 bytes: high word 0000, low word A37A = 41850 W (FIX0)
At night  ... 03 03 04 80 00 00 00   = S32 NaN, not −2147483648 W

Grid voltage L1 the same way: 30783 returns 00 00 6C 5C = 27740, FIX2 → 277.40 V.

Writing: Mind the Flash and the Grid Guard Code

SMA marks writable parameters that are meant for long-term settings: writing them cyclically wears out the inverter's flash memory. Parameters for grid management services are the exception and may be written repeatedly. In this list, for example, 40915 (set active power limit, W) carries the warning about cyclic writing, while the write-only PV-system-control registers 40016 and 40023 (normalized active power limitation, % and 0.01 %) are system control objects. The feed-in management parameters 40210–40214 need the Grid Guard code, which is entered in register 43090 on unit 3 (0 logs out). The workspace below writes nothing.

Common Mistakes

Step-by-Step: Reading a Sunny Tripower with ModbusManager

  1. Switch on Modbus › TCP Server as Installer and note the inverter's IP address.
  2. In ModbusManager choose Modbus TCP, the IP address, port 502, unit ID 3.
  3. Read FC03 from 30769, quantity 52: DC input 1, AC power, phase power, voltages, frequency, reactive and apparent power.
  4. Combine each pair high word first and apply the decimals. Or open the workspace below.

Download a Ready-Made Workspace

Read-only. Nothing is written. Built from the STP 50-US-40 list (Sunny Tripower CORE1-US); on another Sunny Tripower check the registers against that model's list — a register it does not have will show NaN or an exception. Unit 3, port 502. Tags, script and dashboard are ModbusManager Pro features; Standard opens the poll windows only.

SMA_Sunny_Tripower.json

SMA Sunny Tripower CORE1 workspace (SMA Modbus TCP, unit 3). Open via Workspace › Open in ModbusManager Pro, or from the in-app Device library.

Download Workspace

Try it with ModbusManager Pro

Dashboards, alarms on the condition and status codes, historian for power and yield, and MQTT to Home Assistant. Free 14-day trial. No credit card. Windows 10/11.

Download Pro Trial

The same inverter through SunSpec: SunSpec for SMA, Fronius and SolarEdge. Other inverters: Sungrow, Huawei SUN2000. All guides: Modbus device guides.

Frequently Asked Questions

How do I enable Modbus TCP on an SMA Sunny Tripower?

Log in to the inverter's web interface as Installer, open Device Parameters, Edit parameters, External Communication, and set Modbus > TCP Server > Activated to Yes, port 502. The server is off by default and SMA advises checking it again after a factory reset.

Which unit ID does an SMA inverter use?

3 for SMA's own register profile (settable 3 to 123). The SunSpec profile answers on that unit ID plus 123, so 126 by default.

Do I subtract 1 from SMA register addresses?

No. SMA profile register numbers are sent as they are: AC power 30775 is requested at address 30775 (0x7837). SMA's minus-one rule applies to the SunSpec registers, where 40001 is requested as 40000.

Why does my SMA inverter show -2147483648 W?

That is 0x80000000, SMA's NaN for a signed 32-bit value. The inverter sends it when the value is not available, typically AC power at night. Treat it as no value, not as a measurement.

How often can I poll an SMA inverter over Modbus?

SMA's interface document asks for at least ten seconds between data transfers and no more than five parameters and measured values per inverter. The free workspace polls every 10 seconds.

Sources

SMA Solar Technology, SMA and SunSpec Modbus® Interface, Technical Information SMA-Modbus-general-TI-en-10, version 1.0 (2018); SMA, Modbus® Parameters and Measured Values, STP 50-US-40 (Sunny Tripower CORE1-US), Modbus list version 1.1, firmware 01.05.05.R (MODBUS-HTML_STP50-US-40_V11), files.sma.de. Tested against a simulator built from these documents, not against a physical inverter.

// beyond the inverter

Inverters, meters and the PLC in one map

ModbusManager Pro reads the Sunny Tripower next to the grid meter, other inverters and the PLC, turns SMA's NaN values into clean numbers once and republishes them as one Modbus TCP map or as MQTT topics with Home Assistant discovery.

Modbus gateway software →