{
  "spec_version": 1,
  "slug": "abb-terra-ac",
  "manufacturer": "ABB",
  "model": "Terra AC wallbox",
  "category": "EV charger",
  "supplier_url": "https://new.abb.com/ev-charging/terra-ac-wallbox",
  "default_configuration": {
    "protocol": "modbus_tcp",
    "port": 502,
    "unit_id": 1,
    "addressing": "zero_based",
    "byte_order": "BigEndian",
    "word_order": "HighFirst"
  },
  "coils": [],
  "discrete_inputs": [],
  "input_registers": [],
  "holding_registers": [
    {
      "address": 16388,
      "count": 2,
      "name": "Firmware version",
      "data_type": "UInt32",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "Encoded as four bytes: major, minor, patch, reserved (0x01 0x02 0x13 0x00 = v1.2.13)."
    },
    {
      "address": 16390,
      "count": 2,
      "name": "User settable max current",
      "data_type": "UInt32",
      "units": "A",
      "scale_factor": 0.001,
      "offset": 0,
      "access": "R",
      "description": "Maximum current the wallbox hardware supports, as set in the Terra Config app."
    },
    {
      "address": 16392,
      "count": 2,
      "name": "Error code",
      "data_type": "UInt32",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "0 = no error; other values are described in the Terra AC user manual."
    },
    {
      "address": 16394,
      "count": 2,
      "name": "Socket lock state",
      "data_type": "UInt32",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "0x0000 = no cable plugged, 0x0001 = cable connected at the station, unlocked, 0x0011 = cable connected and locked, 0x0101 = cable connected to station and EV, unlocked, 0x0111 = cable connected to station and EV, locked."
    },
    {
      "address": 16396,
      "count": 2,
      "name": "Charging state",
      "data_type": "UInt32",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "Low byte bits 6-0: 0 = State A (idle), 1 = State B1 (plugged in, pending authorization), 2 = State B2 (EVSE ready, PWM), 3 = State C1 (EV ready, S2 closed), 4 = State C2 (charging contactor closed), 5 = other. Bit 7 of byte 1: 0 = charging at rated current, 1 = below the value commanded in 0x4100."
    },
    {
      "address": 16398,
      "count": 2,
      "name": "Charging current limit",
      "data_type": "UInt32",
      "units": "A",
      "scale_factor": 0.001,
      "offset": 0,
      "access": "R",
      "description": "Current limit the wallbox currently applies after internal load management; readback of the 0x4100 setpoint."
    },
    {
      "address": 16400,
      "count": 2,
      "name": "Charging current L1",
      "data_type": "UInt32",
      "units": "A",
      "scale_factor": 0.001,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 16402,
      "count": 2,
      "name": "Charging current L2",
      "data_type": "UInt32",
      "units": "A",
      "scale_factor": 0.001,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 16404,
      "count": 2,
      "name": "Charging current L3",
      "data_type": "UInt32",
      "units": "A",
      "scale_factor": 0.001,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 16406,
      "count": 2,
      "name": "Voltage L1",
      "data_type": "UInt32",
      "units": "V",
      "scale_factor": 0.1,
      "offset": 0,
      "access": "R",
      "description": "Line-to-neutral or line-to-line depending on the configured grid type."
    },
    {
      "address": 16408,
      "count": 2,
      "name": "Voltage L2",
      "data_type": "UInt32",
      "units": "V",
      "scale_factor": 0.1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 16410,
      "count": 2,
      "name": "Voltage L3",
      "data_type": "UInt32",
      "units": "V",
      "scale_factor": 0.1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 16412,
      "count": 2,
      "name": "Active power",
      "data_type": "UInt32",
      "units": "W",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 16414,
      "count": 2,
      "name": "Energy delivered",
      "data_type": "UInt32",
      "units": "Wh",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "Energy transferred in the current charging session."
    },
    {
      "address": 16416,
      "count": 1,
      "name": "Communication timeout readback",
      "data_type": "UInt16",
      "units": "s",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "Readback of the timeout configured in 0x4106."
    },
    {
      "address": 16640,
      "count": 2,
      "name": "Set charging current limit",
      "data_type": "UInt32",
      "units": "A",
      "scale_factor": 0.001,
      "offset": 0,
      "access": "W",
      "description": "Setpoint for the charging current. The internal load-management algorithm may apply a lower value, so read the applied limit back from 0x400E. Below 6 A the session pauses, above 6 A it resumes."
    },
    {
      "address": 16643,
      "count": 1,
      "name": "Lock / unlock socket cable",
      "data_type": "UInt16",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "W",
      "description": "0 = unlock the cable, 1 = lock the cable until it is unlocked again or the wallbox is power-cycled. Socket versions only."
    },
    {
      "address": 16645,
      "count": 1,
      "name": "Start / stop charging session",
      "data_type": "UInt16",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "W",
      "description": "0 = start charging session, 1 = stop charging session."
    },
    {
      "address": 16646,
      "count": 1,
      "name": "Communication timeout",
      "data_type": "UInt16",
      "units": "s",
      "scale_factor": 1,
      "offset": 0,
      "access": "W",
      "description": "Seconds without any read or write before the wallbox treats the link as lost. Default 60, range 10-65535."
    }
  ],
  "combined_registers": [],
  "notes": "Source: ABB, \"Terra AC wallbox - TAC Modbus Communication, Modbus RTU - RS485 and TCP/IP\", document 9AKK108469A0833, revision 1.7 (2022). The charger is the Modbus server; only the holding-register area is implemented, with function codes 03 (read), 06 (write single) and 16 (write multiple), big-endian, TCP port 502. Addresses above are the hexadecimal register numbers from the ABB map (0x4000, 0x4100, ...) written in decimal, used as wire addresses. The 4000h serial number register holds a four-register packed identification, so it is not listed here. Modbus TCP control needs firmware 1.6.5 or newer (evcc's Terra AC template states this requirement). The RS-485 variant of the same map takes a configurable address from 1 to 247, 8 data bits, configurable baud rate 4800-115200 and parity None/Odd/Even."
}
