Skip to main content

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

pymacon-0.4.1.tar.gz (20.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pymacon-0.4.1-py3-none-any.whl (16.4 kB view details)

Uploaded Python 3

File details

Details for the file pymacon-0.4.1.tar.gz.

File metadata

  • Download URL: pymacon-0.4.1.tar.gz
  • Upload date:
  • Size: 20.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for pymacon-0.4.1.tar.gz
Algorithm Hash digest
SHA256 03ff9375f195f94ed6e84bdb9f36a00d139acb3c98c734032311f7a2dc3b10a3
MD5 d8a923147858e24fb8016cf2ad4ce012
BLAKE2b-256 16ddf7f3839f3a12a2c54b084ccef3b427d9c1f347578e30a538a80b4170543a

See more details on using hashes here.

Provenance

The following attestation bundles were made for pymacon-0.4.1.tar.gz:

Publisher: release.yml on sslivins/pymacon

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pymacon-0.4.1-py3-none-any.whl.

File metadata

  • Download URL: pymacon-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 16.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for pymacon-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 99b5d747b68347e4dde39c0f297403a5c0187e234e66308af35f6e92959bf20e
MD5 e2e30c4129f6699bc63737d9c1e43fbb
BLAKE2b-256 ce5c6b4aeecd30886418441b9e6a0899c762f36b25b8c7b0908ba7f4337fda4f

See more details on using hashes here.

Provenance

The following attestation bundles were made for pymacon-0.4.1-py3-none-any.whl:

Publisher: release.yml on sslivins/pymacon

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.4.1 This release

2 files

0.4.0

2 files

0.3.0

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.0

2 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