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.8.0

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.8.0
File Size Uploaded Provenance Actions
pydanfoss_cloud-0.8.0.tar.gz 164.3 kB With provenance Details for pydanfoss_cloud-0.8.0.tar.gz

Built distribution (wheel)

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

Total release size: 306.8 kB

Release files / pydanfoss_cloud-0.8.0.tar.gz

Download URL pydanfoss_cloud-0.8.0.tar.gz
Size 164.3 kB
Tags Source
SHA-256 checksum
How to use checksums
8d62e68ecaebdc2b040eb712c99fbb10a738ce4b8ce1ae50aa6b2325dee237e8
BLAKE2b-256 checksum
How to use checksums
9cf89fe7eb59386c84ced50b8e75e59ecd730d741f8eafa1856fae936fd9b9ac
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 28, 2026.

Transparency log

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

Download URL pydanfoss_cloud-0.8.0-py3-none-any.whl
Size 142.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b5c7e017cc42724a58daebe74638f96f0599d9df4e0419032bc5d571f56495d8
BLAKE2b-256 checksum
How to use checksums
4dfde60fdd123ad548c8567c2764e078f784863052c35a849fce1d0066d4cbe0
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 28, 2026.

Transparency log

Security for pydanfoss-cloud 0.8.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.

Full provenance

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

Select from 2 files

Attestation for pydanfoss_cloud-0.8.0.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 28, 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