Async Python API client for the UPGRAIT HeatControl 3rd-party connector.
Project description
upgrait-heatcontrol-api
Async Python API package for the UPGRAIT HeatControl 3rd-party connector.
The package is intended to be the external dependency consumed by the Home Assistant integration and by other 3rd-party clients.
Current feature set:
- HTTP probing via
/api/ping - device metadata parsing
- pairing start via
/api/pair/start - pairing confirmation via
/api/pair/confirm - websocket bind/session transport
- encrypted request/response handling over the websocket session
- initial snapshot handling and live event subscription
- Zeroconf service constants and discovery metadata parsing helpers
Installation:
pip install upgrait-heatcontrol-api
Example:
import asyncio
from upgrait_heatcontrol_api import HeatControlApiClient, generate_keypair
async def main() -> None:
async with HeatControlApiClient(host="192.168.2.116", port=8001) as client:
device = await client.async_get_device_info()
print(device.serial, device.version)
private_key, public_key = generate_keypair()
pairing = await client.async_start_pairing(
ha_instance_id="example-ha-instance",
display_name="Example Client",
integration_version="0.1.0.dev0",
)
print(pairing.expires_at)
# The 6-digit PIN must be entered by the user after it is shown on the UHC. (Only available in new local interface, version >1610)
# confirm = await client.async_confirm_pairing(...)
# connection = await client.async_connect_and_bind(...)
asyncio.run(main())
Notes:
HeatControlApiClientcan manage its ownaiohttpsession. In that case, either useasync with HeatControlApiClient(...)or callawait client.close().HeatControlConnection.subscribe()registers callbacks for live websocket events and returns an unsubscribe function.- Discovery helpers cover both the
/api/pingdiscoverypayload and Zeroconf TXT-record property normalization.
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 upgrait_heatcontrol_api-0.1.0.dev0.tar.gz.
File metadata
- Download URL: upgrait_heatcontrol_api-0.1.0.dev0.tar.gz
- Upload date:
- Size: 10.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
16f1342cfd473c17b0c1deab8dbe5ac6f56ac39aabeeafe10973d8799ade76c3
|
|
| MD5 |
150299a39fb3ee21afaceadefbef6c10
|
|
| BLAKE2b-256 |
37d919803678c1d39743b3d702c1435431122ad7789c7a53d20b0140b08c9b75
|
Provenance
The following attestation bundles were made for upgrait_heatcontrol_api-0.1.0.dev0.tar.gz:
Publisher:
publish-pypi.yml on UPGRAITgmbh/upgrait-heatcontrol-api
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
upgrait_heatcontrol_api-0.1.0.dev0.tar.gz -
Subject digest:
16f1342cfd473c17b0c1deab8dbe5ac6f56ac39aabeeafe10973d8799ade76c3 - Sigstore transparency entry: 1207114657
- Sigstore integration time:
-
Permalink:
UPGRAITgmbh/upgrait-heatcontrol-api@20bc81d91ce9993c1348d3a6249547aeeaebe50d -
Branch / Tag:
refs/tags/v0.1.0.dev0 - Owner: https://github.com/UPGRAITgmbh
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@20bc81d91ce9993c1348d3a6249547aeeaebe50d -
Trigger Event:
release
-
Statement type:
File details
Details for the file upgrait_heatcontrol_api-0.1.0.dev0-py3-none-any.whl.
File metadata
- Download URL: upgrait_heatcontrol_api-0.1.0.dev0-py3-none-any.whl
- Upload date:
- Size: 10.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
796d839592c5b8d04f6296531e3a5266fef8f941e8fe0c778ec57d3dcbd8b7ed
|
|
| MD5 |
f1588f74a4e57b9fcf930d294ea4bae0
|
|
| BLAKE2b-256 |
8854288606f11a59641523e98a17f30e6a4a4d89c2273135aaa9b3710135fed8
|
Provenance
The following attestation bundles were made for upgrait_heatcontrol_api-0.1.0.dev0-py3-none-any.whl:
Publisher:
publish-pypi.yml on UPGRAITgmbh/upgrait-heatcontrol-api
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
upgrait_heatcontrol_api-0.1.0.dev0-py3-none-any.whl -
Subject digest:
796d839592c5b8d04f6296531e3a5266fef8f941e8fe0c778ec57d3dcbd8b7ed - Sigstore transparency entry: 1207114719
- Sigstore integration time:
-
Permalink:
UPGRAITgmbh/upgrait-heatcontrol-api@20bc81d91ce9993c1348d3a6249547aeeaebe50d -
Branch / Tag:
refs/tags/v0.1.0.dev0 - Owner: https://github.com/UPGRAITgmbh
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@20bc81d91ce9993c1348d3a6249547aeeaebe50d -
Trigger Event:
release
-
Statement type: