{"id":20392962,"url":"https://github.com/superbox-dev/keba-keenergy-api","last_synced_at":"2025-04-12T11:54:51.354Z","repository":{"id":198788986,"uuid":"701086523","full_name":"superbox-dev/KEBA-KeEnergy-API","owner":"superbox-dev","description":"A Python wrapper for the KEBA KeEnergy API.","archived":false,"fork":false,"pushed_at":"2024-12-21T11:42:33.000Z","size":182,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-07T01:41:15.104Z","etag":null,"topics":["api"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/superbox-dev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-05T22:18:08.000Z","updated_at":"2024-12-21T11:42:37.000Z","dependencies_parsed_at":"2023-10-15T17:19:17.914Z","dependency_job_id":"9cbd7c86-cc14-416e-ab48-789430a4c81b","html_url":"https://github.com/superbox-dev/KEBA-KeEnergy-API","commit_stats":null,"previous_names":["superbox-dev/keba-keenergy-api"],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superbox-dev%2FKEBA-KeEnergy-API","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superbox-dev%2FKEBA-KeEnergy-API/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superbox-dev%2FKEBA-KeEnergy-API/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superbox-dev%2FKEBA-KeEnergy-API/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/superbox-dev","download_url":"https://codeload.github.com/superbox-dev/KEBA-KeEnergy-API/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248565051,"owners_count":21125415,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api"],"created_at":"2024-11-15T03:46:53.346Z","updated_at":"2025-04-12T11:54:51.308Z","avatar_url":"https://github.com/superbox-dev.png","language":"Python","funding_links":["https://ko-fi.com/F2F0KXO6D"],"categories":[],"sub_categories":[],"readme":"![coverage-badge](https://raw.githubusercontent.com/superbox-dev/KEBA-KeEnergy-API/main/coverage.svg)\n[![CI](https://github.com/superbox-dev/KEBA-KeEnergy-API/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/superbox-dev/KEBA-KeEnergy-API/actions/workflows/ci.yml)\n[![Version](https://img.shields.io/pypi/pyversions/keba-keenergy-api.svg)](https://pypi.python.org/pypi/keba-keenergy-api)\n\n[![license-url](https://img.shields.io/pypi/l/keba-keenergy-api.svg)](https://github.com/superbox-dev/KEBA-KeEnergy-API/blob/main/LICENSE)\n![Typing: strict](https://img.shields.io/badge/typing-strict-green.svg)\n![Code style: black](https://img.shields.io/badge/code%20style-black-black)\n![Code style: Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v1.json)\n\n# KEBA KeEnergy API\n\nA Python wrapper for the KEBA KeEnergy API.\n\n## Getting started\n\n```bash\npip install keba-keenergy-api\n```\n\n## Usage\n\n```python\nimport asyncio\nfrom typing import Any\n\nfrom keba_keenergy_api import KebaKeEnergyAPI\nfrom keba_keenergy_api.constants import HeatCircuit\n\n\nasync def main() -\u003e None:\n    client = KebaKeEnergyAPI(host=\"YOUR-IP-OR-HOSTNAME\", ssl=True)\n\n    # Get current outdoor temperature\n    outdoor_temperature: float = await client.get_outdoor_temperature()\n\n    # Get heat circuit temperature from heat circuit 2\n    heat_circuit_temperature: float = await client.heat_circuit.get_temperature(position=2)\n\n    # Read multiple values\n    data: dict[str, tuple[float | int | str]] = await client.read_data(\n        request=[\n            HeatCircuit.TEMPERATURE,\n            HeatCircuit.DAY_TEMPERATURE,\n        ],\n    )\n\n    # Enable \"day\" mode for heat circuit 2\n    await client.heat_circuit.set_operating_mode(mode=\"day\", position=2)\n\n    # Write multiple values\n    await client.write_data(\n        request={\n            HeatCircuit.DAY_TEMPERATURE: (20, None, 5),  # Write heat circuit on position 1 and 3 \n            HeatCircuit.NIGHT_TEMPERATURE: (16,),  # Write night temperature on position 1\n        },\n    )\n\n\nasyncio.run(main())\n```\n\nBy default, the library creates a new connection to `KEBA KeEnergy API` with each coroutine. If you are calling a large number of coroutines, an `aiohttp ClientSession()` can be used for connection pooling:\n\n\n```python\nimport asyncio\n\nfrom keba_keenergy_api import KebaKeEnergyAPI\n\nfrom aiohttp import ClientSession\n\nasync def main() -\u003e None:\n    async with ClientSession() as session:\n        client = KebaKeEnergyAPI(host=\"YOUR-IP-OR-HOSTNAME\", session=session, ssl=True)\n        ...\n\nasyncio.run(main())\n```\n\n\n### API endpoints\n\n| Endpoint                                        | Description                                  |\n|-------------------------------------------------|----------------------------------------------|\n| `.read_data(request, position, human_readable)` | Get multiple values with one http request.   |\n| `.write_data(request)`                          | Write multiple values with one http request. |\n\n#### System\n\n| Endpoint                                           | Response       | Description                                                                                                        |\n|----------------------------------------------------|----------------|--------------------------------------------------------------------------------------------------------------------|\n| `.get_info()`                                      | `str`          | Get system information.                                                                                            |\n| `.get_device_info()`                               | `str`          | Get device information.                                                                                            |\n| `.get_outdoor_temperature()`                       | `float`        | Get outdoor temperature.                                                                                           |\n| `.get_operating_mode(position, human_readable)`    | `int` or `str` | Get operating mode as integer (0 is `STANDBY`, 1 is `SUMMER`, 2 is `AUTO_HEAT`, 3 is `AUTO_COOL` and 4 is `AUTO`). |\n| `.set_operating_mode(0, position, human_readable)` | `int` or `str` | Set operating mode.                                                                                                |\n\n\n#### Hot water tank\n\n| Endpoint                                           | Request/Response | Description                                                                           |\n|----------------------------------------------------|------------------|---------------------------------------------------------------------------------------|\n| `.get_lower_limit_temperature(position)`           | `int`            | Get lower limit temperature.                                                          |\n| `.get_upper_limit_temperature(position)`           | `int`            | Get upper limit temperature.                                                          |\n| `.get_temperature(position)`                       | `float`          | Get temperature.                                                                      |\n| `.get_operating_mode(position, human_readable)`    | `int` or `str`   | Get operating mode as integer (0 is `OFF`, 1 is `AUTO`, 2 is `DAY` and 3 is `NIGHT`). |\n| `.set_operating_mode(0, position, human_readable)` | `int` or `str`   | Set operating mode.                                                                   |\n| `.get_min_temperature(position)`                   | `float`          | Get minimum temperature.                                                              |\n| `.set_min_temperature(20, position)`               | `float`          | Set minimum temperature.                                                              |\n| `.get_max_temperature(position)`                   | `float`          | Get maximum temperature.                                                              |\n| `.set_max_temperature(22, position)`               | `float`          | Set maximum temperature.                                                              |\n| `.get_heat_request(position)`                      | `int` or `str`   | Get heat request.                                                                     |\n\n### Heat pump\n\n| Endpoint                                         | Response       | Description                                                                   |\n|--------------------------------------------------|----------------|-------------------------------------------------------------------------------|\n| `.get_name(position)`                            | `str`          | Get head pump model name.                                                     |\n| `.get_state(position, human_readable)`           | `int` or `str` | Get heat pump state as integer (0 is `STANDBY`, 1 is `FLOW` and 2 is `AUTO`). |\n| `.get_operating_mode(position, human_readable)`  | `int` or `str` | Get operating mode as integer (0 is `OFF`, 1 is `ON`, 2 is `BACKUP`).         |\n| `.get_circulation_pump(position)`                | `float`        | Get circulation pump in percent.                                              |\n| `.get_inflow_temperature(position)`              | `float`        | Get inflow temperature.                                                       |\n| `.get_reflux_temperature(position)`              | `float`        | Get reflux temperature.                                                       |\n| `.get_source_input_temperature(position)`        | `float`        | Get source input temperature.                                                 |\n| `.get_source_output_temperature(position)`       | `float`        | Get source output temperature.                                                |\n| `.get_compressor_input_temperature(position)`    | `float`        | Get compressor input temperature.                                             |\n| `.get_compressor_output_temperature(position)`   | `float`        | Get compressor output temperature.                                            |\n| `.get_compressor(position)`                      | `float`        | Get compressor in percent.                                                    |\n| `.get_high_pressure(position)`                   | `float`        | Get high pressure.                                                            |\n| `.get_low_pressure(position)`                    | `float`        | Get low pressure.                                                             |\n| `.get_heat_request(position)`                    | `int` or `str` | Get heat request.                                                             |\n\n### Heat circuit\n\n| Endpoint                                        | Request/Response | Description                                         |\n|-------------------------------------------------|----------------|-----------------------------------------------------|\n| `.get_temperature(position)`                    | `float`        | Get temperature.                                    |\n| `.get_day_temperature(position)`                | `float`        | Get day temperature.                                |\n| `.set_day_temperature(20, position)`            | `float`        | Set day temperature.                                |\n| `.get_day_temperature_threshold(position)`      | `float`        | Get day temperature threshold.                      |\n| `.get_night_temperature(position)`              | `float`        | Get night temperature.                              |\n| `.set_night_temperature(16, position)`          | `float`        | Set night temperature.                              |\n| `.get_night_temperature_threshold(position)`    | `float`        | Get night temperature threshold.                    |\n| `.get_holiday_temperature(position)`            | `float`        | Get holiday temperature.                            |\n| `.set_holiday_temperature(14, position)`        | `float`        | Set holiday temperature.                            |\n| `.get_temperature_offset(position)`             | `float`        | Get temperature offset.                             |\n| `.set_temperature_offset(2, position)`          | `float`        | Set temperature offset.                             |\n| `.get_operating_mode(position, human_readable)` | `int` or `str` | Get operating mode (0 is `OFF` and 3 is `HEAT_UP`). |\n| `.set_operating_mode(3, position)`              | `int` or `str` | Set operating mode.                                 |\n| `.get_heat_request(position)`                   | `int` or `str` | Get heat request.                                   |\n| `.get_external_cool_request(position)`          | `int` or `str` | Get external cool request.                          |\n| `.get_external_heat_request(position)`          | `int` or `str` | Get external heat request.                          |\n\n## Changelog\n\nThe changelog lives in the [CHANGELOG.md](CHANGELOG.md) document. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).\n\n## Contributing\n\nWe're happy about your contributions to the project!\n\nYou can get started by reading the [CONTRIBUTING.md](CONTRIBUTING.md).\n\n## Donation\n\nWe put a lot of time into this project. If you like it, you can support us with a donation.\n\n[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/F2F0KXO6D)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuperbox-dev%2Fkeba-keenergy-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsuperbox-dev%2Fkeba-keenergy-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuperbox-dev%2Fkeba-keenergy-api/lists"}