Matter : manufacturer specific cluster

Hi,

We're currently developing a Matter product based on the nRF5340 SoC, and we would want to add some custom (manufacturer specific) functionality. According to the specification (coren, §7.19, Manufacturer Specific Extensions) this is possible if you define a cluster in the manufacturer-specific range (0xFC00 - 0xFFFE).

So what I did is create an XML file defining my custom cluster, like so:

<?xml version="1.0"?>
<configurator>
  <domain name="Manufacturer"/>

  <cluster manufacturerCode="0xFFF1">
    <domain>Manufacturer</domain>
    <name>MyCluster</name>
    <code>0xfc00</code>
    <define>MY_CUSTOM_CLUSTER</define>
    <description>Manufacturer specific cluster test.</description>
    
    <attribute side="server" code="0x0000" define="MY_ATTRIBUTE" type="INT32U" min="0x00000000" max="0xFFFFFFFF" writable="false" optional="false">Test manufacturer specific attribute.</attribute>

    <command source="client" code="0x00" name="Command" optional="false">
      <description>Test command.</description>
    </command>
  </cluster>
</configurator>

and I added it through the ZCL extension in my zap tool. It loads, and I can see my cluster:

I can now select my attribute, command, and save.

However, when generating the resulting code I get an error:

Error: group_id not found.
    at enhancedItem (/snapshot/zap/dist/src-electron/generator/matter/app/zap-templates/common/ClustersHelper.js)
    at /snapshot/zap/dist/src-electron/generator/matter/app/zap-templates/common/ClustersHelper.js
    at Array.forEach (<anonymous>)
    at /snapshot/zap/dist/src-electron/generator/matter/app/zap-templates/common/ClustersHelper.js
    at Array.forEach (<anonymous>)
    at enhancedCommands (/snapshot/zap/dist/src-electron/generator/matter/app/zap-templates/common/ClustersHelper.js)
    at Object.init (/snapshot/zap/dist/src-electron/generator/matter/app/zap-templates/common/ClustersHelper.js)
Error: group_id not found.
    at enhancedItem (/snapshot/zap/dist/src-electron/generator/matter/app/zap-templates/common/ClustersHelper.js)
    at /snapshot/zap/dist/src-electron/generator/matter/app/zap-templates/common/ClustersHelper.js
    at Array.forEach (<anonymous>)
    at /snapshot/zap/dist/src-electron/generator/matter/app/zap-templates/common/ClustersHelper.js
    at Array.forEach (<anonymous>)
    at enhancedCommands (/snapshot/zap/dist/src-electron/generator/matter/app/zap-templates/common/ClustersHelper.js)
    at Object.init (/snapshot/zap/dist/src-electron/generator/matter/app/zap-templates/common/ClustersHelper.js)

So how does one add a custom cluster to a device? The documentation does not seem to mention anything outside already defined clusters.

Kind regards and thanks

-Alex

Related