Custom XML#

Adding Custom XML from the ZAP UI#

  • Click on "Extensions" icon in the ZAP UI.

  • Click on the "+" add button to select a custom xml file

  • The custom clusters, attributes, commands, etc should show up in the ZAP UI once the custom xml has been added.

Creating your own custom XML in Zigbee#

The section shows how to create your own custom clusters and extend existing standard clusters with custom attributes and commands.

Manufacturer Specific Clusters:#

You can add manufacturer specific clusters to a standard profile. We provide an example of this below. In order to do this you must satisfy two obligations:

  • The cluster ID MUST be in the manufacturer specific range, 0xfc00 - 0xffff.

  • The cluster definition must include a manufacturer code which will be applied to ALL attributes and commands within that cluster and must be provided when sending and receiving commands and interacting with attributes.

  • eg:

<cluster manufacturerCode="0x1002">
    <name>Sample Mfg Specific Cluster</name>
    <domain>General</domain>
    <description>This cluster provides an example of how the Application 
      Framework can be extended to include manufacturer specific clusters.
      </description>
    <code>0xFC00</code>
    <attribute side="server" code="0x0000" define="ATTRIBUTE_ONE" type="INT8U" min="0x00" max="0xFF" writable="true" default="0x00" optional="true">ember sample attribute</attribute>
    <attribute side="server" code="0x0001" define="ATTRIBUTE_TWO" type="INT8U" min="0x00" max="0xFF" writable="true" default="0x00" optional="true">ember sample attribute 2</attribute>
    <command source="client" code="0x00" name="CommandOne" optional="true">
      <description>
        A sample manufacturer specific command within the sample manufacturer specific
        cluster.
      </description>
      <arg name="argOne" type="INT8U"/>
    </command>
</cluster>

Manufacturer Specific Commands in Standard ZigBee Custer:#

You can add your own commands to any standard ZigBee cluster with the following requirements:

  • Your manufacturer specific commands may use any command id within the command id range, 0x00 - 0xff.

  • You must also provide a manufacturer code for the command so that it can be distinguished from other commands in the cluster and handled appropriately.

  • eg(Extending the On/Off cluster with manufacturing commands):

<clusterExtension code="0x0006">
    <command source="client" code="0x00" name="SampleMfgSpecificOffWithTransition" optional="true" manufacturerCode="0x1002">
      <description>Client command that turns the device off with a transition given
        by the transition time in the Ember Sample transition time attribute.</description>
    </command>
    <command source="client" code="0x01" name="SampleMfgSpecificOnWithTransition" optional="true" manufacturerCode="0x1002">
      <description>Client command that turns the device on with a transition given
        by the transition time in the Ember Sample transition time attribute.</description>
    </command>
    <command source="client" code="0x02" name="SampleMfgSpecificToggleWithTransition" optional="true" manufacturerCode="0x1002">
      <description>Client command that toggles the device with a transition given
        by the transition time in the Ember Sample transition time attribute.</description>
    </command>
    <command source="client" code="0x01" name="SampleMfgSpecificOnWithTransition2" optional="true" manufacturerCode="0x1049">
      <description>Client command that turns the device on with a transition given
        by the transition time in the Ember Sample transition time attribute.</description>
    </command>
    <command source="client" code="0x02" name="SampleMfgSpecificToggleWithTransition2" optional="true" manufacturerCode="0x1049">
      <description>Client command that toggles the device with a transition given
        by the transition time in the Ember Sample transition time attribute.</description>
    </command>
  </clusterExtension>

Manufacturer Specific Attributes in Standard ZigBee Cluster:#

You can add your own attributes to any standard ZigBee cluster with the following requirements:

  • Your manufacturer specific attributes may use any attribute id within the attribute id range, 0x0000 - 0xffff.

  • You must also provide a manufacturer code for the attribute so that it can be distinguished from other attributes in the cluster and handled appropriately.

  • eg(Extending the On/Off cluster with manufacturing attributes):

<clusterExtension code="0x0006">
    <attribute side="server" code="0x0000" define="SAMPLE_MFG_SPECIFIC_TRANSITION_TIME" type="INT16U" min="0x0000" max="0xFFFF" writable="true" default="0x0000" optional="true" manufacturerCode="0x1002">Sample Mfg Specific Attribute: 0x0000 0x1002</attribute>
    <attribute side="server" code="0x0000" define="SAMPLE_MFG_SPECIFIC_TRANSITION_TIME_2" type="INT8U" min="0x0000" max="0xFFFF" writable="true" default="0x0000" optional="true" manufacturerCode="0x1049">Sample Mfg Specific Attribute: 0x0000 0x1049</attribute>
    <attribute side="server" code="0x0001" define="SAMPLE_MFG_SPECIFIC_TRANSITION_TIME_3" type="INT8U" min="0x0000" max="0xFFFF" writable="true" default="0x00" optional="true" manufacturerCode="0x1002">Sample Mfg Specific Attribute: 0x0001 0x1002</attribute>
    <attribute side="server" code="0x0001" define="SAMPLE_MFG_SPECIFIC_TRANSITION_TIME_4" type="INT16U" min="0x0000" max="0xFFFF" writable="true" default="0x0000" optional="true" manufacturerCode="0x1049">Sample Mfg Specific Attribute: 0x0001 0x1040</attribute>
</clusterExtension>