pymacon
Secure async REST and WebSocket client for the Macon Heat Pump Controller. It is the transport library used by the Macon Home Assistant integration.
Each MaconClient owns the credential, pinned certificate,
ordered state, reconnect loop, and reconciliation state for exactly one
controller. Multiple controllers therefore remain fully isolated.
Install
pip install pymacon
Usage
from pymacon import MaconClient
client = MaconClient(
"192.168.1.21",
token,
certificate_fingerprint,
# arctic-* is retained because it is the firmware wire-format ID.
device_id="arctic-001122334455",
)
client.subscribe(handle_snapshot)
client.subscribe_status(handle_status)
await client.start()
Call await client.stop() when unloading the owning config entry. Sessions
passed into the constructor remain owned by the caller; sessions created by
the client are closed automatically.
Control methods acknowledge that a command was accepted, but they never optimistically mutate local state. Subscribe to snapshots to observe the controller's reported state:
await client.async_set_cooling_setpoint(12)
await client.async_set_power(False)
Only controls advertised by client.capabilities should be called. The
firmware rejects unavailable, unsafe, or unsupported operations.
Development
python -m pip install -e ".[tests]"
pytest
ruff check src tests
mypy src
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 pymacon-0.2.0.tar.gz.
File metadata
- Download URL: pymacon-0.2.0.tar.gz
- Upload date:
- Size: 16.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e2dd604dc5669fe27593754f5e13b10e2307b19914dc6313a61fca1a126b2e1a
|
|
| MD5 |
aebf8f26f5eba7e2f42ae5b6ed23b394
|
|
| BLAKE2b-256 |
140c1d1fad1e01c1af44991a1c87e5ae5708a78b641f3f240246f02706a7afa7
|
Provenance
The following attestation bundles were made for pymacon-0.2.0.tar.gz:
Publisher:
release.yml on sslivins/pymacon
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pymacon-0.2.0.tar.gz -
Subject digest:
e2dd604dc5669fe27593754f5e13b10e2307b19914dc6313a61fca1a126b2e1a - Sigstore transparency entry: 2431012834
- Sigstore integration time:
-
Permalink:
sslivins/pymacon@09e2ff5ab238b4e7de3c088a2e6fef8a52e48463 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/sslivins
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@09e2ff5ab238b4e7de3c088a2e6fef8a52e48463 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pymacon-0.2.0-py3-none-any.whl.
File metadata
- Download URL: pymacon-0.2.0-py3-none-any.whl
- Upload date:
- Size: 14.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
951df4b753671cbf3155e115eb25640a22bb4f0474d3347129e87f8e23856e9a
|
|
| MD5 |
1230d791bf35a526854e704db1a0ee2d
|
|
| BLAKE2b-256 |
9a9c1700957ce26080c939de37a6e140beca6a697f93011664bdb431473e1a86
|
Provenance
The following attestation bundles were made for pymacon-0.2.0-py3-none-any.whl:
Publisher:
release.yml on sslivins/pymacon
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pymacon-0.2.0-py3-none-any.whl -
Subject digest:
951df4b753671cbf3155e115eb25640a22bb4f0474d3347129e87f8e23856e9a - Sigstore transparency entry: 2431012916
- Sigstore integration time:
-
Permalink:
sslivins/pymacon@09e2ff5ab238b4e7de3c088a2e6fef8a52e48463 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/sslivins
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@09e2ff5ab238b4e7de3c088a2e6fef8a52e48463 -
Trigger Event:
push
-
Statement type: