{
  "spec_version": 1,
  "slug": "abl-em4",
  "manufacturer": "ABL",
  "model": "eM4 Single / eM4 Twin (Controller / Extender)",
  "category": "EV charger",
  "supplier_url": "https://www.ablmobility.de/global/downloads/anleitungen/em4/20230905_Interface_description_ModbusTCP_WallboxeM4_Controller_Extender_EN.pdf?m=1701704247",
  "default_configuration": {
    "protocol": "modbus_tcp",
    "port": 502,
    "unit_id": 255,
    "addressing": "zero_based",
    "byte_order": "BigEndian",
    "word_order": "HighFirst"
  },
  "coils": [],
  "discrete_inputs": [],
  "input_registers": [],
  "holding_registers": [
    {
      "address": 1,
      "count": 1,
      "name": "Revision API",
      "data_type": "Hex",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "Endpoint revision; high byte = major, low byte = minor."
    },
    {
      "address": 2,
      "count": 1,
      "name": "Controller type",
      "data_type": "UInt16",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "0x0000 = ESP32, 0x0001 = SBC."
    },
    {
      "address": 3,
      "count": 1,
      "name": "Node type",
      "data_type": "UInt16",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "0x0000 = server."
    },
    {
      "address": 256,
      "count": 16,
      "name": "Product 1: type",
      "data_type": "Ascii",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "SAP material number of the wallbox, 32 ASCII characters, two per register."
    },
    {
      "address": 272,
      "count": 16,
      "name": "Product 1: serial number",
      "data_type": "Ascii",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "32 ASCII characters, two per register."
    },
    {
      "address": 288,
      "count": 1,
      "name": "Product 1: construction",
      "data_type": "UInt16",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "Bits 11-8: 0 = one outlet, 1 = two outlets. Bits 7-4: 0 = cable, 1 = socket. Bits 3-0: 0 = single phase, 1 = three phase."
    },
    {
      "address": 289,
      "count": 1,
      "name": "Product 1: outlet number",
      "data_type": "UInt16",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "Number of the assigned outlets (1 to 32); bits 15-8 = outlet left, bits 7-0 = outlet right."
    },
    {
      "address": 290,
      "count": 1,
      "name": "Product 1: firmware revision",
      "data_type": "Hex",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "Bits 15-12 = major, bits 11-8 = minor, bits 7-0 = patch."
    },
    {
      "address": 291,
      "count": 1,
      "name": "Product 1: rated current",
      "data_type": "UInt16",
      "units": "A",
      "scale_factor": 0.1,
      "offset": 0,
      "access": "R",
      "description": "Irated, 6 to 32 A, ten times the current in amps."
    },
    {
      "address": 292,
      "count": 1,
      "name": "Product 1: default current",
      "data_type": "UInt16",
      "units": "A",
      "scale_factor": 0.1,
      "offset": 0,
      "access": "R",
      "description": "Idefault, the maximum current of the product due to the installation, 6 to 32 A, ten times the current in amps."
    },
    {
      "address": 294,
      "count": 1,
      "name": "Product 1: control input voltage (AR4100)",
      "data_type": "UInt16",
      "units": "V",
      "scale_factor": 0.1,
      "offset": 0,
      "access": "R",
      "description": "0 to 12 V at the AR4100 control input, ten times the voltage."
    },
    {
      "address": 12288,
      "count": 1,
      "name": "Outlet 1: product number",
      "data_type": "UInt16",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "Number of the assigned product (1 to 32); stand-alone = 1."
    },
    {
      "address": 12289,
      "count": 2,
      "name": "Outlet 1: current L1",
      "data_type": "UInt32",
      "units": "A",
      "scale_factor": 0.1,
      "offset": 0,
      "access": "R",
      "description": "Electricity meter, phase 1, ten times the current in amps."
    },
    {
      "address": 12291,
      "count": 2,
      "name": "Outlet 1: current L2",
      "data_type": "UInt32",
      "units": "A",
      "scale_factor": 0.1,
      "offset": 0,
      "access": "R",
      "description": "Electricity meter, phase 2, ten times the current in amps."
    },
    {
      "address": 12293,
      "count": 2,
      "name": "Outlet 1: current L3",
      "data_type": "UInt32",
      "units": "A",
      "scale_factor": 0.1,
      "offset": 0,
      "access": "R",
      "description": "Electricity meter, phase 3, ten times the current in amps."
    },
    {
      "address": 12295,
      "count": 2,
      "name": "Outlet 1: voltage L1",
      "data_type": "UInt32",
      "units": "V",
      "scale_factor": 0.1,
      "offset": 0,
      "access": "R",
      "description": "Voltage meter, phase 1, ten times the voltage."
    },
    {
      "address": 12297,
      "count": 2,
      "name": "Outlet 1: voltage L2",
      "data_type": "UInt32",
      "units": "V",
      "scale_factor": 0.1,
      "offset": 0,
      "access": "R",
      "description": "Voltage meter, phase 2, ten times the voltage."
    },
    {
      "address": 12299,
      "count": 2,
      "name": "Outlet 1: voltage L3",
      "data_type": "UInt32",
      "units": "V",
      "scale_factor": 0.1,
      "offset": 0,
      "access": "R",
      "description": "Voltage meter, phase 3, ten times the voltage."
    },
    {
      "address": 12301,
      "count": 2,
      "name": "Outlet 1: active power",
      "data_type": "UInt32",
      "units": "W",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "Active power at the outlet in W."
    },
    {
      "address": 12303,
      "count": 2,
      "name": "Outlet 1: active energy meter reading",
      "data_type": "UInt32",
      "units": "kWh",
      "scale_factor": 0.01,
      "offset": 0,
      "access": "R",
      "description": "Outlet meter reading, 100 times the value in kWh (resolution 0.01 kWh)."
    },
    {
      "address": 12337,
      "count": 1,
      "name": "Outlet 1: outlet status",
      "data_type": "UInt16",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "0x00A0 = blocked, EV recognised, 0x00A1 = waiting for EV, 0x00A2 = reserved, 0x00B0 = EV recognised, authentication failed, 0x00B1 = EV recognised, authenticated, 0x00B2 = outlet can provide energy, 0x00B3 = EV ended or interrupted charging, 0x00C2 = outlet provides energy, 0x00E0 = blocked, no EV, 0x00E2 = boot process, 0x00Fx = error."
    },
    {
      "address": 12338,
      "count": 1,
      "name": "Outlet 1: Icmax",
      "data_type": "UInt16",
      "units": "A",
      "scale_factor": 0.1,
      "offset": 0,
      "access": "RW",
      "description": "Maximum current for the outlet from the energy management system, 0 A or 6.0 to 32.0 A (ten times the current); must not exceed Idefault."
    },
    {
      "address": 12339,
      "count": 1,
      "name": "Outlet 1: Ic",
      "data_type": "UInt16",
      "units": "A",
      "scale_factor": 0.1,
      "offset": 0,
      "access": "R",
      "description": "Maximum current the EV may draw, 0 A or 6.0 to 32.0 A (ten times the current)."
    },
    {
      "address": 12544,
      "count": 1,
      "name": "Outlet 2: product number",
      "data_type": "UInt16",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "eM4 Twin / stand-alone right-hand outlet."
    },
    {
      "address": 12545,
      "count": 2,
      "name": "Outlet 2: current L1",
      "data_type": "UInt32",
      "units": "A",
      "scale_factor": 0.1,
      "offset": 0,
      "access": "R",
      "description": "eM4 Twin / stand-alone right-hand outlet."
    },
    {
      "address": 12547,
      "count": 2,
      "name": "Outlet 2: current L2",
      "data_type": "UInt32",
      "units": "A",
      "scale_factor": 0.1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 12549,
      "count": 2,
      "name": "Outlet 2: current L3",
      "data_type": "UInt32",
      "units": "A",
      "scale_factor": 0.1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 12551,
      "count": 2,
      "name": "Outlet 2: voltage L1",
      "data_type": "UInt32",
      "units": "V",
      "scale_factor": 0.1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 12553,
      "count": 2,
      "name": "Outlet 2: voltage L2",
      "data_type": "UInt32",
      "units": "V",
      "scale_factor": 0.1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 12555,
      "count": 2,
      "name": "Outlet 2: voltage L3",
      "data_type": "UInt32",
      "units": "V",
      "scale_factor": 0.1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 12557,
      "count": 2,
      "name": "Outlet 2: active power",
      "data_type": "UInt32",
      "units": "W",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 12559,
      "count": 2,
      "name": "Outlet 2: active energy meter reading",
      "data_type": "UInt32",
      "units": "kWh",
      "scale_factor": 0.01,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 12593,
      "count": 1,
      "name": "Outlet 2: outlet status",
      "data_type": "UInt16",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "Same enumeration as outlet 1."
    },
    {
      "address": 12594,
      "count": 1,
      "name": "Outlet 2: Icmax",
      "data_type": "UInt16",
      "units": "A",
      "scale_factor": 0.1,
      "offset": 0,
      "access": "RW",
      "description": "Same meaning as outlet 1."
    },
    {
      "address": 12595,
      "count": 1,
      "name": "Outlet 2: Ic",
      "data_type": "UInt16",
      "units": "A",
      "scale_factor": 0.1,
      "offset": 0,
      "access": "R",
      "description": "Same meaning as outlet 1."
    }
  ],
  "combined_registers": [],
  "notes": "Source: ABL, \"Modbus TCP - Interface description, Wallbox eM4 Controller / Extender\", R 01, 18.12.2023 (vendor document, abl.de download area), chapters 1 to 3.4. The document names the wallbox as the Modbus server on port 502, uses unit identifier 0xFF (\"identification via IP address\") and states that multi-register values are big-endian (MSR first); reads are function code 03 and writes function code 10, so every row is a holding register here. The address space is laid out in blocks: 0x0001-0x00FF for the endpoint, 0x0100-0x20FF for products (0x0100 = product 1, 0x0200 = product 2, ...) and 0x3000-0x4FFF for outlets (0x3000 = outlet 1, 0x3100 = outlet 2, ...). This seed lists the endpoint block, product 1 and the two outlets of a stand-alone / Twin unit; on a group of several products and outlets the same blocks repeat at 0x0100 + 0x100 x (product-1) and 0x3000 + 0x100 x (outlet-1). The electricity and voltage meters are three consecutive 32-bit values, which is why each phase current and voltage occupies two registers."
}
