Skip to content

DALI

This feature is included in tasmota32 binaries

When compiling your build add the following to user_config_override.h:

#ifndef USE_DALI
#define USE_DALI        // Add support for DALI gateway (+5k code)
#endif

What is DALI?~

Digital Addressable Lighting Interface (DALI) is a trademark for network-based products that control lighting.

A DALI network consists of at least one application controller and bus power supply (which may be built into any of the products) as well as input devices (e.g. sensors and push-buttons), control gear (e.g., electrical ballasts, LED drivers and dimmers) with DALI interfaces.

Application controllers can control, configure or query each device by means of a bi-directional data exchange. Unlike DMX, multiple controllers can co-exist on the bus.

The DALI protocol permits addressing devices individually, in groups or via broadcast.

Scenes can be stored in the devices, for recall on an individual, group or broadcast basis. Groups and scenes are used to ensure simultaneous execution of level changes, since each packet requires about 25 ms - or 1.5 seconds if all 64 addresses were to change level.

Implemented Features~

Tasmota DALI gateway is an application controller. It defaults to supporting Device Type 6 (DT6) or Part207 single color LED lighting controller using standard Tasmota light controls.

Hardware~

The driver is supported on both ESP8266 and ESP32. A possible DALI interface could look like this as used on the DALI 2 Click. Dali On the left side is the connection, TB1, to the DALI bus which should provide a voltage between 16V to 22.5V DC. On the right side is the connection to an ESP device where wires are connected according to the table:

DALI interface ESP device
VCC 3V3
DALI_TX DALI TX_i
DALI_RX DALI RX_i
GND GND

MikroE DALI Click~

Initial implementation has been performed using DALI Click with GPIO settings DALI TX and DALI RX and a Busch-Jaeger Rotary dimmer acting as a DALI bus power supply.

MikroE DALI 2 Click~

A redesigned version called DALI 2 Click also works fine whith GPIO settings DALI TX_i and DALI RX_i.

Shelly DALI Dimmer Gen3~

ShellyDali The ESP32-C3 based Shelly DALI Dimmer Gen3 is supported using template

{"NAME":"Shelly DALI Dimmer Gen3","GPIO":[34,4736,0,3840,11360,11392,128,129,0,1,576,0,0,0,0,0,0,0,0,1,1,1],"FLAG":0,"BASE":1}
and additional commands
Backlog AdcGpio1 10000,10000,4000; ButtonTopic 0; SetOption1 1; SetOption11 0; SetOption32 20; DimmerStep 5; LedTable 0
The following rule
rule1 on button1#state=2 do dimmer + endon on button2#state=2 do dimmer - endon on button1#state=3 do power 2 endon on button2#state=3 do power 2 endon
allows dimmer control using two buttons.

Notice that the Shelly DALI dimmer uses inverted DALI GPIO's DALI TX_i and DALI_RX_i and provides a limited DALI bus power supply of 10mA, enough for 5 DALI control gear.

To add Shelly DALI Dimmer to a bus powered environment it's best to disable the internal Shelly power supply. In that case use template (changed GPIO3)

{"NAME":"Shelly DALI Dimmer Gen3 (No power)","GPIO":[34,4736,0,3872,11360,11392,128,129,0,1,576,0,0,0,0,0,0,0,0,1,1,1],"FLAG":0,"BASE":1}
In addition you can easily remove the Shelly power supply assembly from the main board.

Commands~

Command Parameters
DaliSend Low level DALI control.

<byte1\>,<byte2\> = Execute DALI code and do not expect a DALI backward frame.
<0xA3\>,<byte2\>,<byte3\>,<byte4\> = Set DALI parameter using DTR0 and do not expect a DALI backward frame.
DaliQuery Low level DALI control with expected response.

<byte1\>,<byte2\> = Execute DALI code and report result (DALI backward frame).
DaliScan Sequential address assignment using commissioning protocol. This resets parameters stored on the control gear.

1 = Reset and commission new device addresses.
2 = Reset and commission additional device addresses.
DaliGear To reduce DaliGroup response time set the max commissionned control gear address.

Display current max address.
1..64 = Set max address (default = 64).
DaliGroup<x> Add or remove control gear to/from up to 16 groups.

Display current group contents.
[+]<device\>,<device\>... = Add devices to group.
-<device\>,<device\>... = Remove devices from group.

<x> = 1 to 16.
DaliGroupSliders Add or remove group sliders from the GUI when in DaliLight 0 mode.

Display current groupsliders amount.
1..16 = Number of groupsliders to display.
DaliPower<x> Control power to broadcast or any control gear or group.

Display current power state.
0 = Turn power off.
1 = Restore power to last dimmer value.
2 = Toggle power.
3 to 254 = Set absolute brightness.

<x> = 0 for broadcast, 1 to 64 for individual gear or 101 to 116 for group.
DaliDimmer<x> Control dimmer to broadcast or any control gear or group.

Display current dimmer state.
0 = Turn power off.
1 to 100 = Percentage of brightness.

<x> = 0 for broadcast, 1 to 64 for individual gear or 101 to 116 for group.
DaliLight Switch between DALI or Tasmota Light control. The latter allows for the DALI lighting to be controlled as a local light by any Tasmota protocol like Matter, Alexa, Hue and KNX.

Display current state.
0 = Disable Tasmota light control for DaliTarget device.
1 = Enable Tasmota light control for DaliTarget device (default).
DaliTarget Select DALI target to be used when DaliLight is enabled.

Display current target.
0 = Broadcast (default).
1 to 64 = Individual gear.
101 to 116 = group.