{
  "format": "voltrus-device-template/1",
  "template_id": "sungrow-sg-string-inverter",
  "manufacturer": "Sungrow",
  "model": "SG CX/RT/RS String Inverters",
  "protocol": "modbus",
  "description": "Sungrow residential and commercial string inverters share one Modbus register definition. Read-only running data such as MPPT inputs, AC output, energy and working state sits in input registers; settings such as start or stop, power limits and reactive power control sit in holding registers. Register map: https://voltrus.id/registers/sungrow/sg-string-inverter/",
  "version": "1.0.0",
  "verified": false,
  "verified_notes": "Generated by voltrus.id from Version V1.1.80, release date 2026-03-27 (https://info-support.sungrowpower.com/general-material/85cf50fa-188e-4b23-8a42-606482297b41.pdf), read 2026-10-24. Not checked against a real device; confirm a known value before relying on it.",
  "quirks": [
    "Offsets are 0-based wire addresses. The manual prints 1-based numbers (offset = number minus 1).",
    "Word order from the manual: Low word first (CD AB).",
    "The manual states that 32-bit values are little-endian by word: 0x01020304 is sent as 03 04 01 02, so the low word comes first (p. 4). Running data is read with function 04 and settings with functions 03, 06 and 10. The same numbers (5000 and up) appear in both areas with different meanings.",
    "Defaults from the manual: RS485: slave address 1 by default (1 to 247), 9600 bit/s, 8 data bits, 1 stop bit, RTU. Optional Ethernet Modbus TCP on port 502 (p. 4-5).",
    "14 unsigned 32-bit registers are read as int32: exact up to a raw value of 2,147,483,647.",
    "Not included, because templates have no 64-bit integer or string type: ARM_Software_Version, DSP_Software_Version, Serial_Number."
  ],
  "license": "CC-BY-4.0",
  "port": 502,
  "unit_id": 1,
  "interval_ms": 1000,
  "endianness": "little",
  "registers": [
    {
      "name": "Protocol_Number",
      "offset": 4949,
      "register_type": "int32",
      "register_area": "input",
      "scale": 1,
      "description": "Protocol number (manual address 4950)"
    },
    {
      "name": "Protocol_Version",
      "offset": 4951,
      "register_type": "int32",
      "register_area": "input",
      "scale": 1,
      "description": "Protocol version (manual address 4952)"
    },
    {
      "name": "Device_Type_Code",
      "offset": 4999,
      "register_type": "uint16",
      "register_area": "input",
      "scale": 1,
      "description": "Device type code (manual address 5000)"
    },
    {
      "name": "Nominal_Active_Power",
      "offset": 5000,
      "register_type": "uint16",
      "register_area": "input",
      "scale": 0.1,
      "unit": "kW",
      "description": "Nominal active power (manual address 5001)"
    },
    {
      "name": "Output_Type",
      "offset": 5001,
      "register_type": "uint16",
      "register_area": "input",
      "scale": 1,
      "description": "Output type (manual address 5002)"
    },
    {
      "name": "Daily_Energy_Yield",
      "offset": 5002,
      "register_type": "uint16",
      "register_area": "input",
      "scale": 0.1,
      "unit": "kWh",
      "description": "Daily energy yield (manual address 5003)"
    },
    {
      "name": "Total_Energy_Yield",
      "offset": 5003,
      "register_type": "int32",
      "register_area": "input",
      "scale": 1,
      "unit": "kWh",
      "description": "Total energy yield (manual address 5004)"
    },
    {
      "name": "Total_Running_Time",
      "offset": 5005,
      "register_type": "int32",
      "register_area": "input",
      "scale": 1,
      "unit": "h",
      "description": "Total running time (manual address 5006)"
    },
    {
      "name": "Internal_Temperature",
      "offset": 5007,
      "register_type": "int16",
      "register_area": "input",
      "scale": 0.1,
      "unit": "°C",
      "description": "Internal temperature (manual address 5008)"
    },
    {
      "name": "Total_Apparent_Power",
      "offset": 5008,
      "register_type": "int32",
      "register_area": "input",
      "scale": 1,
      "unit": "VA",
      "description": "Total apparent power (manual address 5009)"
    },
    {
      "name": "MPPT1_Voltage",
      "offset": 5010,
      "register_type": "uint16",
      "register_area": "input",
      "scale": 0.1,
      "unit": "V",
      "description": "MPPT 1 voltage (manual address 5011)"
    },
    {
      "name": "MPPT1_Current",
      "offset": 5011,
      "register_type": "uint16",
      "register_area": "input",
      "scale": 0.1,
      "unit": "A",
      "description": "MPPT 1 current (manual address 5012)"
    },
    {
      "name": "MPPT2_Voltage",
      "offset": 5012,
      "register_type": "uint16",
      "register_area": "input",
      "scale": 0.1,
      "unit": "V",
      "description": "MPPT 2 voltage (manual address 5013)"
    },
    {
      "name": "MPPT2_Current",
      "offset": 5013,
      "register_type": "uint16",
      "register_area": "input",
      "scale": 0.1,
      "unit": "A",
      "description": "MPPT 2 current (manual address 5014)"
    },
    {
      "name": "MPPT3_Voltage",
      "offset": 5014,
      "register_type": "uint16",
      "register_area": "input",
      "scale": 0.1,
      "unit": "V",
      "description": "MPPT 3 voltage (manual address 5015)"
    },
    {
      "name": "MPPT3_Current",
      "offset": 5015,
      "register_type": "uint16",
      "register_area": "input",
      "scale": 0.1,
      "unit": "A",
      "description": "MPPT 3 current (manual address 5016)"
    },
    {
      "name": "MPPT4_Voltage",
      "offset": 5114,
      "register_type": "uint16",
      "register_area": "input",
      "scale": 0.1,
      "unit": "V",
      "description": "MPPT 4 voltage (manual address 5115)"
    },
    {
      "name": "MPPT4_Current",
      "offset": 5115,
      "register_type": "uint16",
      "register_area": "input",
      "scale": 0.1,
      "unit": "A",
      "description": "MPPT 4 current (manual address 5116)"
    },
    {
      "name": "Total_DC_Power",
      "offset": 5016,
      "register_type": "int32",
      "register_area": "input",
      "scale": 1,
      "unit": "W",
      "description": "Total DC power (manual address 5017)"
    },
    {
      "name": "Voltage_AB_or_A",
      "offset": 5018,
      "register_type": "uint16",
      "register_area": "input",
      "scale": 0.1,
      "unit": "V",
      "description": "A-B line voltage or phase A voltage (manual address 5019)"
    },
    {
      "name": "Voltage_BC_or_B",
      "offset": 5019,
      "register_type": "uint16",
      "register_area": "input",
      "scale": 0.1,
      "unit": "V",
      "description": "B-C line voltage or phase B voltage (manual address 5020)"
    },
    {
      "name": "Voltage_CA_or_C",
      "offset": 5020,
      "register_type": "uint16",
      "register_area": "input",
      "scale": 0.1,
      "unit": "V",
      "description": "C-A line voltage or phase C voltage (manual address 5021)"
    },
    {
      "name": "Current_A",
      "offset": 5021,
      "register_type": "uint16",
      "register_area": "input",
      "scale": 0.1,
      "unit": "A",
      "description": "Phase A current (manual address 5022)"
    },
    {
      "name": "Current_B",
      "offset": 5022,
      "register_type": "uint16",
      "register_area": "input",
      "scale": 0.1,
      "unit": "A",
      "description": "Phase B current (manual address 5023)"
    },
    {
      "name": "Current_C",
      "offset": 5023,
      "register_type": "uint16",
      "register_area": "input",
      "scale": 0.1,
      "unit": "A",
      "description": "Phase C current (manual address 5024)"
    },
    {
      "name": "Total_Active_Power",
      "offset": 5030,
      "register_type": "int32",
      "register_area": "input",
      "scale": 1,
      "unit": "W",
      "description": "Total active power (manual address 5031)"
    },
    {
      "name": "Total_Reactive_Power",
      "offset": 5032,
      "register_type": "int32",
      "register_area": "input",
      "scale": 1,
      "unit": "var",
      "description": "Total reactive power (manual address 5033)"
    },
    {
      "name": "Power_Factor",
      "offset": 5034,
      "register_type": "int16",
      "register_area": "input",
      "scale": 0.001,
      "description": "Power factor (manual address 5035)"
    },
    {
      "name": "Grid_Frequency_Coarse",
      "offset": 5035,
      "register_type": "uint16",
      "register_area": "input",
      "scale": 0.1,
      "unit": "Hz",
      "description": "Grid frequency, 0.1 Hz resolution (manual address 5036)"
    },
    {
      "name": "Work_State_1",
      "offset": 5037,
      "register_type": "uint16",
      "register_area": "input",
      "scale": 1,
      "description": "Working state 1 (manual address 5038)"
    },
    {
      "name": "Fault_Alarm_Code_1",
      "offset": 5044,
      "register_type": "uint16",
      "register_area": "input",
      "scale": 1,
      "description": "Fault or alarm code (manual address 5045)"
    },
    {
      "name": "Nominal_Reactive_Power",
      "offset": 5048,
      "register_type": "uint16",
      "register_area": "input",
      "scale": 0.1,
      "unit": "kvar",
      "description": "Nominal reactive power (manual address 5049)"
    },
    {
      "name": "Array_Insulation_Resistance",
      "offset": 5070,
      "register_type": "uint16",
      "register_area": "input",
      "scale": 1,
      "unit": "kΩ",
      "description": "Array insulation resistance (manual address 5071)"
    },
    {
      "name": "Active_Power_Setpoint_Readback",
      "offset": 5076,
      "register_type": "int32",
      "register_area": "input",
      "scale": 1,
      "unit": "W",
      "description": "Active power regulation setpoint (manual address 5077)"
    },
    {
      "name": "Reactive_Power_Setpoint_Readback",
      "offset": 5078,
      "register_type": "int32",
      "register_area": "input",
      "scale": 1,
      "unit": "var",
      "description": "Reactive power regulation setpoint (manual address 5079)"
    },
    {
      "name": "Work_State_2",
      "offset": 5080,
      "register_type": "int32",
      "register_area": "input",
      "scale": 1,
      "description": "Working state 2 (manual address 5081)"
    },
    {
      "name": "Meter_Power",
      "offset": 5082,
      "register_type": "int32",
      "register_area": "input",
      "scale": 1,
      "unit": "W",
      "description": "Meter power (manual address 5083)"
    },
    {
      "name": "Load_Power",
      "offset": 5090,
      "register_type": "int32",
      "register_area": "input",
      "scale": 1,
      "unit": "W",
      "description": "Load power (manual address 5091)"
    },
    {
      "name": "Daily_Feed_In_Energy",
      "offset": 5092,
      "register_type": "int32",
      "register_area": "input",
      "scale": 0.1,
      "unit": "kWh",
      "description": "Daily feed-in energy (manual address 5093)"
    },
    {
      "name": "Total_Feed_In_Energy",
      "offset": 5094,
      "register_type": "int32",
      "register_area": "input",
      "scale": 0.1,
      "unit": "kWh",
      "description": "Total feed-in energy (manual address 5095)"
    },
    {
      "name": "Daily_Purchased_Energy",
      "offset": 5096,
      "register_type": "int32",
      "register_area": "input",
      "scale": 0.1,
      "unit": "kWh",
      "description": "Daily purchased energy (manual address 5097)"
    },
    {
      "name": "Total_Purchased_Energy",
      "offset": 5098,
      "register_type": "int32",
      "register_area": "input",
      "scale": 0.1,
      "unit": "kWh",
      "description": "Total purchased energy (manual address 5099)"
    },
    {
      "name": "Daily_Running_Time",
      "offset": 5112,
      "register_type": "uint16",
      "register_area": "input",
      "scale": 1,
      "unit": "min",
      "description": "Daily running time (manual address 5113)"
    },
    {
      "name": "Present_Country",
      "offset": 5113,
      "register_type": "uint16",
      "register_area": "input",
      "scale": 1,
      "description": "Present country code (manual address 5114)"
    },
    {
      "name": "Power_Factor_Setpoint_Readback",
      "offset": 5124,
      "register_type": "int16",
      "register_area": "input",
      "scale": 0.001,
      "description": "Power factor setpoint (manual address 5125)"
    },
    {
      "name": "Monthly_Energy_Yield",
      "offset": 5127,
      "register_type": "int32",
      "register_area": "input",
      "scale": 0.1,
      "unit": "kWh",
      "description": "Monthly energy yield (manual address 5128)"
    },
    {
      "name": "Total_Energy_Yield_Fine",
      "offset": 5143,
      "register_type": "int32",
      "register_area": "input",
      "scale": 0.1,
      "unit": "kWh",
      "description": "Total energy yield, 0.1 kWh resolution (manual address 5144)"
    },
    {
      "name": "Negative_Voltage_To_Ground",
      "offset": 5145,
      "register_type": "int16",
      "register_area": "input",
      "scale": 0.1,
      "unit": "V",
      "description": "Negative voltage to ground (manual address 5146)"
    },
    {
      "name": "Bus_Voltage",
      "offset": 5146,
      "register_type": "uint16",
      "register_area": "input",
      "scale": 0.1,
      "unit": "V",
      "description": "Bus voltage (manual address 5147)"
    },
    {
      "name": "Grid_Frequency",
      "offset": 5147,
      "register_type": "uint16",
      "register_area": "input",
      "scale": 0.01,
      "unit": "Hz",
      "description": "Grid frequency, 0.01 Hz resolution (manual address 5148)"
    },
    {
      "name": "PID_Work_State",
      "offset": 5149,
      "register_type": "uint16",
      "register_area": "input",
      "scale": 1,
      "description": "PID work state (manual address 5150)"
    },
    {
      "name": "PID_Alarm_Code",
      "offset": 5150,
      "register_type": "uint16",
      "register_area": "input",
      "scale": 1,
      "description": "PID alarm code (manual address 5151)"
    },
    {
      "name": "String1_Current",
      "offset": 7012,
      "register_type": "uint16",
      "register_area": "input",
      "scale": 0.01,
      "unit": "A",
      "description": "String 1 current (manual address 7013)"
    },
    {
      "name": "String2_Current",
      "offset": 7013,
      "register_type": "uint16",
      "register_area": "input",
      "scale": 0.01,
      "unit": "A",
      "description": "String 2 current (manual address 7014)"
    },
    {
      "name": "String3_Current",
      "offset": 7014,
      "register_type": "uint16",
      "register_area": "input",
      "scale": 0.01,
      "unit": "A",
      "description": "String 3 current (manual address 7015)"
    },
    {
      "name": "String4_Current",
      "offset": 7015,
      "register_type": "uint16",
      "register_area": "input",
      "scale": 0.01,
      "unit": "A",
      "description": "String 4 current (manual address 7016)"
    },
    {
      "name": "Clock_Year",
      "offset": 4999,
      "register_type": "uint16",
      "register_area": "holding",
      "scale": 1,
      "description": "Clock year (manual address 5000)",
      "writable": true
    },
    {
      "name": "Clock_Month",
      "offset": 5000,
      "register_type": "uint16",
      "register_area": "holding",
      "scale": 1,
      "description": "Clock month (manual address 5001)",
      "writable": true
    },
    {
      "name": "Clock_Day",
      "offset": 5001,
      "register_type": "uint16",
      "register_area": "holding",
      "scale": 1,
      "description": "Clock day (manual address 5002)",
      "writable": true
    },
    {
      "name": "Clock_Hour",
      "offset": 5002,
      "register_type": "uint16",
      "register_area": "holding",
      "scale": 1,
      "description": "Clock hour (manual address 5003)",
      "writable": true
    },
    {
      "name": "Clock_Minute",
      "offset": 5003,
      "register_type": "uint16",
      "register_area": "holding",
      "scale": 1,
      "description": "Clock minute (manual address 5004)",
      "writable": true
    },
    {
      "name": "Clock_Second",
      "offset": 5004,
      "register_type": "uint16",
      "register_area": "holding",
      "scale": 1,
      "description": "Clock second (manual address 5005)",
      "writable": true
    },
    {
      "name": "Start_Stop",
      "offset": 5005,
      "register_type": "uint16",
      "register_area": "holding",
      "scale": 1,
      "description": "Start or stop command (manual address 5006)",
      "writable": true
    },
    {
      "name": "Power_Limit_Switch",
      "offset": 5006,
      "register_type": "uint16",
      "register_area": "holding",
      "scale": 1,
      "description": "Power limitation switch (manual address 5007)",
      "writable": true
    },
    {
      "name": "Power_Limit_Setting",
      "offset": 5007,
      "register_type": "uint16",
      "register_area": "holding",
      "scale": 0.1,
      "unit": "%",
      "description": "Power limitation setting (manual address 5008)",
      "writable": true
    },
    {
      "name": "Feed_In_Limit_Switch",
      "offset": 5009,
      "register_type": "uint16",
      "register_area": "holding",
      "scale": 1,
      "description": "Feed-in power limit switch (manual address 5010)",
      "writable": true
    },
    {
      "name": "Feed_In_Limit_Value",
      "offset": 5010,
      "register_type": "uint16",
      "register_area": "holding",
      "scale": 0.01,
      "unit": "kW",
      "description": "Feed-in power limit value (manual address 5011)",
      "writable": true
    },
    {
      "name": "Feed_In_Limit_Ratio",
      "offset": 5014,
      "register_type": "uint16",
      "register_area": "holding",
      "scale": 0.1,
      "unit": "%",
      "description": "Feed-in power limit ratio (manual address 5015)",
      "writable": true
    },
    {
      "name": "PF_Setting",
      "offset": 5018,
      "register_type": "int16",
      "register_area": "holding",
      "scale": 0.001,
      "description": "Power factor setting (manual address 5019)",
      "writable": true
    },
    {
      "name": "Active_Power_Overload",
      "offset": 5019,
      "register_type": "uint16",
      "register_area": "holding",
      "scale": 1,
      "description": "Active power overload enable (manual address 5020)",
      "writable": true
    },
    {
      "name": "Reactive_Ratio_At_Night",
      "offset": 5032,
      "register_type": "int16",
      "register_area": "holding",
      "scale": 0.1,
      "unit": "%",
      "description": "Reactive power ratio at night (manual address 5033)",
      "writable": true
    },
    {
      "name": "Local_Remote_Control",
      "offset": 5033,
      "register_type": "uint16",
      "register_area": "holding",
      "scale": 1,
      "description": "Local or remote control mode (manual address 5034)",
      "writable": true
    },
    {
      "name": "Night_SVG_Switch",
      "offset": 5034,
      "register_type": "uint16",
      "register_area": "holding",
      "scale": 1,
      "description": "Night SVG switch (manual address 5035)",
      "writable": true
    },
    {
      "name": "Reactive_Adjustment_Mode",
      "offset": 5035,
      "register_type": "uint16",
      "register_area": "holding",
      "scale": 1,
      "description": "Reactive power adjustment mode (manual address 5036)",
      "writable": true
    },
    {
      "name": "Reactive_Percent_Setting",
      "offset": 5036,
      "register_type": "int16",
      "register_area": "holding",
      "scale": 0.1,
      "unit": "%",
      "description": "Reactive power percentage setting (manual address 5037)",
      "writable": true
    },
    {
      "name": "Power_Limit_Adjustment",
      "offset": 5038,
      "register_type": "uint16",
      "register_area": "holding",
      "scale": 0.1,
      "unit": "kW",
      "description": "Power limitation adjustment (manual address 5039)",
      "writable": true
    },
    {
      "name": "Reactive_Power_Adjustment",
      "offset": 5039,
      "register_type": "int16",
      "register_area": "holding",
      "scale": 0.1,
      "unit": "kvar",
      "description": "Reactive power adjustment (manual address 5040)",
      "writable": true
    }
  ]
}
