{
  "spec_version": 1,
  "slug": "huawei-emma",
  "manufacturer": "Huawei",
  "model": "SmartAssistant EMMA-A02",
  "category": "Solar inverter",
  "supplier_url": "https://solar.huawei.com/en/",
  "default_configuration": {
    "protocol": "modbus_tcp",
    "port": 502,
    "unit_id": 0,
    "addressing": "zero_based",
    "byte_order": "BigEndian",
    "word_order": "HighFirst"
  },
  "coils": [],
  "discrete_inputs": [],
  "input_registers": [],
  "holding_registers": [
    {
      "address": 30312,
      "count": 2,
      "name": "Total battery discharge energy",
      "data_type": "UInt32",
      "units": "kWh",
      "scale_factor": 0.01,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 30354,
      "count": 2,
      "name": "PV active power",
      "data_type": "Int32",
      "units": "W",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 30360,
      "count": 2,
      "name": "Battery power",
      "data_type": "Int32",
      "units": "W",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "Signed. The cited template multiplies it by -1 to reach its charging-positive convention, so a positive register value means discharging. Read-only on the EMMA."
    },
    {
      "address": 30368,
      "count": 1,
      "name": "Battery state of charge",
      "data_type": "UInt16",
      "units": "%",
      "scale_factor": 0.01,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 31639,
      "count": 2,
      "name": "Grid phase A voltage",
      "data_type": "UInt32",
      "units": "V",
      "scale_factor": 0.01,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 31641,
      "count": 2,
      "name": "Grid phase B voltage",
      "data_type": "UInt32",
      "units": "V",
      "scale_factor": 0.01,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 31643,
      "count": 2,
      "name": "Grid phase C voltage",
      "data_type": "UInt32",
      "units": "V",
      "scale_factor": 0.01,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 31651,
      "count": 2,
      "name": "Grid phase A current",
      "data_type": "Int32",
      "units": "A",
      "scale_factor": 0.1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 31653,
      "count": 2,
      "name": "Grid phase B current",
      "data_type": "Int32",
      "units": "A",
      "scale_factor": 0.1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 31655,
      "count": 2,
      "name": "Grid phase C current",
      "data_type": "Int32",
      "units": "A",
      "scale_factor": 0.1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 31657,
      "count": 2,
      "name": "Active power of the built-in energy sensor",
      "data_type": "Int32",
      "units": "W",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "Grid power measured by the EMMA's own energy sensor; signed."
    },
    {
      "address": 31665,
      "count": 2,
      "name": "Grid phase A active power",
      "data_type": "Int32",
      "units": "W",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 31667,
      "count": 2,
      "name": "Grid phase B active power",
      "data_type": "Int32",
      "units": "W",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 31669,
      "count": 2,
      "name": "Grid phase C active power",
      "data_type": "Int32",
      "units": "W",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    }
  ],
  "combined_registers": [],
  "notes": "Modbus TCP is served by the EMMA-A02 (Huawei's residential SmartAssistant / energy management assistant) at unit ID 0 on port 502; it has to be switched on in the FusionSolar app with the installer account (Commission device -> Communication settings -> Modbus TCP). The EMMA accepts a single Modbus TCP client at a time and resets further connections. Its battery readings are read-only; the template's own requirement text points to the SUN2000 Hybrid map (unit ID of the inverter, forwarded by the EMMA) for active battery control. Source: the evcc meter template https://raw.githubusercontent.com/evcc-io/evcc/master/templates/definition/meter/huawei-emma.yaml, used as a secondary source; no Huawei register document was retrieved. The grid import/export energy counters (31687 / 31679) and the PV E-Total (30348) are 64-bit counters, and this app has no 64-bit integer type, so they are absent rather than truncated."
}
