Skip to main content

aiocomexio

Asyncio-native Python client for the Comexio IO-Server, a local building-automation controller.

No dependency on Home Assistant or any other framework — usable as a standalone library. It will provide the communication layer of the homeassistant-comexio integration.

Status: pre-alpha. The code is being moved over from the integration step by step. So far: admin login, read access (including live values of physical IOs), value writes, the Web-IO lifecycle, marker / KNX object management and function plan editing — plans, elements, wires, block instance settings, run / stop (ComexioClient), admin page scraping (aiocomexio.scrape), config parsing (aiocomexio.config), KNX DPT tables (aiocomexio.knx), Web-IO command builders (aiocomexio.webio), function plan rendering (with block settings in the hover text) and diffing (aiocomexio.function_plan) and the block-type reference catalog that resolves Comexio catalog ids per server by stable key (aiocomexio.reference_catalog). The API may still change.

Installation

pip install aiocomexio

Usage

The client works on an aiohttp.ClientSession you create and close yourself. session_kwargs() gives it the settings Comexio needs (a cookie jar that keeps the admin login for an IP-address host, a request timeout; progress_log_interval=10 adds a "still waiting" log line for slow requests). Give every client its own session: login() clears the session's cookie jar. Value writes (set_marker_value, set_io_value, set_knx_value) go through Comexio's /api/ with a separate API user: pass api_username / api_password to the client. Every call either returns data or raises a ComexioError subclass (ComexioAuthenticationError, ComexioConnectionError, ComexioResponseError, ComexioDataError, ComexioRequestRejectedError for a write the server refused, ComexioCreatedWithoutIdError for a create the server confirmed but whose id could not be read back — the object exists, do not create it again). One exception: the value setters raise a plain ValueError, which is not a ComexioError, for a non-finite float (nan, inf) before sending anything — catch it separately if your values can be non-finite.

import asyncio

import aiohttp

from aiocomexio import ComexioClient, session_kwargs
from aiocomexio.config import parse_config


async def main() -> None:
    host = "192.168.0.20"
    async with aiohttp.ClientSession(**session_kwargs()) as session:
        client = ComexioClient(host, "admin", "secret", session=session)
        await client.login()
        raw = await client.get_raw_config()
        config = parse_config(raw.variables, io_types=raw.io_types, io_input_types=raw.io_input_types)
        print(len(config["markers"]), "markers on Comexio", raw.comexio_version)


asyncio.run(main())

Development

pip install -e ".[dev]"
pre-commit install

ruff check .            # lint
ruff format --check .   # formatting check; drop --check to auto-format
mypy                    # strict type check (src/aiocomexio)
pytest                  # tests

License

MIT

Metadata

Release files for aiocomexio 0.6.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 aiocomexio 0.6.0
File Size Uploaded
aiocomexio-0.6.0.tar.gz 167.5 kB Details

Built distribution (wheel)

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

Total release size: 289.7 kB

Release files / aiocomexio-0.6.0.tar.gz

Download URL aiocomexio-0.6.0.tar.gz
Size 167.5 kB
Tags Source
SHA-256 checksum
How to use checksums
a49e3f9466365d20e716af84d52296ad0c231dc4f2197d10096982c91b6b8bc6
BLAKE2b-256 checksum
How to use checksums
a26a87e0002da4de68f4310c541e1b221a5d63d56b3843874bfbad57ff0fb654
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 15, 2026.

Transparency log

Release files / aiocomexio-0.6.0-py3-none-any.whl

Download URL aiocomexio-0.6.0-py3-none-any.whl
Size 122.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
03e9ca26e68dde7544ed36c67375a4bf945bfcb09d580ce726fa5bcf98a01fcb
BLAKE2b-256 checksum
How to use checksums
4f93e4a943cbeb822380fe5229a87a296033b8f998216a50e03eea85ad68cfa3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 15, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.6.0 This release

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

0.0.1

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