The ZCL Advanced Platform (ZAP) tool is an open source ZCL configuration interface that provides users with an easy way to create, modify, and generate ZCL configurations for a device.
ZAP (ZCL Advanced Platform) dependency management is now handled automatically by elcap. When you use the elcap project zap command from within your Zigbee project directory, elcap will automatically ensure you have the correct version of ZAP for the current SDK version.
No manual installation or configuration of ZAP is required. Simply navigate to your Zigbee project directory and run elcap project zap - elcap will handle the rest.
Invoking ZAP to configure the ZCL portion of a Zigbee project can happen in 2 ways.
ZAP can be invoked using elcap from the command line in a terminal window directly. elcap will automatically manage the ZAP dependency and ensure you have the correct version.
Opening a Trident Zigbee project inside of VS Code enables custom VS Code Tasks to be used for doing things like building a project, flashing it to a device, and opening the ZAP configuration tool.
Once ZAP is open, you can use it to configure everything ZCL for your Zigbee project. This includes adding/removing/configuring:
To add an endpoint in ZAP, click the "+ Add Endpoint" button on the left of the screen, select the Device Type from the "Device" drop down menu, and click "Create".
Adding a cluster can be done by selecting the endpoint you wish to modify and check the "Client" or "Server" box next to the cluster.
Adding/modifying attribute configurations can be done by selecting the gear icon next to an enabled cluster. Once inside the cluster menu, enable attributes by activating the "Enabled" option next to the attribute of choice. The default value for the attribute can be entered on the right hand side of the screen. Attribute storage can be selected as RAM, NVM, or external. To handle external attributes please see tr_zcl_external_attribute_read_cb.
Default attribute reporting configurations can be modified from the "Attribute Reporting" tab within the cluster configuration page. Reporting options are configurable for any enabled attributes.
Incoming and outgoing commands can be enabled by navigating to the "Commands" tab within the cluster configuration page and checking the box next to which command(s) you would like to support.
Global options can be configured to set things like the product manufacturer ID and the default response policy. This is done by clicking the "Options" menu at the top of the screen and making the desired selections.
The current implementation of ZAP in the Trident ecosystem requires a manual generation step where you must navigate to the directory in which the generated ZAP files should live. This will be solved in future releases.
Once ZCL configuration changes have been made, generate the resulting files into your project by:
Once the files have been generated into your Zigbee project, you can rebuild the project and the changes will have taken place.