{
  "spec_version": 1,
  "slug": "sma-sunny-boy-tripower",
  "manufacturer": "SMA",
  "model": "Sunny Boy / Sunny Tripower",
  "category": "Solar inverter",
  "supplier_url": "https://www.sma.de/en/products/product-features-interfaces/modbus-protocol-interface",
  "default_configuration": {
    "protocol": "modbus_tcp",
    "port": 502,
    "unit_id": 3,
    "addressing": "zero_based",
    "byte_order": "BigEndian",
    "word_order": "HighFirst"
  },
  "coils": [],
  "discrete_inputs": [],
  "input_registers": [
    {
      "address": 30001,
      "count": 2,
      "name": "SMA Modbus profile version",
      "data_type": "UInt32",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "Version number of the SMA Modbus profile."
    },
    {
      "address": 30003,
      "count": 2,
      "name": "SUSy ID",
      "data_type": "UInt32",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "SMA device family identifier."
    },
    {
      "address": 30005,
      "count": 2,
      "name": "Serial number",
      "data_type": "UInt32",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "Serial number of the inverter."
    },
    {
      "address": 30051,
      "count": 2,
      "name": "Device class",
      "data_type": "UInt32",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "8001 = PV inverter."
    },
    {
      "address": 30053,
      "count": 2,
      "name": "Device type",
      "data_type": "UInt32",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "Numerical device type code; see SMA's device-specific register list."
    },
    {
      "address": 30055,
      "count": 2,
      "name": "Manufacturer",
      "data_type": "UInt32",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "461 = SMA."
    },
    {
      "address": 30059,
      "count": 2,
      "name": "Software package",
      "data_type": "UInt32",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "Installed software package version."
    },
    {
      "address": 30201,
      "count": 2,
      "name": "Device status",
      "data_type": "UInt32",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "35 = Error, 303 = Off, 307 = OK, 455 = Warning."
    },
    {
      "address": 30203,
      "count": 2,
      "name": "Power at status OK",
      "data_type": "UInt32",
      "units": "W",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "Maximum active power while the inverter status is OK; 0 in any other status."
    },
    {
      "address": 30205,
      "count": 2,
      "name": "Power at status warning",
      "data_type": "UInt32",
      "units": "W",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "Maximum active power while the inverter status is Warning; 0 in any other status."
    },
    {
      "address": 30207,
      "count": 2,
      "name": "Power at status error",
      "data_type": "UInt32",
      "units": "W",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "Maximum active power while the inverter status is Error; 0 in any other status."
    },
    {
      "address": 30211,
      "count": 2,
      "name": "Recommended action",
      "data_type": "UInt32",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "336 = Contact manufacturer, 337 = Contact installer, 338 = Invalid, 887 = No recommended action."
    },
    {
      "address": 30213,
      "count": 2,
      "name": "Status message",
      "data_type": "UInt32",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "886 = No message; otherwise the last status message code."
    },
    {
      "address": 30215,
      "count": 2,
      "name": "Status description",
      "data_type": "UInt32",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "885 = No description; otherwise the last status description code."
    },
    {
      "address": 30529,
      "count": 2,
      "name": "Total AC energy (total yield)",
      "data_type": "UInt32",
      "units": "Wh",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "Total energy fed in on all line conductors."
    },
    {
      "address": 30531,
      "count": 2,
      "name": "Total AC energy (total yield)",
      "data_type": "UInt32",
      "units": "kWh",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "Total energy fed in on all line conductors."
    },
    {
      "address": 30533,
      "count": 2,
      "name": "Total AC energy (total yield)",
      "data_type": "UInt32",
      "units": "MWh",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "Total energy fed in on all line conductors."
    },
    {
      "address": 30535,
      "count": 2,
      "name": "Daily AC energy (daily yield)",
      "data_type": "UInt32",
      "units": "Wh",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "Energy fed in today on all line conductors."
    },
    {
      "address": 30537,
      "count": 2,
      "name": "Daily AC energy (daily yield)",
      "data_type": "UInt32",
      "units": "kWh",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "Energy fed in today on all line conductors."
    },
    {
      "address": 30539,
      "count": 2,
      "name": "Daily AC energy (daily yield)",
      "data_type": "UInt32",
      "units": "MWh",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "Energy fed in today on all line conductors."
    },
    {
      "address": 30541,
      "count": 2,
      "name": "Operating time",
      "data_type": "UInt32",
      "units": "s",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 30543,
      "count": 2,
      "name": "Feed-in time",
      "data_type": "UInt32",
      "units": "s",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 30565,
      "count": 2,
      "name": "Number of generator starts",
      "data_type": "UInt32",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 30585,
      "count": 2,
      "name": "Power outage time",
      "data_type": "UInt32",
      "units": "s",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 30769,
      "count": 2,
      "name": "DC current input 1",
      "data_type": "Int32",
      "units": "A",
      "scale_factor": 0.001,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 30771,
      "count": 2,
      "name": "DC voltage input 1",
      "data_type": "Int32",
      "units": "V",
      "scale_factor": 0.01,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 30773,
      "count": 2,
      "name": "DC power input 1",
      "data_type": "Int32",
      "units": "W",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 30775,
      "count": 2,
      "name": "Active power, all line conductors",
      "data_type": "Int32",
      "units": "W",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "Total AC active power (GridMs.TotW)."
    },
    {
      "address": 30777,
      "count": 2,
      "name": "Active power L1",
      "data_type": "Int32",
      "units": "W",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 30779,
      "count": 2,
      "name": "Active power L2",
      "data_type": "Int32",
      "units": "W",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 30781,
      "count": 2,
      "name": "Active power L3",
      "data_type": "Int32",
      "units": "W",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 30783,
      "count": 2,
      "name": "Line-to-neutral voltage L1",
      "data_type": "UInt32",
      "units": "V",
      "scale_factor": 0.01,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 30785,
      "count": 2,
      "name": "Line-to-neutral voltage L2",
      "data_type": "UInt32",
      "units": "V",
      "scale_factor": 0.01,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 30787,
      "count": 2,
      "name": "Line-to-neutral voltage L3",
      "data_type": "UInt32",
      "units": "V",
      "scale_factor": 0.01,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 30789,
      "count": 2,
      "name": "Line-to-line voltage L1-L2",
      "data_type": "UInt32",
      "units": "V",
      "scale_factor": 0.01,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 30791,
      "count": 2,
      "name": "Line-to-line voltage L2-L3",
      "data_type": "UInt32",
      "units": "V",
      "scale_factor": 0.01,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 30793,
      "count": 2,
      "name": "Line-to-line voltage L3-L1",
      "data_type": "UInt32",
      "units": "V",
      "scale_factor": 0.01,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 30795,
      "count": 2,
      "name": "Line current, all line conductors",
      "data_type": "UInt32",
      "units": "A",
      "scale_factor": 0.001,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 30797,
      "count": 2,
      "name": "Line current L1",
      "data_type": "UInt32",
      "units": "A",
      "scale_factor": 0.001,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 30799,
      "count": 2,
      "name": "Line current L2",
      "data_type": "UInt32",
      "units": "A",
      "scale_factor": 0.001,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 30801,
      "count": 2,
      "name": "Line current L3",
      "data_type": "UInt32",
      "units": "A",
      "scale_factor": 0.001,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 30803,
      "count": 2,
      "name": "Power frequency",
      "data_type": "UInt32",
      "units": "Hz",
      "scale_factor": 0.01,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 30805,
      "count": 2,
      "name": "Reactive power, all line conductors",
      "data_type": "Int32",
      "units": "VAr",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "Positive = lagging, negative = leading (IEC convention)."
    },
    {
      "address": 30807,
      "count": 2,
      "name": "Reactive power L1",
      "data_type": "Int32",
      "units": "VAr",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 30809,
      "count": 2,
      "name": "Reactive power L2",
      "data_type": "Int32",
      "units": "VAr",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 30811,
      "count": 2,
      "name": "Reactive power L3",
      "data_type": "Int32",
      "units": "VAr",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 30813,
      "count": 2,
      "name": "Apparent power, all line conductors",
      "data_type": "Int32",
      "units": "VA",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 30815,
      "count": 2,
      "name": "Apparent power L1",
      "data_type": "Int32",
      "units": "VA",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 30817,
      "count": 2,
      "name": "Apparent power L2",
      "data_type": "Int32",
      "units": "VA",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 30819,
      "count": 2,
      "name": "Apparent power L3",
      "data_type": "Int32",
      "units": "VA",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 30821,
      "count": 2,
      "name": "Displacement power factor",
      "data_type": "UInt32",
      "units": "",
      "scale_factor": 0.01,
      "offset": 0,
      "access": "R",
      "description": "cos φ of all line conductors."
    },
    {
      "address": 30823,
      "count": 2,
      "name": "Excitation type",
      "data_type": "UInt32",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "1041 = Leading, 1042 = Lagging."
    },
    {
      "address": 30843,
      "count": 2,
      "name": "Battery current",
      "data_type": "Int32",
      "units": "A",
      "scale_factor": 0.001,
      "offset": 0,
      "access": "R",
      "description": "Only available on devices with a battery (e.g. Sunny Boy Storage)."
    },
    {
      "address": 30845,
      "count": 2,
      "name": "Battery state of charge",
      "data_type": "UInt32",
      "units": "%",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "Only available on devices with a battery."
    },
    {
      "address": 30847,
      "count": 2,
      "name": "Battery capacity",
      "data_type": "UInt32",
      "units": "%",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 30849,
      "count": 2,
      "name": "Battery temperature",
      "data_type": "Int32",
      "units": "°C",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 30851,
      "count": 2,
      "name": "Battery voltage",
      "data_type": "UInt32",
      "units": "V",
      "scale_factor": 0.01,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 30853,
      "count": 2,
      "name": "Active battery charging mode",
      "data_type": "UInt32",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "1767 = Boost charge, 1768 = Full charge, 1769 = Equalization charge, 1770 = Float charge."
    },
    {
      "address": 30957,
      "count": 2,
      "name": "DC current input 2",
      "data_type": "Int32",
      "units": "A",
      "scale_factor": 0.001,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 30959,
      "count": 2,
      "name": "DC voltage input 2",
      "data_type": "Int32",
      "units": "V",
      "scale_factor": 0.01,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 30961,
      "count": 2,
      "name": "DC power input 2",
      "data_type": "Int32",
      "units": "W",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    }
  ],
  "holding_registers": [
    {
      "address": 40149,
      "count": 2,
      "name": "Active power setpoint (grid management)",
      "data_type": "Int32",
      "units": "W",
      "scale_factor": 1,
      "offset": 0,
      "access": "W",
      "description": "Setpoint for the operating mode \"Active power limitation P via system control\". Write-only; do not change cyclically unless it is a grid-management setpoint."
    },
    {
      "address": 40151,
      "count": 2,
      "name": "System control (active and reactive power)",
      "data_type": "UInt32",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "W",
      "description": "802 = Active, 803 = Inactive."
    },
    {
      "address": 40153,
      "count": 2,
      "name": "Reactive power setpoint (grid management)",
      "data_type": "Int32",
      "units": "VAr",
      "scale_factor": 1,
      "offset": 0,
      "access": "W",
      "description": "Setpoint for the operating mode \"Specification via system control\". Write-only."
    }
  ],
  "combined_registers": [
    {
      "id": "dc-power-total",
      "label": "DC power, both inputs (calculated)",
      "operator": "+",
      "operand_a": {
        "register_type": "input_registers",
        "register_address": 30773
      },
      "operand_b": {
        "register_type": "input_registers",
        "register_address": 30961
      },
      "units": "W",
      "scale_factor": 1,
      "offset": 0,
      "description": "Sum of the two DC input powers; useful on Tripower models."
    },
    {
      "id": "ac-power-l1-l2",
      "label": "AC active power L1 + L2 (calculated)",
      "operator": "+",
      "operand_a": {
        "register_type": "input_registers",
        "register_address": 30777
      },
      "operand_b": {
        "register_type": "input_registers",
        "register_address": 30779
      },
      "units": "W",
      "scale_factor": 1,
      "offset": 0
    },
    {
      "id": "ac-power-total-calculated",
      "label": "AC active power, all phases (calculated)",
      "operator": "+",
      "operand_a": {
        "combined_id": "ac-power-l1-l2"
      },
      "operand_b": {
        "register_type": "input_registers",
        "register_address": 30781
      },
      "units": "W",
      "scale_factor": 1,
      "offset": 0,
      "description": "L1 + L2 + L3, built from the nested combined register. Shown next to the device's own total at 30775."
    }
  ],
  "notes": "Addresses are the ADR (DEC) values in SMA's Modbus technical information and are used as wire addresses (SMA documents the register numbers directly; do not subtract 1). The SMA Modbus profile uses unit ID 3. SMA also exposes a SunSpec profile at unit ID 126 with its own 40001-based numbering. Not every register is available on every model or firmware; battery registers apply to Sunny Boy Storage and hybrid models. Do not write holding registers cyclically: SMA warns that repeated writes wear the device's flash memory. Source: SMA technical information \"SMA and SunSpec Modbus Interface\" and the device-specific Modbus register list, linked on the supplier page."
}
