Async Python REST + WebSocket client for the openccu-loom daemon
Project description
openccu-loom-client
Status: WIP / Alpha — transport, event bus, domain store, the full
daemon REST surface (HA-relevant + admin/ops), and the aiohomematic
compat namespace are in place (see "Status of the wire contract"
below).
Async Python REST + WebSocket client for the openccu-loom daemon.
Designed as the drop-in replacement for aiohomematic in the
homematicip_local Home-Assistant custom component, once the daemon
has fully replaced direct XML-RPC/JSON-RPC contact with the CCU.
Architecture
Wire types come from the sister package
openccu-loom-types
(Pydantic models + enum catalogue, generated from the daemon's
assets/openapi.yaml and assets/schemas/enums.json). This package
adds:
transport/http.py— async REST client (aiohttp), RFC 9457problem+jsonparsing, retry/backoff.transport/ws.py— WebSocket loop with subscribe/unsubscribe, heartbeat, resume-after-reconnect viaseq/sincecursor per ADR-0022.client.py—LoomClientfacade: snapshot bootstrap, event bus, in-memory store, and the operation modules (devices,datapoints,custom_data_points,hub,system,schedules,links).compat/aiohomematic/— namespace shim so existinghomematicip_localimports keep working during the cutover. This includes aLoomCentralAdapterthat presents aiohomematic'sCentralUnit+ coordinator surface, and a categorised data-point model (genericDp*, hubSysvarDp*/ProgramDp*, customCustomDp*for light/cover/climate/lock/siren/valve/switch) withunique_id/category/registeredbookkeeping. A refresh bridge fans the daemon's value/sysvar/custom events into the singleDataPointStateChangedEvent(keyed byunique_id) HA entities subscribe to.
Status of the wire contract
The daemon's external-client contract is tracked in
docs/external-clients/asks.md
in the daemon repo. As of openccu-loom-types==0.1.2, all push-event
payloads needed by Home Assistant (DataPointValueChanged,
CustomDataPointStateChanged, CentralStateChanged,
SystemStatusChanged, SysvarChanged, ProgramExecuted,
InstallModeChanged, DeviceCreated, DeviceRemoved) ship typed and
are bound in the event registry.
The full daemon REST surface is wrapped — typed end-to-end against
openccu-loom-types:
- HA-relevant: devices/channels/data-points, paramsets, batch reads, custom data points, programs and sysvars (incl. create / metadata-patch / lifecycle), alarm/service messages (incl. ack), install-mode, interfaces, rooms/functions, firmware updates, calculated data points, climate schedules / week-profiles, and direct/central links.
- Admin / ops: auth + API-token provisioning (
client.auth), users (client.users), centrals (client.centrals), config management (client.config_admin), diagnostics / log-levels / capture / RPC-recording / metrics / values-cache / MQTT-reload / audit (client.diagnostics), backups (client.backup), edit-lock sessions (client.sessions), the Matter bridge (client.matter), and parameter visibility (client.visibility).
The schedule, link and calculated-data-point schemas were added to the
daemon's openapi.yaml (components.schemas) and regenerated into
openccu-loom-types 0.1.3, so they are typed rather than free-form
dicts.
Two gaps remain and are daemon-side, not closeable from the client alone:
OptimisticRollback— not yet broadcast by the daemon; synthesized client-side from RESTset_valuefailures in the meantime.- Device trigger / keypress events —
central-linksforwarding can be enabled via REST, but the daemon does not yet emit the corresponding click broadcast (reserved topic namespace). TheDeviceTriggerEventcompat class is ready to bind once it ships.
Development
python3.11 -m venv venv
source venv/bin/activate
pip install -e '.[dev]'
pytest
License
MIT. See LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file openccu_loom_client-2026.6.4.tar.gz.
File metadata
- Download URL: openccu_loom_client-2026.6.4.tar.gz
- Upload date:
- Size: 117.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
05be68c0134c359d1cf667746c1941e5715e4a6785a8c6e89fd44870cf9207dd
|
|
| MD5 |
284fc24641ddd9db19ecf78de37cf2c9
|
|
| BLAKE2b-256 |
9e2ee35acdbc78b78133b48405251d6b103c8f3744c53233e196e424c72f2887
|
Provenance
The following attestation bundles were made for openccu_loom_client-2026.6.4.tar.gz:
Publisher:
python-publish.yml on SukramJ/openccu-loom-client
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
openccu_loom_client-2026.6.4.tar.gz -
Subject digest:
05be68c0134c359d1cf667746c1941e5715e4a6785a8c6e89fd44870cf9207dd - Sigstore transparency entry: 1790829272
- Sigstore integration time:
-
Permalink:
SukramJ/openccu-loom-client@13adccbd635a2ca0af169c057e92c77a9e019c6f -
Branch / Tag:
refs/heads/main - Owner: https://github.com/SukramJ
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@13adccbd635a2ca0af169c057e92c77a9e019c6f -
Trigger Event:
repository_dispatch
-
Statement type:
File details
Details for the file openccu_loom_client-2026.6.4-py3-none-any.whl.
File metadata
- Download URL: openccu_loom_client-2026.6.4-py3-none-any.whl
- Upload date:
- Size: 146.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ca4f331bd1b541caf9625161b4cb175a62a4ef94bf365c25999c42dafbd0afca
|
|
| MD5 |
d12b10749b370ee5dd1c74f52e7f7a40
|
|
| BLAKE2b-256 |
27511300d81f6068a524b3ed078c7cd7af2521fb29b5396cedd9b1e8260d7207
|
Provenance
The following attestation bundles were made for openccu_loom_client-2026.6.4-py3-none-any.whl:
Publisher:
python-publish.yml on SukramJ/openccu-loom-client
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
openccu_loom_client-2026.6.4-py3-none-any.whl -
Subject digest:
ca4f331bd1b541caf9625161b4cb175a62a4ef94bf365c25999c42dafbd0afca - Sigstore transparency entry: 1790829318
- Sigstore integration time:
-
Permalink:
SukramJ/openccu-loom-client@13adccbd635a2ca0af169c057e92c77a9e019c6f -
Branch / Tag:
refs/heads/main - Owner: https://github.com/SukramJ
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@13adccbd635a2ca0af169c057e92c77a9e019c6f -
Trigger Event:
repository_dispatch
-
Statement type: