<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Best practice for sending multiple Zigbee cluster commands</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/73442/best-practice-for-sending-multiple-zigbee-cluster-commands</link><description>Dear community, 
 
 we are using nRF52840 (s140) and nRF5_SDK_for_Thread_and_Zigbee_v4.1.0_32ce5f8 to develop a multiprotocol (BLE, ZB) application. Regarding the sending of ZB cluster commands, we use, e.g. (in the case of on/off commands) the macros</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 04 May 2021 08:43:53 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/73442/best-practice-for-sending-multiple-zigbee-cluster-commands" /><item><title>RE: Best practice for sending multiple Zigbee cluster commands</title><link>https://devzone.nordicsemi.com/thread/308098?ContentTypeID=1</link><pubDate>Tue, 04 May 2021 08:43:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:914e37ad-b5ce-46a4-a60b-1e5af9c89262</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I am sorry for the delay. The Zigbee team were able to reproduce this issue, and they noticed that when the out buffer was allocated with a call to zb_buf_get_out in a for loop without a delay, then only 5 packets were sent. They suggested using zb_buf_get_out_delayed_ext, which will allocate the buffer as soon as any is free and will use it to send the packet.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Marte&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Best practice for sending multiple Zigbee cluster commands</title><link>https://devzone.nordicsemi.com/thread/305854?ContentTypeID=1</link><pubDate>Tue, 20 Apr 2021 12:48:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8b494cc9-f70e-463c-b8fa-56964e0da76f</guid><dc:creator>dimi</dc:creator><description>&lt;p&gt;Hi Marte,&lt;/p&gt;
&lt;p&gt;Thanks for the reply!&lt;/p&gt;
&lt;p&gt;Unfortunately broadcasting messages to groups, like in the example you mention, seems not to be working robustly in our case. For example, when we send on/off commands to all members (lights) of a group by toggling a button multiple times, sometimes messages are dropped in the zigbee stack (the send callback is executed correctly though). This can happen for all nodes of a group or a subset. On the other hand, if we address each node with individual messages in a for loop with the random delay macros (as mentioned above) in the same use case, we haven&amp;#39;t noticed such problem. We also use a FIFO queue if the&amp;nbsp;OUT buffer is not available (can happen with a higher number of nodes).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Best practice for sending multiple Zigbee cluster commands</title><link>https://devzone.nordicsemi.com/thread/305295?ContentTypeID=1</link><pubDate>Fri, 16 Apr 2021 12:55:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b73b9d6e-180b-4e60-8798-15861482165e</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m sorry for the delay.&lt;/p&gt;
&lt;p&gt;I have some questions that might help figuring this out. Why are you sending the commands to multiple nodes in a for loop? Is there a reason why&amp;nbsp;are doing it in that way instead of broadcasting&amp;nbsp;the message? If you want to send a message to multiple nodes the best way to do that is by broadcasting the message. If you only want specific devices, such as all light bulbs, to receive the broadcast message you can use the&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_tz_v4.1.0/group___z_b___z_c_l___g_r_o_u_p_s.html"&gt;Groups cluster&lt;/a&gt;&amp;nbsp;to create a group of these devices and then broadcast the message to that group.&amp;nbsp;This is already implemented in the light control example in nRF5 SDK for T&amp;amp;Z v4.1.0. You can read about testing Zigbee light switch with ZCL groups&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_tz_v4.1.0/zigbee_example_light_control.html?cp=7_3_3_8_5_0_1_0#zigbee_example_light_control_testing_groups"&gt;here&lt;/a&gt;. The code itself can be found in the experimental light switch code,&amp;nbsp;examples/zigbee/experimental/light_control/light_switch_groups/.&lt;/p&gt;
&lt;p&gt;If this is not what you&amp;#39;re looking for, please clarify why you want to send messages to multiple nodes using a for loop.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Marte&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Best practice for sending multiple Zigbee cluster commands</title><link>https://devzone.nordicsemi.com/thread/302757?ContentTypeID=1</link><pubDate>Wed, 31 Mar 2021 13:19:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1961e49d-b7c5-48b7-9b7d-6d91f855f530</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Great to hear that you found a workaround. I will ask our developers why this is happening. Due to Easter I will not be able to get a response from them until early next week.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Marte&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Best practice for sending multiple Zigbee cluster commands</title><link>https://devzone.nordicsemi.com/thread/302702?ContentTypeID=1</link><pubDate>Wed, 31 Mar 2021 10:59:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0b317445-1c68-4d99-a506-518581191f6e</guid><dc:creator>dimi</dc:creator><description>&lt;p&gt;Sending the ZCL request commands with a random delay seems to do the trick ;). I.e. using&amp;nbsp;ZB_ZCL_SEND_COMMAND_SHORT_WITHOUT_ACK or&amp;nbsp;ZB_ZCL_SEND_COMMAND_SHORT_SCHEDULE in zb_zcl_commands.h&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>