Follow the process to add new XML cluster definitions, but due to lack of documentation there was no clear instruction to add the into mode-base-cluster.xml
Running ./scripts/tools/zap_regen_all.py bombs out after 5 mins with this error:
Having more debug to explain what cluster is affected and what type is effected would give the developer a clue where the issue was. Instead I had to reverse engineer zap tool.
Follow the process to add new XML cluster definitions, but due to lack of documentation there was no clear instruction to add the into mode-base-cluster.xml
Running ./scripts/tools/zap_regen_all.py bombs out after 5 mins with this error:
Having more debug to explain what cluster is affected and what type is effected would give the developer a clue where the issue was. Instead I had to reverse engineer zap tool.
🤖 Generating files: ✍ /w/connectedhomeip/connectedhomeip/src/controller/python/chip/clusters/Objects.py ⚠️ Errors: 👎 /w/connectedhomeip/connectedhomeip/src/controller/python/chip/clusters/CHIPClusters.py: ⛔ TypeError: Cannot read properties of undefined (reading 'discriminatorName') Stack trace:
TypeError: Cannot read properties of undefined (reading 'discriminatorName') at Object.as_underlying_python_zcl_type (/snapshot/zap/dist/src-electron/generator/matter/controller/python/templates/helper.js:76:23) at async Promise.all (index 0) at async Promise.all (index 0) at async Promise.all (index 1) at async Promise.all (index 70) at async Promise.all (index 0) at produceContent (/snapshot/zap/dist/src-electron/generator/template-engine.js:150:19) at generateSingleTemplate (/snapshot/zap/dist/src-electron/generator/generation-engine.js:522:27) at async Promise.all (index 1) at generateAllTemplates (/snapshot/zap/dist/src-electron/generator/generation-engine.js:499:5) 🕐 Generation time: 6s 905ms {"src/controller/python/chip/clusters/CHIPClusters.py":{}} Zap generation error: Error: Generation failed: -- blank session -- Error: Generation failed: -- blank session -- at generateSingleFile (/snapshot/zap/dist/src-electron/main-process/startup.js:490:15) at startGeneration (/snapshot/zap/dist/src-electron/main-process/startup.js:543:5)
Propose adding something like:
into https://github.com/project-chip/zap/blob/9c4b5244168a512112d98c5807285a7dbc8b5f3d/src-electron/generator/matter/controller/python/templates/helper.js#L82
Example of the state my draft PR was in when it failed is here: https://github.com/project-chip/connectedhomeip/actions/runs/7568704069/job/20610437501?pr=31506#step:7:1602
To resolve my issue I had to add the EVSE and DEM mode cluster IDs into the mode-base-cluster.xml: