Refactor DALI-GW XML and README for clarity and accuracy

- Updated DALI-GW.xml to correct application version and product naming conventions.
- Removed unnecessary configuration parameters from XML.
- Revised README.md for improved clarity on the source and migration process.
- Adjusted application version in README to reflect changes in DALI-GW.xml.
- Enhanced instructions for generating product database artifacts.

Signed-off-by: Tony <tonylu@tony-cloud.com>
This commit is contained in:
Tony
2026-05-30 14:04:22 +08:00
parent 6381ca58cf
commit 4fa1b3cb06
7 changed files with 7762 additions and 74 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

@@ -0,0 +1,15 @@
<?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">
<Baggages>
<Baggage TargetPath="openknxapp" Name="hcl_sonne.png" Id="M-00FA_BG-openknxapp-hcl.5Fsonne.2Epng">
<FileInfo TimeInfo="%DATETIME%" />
</Baggage>
<Baggage TargetPath="root" Name="ets.png" Id="M-00FA_BG-root-ets.2Epng">
<FileInfo TimeInfo="%DATETIME%" />
</Baggage>
</Baggages>
</Manufacturer>
</ManufacturerData>
</KNX>
@@ -3,62 +3,17 @@
<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 Id="M-00FA_CS-OpenKNX" Name="OpenKNX" Number="OpenKNX" DefaultLanguage="en-US">
<CatalogItem Id="%CatalogItemId%" Name="OpenKNX: %ProductName%%BuildSuffixText%" Number="1" VisibleDescription="Control your DALI lights via KNX" 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>
<Channel Id="%AID%_CH-DALI" Number="DALI" Name="DALI" Text="DALI Gateway">
<ParameterBlock Id="%AID%_PB-900001" Name="DALI" Text="DALI Gateway">
<op:includetemplate href="%share%" xpath="//Dynamic/ChannelIndependentBlock/*" prefix="%prefix%" />
<op:includetemplate href="%templ%" xpath="//Dynamic/ChannelIndependentBlock/*" type="template" prefix="%prefix%" />
</ParameterBlock>
</Channel>
</Dynamic>
</ApplicationProgram>
<op:include href="DALI-GW.reference.xml" xpath="//ApplicationProgram" />
</ApplicationPrograms>
<Baggages>
<op:include href="DALI-GW.baggages.xml" xpath="//Baggages/*" prefix="BAG" />
</Baggages>
<Hardware>
<Hardware Id="%HardwareId%" Name="OpenKNX-%HardwareName%%BuildSuffix%" SerialNumber="%SerialNumber%" VersionNumber="1" BusCurrent="%BusCurrent%" HasIndividualAddress="true" HasApplicationProgram="true">
<Products>
File diff suppressed because it is too large Load Diff
+4 -13
View File
@@ -1,28 +1,19 @@
<?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"
ApplicationVersion="0.8"
ReplacesVersions="0.3 0.2 0.1 0"
ApplicationRevision="0"
ProductName="DALI Gateway"
ProductName="DALI gateway"
SerialNumber="0xA401"
OrderNumber="REG1-Dali"
ApplicationName="DALI Gateway"
ApplicationName="OpenKNX 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>
+9 -10
View File
@@ -1,16 +1,17 @@
# DALI-GW KNX Product XML
This folder contains the gateway-owned OpenKNXproducer source for the REG1-Dali KNX-DALI gateway persona.
This folder contains the gateway-owned KNX product 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.
`DALI-GW.reference.xml` is a mechanically adapted OpenKNXproducer source-form copy of the working secure OpenKNX DALI gateway application XML from `temp/OpenKNX-DALI-gateway`. The source keeps the gateway manufacturer/product identity while preserving the original parameter pages, module repeats, communication objects, group-object references, and secure application metadata.
Current migration targets:
- Manufacturer/OpenKNX id: `0xA4`
- Application number: `0x01`
- Application version: `0x09`
- Application version: `0x08`
- Mask: `MV-07B0`
- Order number: `REG1-Dali`
- KNX secure: enabled
- Address channels: `64`
- Group channels: `16`
- HCL curves: `3`
@@ -34,15 +35,13 @@ Run a well-formed XML check from the repository root:
xmllint --noout gateway/components/knx_dali_gw/knxprod/*.xml
```
Generate the producer header and product database artifacts with:
Generate the product database artifact with the local non-ETS producer build:
```sh
OpenKNXproducer create --NoXsd \
-h /tmp/DALI-GW-knxprod.h \
-o /tmp/DALI-GW.knxprod \
gateway/components/knx_dali_gw/knxprod/DALI-GW.xml
cd gateway/components/knx_dali_gw/knxprod
/Users/tonylu/Downloads/OpenKNXproducer-osx-arm64/OpenKNXproducer create -o test.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 source is expected to pass the producer's standard `create` sanity checks directly. Generated files such as `test.knxprod`, `DALI-GW.baggages/`, and debug XML files should not be committed.
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`.
The runtime identity must stay synchronized with `gateway/apps/gateway/main/Kconfig.projbuild` and `gateway/components/knx_dali_gw/src/knx_dali_gw.cpp`.