Unable to Add Matter Cluster in ZAP Tool

Hello,

I am following the documents for adding a matter cluster to my device as outlined in this: https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/protocols/matter/getting_started/adding_clusters.html#ug-matter-gs-adding-cluster

However, whenever I go to change the cluster information in the ZAP tool, I do not see the endpoint data: 

Additionally when I click the "Add new endpoint" button, I don't see "Matter Temperature Sensor" listed under the device type (or any other kind of Matter device for that matter). The zap file I'm opening is located at /opt/nordic/ncs/v2.4.0/light_switch/src/light_switch.zap, and was generated using the VS Code project generation tool.

So far I've:

  • Made sure that I've opened the terminal using "Open Terminal" option in the toolchain manager to make sure the environment variables are opened
  • Downloaded the ZAP tool from the Github Projects releases: https://github.com/project-chip/zap/releases/tag/v2023.05.04
  • Modifying the following block of code to resolve to an actual path:

{
  "pathRelativity": "relativeToZap",
  "path": "../../../../../modules/lib/matter/src/app/zap-templates/zcl/zcl.json",
  "type": "zcl-properties",
  "category": "matter",
  "version": 1,
  "description": "Matter SDK ZCL data"
},

I am unsure how to proceed from here.

Best,
Chris Boyer

Parents
  • Due to summer holiday period in Norway we are currently low staffed here at DevZone. Apologies for any delays caused by this and thank you for your patience.


    Hello Chris,

    I have been assigned this ticket and I will help as soon as I can.

    Best regards,

    Maria

  • Thank you for your patience, Chris.

    I will try to test on a Linux machine tomorrow, but I was able to partially reproduce what you see on a Windows computer.

    I can see that no Endpoints are showing up at all in your ZAP tool. If you created the application from the matter/light_switch sample, this should have two endpoints by default. Do you get any error messages from the ZAP tool when you launch it? 

    I'm sharing my initial findings in case they are helpful to you:

    I used the nRF Connect for VS Code extension to create a Light Switch application from the matter/light_switch sample.

    I installed the ZAP tool by following the instructions in Matter tools -> Installing the ZAP tool.

    I opened the ZAP tool with zap <path-to-light_switch-application>/src/light_switch.zap.

    When the file opened, it had two endpoints. I added a third by using the UI and the guide for adding clusters that you linked. I did not find any Matter devices in the list either, so I chose another Temperature Sensor with the same device type (0x0302). This was just to test if the Endpoint could be created. It was saved and I could configure it.

    I will forward my findings internally as well to see if there is an reason for the missing Matter devices.

    Best regards,

    Maria

  • Hello again,

    I have some extra information.

    The ZAP tool needs to be opened with the run_zaptool.sh script to run it with the necessary definitions and cluster templates for Matter.

    The script is found at <ncs-version>\modules\lib\matter\scripts\tools\zap and takes the path to the zap-file you want to open as an argument.

    Edit: If the Matter Device types does not show up when you open the zap-file with the script you can try to create the application again and open it for the first time with the script. I ran into a problem where the Matter Devices did not show up in the ZAP tool even when opening the zap-file with the run_zaptool.sh script.

    BR,

    Maria

Reply
  • Hello again,

    I have some extra information.

    The ZAP tool needs to be opened with the run_zaptool.sh script to run it with the necessary definitions and cluster templates for Matter.

    The script is found at <ncs-version>\modules\lib\matter\scripts\tools\zap and takes the path to the zap-file you want to open as an argument.

    Edit: If the Matter Device types does not show up when you open the zap-file with the script you can try to create the application again and open it for the first time with the script. I ran into a problem where the Matter Devices did not show up in the ZAP tool even when opening the zap-file with the run_zaptool.sh script.

    BR,

    Maria

Children
  • Thanks for the info! After some other trial and error, I've gotten the program to work as intended. The ultimate solution seems to have been downloaded a recent version of the tool from the releases page instead of using the install script, and making sure to put it in the same place that the install script would have put it. From there I've been able to edit the zap file, generate the files, and build the sample application from the docs.

Related