pydanfoss-cloud
Access library for the unofficial Danfoss Ally cloud API (path 1a, the mobile app's one — with
no developer app and no shared quota), extracted from the Home Assistant integration
danfoss_ally_cloud. No Home Assistant dependency.
It provides:
CloudClient— email/password login (+ installation secrets), list of heads, guarded writes (tuya.m.custom.wkf.settings.change, with the head's gateway asgw_id), room writes, schedules, holidays, rooms, robust re-authentication, optional distinctdeviceId(derive_distinct_device_id) so a client does not share its Tuya session with the app.decode/DanfossDevice— decoding of the Tuyadpsinto a normalised model (product schema03wvrwpv), decoding of the E1–E15 fault codes.writes— value validation before sending and a per-model guard-rail.keys— fetching the gateways'localKey+ LAN IP from the cloud.local/— local Zigbee tunnel (DP 198→199, tinytuya): attribute read/write (preheat 0x0025), weekly schedule.mqtt_publish— Tuya cloud MQTT codec, no network: protocol-2.3 frames (AES-GCM with the gateway localKey), topics, DP-publish payload, broker credential derivation.mqtt_client—CloudMqttLink, the live link built on that codec (paho-mqtt, extramqtt): inbound report decoding, DP publish, confirmation by the gateway's echo. One connection per Tuya session; the write path is validated for DP 30 only (writes.MQTT_WRITE_DPS).
Wire format and derivations: docs/cloud-mqtt-publish.md in the repository.
Packaging
Single source: this folder (custom_components/danfoss_ally_cloud/api/). It is packaged under
the name pydanfoss_cloud by the repo's pyproject.toml, without moving files:
- the Home Assistant integration "vendors" this code (relative import
from .api import …), which keeps the HACS install self-contained; - other clients (the MCP connector
danfoss-ally-mcp) depend on the PyPI release.
pip install pydanfoss-cloud # core: client, decode, writes, keys, MQTT codec
pip install 'pydanfoss-cloud[local]' # + tinytuya for the local Zigbee tunnel
pip install 'pydanfoss-cloud[mqtt]' # + paho-mqtt for the live cloud-MQTT link
pip install -e '.[local,mqtt]' # development install from the repository
Dependencies
pycryptodome, requests (core); tinytuya (extra local, Zigbee tunnel); paho-mqtt 1.6.1 or
2.x (extra mqtt, imported only when a connection is opened). Python ≥ 3.11.
Changes
- 0.3.0 —
gw_idonasync_write_setting(the head's gateway; it defaulted to the head itself); distinctdeviceId(derive_distinct_device_id,CloudClient(distinct_device_id=…));mqtt_publishandmqtt_client(extramqtt); holiday, room, relay and unbind calls; active setpoint and heating state indecode. No rename of the 0.2.0 public names. - 0.2.0 — public API renamed to English; first PyPI release.
Disclaimer
Undocumented API, obtained by observing the app's protocol: it can change or be cut off. Secrets
(session token, localKey, credentials): never logged or committed.
Metadata
Release files for pydanfoss-cloud 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pydanfoss_cloud-0.3.0.tar.gz | 133.4 kB | Without provenance | Details for pydanfoss_cloud-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pydanfoss_cloud-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for pydanfoss_cloud-0.3.0-py3-none-any.whl |
Total release size: 196.5 kB
Release files / pydanfoss_cloud-0.3.0.tar.gz
| Download URL | pydanfoss_cloud-0.3.0.tar.gz |
|---|---|
| Size | 133.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7615d8e0e9ec6bfa2230370a6923fb510253cbfdf10fe2f319ed6d3052c5333b
|
|
BLAKE2b-256 checksum How to use checksums |
42b7bcea888dc226364c2c3e9626656fa7562c6c727900df25bdf869c02a82d4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.16
|
Release files / pydanfoss_cloud-0.3.0-py3-none-any.whl
| Download URL | pydanfoss_cloud-0.3.0-py3-none-any.whl |
|---|---|
| Size | 63.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
acf18eb5003c77166cfcfc0a6b2b310f2e7c1b2c81a4f65ec74c61036baf0c9f
|
|
BLAKE2b-256 checksum How to use checksums |
932a66a6fa8fc4e6f5e9993907f9aa217209e7ba9ac5430bf5cc985dd5be0b52
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.16
|
Security for pydanfoss-cloud 0.3.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.