Skip to main content

pyvenstar

A small, stateless Python client for the Venstar ColorTouch T8900 Local (LAN) REST API. Built for managing a fleet of thermostats across multiple sites (e.g. from a central scheduler reaching devices over a site-to-site VPN), not as a general Venstar SDK.

Reference: developer.venstar.com (Local API v5+).

Why stateless?

Each VenstarClient call round-trips to the device rather than caching setpoints/mode on the instance. That costs a little extra HTTP overhead (negligible on a LAN/VPN, these devices are polled/commanded on the order of minutes, not milliseconds) but means a process managing dozens of thermostats can freely construct/discard clients per operation without worrying about stale cached state from a previous call.

Usage

from pyvenstar import VenstarClient, ThermostatMode, FanMode

with VenstarClient("10.0.1.42", timeout=5.0) as client:
    info = client.get_info()
    print(info.name, info.mode, info.space_temp)

    client.set_setpoints(heat_temp=70, cool_temp=76)
    client.set_mode(ThermostatMode.AUTO)
    client.set_fan(FanMode.AUTO)

    for sensor in client.get_sensors():
        print(sensor.name, sensor.temp, sensor.humidity)

Setpoint writes are validated locally (against the device's reported min/max range and, in AUTO mode, its setpointdelta) before any network call is made — bad values from a scheduler never reach the hardware. Validation failures raise VenstarValidationError; device/API problems raise VenstarAPIError; unreachable devices raise VenstarConnectionError. All three derive from VenstarError.

Security — read this before deploying

The T8900 Local API is unauthenticated, plaintext HTTP by default. This library optionally supports a PIN (pin=) or HTTP Digest auth (user=/password=) if configured on the device, but neither is encrypted in transit. Treat network isolation as the primary control, not this library:

  • Put thermostats on an isolated VLAN/SSID per site with no general LAN/WiFi access.
  • Firewall rules so only the control host's VPN-routed IP can reach port 80 on these devices — nothing else in or out.
  • Use DHCP reservations so device IPs stay fixed (this library takes a host/IP directly; it does not implement Venstar's SSDP discovery).
  • Enable the device PIN or Digest auth as defense-in-depth, not a substitute for network isolation.

Development

python -m venv .venv
.\.venv\Scripts\python -m pip install -e ".[tests]"
.\.venv\Scripts\python -m pytest -q
.\.venv\Scripts\python -m ruff check src tests
.\.venv\Scripts\python -m mypy src

Download files

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

Source Distribution

pyvenstar-0.1.1.tar.gz (12.5 kB view details)

Uploaded Source

Built Distribution

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

pyvenstar-0.1.1-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

Details for the file pyvenstar-0.1.1.tar.gz.

File metadata

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

File hashes

Hashes for pyvenstar-0.1.1.tar.gz
Algorithm Hash digest
SHA256 1032d2766d69e6043a5c2f6923521979a84605e5d296ebf1e80e17e0ba393240
MD5 55a59b79d1c9af001b122d63133b9625
BLAKE2b-256 6cf424fc52a1df0df873331b434a26aed814b50467e387396e9e4c9e2c7fd151

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyvenstar-0.1.1.tar.gz:

Publisher: release.yml on sslivins/pyvenstar

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

File details

Details for the file pyvenstar-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: pyvenstar-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 10.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for pyvenstar-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7b30664beb5d45a272a27bc1ac7418baea8f36e4fe90a1998e78c35b497c3dc4
MD5 03fb6c4a1b595a916c71ad2f5b0f19d6
BLAKE2b-256 14df0c22d1ca86e5421cd04393f09c19fc49c3273e49244adf47a5aa7d4f99f9

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyvenstar-0.1.1-py3-none-any.whl:

Publisher: release.yml on sslivins/pyvenstar

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

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 files

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