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, value writes, the Web-IO lifecycle, marker / KNX object management and function plan editing — plans, elements, wires, run / stop (ComexioClient), admin page scraping (aiocomexio.scrape), config parsing (aiocomexio.config), KNX DPT tables (aiocomexio.knx), Web-IO command builders (aiocomexio.webio) and function plan rendering and diffing (aiocomexio.function_plan). 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).

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.2.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.2.0
File Size Uploaded
aiocomexio-0.2.0.tar.gz 133.4 kB Details

Built distribution (wheel)

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

Total release size: 238.3 kB

Release files / aiocomexio-0.2.0.tar.gz

Download URL aiocomexio-0.2.0.tar.gz
Size 133.4 kB
Tags Source
SHA-256 checksum
How to use checksums
89df18d19259ede3ad23dd086319a469ccd1ab319a8bcf1e1b6e179cd387451e
BLAKE2b-256 checksum
How to use checksums
298fab4c2639510849f28e52d13d81db0dc5a18fbc5115cdfda91ad518241bdc
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 Sep 29, 2026.

Transparency log

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

Download URL aiocomexio-0.2.0-py3-none-any.whl
Size 104.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3c6748556adc114f25ccc9705ec55aa680b47ab9c1cd705245e2cc76313aef56
BLAKE2b-256 checksum
How to use checksums
4a8cce3f80876984fe7b44636f90f86261eedf9b5c3b39ae01899563fb6caa0f
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 Sep 29, 2026.

Transparency log

Release history Release notifications | RSS feed

0.6.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

This release

0.2.0 This release

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