Skip to main content

pydanfoss-cloud

Pure-Python library for Danfoss Ally (unofficial cloud path 1a, local Zigbee tunnel, Tuya cloud MQTT 2.3 frames, Zigbee2MQTT dialect contract, and standalone danfoss2mqtt bridge daemon).

Zero Home Assistant dependency. Powers:

Installation

pip install pydanfoss-cloud               # core (cloud HTTP client, decode, writes, z2m_contract)
pip install "pydanfoss-cloud[mqtt]"       # + paho-mqtt (danfoss2mqtt daemon & Tuya cloud MQTT)
pip install "pydanfoss-cloud[local]"      # + tinytuya (local Zigbee tunnel via Ally gateway)

CLI (danfoss2mqtt)

danfoss2mqtt --mqtt-host localhost --base-topic danfoss2mqtt --dry-run

Room coordinator (danfoss-room-coordinator)

A standalone, read-only aggregator for heads on a Zigbee2MQTT coordinator with no Danfoss gateway and no cloud. It keeps its own room store, publishes bridge/rooms and bridge/heat_demand under its own prefix, and answers bridge/request/room/* (docs/z2m-cloud-parity.md §6).

danfoss-room-coordinator --source-prefix zigbee2mqtt --base-topic danfoss-rooms --store-path rooms.json

Write stages 2–7 (closed by default)

Every write stage is closed by default:

  • Room allowlist (armed_rooms, empty by default): no head receives any /set unless its room_id is listed (--armed-room <room_id>, DANFOSS_ARMED_ROOMS, or options.json). Requests targeting an unarmed room (room/set-setpoint, room/set-schedule, room/set-mode, room/set-comfort-setback, room/restore-schedule, room/set-settings) are refused with status: "closed".
  • Per-stage opt-in flags (all False by default):
    • --feed-external-sensor (DANFOSS_FEED_EXTERNAL_SENSOR): Stage 3 event-driven room sensor feed (both radiator_covered modes, 30-min silence -> -8000).
    • --mode-change-keeps-schedule (DANFOSS_MODE_CHANGE_KEEPS_SCHEDULE): Stage 4 flag once a real-hardware trial confirms programming_operation_mode=setpoint keeps the ZCL schedule (when False, returning to schedule rewrites all 7 days).
    • --reconcile-drift (DANFOSS_RECONCILE_DRIFT): Stage 5 hourly drift reconciliation (capped at 3 consecutive attempts, then flagged reconcile_blocked).
    • --feed-load-mean (DANFOSS_FEED_LOAD_MEAN): Stage 6 multi-head load_room_mean (coalesced with the sensor feed into one /set per head, -8000 on clean stop).
    • --enable-holidays (DANFOSS_ENABLE_HOLIDAYS): Stage 7 holiday edge automation (reconciled at startup and on ticks; publishes bridge/holidays).
    • --propagate-window-open (DANFOSS_PROPAGATE_WINDOW_OPEN): Stage 7 cross-room window_open_external propagation with max-duration cap.

Arm a room only for a supervised real-hardware trial, by its room_id:

danfoss-room-coordinator --armed-room room-abcd1234   # repeatable
# or options.json: {"armed_rooms": ["room-abcd1234"]}
# or env:          DANFOSS_ARMED_ROOMS=room-abcd1234

A user change writes occupied_heating_setpoint; a coordinator-initiated change writes occupied_heating_setpoint_scheduled. Each head is reported applied / mismatch / unreachable.

Security

No credentials, installation secrets (sign_key, ch_key), or device_id are ever committed to this repository. When omitted, danfoss2mqtt generates and persists its own dedicated 44-hex device_id locally (0600).

License

MIT — see LICENSE.

Metadata

Release files for pydanfoss-cloud 0.7.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pydanfoss-cloud 0.7.1
File Size Uploaded Provenance Actions
pydanfoss_cloud-0.7.1.tar.gz 143.0 kB With provenance Details for pydanfoss_cloud-0.7.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pydanfoss-cloud 0.7.1
File Interpreter ABI Platform Actions
pydanfoss_cloud-0.7.1-py3-none-any.whl Python 3 none any Details for pydanfoss_cloud-0.7.1-py3-none-any.whl

Total release size: 272.2 kB

Release files / pydanfoss_cloud-0.7.1.tar.gz

Download URL pydanfoss_cloud-0.7.1.tar.gz
Size 143.0 kB
Tags Source
SHA-256 checksum
How to use checksums
74cfce55eb5f011fb54428a4e1e4c5c7692e95090fc5b290d6f86fa1e58cf510
BLAKE2b-256 checksum
How to use checksums
f65bef12dbc5e413ffa6f5d7d4a7ca1e8de17f86d6cb81aed6b8fd72e63baf83
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.

Transparency log

Release files / pydanfoss_cloud-0.7.1-py3-none-any.whl

Download URL pydanfoss_cloud-0.7.1-py3-none-any.whl
Size 129.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
02d8cb7592eb88c72810635a14add163b13fa6c6c072257eb26df275b4cc1d9c
BLAKE2b-256 checksum
How to use checksums
3b87e10eca80cf7d52e2899b389e3e13d449b779795a1147f7c9fc87ede58d80
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.

Transparency log

Security for pydanfoss-cloud 0.7.1

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pydanfoss_cloud-0.7.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.

Transparency log

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.

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