project-chip / zap

ZAP stands for ZCL Advanced Platform. It is used to configure clusters, attributes and other entities for Matter and ZigbeePro applications.
Apache License 2.0
127 stars 81 forks source link

Open, edit and save a zap file outside the Simplicity Studio environment #1328

Open fakuivan opened 1 month ago

fakuivan commented 1 month ago

I'm trying to run ZAP in the mode where you can run a web server with the GUI mess with the the zcl_config.zap files. I'm having issues with it loading an already existing file to make modifications without using Simplicity Studio. I've tried running it with the command:

/tools/zap/zap-cli server \
    --packageMatch fuzzy \
    --zcl /tools/gsdk/app/zcl/zcl-zap.json \
    --generationTemplate /tools/gsdk/protocol/zigbee/app/framework/gen-template/gen-templates.json \
    --appendGenerationSubdirectory \
    --in /tools/gsdk/protocol/zigbee/app/framework/scenarios/z3/Z3Light/config/zcl/zcl_config.zap

and then connected to http://localhost:9070 via a web browser, but it just shows a new file without any endpoints. I even tried using the query parameter filePath (http://localhost:9070/#/?filePath=%2Ftools%2Fgsdk%2Fprotocol%2Fzigbee%2Fapp%2Fframework%2Fscenarios%2Fz3%2FZ3Light%2Fconfig%2Fzcl%2Fzcl_config.zap) in the URL but that didn't work either.

Also I tried both --in pointing to the .zap file and the directory containing it, neither worked.

Is ZAP supposed to open files and edit them? I know that mode is available in Simplicity Studio, but I'm using the scl-cli as a replacement on a headless server.

paulr34 commented 3 weeks ago

its more recommended to take a binary from here https://github.com/project-chip/zap/releases/tag/v2024.06.04

when you open the ZAP binary there will be an electron menu which will allow you to open files