{
  "spec_version": 1,
  "slug": "keba-kecontact-p40",
  "manufacturer": "KEBA",
  "model": "KeContact P40 / P40 Pro",
  "category": "EV charger",
  "supplier_url": "https://www.keba.com/en/emobility/products/ac-charging-stations/p40/kecontact-p40-overview",
  "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": 1000,
      "count": 2,
      "name": "Charging state",
      "data_type": "UInt32",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "0 = start-up, 1 = not ready for charging (no vehicle, locked by the authorization function or another mechanism), 2 = ready and waiting for the vehicle, 3 = charging, 4 = error, 5 = interrupted because of overtemperature or suspended mode."
    },
    {
      "address": 1004,
      "count": 2,
      "name": "Cable state",
      "data_type": "UInt32",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "Cable variants: 3 = cable connected to the station, 7 = cable connected to the station and the vehicle. Socket variants: 0 = no cable plugged, 1 = cable at the station only, 3 = cable at the station and locked, 5 = cable and vehicle connected, 7 = cable and vehicle connected and locked (charging)."
    },
    {
      "address": 1006,
      "count": 2,
      "name": "Error code",
      "data_type": "UInt32",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "0 = no error. Other values are the EVSE error code in decimal, visible while the charging state is 4."
    },
    {
      "address": 1008,
      "count": 2,
      "name": "Charging current L1",
      "data_type": "UInt32",
      "units": "A",
      "scale_factor": 0.001,
      "offset": 0,
      "access": "R",
      "description": "Measured current on phase 1, raw value in mA."
    },
    {
      "address": 1010,
      "count": 2,
      "name": "Charging current L2",
      "data_type": "UInt32",
      "units": "A",
      "scale_factor": 0.001,
      "offset": 0,
      "access": "R",
      "description": "Measured current on phase 2, raw value in mA."
    },
    {
      "address": 1012,
      "count": 2,
      "name": "Charging current L3",
      "data_type": "UInt32",
      "units": "A",
      "scale_factor": 0.001,
      "offset": 0,
      "access": "R",
      "description": "Measured current on phase 3, raw value in mA."
    },
    {
      "address": 1014,
      "count": 2,
      "name": "Serial number",
      "data_type": "UInt32",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "Serial number of the charging station as a decimal number."
    },
    {
      "address": 1016,
      "count": 2,
      "name": "Product type and features",
      "data_type": "UInt32",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "Product key: product family (4 = KC-P40) | device current (1 = 16 A, 2 = 32 A) | connector (1 = cable, 2 = socket) | phases (1 = 1 phase, 2 = 3 phases, 3 = 3-to-1 switching, 4 = rotation) | metering (0 = none, 1 = energy meter, 2 = MID meter, 3 = legal meter) | RFID (0/1) | button (0/1). The guide's worked example, 4212311, belongs to KC-P40-32EU0-C633ALP0-LS1R1111BL0-CL00."
    },
    {
      "address": 1018,
      "count": 2,
      "name": "Software package version",
      "data_type": "UInt32",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "Release without the dots, two digits per field: 10000 = 1.0.0."
    },
    {
      "address": 1020,
      "count": 2,
      "name": "Active power",
      "data_type": "UInt32",
      "units": "W",
      "scale_factor": 0.001,
      "offset": 0,
      "access": "R",
      "description": "Active power of the charging station, raw value in mW."
    },
    {
      "address": 1036,
      "count": 2,
      "name": "Total energy",
      "data_type": "UInt32",
      "units": "kWh",
      "scale_factor": 0.0001,
      "offset": 0,
      "access": "R",
      "description": "Persistent, device-related total energy in 0.1 Wh. Below software 1.2.1 the register reports Wh instead (documented in the guide's known-bugs section), so this scale is a factor of ten off on those units."
    },
    {
      "address": 1040,
      "count": 2,
      "name": "Voltage L1",
      "data_type": "UInt32",
      "units": "V",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 1042,
      "count": 2,
      "name": "Voltage L2",
      "data_type": "UInt32",
      "units": "V",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 1044,
      "count": 2,
      "name": "Voltage L3",
      "data_type": "UInt32",
      "units": "V",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 1046,
      "count": 2,
      "name": "Power factor",
      "data_type": "UInt32",
      "units": "%",
      "scale_factor": 0.1,
      "offset": 0,
      "access": "R",
      "description": "cos phi, raw value in 0.1 %."
    },
    {
      "address": 1100,
      "count": 2,
      "name": "Max charging current",
      "data_type": "UInt32",
      "units": "A",
      "scale_factor": 0.001,
      "offset": 0,
      "access": "R",
      "description": "Maximum charging current of the charging station, raw value in mA."
    },
    {
      "address": 1110,
      "count": 2,
      "name": "Max supported current",
      "data_type": "UInt32",
      "units": "A",
      "scale_factor": 0.001,
      "offset": 0,
      "access": "R",
      "description": "Maximum current supported by the hardware, including the installer-mode setting, cable coding and temperature reductions, raw value in mA."
    },
    {
      "address": 1200,
      "count": 2,
      "name": "Fast charging state",
      "data_type": "UInt32",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "0 = fast charging deactivated, 1 = fast charging active and the current cannot be controlled via Modbus TCP."
    },
    {
      "address": 1500,
      "count": 2,
      "name": "RFID card",
      "data_type": "UInt32",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "First four bytes of the UID of the card that authorized the session, as a decimal number that has to be converted to hex. Reading RFID data has to be enabled additionally."
    },
    {
      "address": 1502,
      "count": 2,
      "name": "Charged energy, current session",
      "data_type": "UInt32",
      "units": "kWh",
      "scale_factor": 0.0001,
      "offset": 0,
      "access": "R",
      "description": "Energy transferred in the running charging session in 0.1 Wh. Below software 1.2.1 the register reports Wh instead (known-bugs section)."
    },
    {
      "address": 1550,
      "count": 2,
      "name": "Phase switching source",
      "data_type": "UInt32",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "0 = no phase toggle source available, 1 = OCPP, 2 = direct REST API command, 3 = Modbus TCP."
    },
    {
      "address": 1552,
      "count": 2,
      "name": "Phase switching state",
      "data_type": "UInt32",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "1 = single-phase charging is used, 3 = three-phase charging is possible."
    },
    {
      "address": 1600,
      "count": 2,
      "name": "Failsafe current setting",
      "data_type": "UInt32",
      "units": "A",
      "scale_factor": 0.001,
      "offset": 0,
      "access": "R",
      "description": "Current applied when the connection between the EMS and the station is lost, raw value in mA."
    },
    {
      "address": 1602,
      "count": 2,
      "name": "Failsafe timeout setting",
      "data_type": "UInt32",
      "units": "s",
      "scale_factor": 1,
      "offset": 0,
      "access": "R",
      "description": "Timeout between two Modbus TCP requests before the station enters failsafe charging with the current from 1600."
    },
    {
      "address": 1700,
      "count": 2,
      "name": "Hardware revision, device",
      "data_type": "UInt32",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 1702,
      "count": 2,
      "name": "Hardware revision, KC-MS10",
      "data_type": "UInt32",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "R"
    },
    {
      "address": 5004,
      "count": 1,
      "name": "Set charging current",
      "data_type": "UInt16",
      "units": "A",
      "scale_factor": 0.001,
      "offset": 0,
      "access": "W",
      "description": "0 = suspends the charging session, 6000 to 32000 = charging current in mA. The value stays active until the next write. The EMS has priority over OCPP, and a station cannot be connected to an EMS and an external meter at the same time."
    },
    {
      "address": 5010,
      "count": 1,
      "name": "Set energy",
      "data_type": "UInt16",
      "units": "kWh",
      "scale_factor": 0.01,
      "offset": 0,
      "access": "W",
      "description": "Energy limit for the running session in 10 Wh; the session is terminated when it is reached. 0 deletes a previously set limit."
    },
    {
      "address": 5012,
      "count": 1,
      "name": "Unlock plug",
      "data_type": "UInt16",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "W",
      "description": "Writing 0 unlocks the connector and stops a running session. Locking the connector via Modbus TCP is not possible."
    },
    {
      "address": 5014,
      "count": 1,
      "name": "Enable/disable charging station",
      "data_type": "UInt16",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "W",
      "description": "0 = disable the station (state Unavailable), 1 = enable it. Available with later software according to the guide's revision record."
    },
    {
      "address": 5016,
      "count": 1,
      "name": "Failsafe current",
      "data_type": "UInt16",
      "units": "A",
      "scale_factor": 0.001,
      "offset": 0,
      "access": "W",
      "description": "0 deactivates charging when the EMS connection is lost, 6000 to 32000 sets the failsafe current in mA."
    },
    {
      "address": 5018,
      "count": 1,
      "name": "Failsafe timeout",
      "data_type": "UInt16",
      "units": "s",
      "scale_factor": 1,
      "offset": 0,
      "access": "W",
      "description": "0 deactivates the failsafe function (charging continues with the highest possible value), 5 to 600 sets the timeout in seconds."
    },
    {
      "address": 5050,
      "count": 1,
      "name": "Set phase switching source",
      "data_type": "UInt16",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "W",
      "description": "0 = phase switching deactivated, 1 = via profiles (OCPP, PV algorithm), 2 = REST API direct control, 3 = via Modbus TCP."
    },
    {
      "address": 5052,
      "count": 1,
      "name": "Trigger phase switch",
      "data_type": "UInt16",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "W",
      "description": "0 = 1 phase, 1 = 3 phases (default state). Only acts when 5050 is 3."
    },
    {
      "address": 5200,
      "count": 1,
      "name": "Activate fast charging",
      "data_type": "UInt16",
      "units": "",
      "scale_factor": 1,
      "offset": 0,
      "access": "W",
      "description": "Writing 1 activates fast charging for the ongoing session. Fast charging cannot be deactivated via Modbus TCP."
    }
  ],
  "combined_registers": [],
  "notes": "Source: KEBA Energy Automation, \"KeContact P40, P40 Pro - Charging Station, Modbus TCP Programmers Guide V 1.03\", document no. 135655, published 08.2026, reached from the KEBA eMobility download page (https://www.keba.com/en/emobility/service-support/downloads/downloads -> https://a.storyblok.com/f/40131/x/e9c9ced3ac/kecontactp40modbustcp_pgen.pdf). Section 2 states the addressing and transport facts this file relies on: the Modbus TCP interface is a server on port 502 (configurable), the default unit ID is 255 (configurable, 0-255), the \"starting register address count is 0\" and the register numbers of the guide are therefore wire addresses, only FC3 (read) and FC6 (write single register) are supported, a single register cannot be read together with others because every return value is 32 bit, and registers must be polled at 0.5 s and written at 5 s intervals. Modbus TCP is off by default and has to be enabled in the KEBA eMobility App (\"Enable\" and, for card data, \"Enable RFID\"); reading RFID cards is a separate opt-in. Readings are FC3 holding registers, the writable registers are FC6 single-register writes. The write rows 5014, 5050 and 5052 are marked in the guide as available with later software only (5050/5052 from firmware 1.3.0, together with the phase-switching feature). Known bug quoted from the guide: below software 1.2.1 registers 1036 and 1502 report Wh instead of 0.1 Wh, which makes their scale a factor of ten off on those units. This is the P40 family; the P30 c-/x-series map is a different document and stays in keba-kecontact-p30."
}
