KEBA KeContact P40 – local REST integration (HACS), looking for P40 / P40 Pro testers

Hi all,

I’ve published a custom integration for the KEBA KeContact P40 wallbox that talks to the charger’s own local HTTPS REST API. No cloud and no Modbus polling are involved. It is independent community work, not an official KEBA product, and it is separate from the existing keba integration (which targets the P20/P30 UDP protocol).

Repository: GitHub - Rschmidt79/home-assistant-keba-p40: Local KEBA P40 REST integration for Home Assistant: verified monitoring, sessions, energy, discovery and optional controls · GitHub
Latest release: Release v0.2.5 — Stable controls and safe HACS upgrades · Rschmidt79/home-assistant-keba-p40 · GitHub

What it does

  • Local setup via zeroconf discovery or manual host/port (HTTPS, default 8443) with the normal KEBA username/password; JWT renewal is automatic.
  • Certificate handling: trust the device certificate, or pin its SHA-256 fingerprint.
  • 33 monitoring entities: charging state, plugged/session flags, phase currents and voltages, active power, lifetime energy (usable in the Energy dashboard), exact session energy, session start/end/duration, session token (RFID) ID, firmware/version diagnostics.
  • Session-active status is kept separate from charging (an open session can be blocked at 0 W). Missing data shows as unavailable, never as a made-up zero.
  • Four optional controls, disabled by default and never called by setup or polling: start charging, stop charging, charging availability, and a charging current limit (edits a simple all-day baseline profile only).
  • A diagnostic “Control result” sensor with per-action receipts. An ambiguous control request is never replayed; the integration reads the physical state afterwards instead.
  • Diagnostics are redacted (credentials, tokens, serial, chip IDs).

Not included: pause/resume, phase switching, price/PV/load-balancing logic, OCPP changes, Modbus writes. The integration is deliberately only the device driver.

Install (HACS custom repository)

  1. HACS → ⋮ → Custom repositories → add GitHub - Rschmidt79/home-assistant-keba-p40: Local KEBA P40 REST integration for Home Assistant: verified monitoring, sessions, energy, discovery and optional controls · GitHub, category Integration.
  2. Download the latest release and restart Home Assistant.
  3. Settings → Devices & services → add KEBA KeContact P40 (or accept the discovered card).
  4. Check model, serial, energy, state and phase values before enabling any control.

Requires Home Assistant 2026.9 or newer. I have also submitted it for the default HACS catalog; that review is pending, so for now it is a custom repository only. The domain is keba_p40; do not install it next to another integration using the same domain.

Updating an existing install: take a backup, update while the charger is idle, then fully restart Home Assistant (a reload is not enough to replace imported Python modules). Do not remove and re-add the integration.

What is and is not validated

Be aware how small the physical test base is:

  • Hardware: one P40, package 1.5.1+cert-meter, REST API 2.5.0, with one vehicle on one installation.
  • Monitoring: read-only audit plus continued everyday use on that device.
  • Controls: START/STOP and current-limit requests have been exercised on that one installation, and one overnight charge ran to its target with the integration reporting no fault. Note that my separate charging controller (not part of this package) performed one extra bounded STOP/START sequence during that night, so please do not read the result as flawless. This does not show that every vehicle, firmware, outage scenario or network setup works. Controls are therefore opt-in.
  • Not verified: P40 Pro, other firmware/REST versions, other vehicles, multi-wallbox setups, guest charging without a plan, behaviour after KEBA credential changes.
  • Automated tests: 144 tests on Home Assistant 2026.9.4 (entities/registry, profile shapes, control receipts, TLS against a loopback server). They use synthetic data and never contact a charger.

Separate from my EV Smart Charging setup

The smart-charging logic I run (a modified EV Smart Charging with my own scheduler, templates and dashboard) is not part of this repository and is not installed or updated by it. There is also no climate/preconditioning feature. Treat this integration as a driver that exposes the charger; charging policy is up to you.

Testers wanted

If you have a P40 or P40 Pro, I’d value a read-only look first:

  • Does setup/discovery work? Do the values match the charger’s own display or your Modbus/meter readings?
  • Which package version and REST API version does your device report (Diagnostics sensors)? Please don’t post serial numbers, passwords, tokens or chip IDs.
  • Optional and at your own risk: with the vehicle connected, try the start/stop buttons or the current limit while watching the real physical state, and report what the “Control result” sensor and the charger did. PHYSICAL_TEST_PLAN.md in the repo lists a cautious sequence.

Please report findings as GitHub issues (diagnostics download is redacted) or reply here. Feedback on entity naming, missing fields and firmware differences is welcome too.

Relationship to the core/existing KEBA integrations

I know a P40 integration was proposed for Home Assistant Core, and that the maintainers there preferred extending the existing keba integration. This repository is not a testing distribution of that work; it is simply what I needed and had hardware to verify. If P40 support lands in keba, I’m happy to share field mappings and test data and to help with a config-entry migration path. Notes from my audit were shared earlier in dannerph/homeassistant-keba#58.

Thanks for reading, and corrections are welcome.