zencontrol-python
This is an implementation of the Zencontrol TPI Advanced protocol, written in Python. This library has been written with three levels of abstraction:
- zencontrol.io: Implementation of the raw TPI Advanced UDP packet specification;
- zencontrol.api: Implementation of most TPI Advanced API commands and events;
- zencontrol.interface: An opinionated abstraction layer suitable for integration into smart building control software. It provides methods, objects, and callbacks for managing lights, groups, profiles, buttons, motion sensors, and system variables. This code is still undergoing significant refinement.
Built on top of this is an example MQTT bridge for Home Assistant. See examples/mqtt_bridge.md.
Requirements
- Python 3.11 (or later)
- Controller firmware 2.2.11 (or later)
Install
Refer to zencontrol-tpi project for now. For integrators, the library is also published on PyPI.
Limitations
Implemented but untested:
- Dealing with multiple controllers (I only have one controller)
- RGB+ and XY colour commands (I don't have any compatible lights)
- Numerical (absolute) instances (I don't have any such ECDs)
- Event filtering (I haven't tested it)
Not implemented:
- Any commands involving DMX, Control4, or virtual instances (I don't have licenses for any of these so I couldn't test them even if I wanted to, but the scaffolding is there if anyone wishes to add support)
- Any commands described in the documentation as "legacy" (they aren't useful)
TPI Advanced wishlist
- Command to return a controller's MAC address used for multicast packets (There are other ways to get or infer the MAC access, but they're unreliable.)
- Command to list active system variables (As a workaround, you can query every number for its label. This assumes no system variables of interest are unlabelled.)
- Command to read an ambient light sensor's lux value. (As a workaround, you can target a light sensor to a system variable. Not elegant but it works.)
- Event notification for ambient light sensor lux values. (Same workaround as above.)
License
Links
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file zencontrol_python-0.1.1.tar.gz.
File metadata
- Download URL: zencontrol_python-0.1.1.tar.gz
- Upload date:
- Size: 80.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bf29177c92745de1d0dd13c16fddd7cdaf66d253235a28cb149044bb0b6df43c
|
|
| MD5 |
7709af200976d5ac0a6c3af946d95da9
|
|
| BLAKE2b-256 |
2777d19170e148cca97057d2f004348143a20ade0a588a006d271f92027d17ad
|
File details
Details for the file zencontrol_python-0.1.1-py3-none-any.whl.
File metadata
- Download URL: zencontrol_python-0.1.1-py3-none-any.whl
- Upload date:
- Size: 67.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
81752460b77a58827aecefa4bfa86661c2f37cc56f25e5c861b09de2d8fcba30
|
|
| MD5 |
a09d78262f54fcd5a758a81b6299b936
|
|
| BLAKE2b-256 |
fa533c7ede2a60dde7ddc4a68829645975aaeeba3dd9437d7faaa7b8126c89b6
|