Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

KEBA KeEnergy API

A Python wrapper for the KEBA KeEnergy API used by the Web HMI.

coverage-badge

CI Typing: strict Code style: Ruff

Donation

I put a lot of time into this project. If you like it, you can support me with a donation.

KoFi

or donate with PayPal

Getting started

pip install keba-keenergy-api

Usage

import asyncio

from keba_keenergy_api import KebaKeEnergyAPI
from keba_keenergy_api.constants import HeatCircuit
from keba_keenergy_api.constants import HeatCircuitOperatingMode


async def main():
    client = KebaKeEnergyAPI(
        host="ap4400.local", username="test", password="test", ssl=True, skip_ssl_verification=True
    )

    # Get current outdoor temperature
    outdoor_temperature = await client.system.get_outdoor_temperature()

    # Get heat circuit temperature from heat circuit 2
    heat_circuit_temperature = await client.heat_circuit.get_target_temperature(position=2)

    # Read multiple values
    data = await client.read_data(
        request=[HeatCircuit.TARGET_TEMPERATURE, HeatCircuit.TARGET_TEMPERATURE_DAY], extra_attributes=True
    )

    # Enable "day" mode for heat circuit 2
    await client.heat_circuit.set_operating_mode(mode=HeatCircuitOperatingMode.DAY.value, position=2)

    # Write multiple values
    await client.write_data(
        request={
            # Write the day temperature of heat circuit 1 and 3
            HeatCircuit.TARGET_TEMPERATURE_DAY: (20, None, 21),
            # Write night temperature on position 1
            HeatCircuit.TARGET_TEMPERATURE_NIGHT: (16,),
        },
    )


asyncio.run(main())

By default, the library creates a new connection to KEBA KeEnergy API with each coroutine. If you are calling a large number of coroutines, use the client with async with, so that all requests share one connection:

import asyncio

from keba_keenergy_api import KebaKeEnergyAPI


async def main():
    async with KebaKeEnergyAPI(
        host="ap4400.local", username="test", password="test", ssl=True, skip_ssl_verification=True
    ) as client:
        ...


asyncio.run(main())

You can also pass your own aiohttp ClientSession(), e.g. to share it with other code. The client leaves it open:

import asyncio

from keba_keenergy_api import KebaKeEnergyAPI

from aiohttp import ClientSession


async def main():
    async with ClientSession() as session:
        client = KebaKeEnergyAPI(
            host="ap4400.local", username="test", password="test", ssl=True, skip_ssl_verification=True, session=session
        )
        ...


asyncio.run(main())

⚠️ Write warnings

This is a low-level API that allows writing values outside the safe operating range. Improper use can damage heating systems and hardware. Always check the attributes, as these may contain minimum and maximum values.

Use at your own risk!

Example:

The upper limit of the hot water tank temperature is 52 °C. Do not write larger values under any circumstances, even if it would be possible.

{
    "name": "APPL.CtrlAppl.sParam.hotWaterTank[0].param.normalSetTempMax.value",
    "attributes": {
        "dynUpperLimit": 1,
        "formatId": "fmtTemp",
        "longText": "Temp. nom.",
        "lowerLimit": "0",
        "unitId": "Temp",
        "upperLimit": "52"
    },
    "value": "50"
}

And one last warning:

Attention! Writing values should remain within normal limits, as is the case with typical use of the Web HMI. Permanent and very frequent writing of values reduces the lifetime of the built-in flash memory. Be careful!

Documentation

Read the full API documentation on api.superbox.one.

Changelog

The changelog lives in the CHANGELOG.md document. The format is based on Keep a Changelog.

Get Involved

The KEBA KeEnergy API is an open-source project and contributions are welcome. You can:

  • Report issues or request new features
  • Improve documentation
  • Contribute code
  • Support the project by starring it on GitHub ⭐

I'm happy about your contributions to the project! You can get started by reading the CONTRIBUTING.md.

Metadata

Release files for keba-keenergy-api 2.13.0b3

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

Source distribution (sdist)

Source distribution for keba-keenergy-api 2.13.0b3
File Size Uploaded
keba_keenergy_api-2.13.0b3.tar.gz 255.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for keba-keenergy-api 2.13.0b3
File Interpreter ABI Platform
keba_keenergy_api-2.13.0b3-py3-none-any.whl Python 3 none any Details

Total release size: 293.7 kB

Release files / keba_keenergy_api-2.13.0b3.tar.gz

Download URL keba_keenergy_api-2.13.0b3.tar.gz
Size 255.9 kB
Tags Source
SHA-256 checksum
How to use checksums
61d2f0651d0df79f9e4c1effe16aaec915d2f7e1695a52d312475ba782b4c276
BLAKE2b-256 checksum
How to use checksums
764fd5788cea477f10611e18dc23904938ab62654c2888b4928c3570b837aab2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / keba_keenergy_api-2.13.0b3-py3-none-any.whl

Download URL keba_keenergy_api-2.13.0b3-py3-none-any.whl
Size 37.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
eea576d9172d6f6832b8012230b70fc8755fb1262dc67aef8c6641b0fcf364a3
BLAKE2b-256 checksum
How to use checksums
359df84d55f60f2b1f6a96358095d011516cd91389c69e7610c26ef739835b24
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

This release

2.13.0b3 This release

2 release files

2.12.2

2 release files

2.12.1

2 release files

2.12.0

2 release files

2.11.0

2 release files

2.10.1

2 release files

2.9.1

2 release files

2.9.0

2 release files

2.8.1

2 release files

2.8.0

2 release files

2.7.2

2 release files

2.7.0

2 release files

2.6.0

2 release files

2.5.2

2 release files

2.5.1

2 release files

2.4.0

2 release files

2.3.1

2 release files

2.3.0

2 release files

2.2.0

2 release files

2.1.0

2 release files

2.0.0

2 release files

1.15.0

2 release files

1.14.0

2 release files

1.13.0

2 release files

1.12.9

2 release files

1.12.8

2 release files

1.12.7

2 release files

1.12.6

2 release files

1.12.4

2 release files

1.12.2

2 release files

1.12.1

2 release files

1.12.0

2 release files

1.11.1

2 release files

1.11.0

2 release files

1.10.1

2 release files

1.10.0

2 release files

1.9.0

2 release files

1.8.1

2 release files

1.8.0

2 release files

1.7.0

2 release files

1.6.2

2 release files

1.6.1

1 release file

1.6.0

2 release files

1.5.0

2 release files

1.4.3

2 release files

1.4.2

2 release files

1.4.1

2 release files

1.4.0

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.0

2 release files

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