---
title: "KEBA KeContact P20 State"
description: "Control charging enable, monitor plug/lock status, read charging state and set user current limit on the KEBA KeContact P20 wallbox over UDP."
url: "https://taphome.com/en/compatibility/keba-kecontact-p20-state/"
language: en
lastmod: 2026-04-24
generator: hugo
ai:
  topics: ["udp","wallbox","ev-charging","ethernet","packet-parser","charging-control"]
  questions: ["How to integrate KEBA KeContact P20 with TapHome?","What does the KEBA KeContact P20 State template do?","How to enable or disable charging on the KEBA P20 from TapHome?","How to set the charging current limit on the KEBA P20 wallbox?","What do the charging states (Starting, Ready, Charging, Error) mean on the KEBA P20?","Can I import both KEBA P20 State and Power Monitoring templates against the same wallbox?"]
---

# KEBA KeContact P20 State

Communication: Packet Parser → UDP

- [KEBA e-mobility (official)](https://www.keba.com/en/emobility/products/product-overview)

> Network address
> 
> TapHome reaches this device at the address entered on import. Give the device a fixed address — an IP reservation in the router, or its mDNS name if it supports one — otherwise the integration stops working when the router changes the address.
> 
> [Network Preparation](https://taphome.com/en/docs/setup/network-preparation/)

## Integration guide

The KEBA KeContact P20 is an AC Mode 3 EV wallbox (10–32 A, single-phase or three-phase) manufactured between 2012 and 2016. Its UDP-based "SmartHome Interface" is supported on the **c-series** and **c-series+PLC** hardware variants (product codes `KC-P20-xxxxxx2x-xxx` and `KC-P20-xxxxxx3x-xxx`) with firmware **2.5 or higher**. The e-series and b-series do not implement this interface.

TapHome communicates with the wallbox over **UDP on port 7090** using the native KEBA protocol. On each poll cycle (default 10 s) TapHome sends the text command `report 2` to the wallbox and parses the returned JSON payload into a writable enable switch, three plug/lock reed contacts, a multi-value charging state and a writable user-current limit. Control commands (`ena`, `curr`) are sent back over the same UDP channel.

> [!NOTE]
> This template exposes **state and control**. For electrical measurements (per-phase voltages, currents, active power and session/lifetime energy) import the sibling [KEBA KeContact P20 Power Monitoring](https://taphome.com/en/compatibility/keba-kecontact-p20-power-monitoring/) template against the same wallbox — the two templates use different reports (`report 2` vs. `report 3`) and can safely run in parallel for a complete monitoring + control integration.

## Requirements

- KEBA KeContact P20 **c-series** or **c-series+PLC** (electronics digit `2` or `3` in the product code on the type plate)
- Firmware **≥ 2.5** (earlier firmware does not implement the UDP `report 2` command)
- Wallbox connected to the same LAN as the TapHome Core via Ethernet (LSA+ terminals X4 or RJ45 socket X3)
- UDP port **7090** not blocked by any firewall between the Core and the wallbox
- The Modbus TCP interface must be **disabled** — the UDP and Modbus TCP interfaces are mutually exclusive on the P20

## Hardware connection

Wiring and Ethernet connection are identical to the sibling Power Monitoring template — the same physical device is addressed by both templates over the same UDP channel. See [KEBA KeContact P20 Power Monitoring → Hardware connection](https://taphome.com/en/compatibility/keba-kecontact-p20-power-monitoring/#hardware-connection) for Cat 5e/STP cabling, LSA+ (X4) vs. RJ45 (X3) selection and the warning about compensation currents through Ethernet shielding.

## Configuration

### Enabling the UDP SmartHome interface

The UDP interface is activated by a single DIP switch on the wallbox PCB, located under the connector-panel cover. **DSW1.3 = ON** is mandatory — without it the wallbox will not reply to any `report` command on port 7090. DIP-switch changes only take effect after a Service-button press (~1 s) or a power cycle.

![KEBA KeContact P20 DIP switch layout showing DSW1.3 ON setting for UDP SmartHome interface activation](https://taphome.com/images/compatibility/keba-kecontact-p20-state/dip-switch-udp-activation_hu_56d2d7e4a149f687.jpg)

The full DIP-switch table (DSW1 and DSW2 addressing) is documented under the sibling template — see [KEBA KeContact P20 Power Monitoring → Configuration](https://taphome.com/en/compatibility/keba-kecontact-p20-power-monitoring/#configuration). The setup is identical because the same physical wallbox is involved.

> [!WARNING]
> The UDP interface and the Modbus TCP interface cannot be active at the same time. If Modbus TCP was previously enabled on this station, disable it before relying on the TapHome UDP template.

### TapHome import parameters

When importing the template, provide:

- **IP Address** — the wallbox IP on the local network (placeholder `192.168.0.1`)
- **Port** — `7090` (fixed by the KEBA protocol)
- **Internal poll interval** — `10000` ms by default; the KEBA protocol tolerates shorter intervals but recommends at least 5 s between repetitions of the same command

## Device capabilities

All values are derived from the `report 2` JSON payload. Writes use the `ena` and `curr` UDP text commands; every write is followed by an immediate `report 2` poll to refresh the template state.

### Charging control

- **Charging Enabled** — writable on/off switch. Sends `ena 1` to enable or `ena 0` to disable the station. Mirrors the `Enable user` flag from `report 2`. Writing OFF permanently pauses charging until re-enabled or the station reboots; KEBA specifies a mandatory 2-second pause after `ena 0` before the next command is accepted.
- **User Charging Current** — writable maximum charging current in amperes. Sends the `curr` command in milliamperes (internally multiplied by 1000 by the template). Valid range is **6–63 A**; the wallbox clamps the effective value by the hardware limit (DIP switches, cable coding, thermal derating) and the new setting propagates to the control-pilot PWM after 6–7 seconds.

> [!TIP]
> `curr` is a **permanent** setting — it persists until the next `curr` write or until the station reboots. KEBA recommends the non-permanent `currtime` variant for regular use because it resets on plug-out. This template exposes only `curr`; for scheduled charging or automatic reset semantics, drive the User Charging Current from a TapHome Smart Rule that writes the target value just before a session starts and resets it to the desired idle value after plug-out.

### Plug and lock status

Three independent reed contacts, each derived from a separate bit of the `Plug` bitmask in `report 2`:

| Device | Plug bit | Mask | Meaning |
|--------|----------|------|---------|
| **Plugged into Wallbox** | 0 | `0x01` | Cable is plugged into the wallbox socket (for non-permanently-attached cables) |
| **Cable Locked** | 1 | `0x02` | Cable is mechanically locked in the wallbox socket |
| **Plugged into Vehicle** | 2 | `0x04` | Cable is plugged into the EV |

Charging requires **all three bits set** (`Plug = 7`). The individual devices let you distinguish whether a user has disconnected the car, the wallbox or both.

### Charging state

- **Charging State** — multi-value device exposing the wallbox operating mode, mapped from the raw `State` field of `report 2`:

| Raw `State` | Protocol meaning (UDP Programmers Guide V 2.03) | Template display |
|-------------|--------------------------------------------------|------------------|
| 0 | Startup | Starting |
| 1 | Not ready for charging (not connected, locked or blocked) | Not Ready |
| 2 | Ready for charging, waiting for vehicle | Ready |
| 3 | Charging | Charging |
| 4 | Error is present | Error |
| 5 | Charging temporarily interrupted | Not Authorized |

> [!WARNING]
> The template displays raw `State = 5` as **Not Authorized**, but the KEBA UDP Programmers Guide V 2.03 (§3.2.3) documents this value as "Charging temporarily interrupted" (for example because of over-temperature or a denied voter). If the Charging State shows "Not Authorized" without an RFID session in progress, treat it as a temporary interruption rather than an authorization failure. The raw value can be cross-checked by reading `State` directly from a `report 2` query against the wallbox on UDP port 7090.

## Troubleshooting

### TapHome shows no data from the wallbox

1. Verify the wallbox product code on the type plate. Only `KC-P20-xxxxxx2x-xxx` (c-series) and `KC-P20-xxxxxx3x-xxx` (c-series+PLC) support UDP
2. Confirm the firmware version is **≥ 2.5**. Firmware updates are available in the download area at keba.com/emobility
3. Confirm **DSW1.3 = ON** — the most common setup issue. The DIP switches sit under the connector-panel cover and are easy to miss during commissioning. After toggling, press the Service button for 1 second or cycle the breaker
4. Ensure UDP port **7090** is open between the TapHome Core and the wallbox (no VLAN / firewall blocking)
5. Confirm the Modbus TCP interface on the wallbox is not active — UDP and Modbus TCP are mutually exclusive

### Writing the Charging Enabled switch has no effect

Some station configurations override `Enable user` via the external enable input X1 or via an active failsafe event. If `ena 1` does not bring the station out of a disabled state:

- Check whether DSW1.1 is ON (external enable input in use). If so, verify the X1 contact is closed.
- Observe `Enable sys` in the raw `report 2` payload — if `Enable sys = 0` the station is refusing to enable regardless of `Enable user` (typically due to a failsafe timeout or a thermal limit). The template does not expose `Enable sys`; confirm via the wallbox LED status or a direct UDP query.

### User Charging Current change does not propagate

After writing a new current the station takes **6–7 seconds** to apply the change internally. If the new value never appears in the readback:

- Verify the target is within the valid range **6000–63000 mA** (6–63 A). Values outside this range are silently rejected by the wallbox.
- Confirm no active failsafe event — when triggered, `Max curr = Curr FS` overrides `Curr user` until the failsafe is reset.
- Remember that `curr` is a **permanent** setting. If a previous `currtime` command is still running (issued via another client), `curr` is ignored until the `currtime` timer expires or `currtime 0 0` nullifies it.

### Charging State is stuck on Error or Not Authorized

**Error** (raw `State = 4`) indicates a station-reported error condition. The `Error1` and `Error2` fields in `report 2` carry the numeric error code but are not exposed by the template — query the wallbox directly over UDP port 7090 with `report 2` to read them, or consult the station status LED.

**Not Authorized** is the template's display label for raw `State = 5`, which KEBA documents as "Charging temporarily interrupted". Common causes include over-temperature, an active voter denial, or a deliberate interruption in the KEBA control flow. Power-cycling the wallbox or waiting for the interruption condition to clear usually restores the Charging state. This template does not expose an RFID authorization flow — RFID whitelisting remains managed through the KEBA app and physical master cards.

## Available devices 6

These devices appear in TapHome after import.

Keba KeContact P20 State Module

Custom Variables

Read (module)

```taphome
SENDDATA("report 2");
```

Listener

```taphome
VAR jsonString := TOSTRING(RECEIVEDBYTES);
VAR id := PARSEJSON(jsonString, "$.ID", 1);

IF(id = 2)
    report2 := jsonString;
END
```

Charging Enabled Switch Read and write

Writable on/off switch — enables or disables charging via the \`ena\` UDP command (permanent until reboot or re-enabled)

boolean json\_path

Values / States: ${general\_enabled} · ${general\_disabled}

Write switch state

```taphome
SENDDATA("ena " + St);
SENDDATA("report 2");
```

Listener

```taphome
St := PARSEJSON(report2, "$.['Enable user']", 1)
```

Cable Locked Reed Contact Read-only

Indicates whether the cable is mechanically locked inside the wallbox socket (Plug bit 1)

boolean bitmask

Listener

```taphome
Rc := PARSEJSON(report2, "$.Plug", 1) & 0x02
```

Plugged into Vehicle Reed Contact Read-only

Indicates whether the charging cable is connected to the electric vehicle (Plug bit 2)

boolean bitmask

Listener

```taphome
Rc := PARSEJSON(report2, "$.Plug", 1) & 0x04
```

Plugged into Wallbox Reed Contact Read-only

Indicates whether a cable is plugged into the wallbox socket (Plug bit 0)

boolean bitmask

Listener

```taphome
Rc := PARSEJSON(report2, "$.Plug", 1) & 0x01
```

Charging State Multi-value Switch Read-only

Operating state of the wallbox — Starting, Not Ready, Ready, Charging, Error or Not Authorized

numeric json\_path

Values / States: ${starting} · ${notReady} · ${ready} · ${charging} · ${error} · ${notAuthorized}

Listener

```taphome
VAR state := PARSEJSON(report2, "$.State");
Mu := SWITCH(State, 0, 1, 1, 2, 2, 3, 3, 5, 4, 8, 5, 9, 1)
```

User Charging Current Variable Read and write

Writable maximum charging current in amperes (6–63 A) — sent to the wallbox via the \`curr\` UDP command in milliamperes

numeric Unit: A json\_path

Write

```taphome
SENDDATA("curr " + Va*1000);
SENDDATA("report 2");
```

Listener

```taphome
Va := PARSEJSON(report2, "$.['Curr user']", 1) / 1000.0
```

**Connection:** Packet Parser → UDP

Possible improvements (24)

- Error Codes — Decimal error codes indicating the cause of an error state. Not exposed by the template — only the generic Error state is surfaced through the \`State\` device.
- RFID Authorization Flags — AuthON (authorization function enabled) and Authreq (RFID authorization pending). Useful only when the wallbox whitelist is in use; template has no RFID flow.
- System Enable — Separate enable flag managed by the station (distinct from \`Enable user\`). Goes to 0 when failsafe triggers or on thermal/hardware limits.
- Actual Charging Current Limit — Effective current offered to the vehicle via PWM (mA) and the duty cycle (0.1% units). Different from \`Curr user\` — this is the resolved minimum of user setting, hardware limit, failsafe, and thermal derating.
- Hardware Current Limit — Maximum current the hardware supports based on DIP switch amperage setting, cable coding, and temperature monitoring. Static upper bound.
- Failsafe Current / Timeout — Fallback current and communication timeout configured via the \`failsafe\` command. Exposes current safety configuration; template has no diagnostic device.
- Pending Current Setting (currtime) — Queued current value and remaining countdown from an active \`currtime\` command. Useful for scheduled charging but not surfaced.
- Session Energy Limit — Active energy limit for the current/next charging session (0.1 Wh units). Set via \`setenergy\` command — template does not read or write it.
- Aux Relay Output State — Last \`output\` command setting for the X2 auxiliary relay. Template does not mirror relay state.
- External Enable Input (X1) — Current state of the external enable input X1 (ripple control / time switch contact). Requires DIP DSW1.1 = ON. Could be exposed as an independent reed contact.
- Serial Number — Device serial (8 chars) present in \`report 2\` JSON. Not mapped to a service attribute by the template.
- System Uptime — System clock seconds since startup. Useful for reboot detection but not surfaced.
- Set Charging Current with Delay — Non-permanent, delayed current setting — the KEBA-recommended primary current control command (preferred over \`curr\`). Allows scheduled current adjustments and safe \`currtime 0 1\` stop.
- Set Energy Limit — Sets a per-session energy limit (0.1 Wh units). Charging stops automatically when the limit is reached.
- Auxiliary Relay Output (X2) — Control the auxiliary relay at terminal X2 (open/close/pulse). Requires DIP DSW1.2 = ON.
- RFID Start / Stop — Programmatic RFID authorization when AuthON = 1 and a whitelist is configured.
- Set Station Clock — Set the station clock via Unix epoch. Useful when NTP is unavailable.
- Show Display Text — P30 only — not functional on P20 (no display). Listed for reference.
- Unlock Socket — Unlocks the charging socket (requires charging to be stopped first). Useful after an interrupted session.
- Failsafe Configuration — Fallback current when communication is lost. Important safety feature — template does not expose it.
- Device Identification — Basic identification: Product name, Serial, Firmware, COM-module flag, Backend flag, timeQ. Template polls only \`report 2\`.
- Power Monitoring — Voltage (U1/U2/U3), current (I1/I2/I3), active power (P), power factor (PF), present/total energy. Covered by the sibling \`keba-kecontact-p20-power-monitoring\` template.
- Charging Session History — Last 30 charging sessions (Session ID, E start, E pres, start/end timestamps, termination reason, RFID tag). Not applicable to real-time state monitoring.
- Push Notifications on State Change — Station can push State, Plug, Input, Enable sys, Max curr and E pres changes to the last UDP sender without polling. Template uses polling only.

## Import parameters

Enter these values when you import the XML.

| Asked in the app       | Default       |
|------------------------|---------------|
| IP address             | `192.168.0.1` |
| Port                   | `7090`        |
| Internal poll interval | `10000`       |

## Sources

- KeContact P20 / P30 UDP Programmers Guide V 2.03
  
  [sollis.de](https://sollis.de/wp-content/uploads/UDP-Programmieranleitung.pdf) 2026-04-23
- KeContact P20 / P30 Installation manual V 3.20
  
  [www.keba.com](https://www.keba.com/file/downloads/e-mobility/KeContact_KCP20_30_ih_en.pdf) 2026-04-23

Manufacturer documents are © their respective owners. They are provided as published by the manufacturer, for reference only.

## Related Documentation

- [Packet Parser Integration](https://taphome.com/en/compatibility/packet-parser-guide/)
- [Packet Parser (HTTP, TCP, UDP, FTP, MQTT)](https://taphome.com/en/docs/integration/packet-parser/)
- [Packet parser functions](https://taphome.com/en/docs/script/packet-parser/)
- [Parsing functions](https://taphome.com/en/docs/script/parsing-functions/)

