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.
In the current iteration of the Trident development tools, ZAP must be installed from the project chip open source repository and added to the elcap configuration. ZAP version 2025.01.15 has been tested against and is what the Trident tools expect to be installed. Once ZAP has been installed and added to the elcap configuration, it an be invoked using the command line from within a Trident Zigbee project.
elcap config set tools.zap_path path/to/zap/directory
elcap config set tools.zap_path /usr/bin
elcap config set tools.zap_path /Applications/zap-mac-arm64/zap.app/Contents/MacOS
elcap config set tools.zap_path C:\Users\archb\Programs\zap-win-x64
elcap doctor
elcap doctor
from inside a Zigbee project directory will allow it to check the ZAP installation.elcap new
, then navigate to the newly created project directory and run elcap doctor
inside of it.zap.exe --version
from the installation location on a Windows machine or zap --version
from a Linux or MacOS machine. If this command fails then ZAP is not installed correctly.elcap doctor
command can be used to check the ZAP configuration within elcap as long as you are inside a Zigbee project directory when you execute the command. A Zigbee project can be created using the elcap new
command, then change into the project directory you created and run elcap doctor
to check the zap installation. If all looks good, it will look something like this: elcap config
. Use this to confirm that your ZAP path aligns with what you were expecting.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 project zap
.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.
Ctrl+Shift+P
on Linux and Windows, or Cmd+Shift+P
on MacOS.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 conifgured 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 naviage to the directory in which the generated ZAP files should live. This will be solved in future releases and will only need to be dealt with during the Beta release phase.
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.