Skip to content

SvenHaedrich/dali_cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DALI cli

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.

Usage

To transmit a gear OFF command to the DALI bus you enter the following.

dali --serial-port /dev/ttyUSB0 off

This 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 off

Usually, 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 off

Use optional addressing to direct DALI commands to single controllers attached to the bus.

dali dapc 100 --adr G0

Use the --help option to learn more about available commands.

dali --help

Some 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 --help

The 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

Supported Hardware

Tests

This script:

./test_dali_cli.sh

prepares a virtual environment, and then runs the tests. Optionally you can add --log-level=debug for more detailed logging.

Install from github

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 .

About

Command line interface to control a DALI system

Resources

License

Stars

Watchers

Forks

Packages

No packages published