Skip to main content

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

Links

Download files

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

Source Distribution

zencontrol_python-0.1.0.tar.gz (85.3 kB view details)

Uploaded Source

Built Distribution

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

zencontrol_python-0.1.0-py3-none-any.whl (74.1 kB view details)

Uploaded Python 3

File details

Details for the file zencontrol_python-0.1.0.tar.gz.

File metadata

  • Download URL: zencontrol_python-0.1.0.tar.gz
  • Upload date:
  • Size: 85.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.14

File hashes

Hashes for zencontrol_python-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3c2f736970becd52ae20047bdc0c440bc47f1c57c210c856831e3eb423898814
MD5 15b63b35c0d46bccd13406de646241b8
BLAKE2b-256 ad42c6694396918d86f04ec92b54fe08da4c5a8c57eba598c7b18642df37f3cd

See more details on using hashes here.

File details

Details for the file zencontrol_python-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for zencontrol_python-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 de338a5741de04b2d01d6519e255af307172181dc43e5142f907ce1bcd27bd18
MD5 b375f34a7e9f8590839cd48787132e6a
BLAKE2b-256 b1f79703dfdf09bfaffbb202f796809b8b3bf5578d2f181b11c081fe7cd78589

See more details on using hashes here.

Release history Release notifications | RSS feed

3.0.0

2 files

2.5.0

2 files

2.0.0

2 files

1.0.0

2 files

0.1.7

2 files

0.1.6

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

This release

0.1.0 This release

2 files

Supported by

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