feat: Enhance DALI Gateway with RGBW and RGBCW support

- Added support for RGBW and RGBCW color modes in the DALI Gateway.
- Updated JSON color mode parsing to handle new color types.
- Extended the StoreDt8SceneSnapshot function to include white, amber, and free color parameters.
- Introduced new methods in DaliGatewayBridge for setting RGBW, RGBCW, and RGBWAF colors.
- Modified KnxDaliChannel to send RGBW and RGBCW colors based on the color type.
- Updated parameter types and definitions in the KNX product XML files to accommodate new color modes.
- Enhanced README with migration details and validation instructions.

Signed-off-by: Tony <tonylu@tony-cloud.com>
This commit is contained in:
Tony
2026-05-29 11:32:10 +08:00
parent f39ae6f0c6
commit c60ef2ccde
19 changed files with 554 additions and 18 deletions
@@ -76,6 +76,11 @@ class DaliGatewayBridge {
bool setColourTemperature(int short_address, int kelvin) const;
bool setColourRGB(int short_address, uint8_t r, uint8_t g, uint8_t b) const;
bool setColourRGBW(int short_address, uint8_t r, uint8_t g, uint8_t b, uint8_t w) const;
bool setColourRGBCW(int short_address, uint8_t r, uint8_t g, uint8_t b,
uint8_t cool_white, uint8_t warm_white) const;
bool setColourRGBWAF(int short_address, uint8_t r, uint8_t g, uint8_t b, uint8_t w,
uint8_t amber, uint8_t freecolour, uint8_t control) const;
std::optional<DaliDomainSnapshot> dt8StatusSnapshot(int short_address) const;
std::optional<DaliDomainSnapshot> dt8SceneColorReport(int short_address, int scene) const;
+8 -2
View File
@@ -1,6 +1,10 @@
#pragma once
#include <stdint.h>
#if __has_include("sdkconfig.h")
#include "sdkconfig.h"
#endif
#ifndef CONFIG_GATEWAY_KNX_OEM_MANUFACTURER_ID
#define CONFIG_GATEWAY_KNX_OEM_MANUFACTURER_ID 0x00A4
@@ -11,12 +15,12 @@
#endif
#ifndef CONFIG_GATEWAY_KNX_OEM_APPLICATION_VERSION
#define CONFIG_GATEWAY_KNX_OEM_APPLICATION_VERSION 0x08
#define CONFIG_GATEWAY_KNX_OEM_APPLICATION_VERSION 0x09
#endif
// Minimal stub for knxprod.h — generated KNX product definitions.
// The full file (1796 bytes of parameters, 1439 group objects) will be
// adapted in Phase 3 to use the gateway/knx API directly.
// replaced by the OpenKNXproducer-generated header.
// Product identity
#define MAIN_OpenKnxId (CONFIG_GATEWAY_KNX_OEM_MANUFACTURER_ID & 0xff)
@@ -45,6 +49,8 @@ enum PT_ColorType : uint8_t {
PT_colorType_RGB = 1,
PT_colorType_TW = 2,
PT_colorType_XYY = 3,
PT_colorType_RGBW = 4,
PT_colorType_RGBCW = 5,
};
enum PT_ColorSpace : uint8_t {