2024-01-25 07:53 AM
Hi evryone,
I've been trying to work on Zigbee communication for a while now, so far I've just learned how to read and write attributes. Now I'd like to try to learn how to use cluster Identify and groups, but I dont understand several thing, so I need help. For these cluster I'm working in Server.
Identify Cluster (only IdentifyTime attribute)
so i create my cluster, i allocate it as usual, i use the ZbZclIdentifyServerSetTime function and then i write in my attribute the value of the remaining time. what i don't understand is the part where in my code i'm going to receive the command that says "it's ok i can start the timer". i've seen that there's a start and stop structure that can be used via a callback, but i don't understand how to use it.
Groups Cluster
I don't really understand how to use this one.
I suppose that my device will receive an order to say "I've been added to such and such a group", in which case, as above, how can I manage the reception of this order? How does this cluster server really work?
if someone could explain it to me, that would be great!
thanks
have a nice day
Solved! Go to Solution.
2024-02-05 02:11 AM
I see that in your code you use your function ZbApsmeAddGroupReq(zigbee_app_info. zb, &req, &conf) in static void APP_ZIGBEE_ConfigGroupAddr(void) , which is itself called in APP_ZIGBEE_NwkForm when you have checked that the connection has been established, When I do this, I don't enter the APP_ZIGBEE_ConfigGroupAddr function when I send an add command to Silicon Labs. Could this happen if I call the function in APP_ZIGBEE_StackLayersInit as I do for configuring endpoints?
To come back to the Identify cluster, do you have an example of using the ZbZclIdentifyServerSetCallback function? Is it really necessary? Because I saw that in the test code it wasn't called.
Thanks Ouadi
2024-02-06 05:18 AM
Hello,
I'm not sure to understand exactly your question about ZbApsmeAddGroupReq which was used in my example to set a group addressing mode using APS layer, but this is not the purpose of the application provided to demonstrate mainly the use of the groups cluster according to your previous request.
Identification mode is needed only when client use the command ZbZclGroupsClientAddIdentifyingReq, and this was not the case in my example.
Please find a new example implementing Identify cluster as follow :
/* Idenfity server */
zigbee_app_info.identify_server = ZbZclIdentifyServerAlloc(zigbee_app_info.zb, SW1_ENDPOINT, NULL);
assert(zigbee_app_info.identify_server != NULL);
ZbZclClusterEndpointRegister(zigbee_app_info.identify_server);
ZbZclIdentifyServerSetCallback(zigbee_app_info.identify_server, ZbZclIdentifyCallback);
Regards,
Ouadi
2024-02-12 12:36 AM
Hello Ouadi
Actually, I now understand how the whole cluster group and Identify system works. What I don't understand is that you activate the Identify cluster by pressing a button, then you check the time from time to time if you press another button, but I would like to activate it because I have received a request. And it's this part, the reception of this request that I don't understand and which is the same as for the cluster group, since in the same way I am sent a request to add as you say. it's the recovery of the request that I don't understand. it's that "zigbee_app_info.identify_server !=NULL" for Identify ? for the cluster group, how do you differentiate between adding or deleting an element? via attributes?
Thanks