{
  "spec_version": 1,
  "slug": "saj-h2",
  "manufacturer": "SAJ",
  "model": "H2 series hybrid (also Ampere.StoragePro)",
  "category": "Solar inverter",
  "supplier_url": "https://www.saj-electric.com/",
  "default_configuration": {
    "protocol": "modbus_tcp",
    "port": 502,
    "unit_id": 1,
    "addressing": "zero_based",
    "byte_order": "BigEndian",
    "word_order": "HighFirst",
    "native_interface": "rs485",
    "serial": {
      "parity": "None",
      "baud_rate": 115200,
      "data_bits": 8,
      "stop_bits": 1
    }
  },
  "coils": [],
  "discrete_inputs": [],
  "input_registers": [],
  "holding_registers": [
    {
      "address": 40972,
      "count": 1,
      "name": "Battery 1 state of charge",
      "data_type": "UInt16",
      "units": "%",
      "scale_factor": 0.01,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 13828,
      "count": 1,
      "name": "Charge time enable control",
      "data_type": "Int16",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "RW",
      "description": "1 = the first charge time window is enabled."
    },
    {
      "address": 13830,
      "count": 1,
      "name": "First charge window start",
      "data_type": "Int16",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "RW",
      "description": "Packed hour/minute; 0x0000 = 00:00."
    },
    {
      "address": 13831,
      "count": 1,
      "name": "First charge window end",
      "data_type": "Int16",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "RW",
      "description": "Packed hour/minute; 0x173B = 23:59."
    },
    {
      "address": 13895,
      "count": 1,
      "name": "Application mode",
      "data_type": "Int16",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "RW",
      "description": "1 = time mode, 2 = self use (default)."
    },
    {
      "address": 13905,
      "count": 1,
      "name": "Battery state-of-charge keep limit",
      "data_type": "Int16",
      "units": "%",
      "scale_factor": 1,
      "offset": 0,
      "access": "RW",
      "description": "SoC the inverter holds when it is prevented from discharging."
    },
    {
      "address": 41022,
      "count": 1,
      "name": "Meter current R",
      "data_type": "UInt16",
      "units": "A",
      "scale_factor": 0.01,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 41023,
      "count": 1,
      "name": "Grid active power R",
      "data_type": "Int16",
      "units": "W",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "Signed; positive means import from the grid."
    },
    {
      "address": 41028,
      "count": 1,
      "name": "Meter current S",
      "data_type": "UInt16",
      "units": "A",
      "scale_factor": 0.01,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 41029,
      "count": 1,
      "name": "Grid active power S",
      "data_type": "Int16",
      "units": "W",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "Signed; positive means import from the grid."
    },
    {
      "address": 41034,
      "count": 1,
      "name": "Meter current T",
      "data_type": "UInt16",
      "units": "A",
      "scale_factor": 0.01,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 41035,
      "count": 1,
      "name": "Grid active power T",
      "data_type": "Int16",
      "units": "W",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "Signed; positive means import from the grid."
    },
    {
      "address": 16549,
      "count": 1,
      "name": "Total PV power",
      "data_type": "Int16",
      "units": "W",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 16550,
      "count": 1,
      "name": "Total battery power",
      "data_type": "Int16",
      "units": "W",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "Signed; positive means discharging."
    },
    {
      "address": 16557,
      "count": 1,
      "name": "System grid power",
      "data_type": "Int16",
      "units": "W",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "Signed; positive means import from the grid."
    },
    {
      "address": 16581,
      "count": 2,
      "name": "Total PV energy",
      "data_type": "UInt32",
      "units": "kWh",
      "scale_factor": 0.01,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 16597,
      "count": 2,
      "name": "Total battery discharge energy",
      "data_type": "UInt32",
      "units": "kWh",
      "scale_factor": 0.01,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 16749,
      "count": 2,
      "name": "Sum of all phases feed-in total",
      "data_type": "UInt32",
      "units": "kWh",
      "scale_factor": 0.01,
      "offset": 0,
      "access": "R"
    }
  ],
  "combined_registers": [],
  "notes": "Register map from the evcc template https://raw.githubusercontent.com/evcc-io/evcc/master/templates/definition/meter/saj-h2.yaml (SAJ H2 series hybrid and the rebadged Ampere.StoragePro), cross-checked against stanus74/home-assistant-saj-h2-modbus. The inverter is an RS-485 device with 115200 8N1 factory serial settings and slave address 1; all entries listed are holding registers. Times are written as packed hour/minute values (for example 0x173B = 23:59). Charge windows are only acted on while the charge time control register is enabled. Battery compatibility: SAJ's US H2 (5K-11.4K) LS3/LS4 user manual gives an approved-battery table naming only SAJ's own packs - B2-5.0-LV1, B2-5.0-LV2 and B3-5.0-LV - and states the H2 is only compatible with the batteries listed, any other untested battery voiding the warranty - https://us.saj-electric.com/hubfs/Guides%20and%20Manuals/H2/H2-(5K-11.4K)-(LS3,LS4)-US/H2-(5K-11.4K)-(LS3%2CLS4)-US_User_Manual_en_US.pdf."
}
