Skip to main content

pyeebus

EEBUS for Python: SHIP (transport), SPINE (data model) and the energy manager (CEM) use cases for EV charging. Ported from the Go implementation by enbility (ship-go, spine-go, eebus-go, MIT licensed).

Status: 0.1.0, early. SHIP, SPINE and the use cases (EV charging, LPC, MPC) are tested against eebus-go/spine-go in both directions and in use with a real Elli Charger 2 and Solar Manager (through elli-eebus-proxy). The API may still change.

Why

EEBUS is how energy managers talk to wallboxes, heat pumps and grid control boxes. Until now, the only complete open-source implementation has been in Go. pyeebus makes EEBUS available to Python projects such as Home Assistant integrations.

Roadmap

Layer Status
SHIP: certificates/SKI, TLS websocket, handshake (CMI, hello incl. prolongation, protocol, PIN none, access methods), data exchange, close ✅ tested against ship-go
SHIP: mDNS announce and discovery (zeroconf), trust store, auto-reconnect ✅
SPINE: devices/entities/features, detailed discovery, use case data, subscriptions, bindings, partial updates, heartbeat ✅ tested against spine-go
Use cases (CEM side): EVSECC, EVCC, EVCEM, OPEV, OSCEV, EVSOC ✅ tested against eebus-go
Limitation and monitoring of power consumption: LPC (Energy Guard), MPC (Monitoring Appliance) ✅ tested against eebus-go
Controllable System side: CS-LPC with the LPC state machine (init, limited, failsafe, ...) ✅ tested against eebus-go
Monitored Unit side: MU-MPC (power, energy, currents, voltages, frequency) ✅ tested against eebus-go
Coordinated EV charging (CEVC), production use cases (LPP etc.) later

Try it

pip install pyeebus   # or: uvx pyeebus ...

pyeebus discover                     # list EEBUS devices on the network
pyeebus connect <SKI of the device>  # pair, connect as energy manager, show what the device offers
pyeebus connect <SKI> --read-all     # ... and print all data the device offers
pyeebus connect <SKI> --raw          # ... and print every SPINE message
pyeebus connect <SKI> --lpc-limit 4200   # test: limit the power to 4200 W for 5 minutes (LPC)

connect announces pyeebus on the network as an energy manager. Then pair with it on the device. For example, on an Elli wallbox: Connections → HEMS connection → found EEBUS devices → Pair. The identity is kept in ~/.config/pyeebus/.

pyeebus simulate-evse runs a simulated wallbox with a pluggable EV for development.

Library

from pyeebus.service import EebusService
from pyeebus.usecases import EVCC, EVCEM, EVSECC, OPEV, PhaseLimit

service = EebusService.from_directory("/path/to/state", brand="Me", model="HEMS", serial="1")
cem = service.entities[0]                      # the CEM entity

def on_event(ski, entity, event):              # e.g. "EvConnected", "DataUpdateCurrentPerPhase"
    if event == EVCEM.DATA_UPDATE_CURRENT_PER_PHASE:
        print(evcem.current_per_phase(entity))

evsecc, evcc, evcem, opev = (uc(cem, on_event).setup() for uc in (EVSECC, EVCC, EVCEM, OPEV))

await service.start()
service.trust("<SKI of the wallbox>")          # connects as soon as it is found via mDNS

# later, with the EV entity from an event:
await opev.write_load_control_limits(ev, [PhaseLimit(p, 10) for p in "abc"])   # 10 A

For devices that offer power limitation (LPC, e.g. wallboxes with §14a EnWG support) use LPC and MPC: await lpc.write_consumption_limit(evse, LoadLimit(4200, duration=3600)), mpc.power(evse), mpc.energy_consumed(evse).

To act as the controllable system yourself (a device behind a §14a EnWG control box), use CsLPC. Incoming limits and failsafe values go through your approval callbacks; the built-in LPC state machine (LPC 1.0.0) handles init, heartbeat timeout (failsafe), failsafe duration and limit durations, so you only apply effective_limit() (W, None = no limit) whenever CsLPC.STATE_CHANGED comes. The failsafe limit is required: it applies from the start (init) until the Energy Guard states a limit:

mpc = MuMPC(service.entities[0], power=MonitorPowerConfig("abc"),
            energy=MonitorEnergyConfig(value_source_consumption="measuredValue")).setup()  # before CsLPC
lpc = CsLPC(service.entities[0], on_event, failsafe_limit=4200, failsafe_duration=2 * 3600,
            approve_limit=lambda limit: None).setup()
lpc.set_consumption_nominal_max(11000)
lpc.set_consumption_limit(LoadLimit(11000, is_active=False))
mpc.update(power_total=3200, energy_consumed=1_234_000)   # W, Wh; notifies the monitoring appliance

The use cases follow eebus-go: evcc.charge_state(ev), evcc.communication_standard(ev), evcem.energy_charged(ev), opev.current_limits(ev) (min/max/default per phase) and so on. Values the device has not sent yet raise DataNotAvailable.

Lower levels are usable on their own: pyeebus.ship (ShipNode, ShipConnection) and pyeebus.spine (LocalDevice, features, subscriptions).

Limitation of Python's ssl: a server cannot request a client certificate without verifying it. For that reason pyeebus accepts incoming connections only from peers whose certificate it already knows, for example from an earlier outgoing connection. It reaches new peers as a client.

Development

python3 -m venv .venv && . .venv/bin/activate
pip install -e ".[test]"
pytest

The interop tests against ship-go and eebus-go run when SHIP_GO_HARNESS and EEBUS_GO_HARNESS point to the built harnesses; see interop/. CI builds them automatically. tools/gen_schema.py regenerates the SPINE list/key metadata from spine-go's model.

EEBUS is a trademark of EEBus Initiative e.V. This project is not affiliated with it.

Metadata

Release files for pyeebus 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyeebus 0.3.0
File Size Uploaded Provenance Actions
pyeebus-0.3.0.tar.gz 95.5 kB With provenance Details for pyeebus-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pyeebus 0.3.0
File Interpreter ABI Platform Actions
pyeebus-0.3.0-py3-none-any.whl Python 3 none any Details for pyeebus-0.3.0-py3-none-any.whl

Total release size: 179.0 kB

Release files / pyeebus-0.3.0.tar.gz

Download URL pyeebus-0.3.0.tar.gz
Size 95.5 kB
Tags Source
SHA-256 checksum
How to use checksums
4f5feaf539e7dc3b4cafef25dd294c7b81a4ce361cedc40fd434e74b2ac5b729
BLAKE2b-256 checksum
How to use checksums
0dbfc2adc8b2f9adaee9bc782c05ab0fc8ad891346629f94966fedf653f01ff3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.

Transparency log

Release files / pyeebus-0.3.0-py3-none-any.whl

Download URL pyeebus-0.3.0-py3-none-any.whl
Size 83.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d3f4434f12b5ce81e35bf764e16e418c50442cf73adde9e2a9bb0d83bb5fca9e
BLAKE2b-256 checksum
How to use checksums
dcaaa32bc27626cf8a0aad28ed08d358ecb9629c86125b3f5dda1e997408f30b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.

Transparency log

Security for pyeebus 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pyeebus-0.3.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page