{
  "spec_version": 1,
  "slug": "sofar-hyd-g3",
  "manufacturer": "Sofar Solar",
  "model": "HYD 3...20K-3PH / HYD 3...6K-EP / SOFAR ...KTL-G3",
  "category": "Solar inverter",
  "supplier_url": "https://www.sofarsolar.com/",
  "default_configuration": {
    "protocol": "modbus_tcp",
    "port": 8899,
    "unit_id": 1,
    "addressing": "zero_based",
    "byte_order": "BigEndian",
    "word_order": "HighFirst"
  },
  "coils": [],
  "discrete_inputs": [],
  "input_registers": [],
  "holding_registers": [
    {
      "address": 1160,
      "count": 1,
      "name": "Grid active power at the point of common coupling",
      "data_type": "Int16",
      "units": "W",
      "scale_factor": 10,
      "offset": 0,
      "access": "R",
      "description": "Signed; positive means export to the grid."
    },
    {
      "address": 1170,
      "count": 1,
      "name": "Grid current R",
      "data_type": "UInt16",
      "units": "A",
      "scale_factor": 0.01,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 1171,
      "count": 1,
      "name": "Grid active power R",
      "data_type": "Int16",
      "units": "W",
      "scale_factor": 10,
      "offset": 0,
      "access": "R",
      "description": "Signed; positive means export."
    },
    {
      "address": 1181,
      "count": 1,
      "name": "Grid current S",
      "data_type": "UInt16",
      "units": "A",
      "scale_factor": 0.01,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 1182,
      "count": 1,
      "name": "Grid active power S",
      "data_type": "Int16",
      "units": "W",
      "scale_factor": 10,
      "offset": 0,
      "access": "R",
      "description": "Signed; positive means export."
    },
    {
      "address": 1192,
      "count": 1,
      "name": "Grid current T",
      "data_type": "UInt16",
      "units": "A",
      "scale_factor": 0.01,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 1193,
      "count": 1,
      "name": "Grid active power T",
      "data_type": "Int16",
      "units": "W",
      "scale_factor": 10,
      "offset": 0,
      "access": "R",
      "description": "Signed; positive means export."
    },
    {
      "address": 1198,
      "count": 1,
      "name": "External PV active power",
      "data_type": "UInt16",
      "units": "W",
      "scale_factor": 10,
      "offset": 0,
      "access": "R",
      "description": "Power of cascaded external inverters."
    },
    {
      "address": 1414,
      "count": 1,
      "name": "PV1 power",
      "data_type": "UInt16",
      "units": "W",
      "scale_factor": 10,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 1417,
      "count": 1,
      "name": "PV2 power",
      "data_type": "UInt16",
      "units": "W",
      "scale_factor": 10,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 1420,
      "count": 1,
      "name": "PV3 power",
      "data_type": "UInt16",
      "units": "W",
      "scale_factor": 10,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 1422,
      "count": 1,
      "name": "PV4 power",
      "data_type": "UInt16",
      "units": "W",
      "scale_factor": 10,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 1542,
      "count": 1,
      "name": "Battery tower 1 power",
      "data_type": "Int16",
      "units": "W",
      "scale_factor": 10,
      "offset": 0,
      "access": "R",
      "description": "Signed; positive means charging (evcc inverts it so that charging is negative)."
    },
    {
      "address": 1544,
      "count": 1,
      "name": "Battery tower 1 state of charge",
      "data_type": "UInt16",
      "units": "%",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 1549,
      "count": 1,
      "name": "Battery tower 2 power",
      "data_type": "Int16",
      "units": "W",
      "scale_factor": 10,
      "offset": 0,
      "access": "R",
      "description": "Signed; positive means charging (evcc inverts it so that charging is negative)."
    },
    {
      "address": 1551,
      "count": 1,
      "name": "Battery tower 2 state of charge",
      "data_type": "UInt16",
      "units": "%",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 1670,
      "count": 2,
      "name": "PV generation total",
      "data_type": "UInt32",
      "units": "kWh",
      "scale_factor": 0.1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 1678,
      "count": 2,
      "name": "Energy purchased from grid total",
      "data_type": "UInt32",
      "units": "kWh",
      "scale_factor": 0.1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 4368,
      "count": 1,
      "name": "Energy storage working mode",
      "data_type": "Int16",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "RW",
      "description": "0 = self use, 3 = passive (external power setpoint)."
    }
  ],
  "combined_registers": [],
  "notes": "Register map from the evcc template https://raw.githubusercontent.com/evcc-io/evcc/master/templates/definition/meter/sofarsolar-g3.yaml (Sofar HYD 5...20K-3PH, HYD 3...6K-EP, SOFAR 5...24KTL-G3 and 80...136KTL-G3), cross-checked against wills106/homeassistant-solax-modbus (custom_components/solax_modbus/plugin_sofar.py). This is the newer 'G3' protocol on a second-generation unit that serves Modbus TCP on port 8899, unit ID 1. The older HYD protocol uses different addresses in the 0x02xx block (evcc template sofarsolar.yaml) and RS-485 at 9600 8N1 - a device on that protocol needs the other map. Grid power and per-phase power are signed, positive = export to the grid. The registers are holding registers; the battery registers are repeated for up to eight BTS 5K towers and advance by seven registers per tower, so only towers 1 and 2 are listed here (power 0x0606/0x060D/0x0614/..., state of charge 0x0608/0x060F/0x0616/...). Battery compatibility: SOFAR's compatible-battery declaration for the HYD hybrid (2024-07-12) lists SOFAR BTS 5K and BTS E5-20-DS5, Pylontech US2000/US3000/US5000 and Force H1/H2/H3, WeCo GTX 3000H/5000/5000P/5000S, 4K4/4K4LT/4K4 PRO/5K3, H48050/H48074 and lead-acid - https://downloads.sofarsolar.eu/wp-content/uploads/sofar/Declarations/Technik%20Declaration/SOFAR%20HYD%20Inverter_Declaration_Compatible%20Battery%20List_2024-07-12_en-EU.pdf."
}
