Skip to content

Commit 4de92d2

Browse files
committed
Fix DALI protocol errors
1 parent 4676db2 commit 4de92d2

File tree

4 files changed

+213
-69
lines changed

4 files changed

+213
-69
lines changed

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ All notable changes to this project will be documented in this file.
55

66
## [15.1.0.2]
77
### Added
8-
- WS2812 and Berry animation support for reverse-order LED strip
8+
- WS2812 and Berry animation support for reverse-order LED strip (#24138)
9+
- DALI persistence for `DaliTarget` if filesystem is present
910

1011
### Breaking Changed
1112

@@ -14,6 +15,7 @@ All notable changes to this project will be documented in this file.
1415
- JPEGDEC library from v1.8.3 to v1.8.4 (#24120)
1516

1617
### Fixed
18+
- DALI protocol errors
1719

1820
### Removed
1921

RELEASENOTES.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasm
120120
- Scripter array transfer via UFS [#24060](https://github.com/arendst/Tasmota/issues/24060)
121121
- NeoPool command `NPReadLSB`, `NPReadMSB`, `NPWriteLSB`, `NWriteMSB` for directly read/write LSB/MSB of 16-bit register [#24083](https://github.com/arendst/Tasmota/issues/24083)
122122
- TLS enabled ECDSA by default for ESP8266 [#24009](https://github.com/arendst/Tasmota/issues/24009)
123+
- WS2812 and Berry animation support for reverse-order LED strip [#24138](https://github.com/arendst/Tasmota/issues/24138)
123124
- Berry `cb.free_cb` for extension manager [#24014](https://github.com/arendst/Tasmota/issues/24014)
124125
- Berry `light.get()` direct access to values [#24033](https://github.com/arendst/Tasmota/issues/24033)
125126
- Berry `gc_heap` and `gc_time` to `tasmota.memory()` [#24054](https://github.com/arendst/Tasmota/issues/24054)
@@ -139,6 +140,7 @@ The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasm
139140
- InfluxDb receives IPAddress as a value regression from v15.0.1.3 [#24031](https://github.com/arendst/Tasmota/issues/24031)
140141
- Scripter UDP and switch case [#24060](https://github.com/arendst/Tasmota/issues/24060)
141142
- TuyaMCU v1 soft lock when WIFI_SELECT / WIFI_RESET is initiated [#24063](https://github.com/arendst/Tasmota/issues/24063)
143+
- DALI protocol errors
142144
- TLS fix ECDSA and add `SetOption165 1` to enable ECDSA in addition to RSA [#24000](https://github.com/arendst/Tasmota/issues/24000)
143145
- Extension Manager exception when `OtaUrl` is not defined or invalid
144146
- Extension Manager Light Theme support and Extensions input field control

tasmota/include/xdrv_75_dali.h

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
#define DALI_GROUP_ADDRESS15 0x9E // 0b10011110 15 - Last group address
2727
#define DALI_BROADCAST_DP 0xFE // 0b11111110 254 - Broadcast address
2828

29+
// Address selector bit - Send with first byte
30+
#define DALI_SELECTOR_BIT 0x01 // Mark second byte as standard/extended command
31+
2932
/*-------------------------------------------------------------------------------------------*\
3033
* DALI Commands for IEC62386 part 102 = Control gears - Send as first byte
3134
\*-------------------------------------------------------------------------------------------*/
@@ -121,7 +124,7 @@
121124
// If the lamp is off it shall be ignited with this command.
122125
#define DALI_102_STEP_DOWN_AND_OFF 0x07 // 7 - Decrements the lighting control level and turns off lighting if the level is at the minimum (without fade).
123126
#define DALI_102_ON_AND_STEP_UP 0x08 // 8 - Increments the lighting control level and turns on lighting if lighting is off (with fade).
124-
#define DALI_102_DIRECT_ARC_POWER_CONTROL 0x09 // 9 - Enable DAPC Sequence
127+
#define DALI_102_DIRECT_ARC_POWER_CONTROL 0x09 // 9 Deprecated - Enable DAPC Sequence
125128
// Indicates the start of a command iteration of DAPC(level) commands.
126129
// The control gear shall temporarily use a fade time of 200ms while the command iteration is active independent of the actual fade/extended fade time.
127130
// The DAPC sequence shall end if 200ms elapse without the control gear receiving a DAPC(level) command.
@@ -711,7 +714,7 @@
711714
// No change shall occur if ‘COLOUR TEMPERATURE TC’ is already at ‘COLOUR TEMPERATURE TC WARMEST’.
712715
// If the new colour value does not correspond to a colour temperature attainable by the control gear, this shall be indicated by
713716
// the ‘Colour temperature TC out of range’ bit, bit 1 of the ‘COLOUR STATUS’.
714-
#define DALI_209_SET_TEMPORARY_PRIMARY_N_DIMLEVEL 0xEA // 234 - Set temporary primary N dimlevel (Uses DTR0 (LSB), DTR1 (MSB) and DTR2 (N))
717+
#define DALI_209_SET_TEMPORARY_PRIMARY_N_DIMLEVEL 0xEA // 234 Deprecated - Set temporary primary N dimlevel (Uses DTR0 (LSB), DTR1 (MSB) and DTR2 (N))
715718
// The value is expressed in units of 1/65536.
716719
// The maximum ‘PRIMARY N DIMLEVEL’ value is 0,99997 and shall be interpreted on a linear scale.
717720
// N depends on DTR2 and shall be in the range from 0 to 5 depending upon the available number of primaries.
@@ -745,13 +748,13 @@
745748

746749
// Application extended configuration commands - Send as second byte with repeat
747750
#define DALI_209_RESERVED239 0xEF // 239 - [Reserved]
748-
#define DALI_209_STORE_TY_PRIMARY_N 0xF0 // 240 - Store TY Primary N via DTR0/1/2
751+
#define DALI_209_STORE_TY_PRIMARY_N 0xF0 // 240 Deprecated - Store TY Primary N via DTR0/1/2
749752
// The value is expressed in units of 0,5 lumen resulting in a possible range of TYmin = 0 lumen, to TYmax = 32767 lumen.
750753
// A value of 65535 (“MASK”) means unknown.
751754
// N depends on DTR2 and shall be in the range from 0 to 5 depending upon the available number of primaries.
752755
// For any other value of DTR2 the command shall be ignored.
753756
// A value of “MASK” means that this primary is undefined and calibration is needed.
754-
#define DALI_209_STORE_XY_COORDINATE_PRIMARY_N 0xF1 // 241 - Store XY coord primary channel N via DTR2
757+
#define DALI_209_STORE_XY_COORDINATE_PRIMARY_N 0xF1 // 241 Deprecated - Store XY coord primary channel N via DTR2
755758
// The ‘TEMPORARY x-COORDINATE’ and the ‘TEMPORARY y-COORDINATE’, given by command 224 and command 225 shall be stored as ‘x-COORDINATE PRIMARY N’
756759
// respectively ‘y-COORDINATE PRIMARY N’ of primary N given by the value of DTR2, and shall be in the range from 0 to 5 depending upon the available number of primaries.
757760
// For any other value of DTR2 the command shall be ignored.

0 commit comments

Comments
 (0)