Skip to main content

ZhongHongHVAC

Python driver for ZhongHong HVAC Controller

Connection robustness

The gateway connection is self-healing:

  • Unknown protocol values (for example fan speed 0x00 reported by an indoor unit right after power-off) are tolerated instead of crashing the listener. A malformed frame is logged and skipped while the rest of the buffer is still processed.
  • The listener thread survives unexpected errors and keeps running.
  • When no status data has been received for probe_interval seconds the hub sends a status query as a health probe. After max_probe_failures consecutive failed probes the TCP connection is reopened.
  • ZhongHongGateway.connected reflects the health of the connection so integrations can mark entities unavailable instead of showing stale values.

Tunables (instance attributes, set before start_listen()):

Attribute Default Meaning
_recv_timeout 30.0 socket read timeout in seconds
_probe_interval 60.0 seconds without data before probing
_probe_response_timeout 10.0 seconds to wait for a probe response
_max_probe_failures 3 consecutive probe failures before reopening the socket
_stale_timeout 300.0 seconds without data before connected turns False

Release

Pushing a vX.Y.Z tag publishes the package to PyPI automatically (workflow: .github/workflows/publish.yml). It runs the test suite, builds the sdist and wheel, verifies that the tag matches the package version, and uploads.

  1. Bump the version in zhong_hong_hvac/version.py and pyproject.toml.

  2. Commit the change, then tag and push:

    git tag vX.Y.Z
    git push origin vX.Y.Z
    

First-time setup, one of:

  • Trusted publishing (recommended, no secrets needed): add a trusted publisher on PyPI for this repository (crhan/ZhongHongHVAC), workflow publish.yml, environment pypi, project zhong-hong-hvac.
  • Or add a repository secret PYPI_TOKEN with a PyPI API token scoped to the zhong-hong-hvac project.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zhong_hong_hvac-1.0.17.tar.gz (14.2 kB view details)

Uploaded Source

Built Distribution

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

zhong_hong_hvac-1.0.17-py3-none-any.whl (15.8 kB view details)

Uploaded Python 3

File details

Details for the file zhong_hong_hvac-1.0.17.tar.gz.

File metadata

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

File hashes

Hashes for zhong_hong_hvac-1.0.17.tar.gz
Algorithm Hash digest
SHA256 194e3d7f6c49e8dc2b90728d80b0b595959a6cab981638cae699493bbbd9ccad
MD5 7d1cafcac7d8700bde79c9ad3a7604c6
BLAKE2b-256 8ce73ad700853f8762ae42a0f327caa4cbd6573c3b069fff656f4554896bd4c7

See more details on using hashes here.

Provenance

The following attestation bundles were made for zhong_hong_hvac-1.0.17.tar.gz:

Publisher: publish.yml on crhan/ZhongHongHVAC

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

File details

Details for the file zhong_hong_hvac-1.0.17-py3-none-any.whl.

File metadata

File hashes

Hashes for zhong_hong_hvac-1.0.17-py3-none-any.whl
Algorithm Hash digest
SHA256 d0a237c9b177b2b4136a9ce4272dff6342d6b1baf266a8fae349c13cb0257ad4
MD5 c5a5b55c3fe4a1cf9ba48495ef2eb50d
BLAKE2b-256 2ff20d79d474b09762bb7ef8168d92b85766c4ea65dc6cb533425ede3d242389

See more details on using hashes here.

Provenance

The following attestation bundles were made for zhong_hong_hvac-1.0.17-py3-none-any.whl:

Publisher: publish.yml on crhan/ZhongHongHVAC

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

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page