{
  "spec_version": 1,
  "slug": "sunspec-generic",
  "manufacturer": "SunSpec Alliance",
  "model": "Generic SunSpec inverter + meter (models 1, 103, 203)",
  "category": "Solar inverter",
  "supplier_url": "https://sunspec.org/specifications/",
  "default_configuration": {
    "protocol": "modbus_tcp",
    "port": 502,
    "unit_id": 1,
    "addressing": "zero_based",
    "byte_order": "BigEndian",
    "word_order": "HighFirst"
  },
  "coils": [],
  "discrete_inputs": [],
  "input_registers": [],
  "holding_registers": [
    {
      "address": 40000,
      "count": 2,
      "name": "SunSpec identifier (\"SunS\")",
      "data_type": "UInt32",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "0x53756E53. Test for it to find the map; if it is missing, the device uses a different base address (0, 1, 50000, ...)."
    },
    {
      "address": 40002,
      "count": 1,
      "name": "SunSpec model ID (common)",
      "data_type": "UInt16",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "1 = common model."
    },
    {
      "address": 40003,
      "count": 1,
      "name": "SunSpec common model length",
      "data_type": "UInt16",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "Number of registers that follow this field (65 in this layout). Use it to step to the next model."
    },
    {
      "address": 40004,
      "count": 16,
      "name": "Manufacturer",
      "data_type": "Ascii",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 40020,
      "count": 16,
      "name": "Model",
      "data_type": "Ascii",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 40036,
      "count": 8,
      "name": "Options",
      "data_type": "Ascii",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "Model-specific option codes, e.g. the meter type on devices that expose a meter."
    },
    {
      "address": 40044,
      "count": 8,
      "name": "Firmware version",
      "data_type": "Ascii",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 40052,
      "count": 16,
      "name": "Serial number",
      "data_type": "Ascii",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 40068,
      "count": 1,
      "name": "Modbus unit ID",
      "data_type": "UInt16",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 40069,
      "count": 1,
      "name": "SunSpec model ID (inverter)",
      "data_type": "UInt16",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "101 = single phase, 102 = split phase, 103 = three phase. If the ID is 111/112/113 the device uses the float variant and every offset after this one changes."
    },
    {
      "address": 40070,
      "count": 1,
      "name": "SunSpec inverter model length",
      "data_type": "UInt16",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "50 registers follow in the int+SF models (60 in the float models 111-113)."
    },
    {
      "address": 40071,
      "count": 1,
      "name": "AC current, total",
      "data_type": "UInt16",
      "units": "A",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "Raw value; apply A_SF at 40075 (engineering value = raw x 10^SF)."
    },
    {
      "address": 40072,
      "count": 1,
      "name": "AC current, phase A",
      "data_type": "UInt16",
      "units": "A",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 40073,
      "count": 1,
      "name": "AC current, phase B",
      "data_type": "UInt16",
      "units": "A",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 40074,
      "count": 1,
      "name": "AC current, phase C",
      "data_type": "UInt16",
      "units": "A",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 40075,
      "count": 1,
      "name": "AC current scale factor (A_SF)",
      "data_type": "Int16",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "SunSpec scale factor, 10^SF."
    },
    {
      "address": 40076,
      "count": 1,
      "name": "AC voltage, phase A-B",
      "data_type": "UInt16",
      "units": "V",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "Raw value; apply V_SF at 40082."
    },
    {
      "address": 40079,
      "count": 1,
      "name": "AC voltage, phase A-N",
      "data_type": "UInt16",
      "units": "V",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 40080,
      "count": 1,
      "name": "AC voltage, phase B-N",
      "data_type": "UInt16",
      "units": "V",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 40081,
      "count": 1,
      "name": "AC voltage, phase C-N",
      "data_type": "UInt16",
      "units": "V",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 40082,
      "count": 1,
      "name": "AC voltage scale factor (V_SF)",
      "data_type": "Int16",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "SunSpec scale factor, 10^SF."
    },
    {
      "address": 40083,
      "count": 1,
      "name": "AC active power",
      "data_type": "Int16",
      "units": "W",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "Raw value; apply W_SF at 40084."
    },
    {
      "address": 40084,
      "count": 1,
      "name": "AC power scale factor (W_SF)",
      "data_type": "Int16",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "SunSpec scale factor, 10^SF."
    },
    {
      "address": 40085,
      "count": 1,
      "name": "AC frequency",
      "data_type": "UInt16",
      "units": "Hz",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "Raw value; apply Hz_SF at 40086."
    },
    {
      "address": 40086,
      "count": 1,
      "name": "AC frequency scale factor (Hz_SF)",
      "data_type": "Int16",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "SunSpec scale factor, 10^SF."
    },
    {
      "address": 40087,
      "count": 1,
      "name": "AC apparent power",
      "data_type": "Int16",
      "units": "VA",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "Raw value; apply VA_SF at 40088."
    },
    {
      "address": 40089,
      "count": 1,
      "name": "AC reactive power",
      "data_type": "Int16",
      "units": "var",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "Raw value; apply VAr_SF at 40090."
    },
    {
      "address": 40091,
      "count": 1,
      "name": "Power factor",
      "data_type": "Int16",
      "units": "%",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "Raw value; apply PF_SF at 40092."
    },
    {
      "address": 40093,
      "count": 2,
      "name": "AC lifetime energy",
      "data_type": "UInt32",
      "units": "Wh",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "Raw value; apply WH_SF at 40095. Divide by 1000 for kWh."
    },
    {
      "address": 40095,
      "count": 1,
      "name": "AC lifetime energy scale factor (WH_SF)",
      "data_type": "Int16",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "SunSpec scale factor, 10^SF."
    },
    {
      "address": 40100,
      "count": 1,
      "name": "DC power",
      "data_type": "Int16",
      "units": "W",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "Raw value; apply DCW_SF at 40101. On multi-MPPT devices this is the total DC power."
    },
    {
      "address": 40101,
      "count": 1,
      "name": "DC power scale factor (DCW_SF)",
      "data_type": "Int16",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "SunSpec scale factor, 10^SF."
    },
    {
      "address": 40102,
      "count": 1,
      "name": "Cabinet temperature",
      "data_type": "Int16",
      "units": "°C",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "Raw value; apply Tmp_SF at 40106."
    },
    {
      "address": 40106,
      "count": 1,
      "name": "Temperature scale factor (Tmp_SF)",
      "data_type": "Int16",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "SunSpec scale factor, 10^SF."
    },
    {
      "address": 40107,
      "count": 1,
      "name": "Inverter operating state",
      "data_type": "UInt16",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "1 = Off, 2 = Sleeping, 3 = Starting, 4 = MPPT, 5 = Throttled, 6 = Shutting down, 7 = Fault, 8 = Standby."
    },
    {
      "address": 40109,
      "count": 2,
      "name": "Inverter events 1",
      "data_type": "UInt32",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "Bit field: 0 = ground fault, 1 = input over voltage, 3 = DC disconnect, 5 = cabinet open, 6 = manual shutdown, 7 = over temperature, 12 = blown fuse, 13 = under temperature, 14 = memory loss, 15 = arc detection."
    },
    {
      "address": 40121,
      "count": 1,
      "name": "SunSpec model ID (meter common)",
      "data_type": "UInt16",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "1 = common model. Only present when a meter is exposed after the inverter."
    },
    {
      "address": 40122,
      "count": 1,
      "name": "Meter common model length",
      "data_type": "UInt16",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 40123,
      "count": 1,
      "name": "SunSpec model ID (meter)",
      "data_type": "UInt16",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "201 = single phase, 202 = split phase, 203 = three phase wye, 204 = three phase delta. Offset 0 of the meter model."
    },
    {
      "address": 40124,
      "count": 1,
      "name": "AC current, total",
      "data_type": "Int16",
      "units": "A",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "Raw value; apply A_SF at 40127."
    },
    {
      "address": 40125,
      "count": 1,
      "name": "AC current, phase A",
      "data_type": "Int16",
      "units": "A",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 40126,
      "count": 1,
      "name": "AC current, phase B",
      "data_type": "Int16",
      "units": "A",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 40127,
      "count": 1,
      "name": "AC current, phase C",
      "data_type": "Int16",
      "units": "A",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 40128,
      "count": 1,
      "name": "Meter current scale factor (A_SF)",
      "data_type": "Int16",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "SunSpec scale factor, 10^SF."
    },
    {
      "address": 40129,
      "count": 1,
      "name": "AC voltage, line to neutral (average)",
      "data_type": "Int16",
      "units": "V",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "Raw value; apply V_SF at 40136."
    },
    {
      "address": 40131,
      "count": 1,
      "name": "AC voltage, phase A-N",
      "data_type": "Int16",
      "units": "V",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 40132,
      "count": 1,
      "name": "AC voltage, phase B-N",
      "data_type": "Int16",
      "units": "V",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 40133,
      "count": 1,
      "name": "AC voltage, phase C-N",
      "data_type": "Int16",
      "units": "V",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 40136,
      "count": 1,
      "name": "Meter voltage scale factor (V_SF)",
      "data_type": "Int16",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "SunSpec scale factor, 10^SF."
    },
    {
      "address": 40137,
      "count": 1,
      "name": "AC frequency",
      "data_type": "Int16",
      "units": "Hz",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "Raw value; apply Hz_SF at 40138."
    },
    {
      "address": 40138,
      "count": 1,
      "name": "Meter frequency scale factor (Hz_SF)",
      "data_type": "Int16",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "SunSpec scale factor, 10^SF."
    },
    {
      "address": 40139,
      "count": 1,
      "name": "AC active power, total",
      "data_type": "Int16",
      "units": "W",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "Raw value; apply W_SF at 40143. Positive = import from the grid unless the meter is configured as a production meter."
    },
    {
      "address": 40140,
      "count": 1,
      "name": "AC active power, phase A",
      "data_type": "Int16",
      "units": "W",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 40141,
      "count": 1,
      "name": "AC active power, phase B",
      "data_type": "Int16",
      "units": "W",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 40142,
      "count": 1,
      "name": "AC active power, phase C",
      "data_type": "Int16",
      "units": "W",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 40143,
      "count": 1,
      "name": "Meter power scale factor (W_SF)",
      "data_type": "Int16",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "SunSpec scale factor, 10^SF."
    },
    {
      "address": 40149,
      "count": 1,
      "name": "AC reactive power, total",
      "data_type": "Int16",
      "units": "var",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 40154,
      "count": 1,
      "name": "Power factor (average)",
      "data_type": "Int16",
      "units": "%",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 40159,
      "count": 2,
      "name": "Total exported energy",
      "data_type": "UInt32",
      "units": "Wh",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "Raw value; apply TotWh_SF at 40175."
    },
    {
      "address": 40167,
      "count": 2,
      "name": "Total imported energy",
      "data_type": "UInt32",
      "units": "Wh",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "Raw value; apply TotWh_SF at 40175."
    },
    {
      "address": 40175,
      "count": 1,
      "name": "Meter energy scale factor (TotWh_SF)",
      "data_type": "Int16",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "SunSpec scale factor, 10^SF."
    }
  ],
  "combined_registers": [],
  "notes": "SunSpec is the vendor-neutral Modbus map that most modern inverters, meters and batteries expose: a chain of numbered models, each starting with its model ID and its length in registers, beginning with the common model (ID 1) that carries the manufacturer, model and serial number. This file describes the layout most devices use: base address 40000, common model 40000-40068, three-phase inverter model 103 at 40069 and a three-phase wye meter model 203 at 40121. The base address is not part of the standard - 40000, 40001, 0, 1 and 50000 all occur - and devices insert extra models (120 nameplate, 121 basic settings, 122 extended status, 123 immediate controls, 124 storage control, 160 multiple MPPT), so verify the actual chain: test for \"SunS\" at the base address, then read the model ID and length at the start of every model and step forward by two plus the length. If the inverter model ID is 111, 112 or 113 the device uses the float variants and the layout of that model (and every address after it) differs from this map. Values in this map use the SunSpec int+SF encoding, so engineering value = raw value x 10^scale factor, with the scale factor registers listed next to their values; scale factors are set by the device and can be negative. Points a device does not implement read as 0xFFFF (uint16, enum16), 0x8000 (int16, sunssf) or 0xFFFFFFFF (acc32); filter those values. Register addresses here are wire addresses; add 1 if your client numbers registers from 1. Source: SunSpec Alliance specifications and the published SunSpec model definitions (models 1, 103 and 203)."
}
