python-dali
Library for controlling DALI lighting systems
A Python library for controlling DALI-standard smart lighting, dim, switch, and coordinate lights, sensors, and buttons through code instead of manual setup.
What This Library Does
This library lets you control smart lighting systems using Python code. If you have a building with DALI-compatible lights—like LED dimmers, fluorescent ballasts, or motion sensors—you can write a program to dim them, turn them on and off, check their status, and coordinate them all together. Instead of manually configuring each light or button, you automate it.
How It Works
DALI is an international standard (IEC 62386) that defines how lighting control equipment should communicate with each other. Think of it like a common language for lights and switches. This library translates that language into Python commands you can use in your own programs. You tell the library "dim this light to 50 percent" or "turn off all lights in zone 3," and it handles the technical details of sending the right signals to your lighting hardware.
The library also supports different types of equipment: LED modules, emergency lighting, fluorescent lamps, and various sensors like occupancy detectors and push buttons. It connects to physical lighting control gateways—devices that bridge your computer to the actual light hardware—supporting several popular models like Tridonic DALI USB and Hasseb DALI Master.
Who Uses It and Why
Building automation specialists, lighting instalants, and smart home developers use this library to create custom control systems. For example, a hotel might use it to automatically adjust hallway lighting based on occupancy sensors, or an office might create scenes that change lighting throughout the day. Anyone integrating DALI lighting into a larger automation platform would benefit from having a clean Python interface instead of writing low-level communication code from scratch.
What's Notable
The library is organized into clear sections for different equipment types and uses. Some parts are considered stable and ready for production (like addressing and commands), while others are still evolving. The project is designed to be extended—if a new type of DALI equipment comes out, you can add support without rewriting everything.
Where it fits
- Dim or switch DALI lights in a building from a Python script.
- Build occupancy-based lighting scenes for offices or hotels.
- Integrate DALI lighting control into a larger smart home platform.
- Add support for new DALI equipment types as they come out.