<?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>Default handler doesn&amp;#39;t relay set color command</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/100735/default-handler-doesn-t-relay-set-color-command</link><description>Hi, 
 I have an nrf52833-dk and adapted the light_bulb example in order to handle two endpoints. The second endpoint is a copy from the first and the same as in the light_bulb example. When I send a level control command everything works as expected and</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 14 Mar 2024 07:54:38 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/100735/default-handler-doesn-t-relay-set-color-command" /><item><title>RE: Default handler doesn't relay set color command</title><link>https://devzone.nordicsemi.com/thread/473770?ContentTypeID=1</link><pubDate>Thu, 14 Mar 2024 07:54:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0a7e1bbe-06cb-4fab-b4a1-902804c1104f</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;This has been fixed in nRF Connect SDK v2.6.0.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Marte&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Default handler doesn't relay set color command</title><link>https://devzone.nordicsemi.com/thread/459656?ContentTypeID=1</link><pubDate>Mon, 11 Dec 2023 10:15:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:46f87718-239a-44aa-8816-22af440a4c83</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The developers have made a fix for this. Please try replacing the files zcl_main.c and zcl_color_control_commands.c in nrfxlib/zboss/production/src/zcl with the ones I have attached here.&lt;/p&gt;
&lt;p&gt;Here are the changes between the files:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="diff"&gt;diff --git a/zboss/production/src/zcl/zcl_main.c b/zboss/production/src/zcl/zcl_main.c
index a560f4d0..29f0e72f 100644
--- a/zboss/production/src/zcl/zcl_main.c
+++ b/zboss/production/src/zcl/zcl_main.c
@@ -364,7 +364,7 @@ zb_zcl_cluster_check_value_t zb_zcl_get_cluster_check_value(zb_uint16_t cluster_
   zb_uindex_t i = 0;
   ZVUNUSED(cluster_role);
 
-  TRACE_MSG(TRACE_ERROR, &amp;quot;zb_zcl_get_cluster_check_value: cluster_id %d cluster_role %hd&amp;quot;,
+  TRACE_MSG(TRACE_ZCL3, &amp;quot;zb_zcl_get_cluster_check_value: cluster_id %d cluster_role %hd&amp;quot;,
             (FMT__D_H, cluster_id, cluster_role));
 
   /* Search if we already have handler */
@@ -389,7 +389,7 @@ zb_zcl_cluster_write_attr_hook_t zb_zcl_get_cluster_write_attr_hook(zb_uint16_t
   zb_uindex_t i = 0;
   ZVUNUSED(cluster_role);
 
-  TRACE_MSG(TRACE_ERROR, &amp;quot;zb_zcl_get_cluster_write_attr_hook: cluster_id %d cluster_role %hd&amp;quot;,
+  TRACE_MSG(TRACE_ZCL3, &amp;quot;zb_zcl_get_cluster_write_attr_hook: cluster_id %d cluster_role %hd&amp;quot;,
             (FMT__D_H, cluster_id, cluster_role));
 
   /* Search if we already have handler */
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="diff"&gt;diff --git a/zboss/production/src/zcl/zcl_color_control_commands.c b/zboss/production/src/zcl/zcl_color_control_commands.c
index b9f110b5..59a2c55a 100644
--- a/zboss/production/src/zcl/zcl_color_control_commands.c
+++ b/zboss/production/src/zcl/zcl_color_control_commands.c
@@ -1004,7 +1004,11 @@ static void zb_zcl_process_color_control_move_to_loop(zb_uint8_t param)
   if (rm_time_unit!=0)
   {
     zb_int32_t unit_max = is_16bit ? ZB_UINT16_MAX : ZB_UINT8_MAX;
-    zb_int32_t all_delta = (loop_data.finish_value - loop_data.start_value);
+    zb_int32_t all_delta =
+      (loop_data.finish_value &amp;gt; loop_data.start_value) ?
+      (loop_data.finish_value - loop_data.start_value) :
+      (loop_data.start_value - loop_data.finish_value);
+    zb_int32_t step_value;
 
     if((loop_data.attr_id == ZB_ZCL_ATTR_COLOR_CONTROL_CURRENT_HUE_ID)
         || (loop_data.attr_id == ZB_ZCL_ATTR_COLOR_CONTROL_ENHANCED_CURRENT_HUE_ID)
@@ -1020,8 +1024,17 @@ static void zb_zcl_process_color_control_move_to_loop(zb_uint8_t param)
       }
     }
 
-    val = (zb_int32_t)(all_delta * delta_time / loop_data.transition_time + loop_data.start_value);
-    if(val &amp;gt; unit_max)
+    step_value =
+      (delta_time == 0U) ?
+      (all_delta) :
+      (zb_int32_t)(all_delta * delta_time / loop_data.transition_time);
+
+    val =
+      (loop_data.finish_value &amp;gt; loop_data.start_value) ?
+      (loop_data.start_value + step_value) :
+      (loop_data.start_value - step_value);
+
+    if (val &amp;gt; unit_max)
     {
       val -= unit_max;
     }
@@ -1045,8 +1058,20 @@ static void zb_zcl_process_color_control_move_to_loop(zb_uint8_t param)
 
     if (rm_time_unit!=0)
     {
-      zb_int32_t all_delta = (loop_data.finish_value2 - loop_data.start_value2);
-      val = (zb_int32_t)(all_delta * delta_time / loop_data.transition_time + loop_data.start_value2);
+      zb_int32_t all_delta =
+        (loop_data.finish_value2 &amp;gt; loop_data.start_value2) ?
+        (loop_data.finish_value2 - loop_data.start_value2) :
+        (loop_data.start_value2 - loop_data.finish_value2);
+
+      zb_int32_t step_value =
+        (delta_time == 0U) ?
+        (all_delta) :
+        (zb_int32_t)(all_delta * delta_time / loop_data.transition_time);
+
+      val =
+        (loop_data.finish_value2 &amp;gt; loop_data.start_value2) ?
+        (loop_data.start_value2 + step_value) :
+        (loop_data.start_value2 - step_value);
     }
     else
     {
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/zcl_5F00_color_5F00_control_5F00_commands.c"&gt;devzone.nordicsemi.com/.../zcl_5F00_color_5F00_control_5F00_commands.c&lt;/a&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/zcl_5F00_main.c"&gt;devzone.nordicsemi.com/.../zcl_5F00_main.c&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Marte&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Default handler doesn't relay set color command</title><link>https://devzone.nordicsemi.com/thread/432288?ContentTypeID=1</link><pubDate>Wed, 21 Jun 2023 11:28:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f37beaf8-cc1a-4d0c-96d3-d3f4393b8643</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I have asked the development team about this, and I will update you when I hear back from them.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Marte&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Default handler doesn't relay set color command</title><link>https://devzone.nordicsemi.com/thread/431848?ContentTypeID=1</link><pubDate>Mon, 19 Jun 2023 19:19:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f7405de2-18f9-4cea-8219-a7774201e893</guid><dc:creator>aforino</dc:creator><description>&lt;p&gt;Thanks to your help I was able to debug it further. When I send a single &amp;quot;move to color&amp;quot; command at either endpoint, everything works as expected. So I have the same behaviour as you. However if I send two commands in a very short amount of time, then only the second command will be relayed to zcl_device_cb. &lt;strong&gt;Important note: the color for the first endpoint is different from the command before.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The commands that are being sent:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:96px;max-width:549px;" alt=" " height="96" src="https://devzone.nordicsemi.com/resized-image/__size/1098x192/__key/communityserver-discussions-components-files/4/Screenshot-2023_2D00_06_2D00_19-at-20.44.36.png" width="549" /&gt;&lt;/p&gt;
&lt;p&gt;The first and the second &amp;quot;move to color&amp;quot; command in detail:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:226px;max-width:390px;" alt=" " height="226" src="https://devzone.nordicsemi.com/resized-image/__size/780x452/__key/communityserver-discussions-components-files/4/Screenshot-2023_2D00_06_2D00_19-at-20.45.33.png" width="390" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:227px;max-width:391px;" alt=" " height="227" src="https://devzone.nordicsemi.com/resized-image/__size/782x454/__key/communityserver-discussions-components-files/4/Screenshot-2023_2D00_06_2D00_19-at-20.45.49.png" width="391" /&gt;&lt;/p&gt;
&lt;p&gt;The first and second response:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:226px;max-width:389px;" alt=" " height="226" src="https://devzone.nordicsemi.com/resized-image/__size/778x452/__key/communityserver-discussions-components-files/4/Screenshot-2023_2D00_06_2D00_19-at-20.48.02.png" width="389" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:226px;max-width:388px;" alt=" " height="226" src="https://devzone.nordicsemi.com/resized-image/__size/776x452/__key/communityserver-discussions-components-files/4/Screenshot-2023_2D00_06_2D00_19-at-20.48.07.png" width="388" /&gt;&lt;/p&gt;
&lt;p&gt;Moreover I did implement a test handler for both endpoints with:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;ZB_AF_SET_ENDPOINT_HANDLER(DIMMABLE_LIGHT_ENDPOINT, test_handler);
ZB_AF_SET_ENDPOINT_HANDLER(DIMMABLE_LIGHT_ENDPOINT_2, test_handler);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;and&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;zb_uint8_t test_handler(zb_uint8_t param) {
    LOG_INF(&amp;quot;test handler reached&amp;quot;);
    zb_bufid_t zcl_cmd_buf = param;
    volatile zb_zcl_parsed_hdr_t *cmd_info = ZB_BUF_GET_PARAM(zcl_cmd_buf, zb_zcl_parsed_hdr_t);
    LOG_INF(&amp;quot;destination endpoint: %d&amp;quot;, cmd_info-&amp;gt;addr_data.common_data.dst_endpoint);
    return 0;
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Now I can see that when I send two endpoints in a short sequence my test_handler gets called two times, one for each endpoint. However, only the second command also gets relayed to the default handler as well. The package that does not get relayed can be seen in the original post.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:208px;max-width:361px;" alt=" " height="208" src="https://devzone.nordicsemi.com/resized-image/__size/722x416/__key/communityserver-discussions-components-files/4/Screenshot-2023_2D00_06_2D00_19-at-21.17.29.png" width="361" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Default handler doesn't relay set color command</title><link>https://devzone.nordicsemi.com/thread/431780?ContentTypeID=1</link><pubDate>Mon, 19 Jun 2023 12:53:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:63e5eab7-c833-43b5-8049-e70beec27a08</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thank you for sharing the project.&lt;/p&gt;
&lt;p&gt;I did some testing and for Level Control,&amp;nbsp;zcl_device_cb is ony called when sending commands with On/Off. So you must send &amp;quot;Step (with On/Off)&amp;quot;&amp;nbsp; (command ID 0x06) instead of the regular &amp;quot;Step&amp;quot; (command ID 0x02) command.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;As for Color Control, the command and&amp;nbsp;zcl_device_cb worked as expected for both endpoints. I used Zigbee shell to test it and sent the&amp;nbsp;Move to Color command with the following:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;zcl cmd 0xff10 1 0x0300 0x07 -l 0000aaaa0200&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;This is what the payload of the packet looked like:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1687178701894v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;As you can see from the log,&amp;nbsp;zcl_device_cb was called for both endpoints:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:200px;max-width:500px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/1000x400/__key/communityserver-discussions-components-files/4/pastedimage1687178817661v2.png" /&gt;&lt;/p&gt;
&lt;p&gt;If the payload of the command was incorrect or the color values were outside the valid range, it did not enter zcl_device_cb. This might be what the issue is in your case, since I did not make any changes to your code. &lt;br /&gt;If you get a sniffer log, you should be able to see if the payload is correct or not. If it is incorrect, the device will send a Default Response packet with the status field showing the problem, similar to this:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1687179030731v3.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Marte&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Default handler doesn't relay set color command</title><link>https://devzone.nordicsemi.com/thread/431622?ContentTypeID=1</link><pubDate>Sun, 18 Jun 2023 21:35:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:361ab1f0-1c21-4b75-afb0-97c6663e53a4</guid><dc:creator>aforino</dc:creator><description>&lt;p&gt;Here is the example project. It creates two endpoints with the numbers 1 and 2. The &amp;quot;move to color&amp;quot; command is only relayed to the second endpoint in this example. The initialisation of the color control capabilities are found on line 761-777 in main.c. I am running this example with the nRF52833-DK.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/light_5F00_bulb_5F00_2_5F00_endpoints.zip"&gt;devzone.nordicsemi.com/.../light_5F00_bulb_5F00_2_5F00_endpoints.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Default handler doesn't relay set color command</title><link>https://devzone.nordicsemi.com/thread/431484?ContentTypeID=1</link><pubDate>Fri, 16 Jun 2023 12:14:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1bb06709-1b51-4d81-87ef-ca7c70e96daf</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;It looks like you are doing it correct based on the code you have shared here. The handler should work for both endpoints when they are both initialized.&lt;/p&gt;
&lt;p&gt;Can you share your project so I can reproduce the problem on my side?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Marte&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Default handler doesn't relay set color command</title><link>https://devzone.nordicsemi.com/thread/431328?ContentTypeID=1</link><pubDate>Thu, 15 Jun 2023 14:32:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:46af1a97-14eb-4b4e-9f7d-d30068938ebd</guid><dc:creator>aforino</dc:creator><description>&lt;p&gt;I am using zigbee2mqtt with a sonoff dongle. I am sending one color control command at a time to one endpoint at a time. The exact package that is received by the device can be seen in the original post. My guess is that something is not initialized correctly so the default handler ignores the package. However I think I only need to initialize the color_capabilities, is that correct?&lt;/p&gt;
&lt;p&gt;Also, the behaviour that&amp;nbsp;the default handler only relays the package from either endpoint 1 or 2 depending if I initialized only one or both endpoints seems very strange to me.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Default handler doesn't relay set color command</title><link>https://devzone.nordicsemi.com/thread/431300?ContentTypeID=1</link><pubDate>Thu, 15 Jun 2023 14:00:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b21cf35b-e81e-4c81-8e13-5d0ee661f07e</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;What are you using to send the color control command to the device? Are you sending it to both endpoints?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Marte&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Default handler doesn't relay set color command</title><link>https://devzone.nordicsemi.com/thread/431123?ContentTypeID=1</link><pubDate>Wed, 14 Jun 2023 21:31:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:52416c76-0455-4fc1-8216-d8a4ca43cd46</guid><dc:creator>aforino</dc:creator><description>&lt;p&gt;Yes I did implement the color control cluster. My Cluster declaration looks as follows:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;typedef struct {
    zb_zcl_basic_attrs_ext_t basic_attr;
    zb_zcl_identify_attrs_t identify_attr;
    zb_zcl_scenes_attrs_t scenes_attr;
    zb_zcl_groups_attrs_t groups_attr;
    zb_zcl_on_off_attrs_t on_off_attr;
    zb_zcl_level_control_attrs_t level_control_attr;
    zb_zcl_color_control_attrs_ext_t color_control_attr_ext;
    uint8_t level_control_options;
    uint8_t level_control_startup_level;
    uint8_t level_control_move_status;

} bulb_device_ctx_t;

/* Zigbee device application context storage. */
static bulb_device_ctx_t dev_ctx;
static bulb_device_ctx_t dev_ctx_2;


ZB_ZCL_DECLARE_IDENTIFY_ATTRIB_LIST(
        identify_attr_list,
        &amp;amp;dev_ctx.identify_attr.identify_time);

ZB_ZCL_DECLARE_IDENTIFY_ATTRIB_LIST(
        identify_attr_list_2,
        &amp;amp;dev_ctx_2.identify_attr.identify_time);

ZB_ZCL_DECLARE_GROUPS_ATTRIB_LIST(
        groups_attr_list,
        &amp;amp;dev_ctx.groups_attr.name_support);

ZB_ZCL_DECLARE_GROUPS_ATTRIB_LIST(
        groups_attr_list_2,
        &amp;amp;dev_ctx_2.groups_attr.name_support);

ZB_ZCL_DECLARE_SCENES_ATTRIB_LIST(
        scenes_attr_list,
        &amp;amp;dev_ctx.scenes_attr.scene_count,
        &amp;amp;dev_ctx.scenes_attr.current_scene,
        &amp;amp;dev_ctx.scenes_attr.current_group,
        &amp;amp;dev_ctx.scenes_attr.scene_valid,
        &amp;amp;dev_ctx.scenes_attr.name_support);

ZB_ZCL_DECLARE_SCENES_ATTRIB_LIST(
        scenes_attr_list_2,
        &amp;amp;dev_ctx_2.scenes_attr.scene_count,
        &amp;amp;dev_ctx_2.scenes_attr.current_scene,
        &amp;amp;dev_ctx_2.scenes_attr.current_group,
        &amp;amp;dev_ctx_2.scenes_attr.scene_valid,
        &amp;amp;dev_ctx_2.scenes_attr.name_support);

ZB_ZCL_DECLARE_BASIC_ATTRIB_LIST_EXT(
        basic_attr_list,
        &amp;amp;dev_ctx.basic_attr.zcl_version,
        &amp;amp;dev_ctx.basic_attr.app_version,
        &amp;amp;dev_ctx.basic_attr.stack_version,
        &amp;amp;dev_ctx.basic_attr.hw_version,
        dev_ctx.basic_attr.mf_name,
        dev_ctx.basic_attr.model_id,
        dev_ctx.basic_attr.date_code,
        &amp;amp;dev_ctx.basic_attr.power_source,
        dev_ctx.basic_attr.location_id,
        &amp;amp;dev_ctx.basic_attr.ph_env,
        dev_ctx.basic_attr.sw_ver);

ZB_ZCL_DECLARE_BASIC_ATTRIB_LIST_EXT(
        basic_attr_list_2,
        &amp;amp;dev_ctx_2.basic_attr.zcl_version,
        &amp;amp;dev_ctx_2.basic_attr.app_version,
        &amp;amp;dev_ctx_2.basic_attr.stack_version,
        &amp;amp;dev_ctx_2.basic_attr.hw_version,
        dev_ctx_2.basic_attr.mf_name,
        dev_ctx_2.basic_attr.model_id,
        dev_ctx_2.basic_attr.date_code,
        &amp;amp;dev_ctx_2.basic_attr.power_source,
        dev_ctx_2.basic_attr.location_id,
        &amp;amp;dev_ctx_2.basic_attr.ph_env,
        dev_ctx_2.basic_attr.sw_ver);

/* On/Off cluster attributes additions data */
ZB_ZCL_DECLARE_ON_OFF_ATTRIB_LIST(
        on_off_attr_list,
        &amp;amp;dev_ctx.on_off_attr.on_off);

ZB_ZCL_DECLARE_ON_OFF_ATTRIB_LIST(
        on_off_attr_list_2,
        &amp;amp;dev_ctx_2.on_off_attr.on_off);

ZB_ZCL_DECLARE_LEVEL_CONTROL_ATTRIB_LIST_EXT(
        level_control_attr_list,
        &amp;amp;dev_ctx.level_control_attr.current_level,
        &amp;amp;dev_ctx.level_control_attr.remaining_time,
        &amp;amp;dev_ctx.level_control_startup_level,
        &amp;amp;dev_ctx.level_control_options);

ZB_ZCL_DECLARE_LEVEL_CONTROL_ATTRIB_LIST_EXT(
        level_control_attr_list_2,
        &amp;amp;dev_ctx_2.level_control_attr.current_level,
        &amp;amp;dev_ctx_2.level_control_attr.remaining_time,
        &amp;amp;dev_ctx_2.level_control_startup_level,
        &amp;amp;dev_ctx_2.level_control_options);

ZB_ZCL_DECLARE_COLOR_CONTROL_ATTRIB_LIST_EXT(
        color_control_attr_list_ext,
        &amp;amp;dev_ctx.color_control_attr_ext.set_color_info.current_hue,
        &amp;amp;dev_ctx.color_control_attr_ext.set_color_info.current_saturation,
        &amp;amp;dev_ctx.color_control_attr_ext.set_color_info.remaining_time,
        &amp;amp;dev_ctx.color_control_attr_ext.set_color_info.current_X,
        &amp;amp;dev_ctx.color_control_attr_ext.set_color_info.current_Y,
        &amp;amp;dev_ctx.color_control_attr_ext.set_color_info.color_temperature,
        &amp;amp;dev_ctx.color_control_attr_ext.set_color_info.color_mode,
        &amp;amp;dev_ctx.color_control_attr_ext.set_color_info.options,
        &amp;amp;dev_ctx.color_control_attr_ext.set_defined_primaries_info.number_primaries,
        &amp;amp;dev_ctx.color_control_attr_ext.set_defined_primaries_info.primary_1_X,
        &amp;amp;dev_ctx.color_control_attr_ext.set_defined_primaries_info.primary_1_Y,
        &amp;amp;dev_ctx.color_control_attr_ext.set_defined_primaries_info.primary_1_intensity,
        &amp;amp;dev_ctx.color_control_attr_ext.set_defined_primaries_info.primary_2_X,
        &amp;amp;dev_ctx.color_control_attr_ext.set_defined_primaries_info.primary_2_Y,
        &amp;amp;dev_ctx.color_control_attr_ext.set_defined_primaries_info.primary_2_intensity,
        &amp;amp;dev_ctx.color_control_attr_ext.set_defined_primaries_info.primary_3_X,
        &amp;amp;dev_ctx.color_control_attr_ext.set_defined_primaries_info.primary_3_Y,
        &amp;amp;dev_ctx.color_control_attr_ext.set_defined_primaries_info.primary_3_intensity,
        &amp;amp;dev_ctx.color_control_attr_ext.set_additional_defined_primaries_info.primary_4_X,
        &amp;amp;dev_ctx.color_control_attr_ext.set_additional_defined_primaries_info.primary_4_Y,
        &amp;amp;dev_ctx.color_control_attr_ext.set_additional_defined_primaries_info.primary_4_intensity,
        &amp;amp;dev_ctx.color_control_attr_ext.set_additional_defined_primaries_info.primary_5_X,
        &amp;amp;dev_ctx.color_control_attr_ext.set_additional_defined_primaries_info.primary_5_Y,
        &amp;amp;dev_ctx.color_control_attr_ext.set_additional_defined_primaries_info.primary_5_intensity,
        &amp;amp;dev_ctx.color_control_attr_ext.set_additional_defined_primaries_info.primary_6_X,
        &amp;amp;dev_ctx.color_control_attr_ext.set_additional_defined_primaries_info.primary_6_Y,
        &amp;amp;dev_ctx.color_control_attr_ext.set_additional_defined_primaries_info.primary_6_intensity,
        &amp;amp;dev_ctx.color_control_attr_ext.set_color_info.enhanced_current_hue,
        &amp;amp;dev_ctx.color_control_attr_ext.set_color_info.enhanced_color_mode,
        &amp;amp;dev_ctx.color_control_attr_ext.set_color_info.color_loop_active,
        &amp;amp;dev_ctx.color_control_attr_ext.set_color_info.color_loop_direction,
        &amp;amp;dev_ctx.color_control_attr_ext.set_color_info.color_loop_time,
        &amp;amp;dev_ctx.color_control_attr_ext.set_color_info.color_loop_start_enhanced_hue,
        &amp;amp;dev_ctx.color_control_attr_ext.set_color_info.color_loop_stored_enhanced_hue,
        &amp;amp;dev_ctx.color_control_attr_ext.set_color_info.color_capabilities,
        &amp;amp;dev_ctx.color_control_attr_ext.set_color_info.color_temp_physical_min_mireds,
        &amp;amp;dev_ctx.color_control_attr_ext.set_color_info.color_temp_physical_max_mireds,
        &amp;amp;dev_ctx.color_control_attr_ext.set_color_info.couple_color_temp_to_level_min_mireds,
        &amp;amp;dev_ctx.color_control_attr_ext.set_color_info.start_up_color_temp_mireds);

ZB_ZCL_DECLARE_COLOR_CONTROL_ATTRIB_LIST_EXT(
        color_control_attr_list_ext_2,
        &amp;amp;dev_ctx_2.color_control_attr_ext.set_color_info.current_hue,
        &amp;amp;dev_ctx_2.color_control_attr_ext.set_color_info.current_saturation,
        &amp;amp;dev_ctx_2.color_control_attr_ext.set_color_info.remaining_time,
        &amp;amp;dev_ctx_2.color_control_attr_ext.set_color_info.current_X,
        &amp;amp;dev_ctx_2.color_control_attr_ext.set_color_info.current_Y,
        &amp;amp;dev_ctx_2.color_control_attr_ext.set_color_info.color_temperature,
        &amp;amp;dev_ctx_2.color_control_attr_ext.set_color_info.color_mode,
        &amp;amp;dev_ctx_2.color_control_attr_ext.set_color_info.options,
        &amp;amp;dev_ctx_2.color_control_attr_ext.set_defined_primaries_info.number_primaries,
        &amp;amp;dev_ctx_2.color_control_attr_ext.set_defined_primaries_info.primary_1_X,
        &amp;amp;dev_ctx_2.color_control_attr_ext.set_defined_primaries_info.primary_1_Y,
        &amp;amp;dev_ctx_2.color_control_attr_ext.set_defined_primaries_info.primary_1_intensity,
        &amp;amp;dev_ctx_2.color_control_attr_ext.set_defined_primaries_info.primary_2_X,
        &amp;amp;dev_ctx_2.color_control_attr_ext.set_defined_primaries_info.primary_2_Y,
        &amp;amp;dev_ctx_2.color_control_attr_ext.set_defined_primaries_info.primary_2_intensity,
        &amp;amp;dev_ctx_2.color_control_attr_ext.set_defined_primaries_info.primary_3_X,
        &amp;amp;dev_ctx_2.color_control_attr_ext.set_defined_primaries_info.primary_3_Y,
        &amp;amp;dev_ctx_2.color_control_attr_ext.set_defined_primaries_info.primary_3_intensity,
        &amp;amp;dev_ctx_2.color_control_attr_ext.set_additional_defined_primaries_info.primary_4_X,
        &amp;amp;dev_ctx_2.color_control_attr_ext.set_additional_defined_primaries_info.primary_4_Y,
        &amp;amp;dev_ctx_2.color_control_attr_ext.set_additional_defined_primaries_info.primary_4_intensity,
        &amp;amp;dev_ctx_2.color_control_attr_ext.set_additional_defined_primaries_info.primary_5_X,
        &amp;amp;dev_ctx_2.color_control_attr_ext.set_additional_defined_primaries_info.primary_5_Y,
        &amp;amp;dev_ctx_2.color_control_attr_ext.set_additional_defined_primaries_info.primary_5_intensity,
        &amp;amp;dev_ctx_2.color_control_attr_ext.set_additional_defined_primaries_info.primary_6_X,
        &amp;amp;dev_ctx_2.color_control_attr_ext.set_additional_defined_primaries_info.primary_6_Y,
        &amp;amp;dev_ctx_2.color_control_attr_ext.set_additional_defined_primaries_info.primary_6_intensity,
        &amp;amp;dev_ctx_2.color_control_attr_ext.set_color_info.enhanced_current_hue,
        &amp;amp;dev_ctx_2.color_control_attr_ext.set_color_info.enhanced_color_mode,
        &amp;amp;dev_ctx_2.color_control_attr_ext.set_color_info.color_loop_active,
        &amp;amp;dev_ctx_2.color_control_attr_ext.set_color_info.color_loop_direction,
        &amp;amp;dev_ctx_2.color_control_attr_ext.set_color_info.color_loop_time,
        &amp;amp;dev_ctx_2.color_control_attr_ext.set_color_info.color_loop_start_enhanced_hue,
        &amp;amp;dev_ctx_2.color_control_attr_ext.set_color_info.color_loop_stored_enhanced_hue,
        &amp;amp;dev_ctx_2.color_control_attr_ext.set_color_info.color_capabilities,
        &amp;amp;dev_ctx_2.color_control_attr_ext.set_color_info.color_temp_physical_min_mireds,
        &amp;amp;dev_ctx_2.color_control_attr_ext.set_color_info.color_temp_physical_max_mireds,
        &amp;amp;dev_ctx_2.color_control_attr_ext.set_color_info.couple_color_temp_to_level_min_mireds,
        &amp;amp;dev_ctx_2.color_control_attr_ext.set_color_info.start_up_color_temp_mireds);
ZB_DECLARE_DIMMABLE_LIGHT_CLUSTER_LIST(
        dimmable_light_clusters,
        basic_attr_list,
        identify_attr_list,
        groups_attr_list,
        scenes_attr_list,
        on_off_attr_list,
        level_control_attr_list,
        color_control_attr_list_ext);

ZB_DECLARE_DIMMABLE_LIGHT_CLUSTER_LIST(
        dimmable_light_clusters_2,
        basic_attr_list_2,
        identify_attr_list_2,
        groups_attr_list_2,
        scenes_attr_list_2,
        on_off_attr_list_2,
        level_control_attr_list_2,
        color_control_attr_list_ext_2);

ZB_DECLARE_DIMMABLE_LIGHT_EP(
        dimmable_light_ep,
        DIMMABLE_LIGHT_ENDPOINT,
        dimmable_light_clusters);

ZB_DECLARE_DIMMABLE_LIGHT_EP(
        dimmable_light_ep_2,
        DIMMABLE_LIGHT_ENDPOINT_2,
        dimmable_light_clusters_2);

ZBOSS_DECLARE_DEVICE_CTX_2_EP(
        dimmable_light_ctx,
        dimmable_light_ep,
        dimmable_light_ep_2);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Then I initialize the color capabilities with&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;    dev_ctx.color_control_attr_ext.set_color_info.color_capabilities = ZB_ZCL_COLOR_CONTROL_CAPABILITIES_X_Y;
    ZB_ZCL_SET_ATTRIBUTE(
            DIMMABLE_LIGHT_ENDPOINT,
            ZB_ZCL_CLUSTER_ID_COLOR_CONTROL,
            ZB_ZCL_CLUSTER_SERVER_ROLE,
            ZB_ZCL_ATTR_COLOR_CONTROL_COLOR_CAPABILITIES_ID,
            (zb_uint16_t *) &amp;amp;dev_ctx.color_control_attr_ext.set_color_info.color_capabilities,
            ZB_FALSE);

    dev_ctx_2.color_control_attr_ext.set_color_info.color_capabilities = ZB_ZCL_COLOR_CONTROL_CAPABILITIES_X_Y;
    ZB_ZCL_SET_ATTRIBUTE(
            DIMMABLE_LIGHT_ENDPOINT_2,
            ZB_ZCL_CLUSTER_ID_COLOR_CONTROL,
            ZB_ZCL_CLUSTER_SERVER_ROLE,
            ZB_ZCL_ATTR_COLOR_CONTROL_COLOR_CAPABILITIES_ID,
            (zb_uint16_t *) &amp;amp;dev_ctx_2.color_control_attr_ext.set_color_info.color_capabilities,
            ZB_FALSE);
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I did some further tests and I realized when I initialize the color capabilities of both&amp;nbsp;endpoints then only the second enpoint relays the command&amp;nbsp;to zcl_device_cb. When I initialize only the first endpoints color capabilities, then only the first endpoint relays the command to zcl_device_cb. But never both endpoints relay their color control command. What is the reason for this?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Default handler doesn't relay set color command</title><link>https://devzone.nordicsemi.com/thread/431032?ContentTypeID=1</link><pubDate>Wed, 14 Jun 2023 13:15:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0ad3e2d5-3491-451c-8a63-894566c1448b</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Have you implemented the Color control cluster at the endpoint you are sending this packet to?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Light Bulb example doesn’t implement it by default.&lt;/p&gt;
&lt;p&gt;If ZCL command targets cluster that does not present at the endpoint, the ZCL device callback will not be called - Zigbee stack doesn’t process this frame further (similarly to receiving command that targets endpoint that is not present at the device). If you want to have Color cluster functionality at the given endpoint, you should add Color cluster to the endpoint, then the stack will process Color cluster command and inform application about any change in value of Color cluster’s attributes via ZCL device callback.&lt;/p&gt;
&lt;p&gt;If you want to receive callback for every ZCL command that is received at the endpoint, you should register an endpoint handler for given endpoint.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Default handler doesn't relay set color command</title><link>https://devzone.nordicsemi.com/thread/430748?ContentTypeID=1</link><pubDate>Tue, 13 Jun 2023 12:21:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a2b66604-5983-43c5-94e6-81ca4d2475dd</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Let me check.&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>