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. It also supports Device Type 8 (DT8) or Part209 RGBWAF color control using standard Tasmota light controls.
Connecting several Tasmota DALI gateways to the same bus is supported. It will synchronise the GUI if configured equally or allow control of different lights 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.
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.
Waveshare Pico DALI2~
This DALI2 expansion Module for ESP32-Pico series boards works fine with a Waveshare ESP32-S3-Pico using GPIO14 as DALI RX and GPIO17 as DALI TX_i.
The Waveshare ESP32-C6-Pico also works fine using GPIO5 as DALI RX and GPIO14 as DALI TX_i.
For best result you'll need to isolate GPIO4 (pin 4) from the Pico DALI2. The ESP32-C6-Pico GPIO4 is hardwired to it's USB Type-C interface input voltage using a resistor bridge and is supposed to be used as an ADC input to measure voltage. The Pico DALI2 uses the same pin for high voltage DALI receive input. It seems to interfere with the data on GPIO5 resulting in no DALI signal detection. An easy fix is to remove pin 4 from the ESP32-C6-Pico header.
Shelly DALI Dimmer Gen3~
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}
Backlog AdcGpio1 10000,10000,4000; ButtonTopic 0; SetOption1 1; SetOption11 0; SetOption32 20; DimmerStep 5; LedTable 0
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
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}
Commands~
DALI ballasts~
I've tested Tasmota DALI with several DALI-2 DT6 certified ballasts like inbuild ceiling LEDs and larger LED panels. It also works with DT8 color LED ballasts.
MiBoxer DALI 5 in 1 LED controller (DT8)~
This controller is not a certified DALI ballast but it will work with Tasmota DALI. Do not try to commission the DALI bus when it is connected as it will likely fail.
The controller is tested with an RGB led strip using it's default configuration and a user selected short address. With a short address set to 11 and using the following commands once will enable Tasmota light control:
DaliTarget 12
DaliChannels 3
DaliLight 1
Using two or more devices in a group also works fine. Execute the following commands assuming the second controller has a short address of 12:
Daligroup1 12,13
DaliTarget 101
The numbering for Tasmota short adresses is from 1 to 64 and group addresses from 101 to 116.