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
@@ -0,0 +1,52 @@
<?xml version="1.0" encoding="utf-8" ?>
<KNX xmlns="http://knx.org/xml/project/20" xmlns:op="http://github.com/OpenKNX/OpenKNXproducer">
<ManufacturerData>
<Manufacturer RefId="M-00FA">
<ApplicationPrograms>
<ApplicationProgram>
<Static>
<Parameters>
<Parameter Id="%AID%_P-%TT%%CC%001" Name="colorType%C%" ParameterType="%AID%_PT-ColorType" Text="Address %C% colour type" Value="2">
<Property ObjectType="160" PropertyId="201" Offset="%C-1%" BitOffset="0" />
</Parameter>
</Parameters>
<ParameterRefs>
<ParameterRef Id="%AID%_P-%TT%%CC%001_R-%TT%%CC%00101" RefId="%AID%_P-%TT%%CC%001" />
</ParameterRefs>
<ComObjectTable>
<ComObject Id="%AID%_O-%TT%%CC%001" Number="%K0%" Name="Address %C% switch" Text="Switch" FunctionText="Switch" DatapointType="DPST-1-1" ObjectSize="1 Bit" Priority="Low" ReadFlag="false" WriteFlag="true" CommunicationFlag="true" TransmitFlag="false" UpdateFlag="false" />
<ComObject Id="%AID%_O-%TT%%CC%002" Number="%K1%" Name="Address %C% brightness" Text="Brightness" FunctionText="Brightness" DatapointType="DPST-5-1" ObjectSize="1 Byte" Priority="Low" ReadFlag="false" WriteFlag="true" CommunicationFlag="true" TransmitFlag="false" UpdateFlag="false" />
<ComObject Id="%AID%_O-%TT%%CC%003" Number="%K2%" Name="Address %C% RGB colour" Text="RGB colour" FunctionText="RGB colour" DatapointType="DPST-232-600" ObjectSize="3 Bytes" Priority="Low" ReadFlag="false" WriteFlag="true" CommunicationFlag="true" TransmitFlag="false" UpdateFlag="false" />
<ComObject Id="%AID%_O-%TT%%CC%004" Number="%K3%" Name="Address %C% RGBW colour" Text="RGBW colour" FunctionText="RGBW colour" DatapointType="DPST-251-600" ObjectSize="6 Bytes" Priority="Low" ReadFlag="false" WriteFlag="true" CommunicationFlag="true" TransmitFlag="false" UpdateFlag="false" />
<ComObject Id="%AID%_O-%TT%%CC%005" Number="%K4%" Name="Address %C% RGBCW colour" Text="RGBCW colour" FunctionText="RGBCW colour" DatapointType="DPST-251-600" ObjectSize="6 Bytes" Priority="Low" ReadFlag="false" WriteFlag="true" CommunicationFlag="true" TransmitFlag="false" UpdateFlag="false" />
<ComObject Id="%AID%_O-%TT%%CC%006" Number="%K5%" Name="Address %C% colour temperature" Text="Colour temperature" FunctionText="Colour temperature" DatapointType="DPST-7-600" ObjectSize="2 Bytes" Priority="Low" ReadFlag="false" WriteFlag="true" CommunicationFlag="true" TransmitFlag="false" UpdateFlag="false" />
</ComObjectTable>
<ComObjectRefs>
<ComObjectRef Id="%AID%_O-%TT%%CC%001_R-%TT%%CC%00101" RefId="%AID%_O-%TT%%CC%001" />
<ComObjectRef Id="%AID%_O-%TT%%CC%002_R-%TT%%CC%00201" RefId="%AID%_O-%TT%%CC%002" />
<ComObjectRef Id="%AID%_O-%TT%%CC%003_R-%TT%%CC%00301" RefId="%AID%_O-%TT%%CC%003" />
<ComObjectRef Id="%AID%_O-%TT%%CC%004_R-%TT%%CC%00401" RefId="%AID%_O-%TT%%CC%004" />
<ComObjectRef Id="%AID%_O-%TT%%CC%005_R-%TT%%CC%00501" RefId="%AID%_O-%TT%%CC%005" />
<ComObjectRef Id="%AID%_O-%TT%%CC%006_R-%TT%%CC%00601" RefId="%AID%_O-%TT%%CC%006" />
</ComObjectRefs>
</Static>
<Dynamic>
<ChannelIndependentBlock>
<ParameterBlock Id="%AID%_PB-ADR%CC%" Text="DALI address %C%" Inline="true" Layout="Grid">
<Rows>
<Row Id="%AID%_PB-ADR%CC%_R-1" />
</Rows>
<Columns>
<Column Id="%AID%_PB-ADR%CC%_C-1" Width="30%" />
<Column Id="%AID%_PB-ADR%CC%_C-2" Width="70%" />
</Columns>
<ParameterSeparator Id="%AID%_PS-ADR%CC%" Text="DALI address %C%" Cell="1,1" />
<ParameterRefRef RefId="%AID%_P-%TT%%CC%001_R-%TT%%CC%00101" Cell="1,2" />
</ParameterBlock>
</ChannelIndependentBlock>
</Dynamic>
</ApplicationProgram>
</ApplicationPrograms>
</Manufacturer>
</ManufacturerData>
</KNX>
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8" ?>
<KNX xmlns="http://knx.org/xml/project/20" xmlns:op="http://github.com/OpenKNX/OpenKNXproducer">
<ManufacturerData>
<Manufacturer RefId="M-00FA">
<ApplicationPrograms>
<ApplicationProgram>
<Static>
<ParameterTypes>
<ParameterType Id="%AID%_PT-ColorType" Name="ColorType">
<TypeRestriction Base="Value" SizeInBit="%DALI_ColorTypeBits%">
<Enumeration Id="%AID%_PT-ColorType_EN-0" Text="HSV" Value="0" />
<Enumeration Id="%AID%_PT-ColorType_EN-1" Text="RGB" Value="1" />
<Enumeration Id="%AID%_PT-ColorType_EN-2" Text="Tunable white" Value="2" />
<Enumeration Id="%AID%_PT-ColorType_EN-3" Text="xyY" Value="3" />
<Enumeration Id="%AID%_PT-ColorType_EN-4" Text="RGBW" Value="4" />
<Enumeration Id="%AID%_PT-ColorType_EN-5" Text="RGBCW" Value="5" />
</TypeRestriction>
</ParameterType>
</ParameterTypes>
</Static>
</ApplicationProgram>
</ApplicationPrograms>
</Manufacturer>
</ManufacturerData>
</KNX>
@@ -0,0 +1,52 @@
<?xml version="1.0" encoding="utf-8" ?>
<KNX xmlns="http://knx.org/xml/project/20" xmlns:op="http://github.com/OpenKNX/OpenKNXproducer">
<ManufacturerData>
<Manufacturer RefId="M-00FA">
<ApplicationPrograms>
<ApplicationProgram>
<Static>
<Parameters>
<Parameter Id="%AID%_P-%TT%%CC%001" Name="colorType%C%" ParameterType="%AID%_PT-ColorType" Text="Group %C% colour type" Value="2">
<Property ObjectType="161" PropertyId="201" Offset="%C-1%" BitOffset="0" />
</Parameter>
</Parameters>
<ParameterRefs>
<ParameterRef Id="%AID%_P-%TT%%CC%001_R-%TT%%CC%00101" RefId="%AID%_P-%TT%%CC%001" />
</ParameterRefs>
<ComObjectTable>
<ComObject Id="%AID%_O-%TT%%CC%001" Number="%K0%" Name="Group %C% switch" Text="Switch" FunctionText="Switch" DatapointType="DPST-1-1" ObjectSize="1 Bit" Priority="Low" ReadFlag="false" WriteFlag="true" CommunicationFlag="true" TransmitFlag="false" UpdateFlag="false" />
<ComObject Id="%AID%_O-%TT%%CC%002" Number="%K1%" Name="Group %C% brightness" Text="Brightness" FunctionText="Brightness" DatapointType="DPST-5-1" ObjectSize="1 Byte" Priority="Low" ReadFlag="false" WriteFlag="true" CommunicationFlag="true" TransmitFlag="false" UpdateFlag="false" />
<ComObject Id="%AID%_O-%TT%%CC%003" Number="%K2%" Name="Group %C% RGB colour" Text="RGB colour" FunctionText="RGB colour" DatapointType="DPST-232-600" ObjectSize="3 Bytes" Priority="Low" ReadFlag="false" WriteFlag="true" CommunicationFlag="true" TransmitFlag="false" UpdateFlag="false" />
<ComObject Id="%AID%_O-%TT%%CC%004" Number="%K3%" Name="Group %C% RGBW colour" Text="RGBW colour" FunctionText="RGBW colour" DatapointType="DPST-251-600" ObjectSize="6 Bytes" Priority="Low" ReadFlag="false" WriteFlag="true" CommunicationFlag="true" TransmitFlag="false" UpdateFlag="false" />
<ComObject Id="%AID%_O-%TT%%CC%005" Number="%K4%" Name="Group %C% RGBCW colour" Text="RGBCW colour" FunctionText="RGBCW colour" DatapointType="DPST-251-600" ObjectSize="6 Bytes" Priority="Low" ReadFlag="false" WriteFlag="true" CommunicationFlag="true" TransmitFlag="false" UpdateFlag="false" />
<ComObject Id="%AID%_O-%TT%%CC%006" Number="%K5%" Name="Group %C% colour temperature" Text="Colour temperature" FunctionText="Colour temperature" DatapointType="DPST-7-600" ObjectSize="2 Bytes" Priority="Low" ReadFlag="false" WriteFlag="true" CommunicationFlag="true" TransmitFlag="false" UpdateFlag="false" />
</ComObjectTable>
<ComObjectRefs>
<ComObjectRef Id="%AID%_O-%TT%%CC%001_R-%TT%%CC%00101" RefId="%AID%_O-%TT%%CC%001" />
<ComObjectRef Id="%AID%_O-%TT%%CC%002_R-%TT%%CC%00201" RefId="%AID%_O-%TT%%CC%002" />
<ComObjectRef Id="%AID%_O-%TT%%CC%003_R-%TT%%CC%00301" RefId="%AID%_O-%TT%%CC%003" />
<ComObjectRef Id="%AID%_O-%TT%%CC%004_R-%TT%%CC%00401" RefId="%AID%_O-%TT%%CC%004" />
<ComObjectRef Id="%AID%_O-%TT%%CC%005_R-%TT%%CC%00501" RefId="%AID%_O-%TT%%CC%005" />
<ComObjectRef Id="%AID%_O-%TT%%CC%006_R-%TT%%CC%00601" RefId="%AID%_O-%TT%%CC%006" />
</ComObjectRefs>
</Static>
<Dynamic>
<ChannelIndependentBlock>
<ParameterBlock Id="%AID%_PB-GRP%CC%" Text="DALI group %C%" Inline="true" Layout="Grid">
<Rows>
<Row Id="%AID%_PB-GRP%CC%_R-1" />
</Rows>
<Columns>
<Column Id="%AID%_PB-GRP%CC%_C-1" Width="30%" />
<Column Id="%AID%_PB-GRP%CC%_C-2" Width="70%" />
</Columns>
<ParameterSeparator Id="%AID%_PS-GRP%CC%" Text="DALI group %C%" Cell="1,1" />
<ParameterRefRef RefId="%AID%_P-%TT%%CC%001_R-%TT%%CC%00101" Cell="1,2" />
</ParameterBlock>
</ChannelIndependentBlock>
</Dynamic>
</ApplicationProgram>
</ApplicationPrograms>
</Manufacturer>
</ManufacturerData>
</KNX>
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8" ?>
<KNX xmlns="http://knx.org/xml/project/20" xmlns:op="http://github.com/OpenKNX/OpenKNXproducer">
<ManufacturerData>
<Manufacturer RefId="M-00FA">
<ApplicationPrograms>
<ApplicationProgram>
<Static>
<ParameterTypes>
<ParameterType Id="%AID%_PT-Bool" Name="Bool">
<TypeRestriction Base="Value" SizeInBit="1">
<Enumeration Id="%AID%_PT-Bool_EN-0" Text="Disabled" Value="0" />
<Enumeration Id="%AID%_PT-Bool_EN-1" Text="Enabled" Value="1" />
</TypeRestriction>
</ParameterType>
</ParameterTypes>
</Static>
</ApplicationProgram>
</ApplicationPrograms>
</Manufacturer>
</ManufacturerData>
</KNX>
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8" ?>
<KNX xmlns="http://knx.org/xml/project/20" xmlns:op="http://github.com/OpenKNX/OpenKNXproducer">
<ManufacturerData>
<Manufacturer RefId="M-00FA">
<ApplicationPrograms>
<ApplicationProgram>
<Static>
<Parameters>
<Parameter Id="%AID%_P-%TT%%CC%001" Name="curveEnabled%C%" ParameterType="%AID%_PT-Bool" Text="HCL curve %C% enabled" Value="0">
<Property ObjectType="162" PropertyId="201" Offset="%C-1%" BitOffset="0" />
</Parameter>
</Parameters>
<ParameterRefs>
<ParameterRef Id="%AID%_P-%TT%%CC%001_R-%TT%%CC%00101" RefId="%AID%_P-%TT%%CC%001" />
</ParameterRefs>
</Static>
<Dynamic>
<ChannelIndependentBlock>
<ParameterBlock Id="%AID%_PB-HCL%CC%" Text="HCL curve %C%" Inline="true" Layout="Grid">
<Rows>
<Row Id="%AID%_PB-HCL%CC%_R-1" />
</Rows>
<Columns>
<Column Id="%AID%_PB-HCL%CC%_C-1" Width="30%" />
<Column Id="%AID%_PB-HCL%CC%_C-2" Width="70%" />
</Columns>
<ParameterSeparator Id="%AID%_PS-HCL%CC%" Text="HCL curve %C%" Cell="1,1" />
<ParameterRefRef RefId="%AID%_P-%TT%%CC%001_R-%TT%%CC%00101" Cell="1,2" />
</ParameterBlock>
</ChannelIndependentBlock>
</Dynamic>
</ApplicationProgram>
</ApplicationPrograms>
</Manufacturer>
</ManufacturerData>
</KNX>
@@ -0,0 +1,75 @@
<?xml version="1.0" encoding="utf-8" ?>
<KNX xmlns="http://knx.org/xml/project/20" xmlns:op="http://github.com/OpenKNX/OpenKNXproducer">
<ManufacturerData>
<Manufacturer RefId="M-00FA">
<Catalog>
<CatalogSection Id="M-00FA_CS-DALI" Name="DALI" Number="DALI" DefaultLanguage="en-US">
<CatalogItem Id="%CatalogItemId%" Name="OpenKNX: %ProductName%%BuildSuffixText%" Number="1" ProductRefId="%ProductId%" Hardware2ProgramRefId="%Hardware2ProgramId%" DefaultLanguage="en-US" />
</CatalogSection>
</Catalog>
<ApplicationPrograms>
<op:version OpenKnxId="%OpenKnxId%" ApplicationNumber="%ApplicationNumber%" ApplicationVersion="%ApplicationVersion%" ReplacesVersions="%ReplacesVersions%" ApplicationRevision="%ApplicationRevision%" FirmwareRevision="%FirmwareRevision%" />
<ApplicationProgram Id="%AID%" ProgramType="ApplicationProgram" MaskVersion="%MaskVersion%" Name="%ApplicationName%%BuildSuffix%" LoadProcedureStyle="MergedProcedure" PeiType="0" DefaultLanguage="en-US" IsSecureEnabled="false" DynamicTableManagement="false" Linkable="false" MinEtsVersion="6.0" ApplicationNumber="0" ApplicationVersion="0" ReplacesVersions="0">
<Static>
<Code>
<AbsoluteSegment Id="%AID%_AS-0100" Address="256" Size="1024" />
</Code>
<ParameterTypes>
<op:includetemplate href="%share%" xpath="//ApplicationProgram/Static/ParameterTypes/ParameterType" prefix="%prefix%" />
</ParameterTypes>
<Parameters>
<op:includetemplate href="%share%" xpath="//ApplicationProgram/Static/Parameters/Parameter|//ApplicationProgram/Static/Parameters/Union" prefix="%prefix%" />
<op:includetemplate href="%templ%" xpath="//ApplicationProgram/Static/Parameters/Parameter|//ApplicationProgram/Static/Parameters/Union" type="template" prefix="%prefix%" />
</Parameters>
<ParameterRefs>
<op:includetemplate href="%share%" xpath="//ApplicationProgram/Static/ParameterRefs/ParameterRef" prefix="%prefix%" />
<op:includetemplate href="%templ%" xpath="//ApplicationProgram/Static/ParameterRefs/ParameterRef" type="template" prefix="%prefix%" />
</ParameterRefs>
<AddressTable MaxEntries="2047" />
<AssociationTable MaxEntries="2047" />
<ComObjectTable>
<op:includetemplate href="%share%" xpath="//ApplicationProgram/Static/ComObjectTable/ComObject" prefix="%prefix%" />
<op:includetemplate href="%templ%" xpath="//ApplicationProgram/Static/ComObjectTable/ComObject" type="template" prefix="%prefix%" />
</ComObjectTable>
<ComObjectRefs>
<op:includetemplate href="%share%" xpath="//ApplicationProgram/Static/ComObjectRefs/ComObjectRef" prefix="%prefix%" />
<op:includetemplate href="%templ%" xpath="//ApplicationProgram/Static/ComObjectRefs/ComObjectRef" type="template" prefix="%prefix%" />
</ComObjectRefs>
<LoadProcedures>
<LoadProcedure MergeId="4">
<LdCtrlWriteMem Address="256" Size="1024" Verify="true" />
</LoadProcedure>
</LoadProcedures>
<Messages>
<op:includetemplate href="%share%" xpath="//ApplicationProgram/Static/Messages/*" prefix="%prefix%" />
</Messages>
<Options Comparable="true" Reconstructable="true" DownloadInvisibleParameters="None" />
</Static>
<ModuleDefs>
<op:includetemplate href="%share%" xpath="//ApplicationProgram/ModuleDefs/*" prefix="%prefix%" />
<op:includetemplate href="%templ%" xpath="//ApplicationProgram/ModuleDefs/*" type="template" prefix="%prefix%" />
</ModuleDefs>
<Dynamic>
<op:includetemplate href="%share%" xpath="//Dynamic/*" prefix="%prefix%" />
<op:includetemplate href="%templ%" xpath="//Dynamic/*" type="template" prefix="%prefix%" />
</Dynamic>
</ApplicationProgram>
</ApplicationPrograms>
<Hardware>
<Hardware Id="%HardwareId%" Name="OpenKNX-%HardwareName%%BuildSuffix%" SerialNumber="%SerialNumber%" VersionNumber="1" BusCurrent="%BusCurrent%" HasIndividualAddress="true" HasApplicationProgram="true">
<Products>
<Product Id="%ProductId%" Text="OpenKNX: %ProductName%%BuildSuffixText%" OrderNumber="%OrderNumber%" IsRailMounted="%IsRailMounted%" WidthInMillimeter="72" DefaultLanguage="en-US">
<RegistrationInfo RegistrationStatus="Registered" />
</Product>
</Products>
<Hardware2Programs>
<Hardware2Program Id="%Hardware2ProgramId%" MediumTypes="%MediumTypes%">
<ApplicationProgramRef RefId="%AID%" />
<RegistrationInfo RegistrationStatus="Registered" RegistrationNumber="0001/%HardwareVersionEncoded%1" />
</Hardware2Program>
</Hardware2Programs>
</Hardware>
</Hardware>
</Manufacturer>
</ManufacturerData>
</KNX>
@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="utf-8" ?>
<KNX xmlns="http://knx.org/xml/project/20" xmlns:op="http://github.com/OpenKNX/OpenKNXproducer">
<ManufacturerData>
<Manufacturer RefId="M-00FA">
<ApplicationPrograms>
<ApplicationProgram>
<Static>
<ParameterTypes>
<ParameterType Id="%AID%_PT-Bool" Name="Bool">
<TypeRestriction Base="Value" SizeInBit="1">
<Enumeration Id="%AID%_PT-Bool_EN-0" Text="Disabled" Value="0" />
<Enumeration Id="%AID%_PT-Bool_EN-1" Text="Enabled" Value="1" />
</TypeRestriction>
</ParameterType>
<ParameterType Id="%AID%_PT-ColorType" Name="ColorType">
<TypeRestriction Base="Value" SizeInBit="%DALI_ColorTypeBits%">
<Enumeration Id="%AID%_PT-ColorType_EN-0" Text="HSV" Value="0" />
<Enumeration Id="%AID%_PT-ColorType_EN-1" Text="RGB" Value="1" />
<Enumeration Id="%AID%_PT-ColorType_EN-2" Text="Tunable white" Value="2" />
<Enumeration Id="%AID%_PT-ColorType_EN-3" Text="xyY" Value="3" />
<Enumeration Id="%AID%_PT-ColorType_EN-4" Text="RGBW" Value="4" />
<Enumeration Id="%AID%_PT-ColorType_EN-5" Text="RGBCW" Value="5" />
</TypeRestriction>
</ParameterType>
<ParameterType Id="%AID%_PT-Level" Name="Level">
<TypeRestriction Base="Value" SizeInBit="8" />
</ParameterType>
<ParameterType Id="%AID%_PT-Kelvin" Name="Kelvin">
<TypeNumber SizeInBit="16" Type="unsignedInt" minInclusive="1000" maxInclusive="20000" />
</ParameterType>
</ParameterTypes>
<ComObjectTable />
<ComObjectRefs />
<ParameterRefs />
</Static>
<Dynamic>
<ChannelIndependentBlock>
<ParameterBlock Id="%AID%_PB-DALI-Main" Text="DALI Gateway" Inline="true" Layout="Grid">
<Rows>
<Row Id="%AID%_PB-DALI-Main_R-1" />
</Rows>
<Columns>
<Column Id="%AID%_PB-DALI-Main_C-1" Width="100%" />
</Columns>
<ParameterSeparator Id="%AID%_PS-DALI-Main" Text="DALI Gateway" Cell="1,1" />
</ParameterBlock>
</ChannelIndependentBlock>
</Dynamic>
</ApplicationProgram>
</ApplicationPrograms>
</Manufacturer>
</ManufacturerData>
</KNX>
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8" ?>
<KNX xmlns="http://knx.org/xml/project/20" xmlns:op="http://github.com/OpenKNX/OpenKNXproducer">
<op:config name="%DALI_AddressChannels%" value="64" />
<op:config name="%DALI_GroupChannels%" value="16" />
<op:config name="%DALI_HclCurves%" value="3" />
<op:config name="%DALI_ColorTypeBits%" value="3" />
<op:ETS OpenKnxId="0xA4"
ApplicationNumber="1"
ApplicationVersion="0.9"
ReplacesVersions="0.8 0.5"
ApplicationRevision="0"
ProductName="DALI Gateway"
SerialNumber="0xA401"
OrderNumber="REG1-Dali"
ApplicationName="DALI Gateway"
IsRailMounted="true"
BusCurrent="10"
MaskVersion="MV-07B0" />
<op:define prefix="DALI" NumChannels="%DALI_AddressChannels%" ModuleType="60" KoOffset="1" KoBlockSize="16" share="DALI-GW.share.xml" template="DALI-GW-address.templ.xml" />
<op:define prefix="DGRP" NumChannels="%DALI_GroupChannels%" ModuleType="61" KoOffset="1025" KoBlockSize="16" share="DALI-GW-group.share.xml" template="DALI-GW-group.templ.xml" />
<op:define prefix="HCL" NumChannels="%DALI_HclCurves%" ModuleType="62" share="DALI-GW-hcl.share.xml" template="DALI-GW-hcl.templ.xml" />
<generate base="DALI-GW.base.xml" />
</KNX>
+48
View File
@@ -0,0 +1,48 @@
# DALI-GW KNX Product XML
This folder contains the gateway-owned OpenKNXproducer source for the REG1-Dali KNX-DALI gateway persona.
The source migrates the legacy Kaenx Creator database from `temp/openknx/GW-REG1-Dali/DALI-GW.ae-manu` into the gateway component so the generated product database, generated `knxprod.h`, and ESP-IDF runtime can evolve together.
Current migration targets:
- Manufacturer/OpenKNX id: `0xA4`
- Application number: `0x01`
- Application version: `0x09`
- Mask: `MV-07B0`
- Order number: `REG1-Dali`
- Address channels: `64`
- Group channels: `16`
- HCL curves: `3`
The existing color type values stay stable for compatibility:
- `HSV = 0`
- `RGB = 1`
- `TW = 2`
- `XYY = 3`
- `RGBW = 4`
- `RGBCW = 5`
RGBW is exposed with standard DPT `251.600` (`DPT_Colour_RGBW`). RGBCW uses the same RGBW payload shape and maps the white and amber DT8 RGBWAF channels as cool-white and warm-white levels at runtime because the local KNX master database does not define a standard RGBCW datapoint subtype.
## Validation
Run a well-formed XML check from the repository root:
```sh
xmllint --noout gateway/components/knx_dali_gw/knxprod/*.xml
```
Generate the producer header and product database artifacts with:
```sh
OpenKNXproducer create --NoXsd \
-h /tmp/DALI-GW-knxprod.h \
-o /tmp/DALI-GW.knxprod \
gateway/components/knx_dali_gw/knxprod/DALI-GW.xml
```
In this workspace the producer validates the XML and writes `/tmp/DALI-GW-knxprod.h`. If the local producer installation does not have an ETS converter available it prints `No ETS found, skipped knxprod creation!` and omits the `.knxprod` archive while still exiting successfully.
The generated header must stay synchronized with the runtime identity in `gateway/apps/gateway/main/Kconfig.projbuild` and `gateway/components/knx_dali_gw/src/knx_dali_gw.cpp`.