-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there any API for discover attributes? (TZ-204) #55
Comments
Hi, The ESP-Zigbee-SDK offers two essential functions to aid in this process: |
Hi @xieqinan, thanks for your reply.
Yes, I can provide node address (16-bit short address), endpoint number, cluster ID, callback function, callback function context.
I have used these two functions, and the clusterID list provided by
Yes, I am interested in finding attribute by specific endpoint and specific clusterID. In the documentation, there are many APIs related to HA creation, cluster creation, and attribute creation, but the APIs related to HA discovery, cluster discovery, and attribute discovery are not perfect. This is friendly for creating End devices, but unfriendly for creating coordinators. I'm not very familiar with Zigbee, so sorry for any mistakes or omissions. |
Hi,
The
Thank you for your feedback and suggestion, the discovery feature will be added in August. |
Hello, |
@xieqinan, can you give a hint on how to correctly use this API? esp_zb_zcl_disc_attr_cmd_t cmd;
cmd.address_mode = ESP_ZB_APS_ADDR_MODE_16_ENDP_PRESENT;
cmd.cluster_id = simple_desc->app_cluster_list[i]; // <-- id from esp_zb_zdo_simple_desc_req
cmd.direction = ESP_ZB_ZCL_CMD_DIRECTION_TO_SRV;
cmd.max_attr_number = 10;
cmd.start_attr_id = 0;
cmd.zcl_basic_cmd.dst_addr_u.addr_short = 0x5118; // <-- matches device
cmd.zcl_basic_cmd.dst_endpoint = 1;
cmd.zcl_basic_cmd.src_endpoint = 1;
auto seq = esp_zb_zcl_disc_attr_cmd_req(&cmd); but in my callback on I'm trying using a Sonoff SNZB-02 sensor as my test-device currently; my final application requires me to discover the attributes. |
It's odd that such a basic example does not exist. A simple coordinator that forms a network and then allows joining of new devices forever and display all the nodes, clusters and attributes of each such connected device in a nice, easy-to-read way. And this example not be be locked behind closed API, like the In my case, I'm trying to have my coordinator allow any type of off-the-shelf home automation (HA) zigbee device to connect and then read their data. |
Hi, i used this library to develop a ZigBee gateway.
For the reason of want connect to most zigbee device, I need to discover the attributes for cluster.
However, I read all the examples and didn't find some api that can do this, there is something like
esp_zb_zdo_find_on_off_light
, but it's not what I want.I searched for information on Google again and found the ZCL command 0x0c, but in the online documentation of esp_zigbee_lib, I did not find the implementation of this command; there is a related command
esp_zb_zcl_get_attribute
, but this command is only for local.The text was updated successfully, but these errors were encountered: