Command line interface to control a DALI system.
Important
This application is still in development. Use with caution. Give ample feedback.
DALI is the digital addressable lighting interface as described here.
To transmit a gear OFF command to the DALI bus you enter the following.
dali --serial-port /dev/ttyUSB0 offThis will transmit the control gear command OFF, using broadcast addressing, via an adapter connected to the serial port. Alternatively, you can use a Lunatone or BEGA adapter.
dali --hid offUsually, you will operate with a single bus interface. You can use an environment variable to set it once.
export DALI_SERIAL_PORT=/dev/ttyUSB0
dali max
dali min
dali offUse optional addressing to direct DALI commands to single controllers attached to the bus.
dali dapc 100 --adr G0Use the --help option to learn more about available commands.
dali --helpSome commands support further parameters. Again, the help option let
you explore the available commands and their usage. Note that most commands for DALI control gears are grouped under the gear command,
while control device commands are grouped under the device command.
dali gear --helpThe commands are structured like a tree. For instance the following command queries a control gear's status.
dali gear query status
status: 4 = 0x04 = 00000100b
bit : description
0 : controlGearFailure
0 : lampFailure
1 : lampOn
0 : limitError
0 : fadeRunning
0 : resetState
0 : shortAddress is MASK
0 : powerCycleSeen- Lunatone 241 389 23DO
- Lunatone 241 389 23-30
- BEGA 71024
- Serial based SevenLab Hardware
This script:
./test_dali_cli.shprepares a virtual environment, and then runs the tests. Optionally you can
add --log-level=debug for more detailed logging.
git clone [email protected]:SvenHaedrich/dali_cli.git
cd dali_cli
git submodule update --init
python3 -m venv --prompt dali .venv
source .venv/bin/activate
python3 -m pip install -e .