<?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>Zigbee - Power On Behaviour</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/97876/zigbee---power-on-behaviour</link><description>Hi, 
 
 Has SDK V2.3.0 implemented the following ZCL power on behaviour commands? How do I add them to the Zigbee Light Bulb or Zigbee Template examples? 
 
 
 
 
 
 Cluster 
 Command 
 Attribute 
 
 
 On/Off (0x0006) 
 Write Attributes (0x02) 
 StartUpOnOff</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 21 Mar 2023 20:23:08 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/97876/zigbee---power-on-behaviour" /><item><title>RE: Zigbee - Power On Behaviour</title><link>https://devzone.nordicsemi.com/thread/416655?ContentTypeID=1</link><pubDate>Tue, 21 Mar 2023 20:23:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8f98ee19-ed49-4f2f-aca9-78eb7b885030</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The attributes are supported in the SDK. You can find them here:&amp;nbsp;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a title="https://developer.nordicsemi.com/nrf_connect_sdk/doc/zboss/3.12.1.0/group___z_b___z_c_l___o_n___o_f_f.html#ga6389ee2783ad309a75a030baa2761cac" href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/zboss/3.12.1.0/group___z_b___z_c_l___o_n___o_f_f.html#ga6389ee2783ad309a75a030baa2761cac" rel="noopener noreferrer" target="_blank"&gt;zb_zcl_on_off_attr_e&lt;/a&gt; (ZB_ZCL_ATTR_ON_OFF_START_UP_ON_OFF)&lt;/li&gt;
&lt;li&gt;&lt;a title="https://developer.nordicsemi.com/nrf_connect_sdk/doc/zboss/3.12.1.0/group___z_b___z_c_l___c_o_l_o_r___c_o_n_t_r_o_l.html#gaada00b4ca50db20f9433b1935118c5f3" href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/zboss/3.12.1.0/group___z_b___z_c_l___c_o_l_o_r___c_o_n_t_r_o_l.html#gaada00b4ca50db20f9433b1935118c5f3" rel="noopener noreferrer" target="_blank"&gt;zb_zcl_color_control_attr_e&lt;/a&gt; (ZB_ZCL_ATTR_COLOR_CONTROL_START_UP_COLOR_TEMPERATURE_MIREDS_ID)&lt;/li&gt;
&lt;li&gt;&lt;a title="https://developer.nordicsemi.com/nrf_connect_sdk/doc/zboss/3.12.1.0/group___z_b___z_c_l___l_e_v_e_l___c_o_n_t_r_o_l.html#ga12838214973310738679f4849393b849" href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/zboss/3.12.1.0/group___z_b___z_c_l___l_e_v_e_l___c_o_n_t_r_o_l.html#ga12838214973310738679f4849393b849" rel="noopener noreferrer" target="_blank"&gt;zb_zcl_level_control_attr_e&lt;/a&gt; (ZB_ZCL_ATTR_LEVEL_CONTROL_START_UP_CURRENT_LEVEL_ID)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;We do not have implementations on the local actions the device will take when receiving a write attributes command for these attributes, but this is something the customer can implement themselves. &amp;nbsp;The light bulb sample is a good example to look at for how to do this.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span dir="ltr"&gt;In &lt;a title="https://github.com/nrfconnect/sdk-nrf/blob/v2.3.0/samples/zigbee/light_bulb/src/main.c#l434" href="https://github.com/nrfconnect/sdk-nrf/blob/v2.3.0/samples/zigbee/light_bulb/src/main.c#L434" rel="noopener noreferrer" target="_blank"&gt;zcl_device_cb()&lt;/a&gt;, device_cb_id (used in the switch expression) is ZB_ZCL_SET_ATTR_VALUE_CB_ID when a device receives a write attributes command. So they can use this, check the cluster ID and attr ID, and then add what they want the device to do when the attributes have changed.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;...
case ZB_ZCL_SET_ATTR_VALUE_CB_ID:
    cluster_id = device_cb_param-&amp;gt;cb_param.
                set_attr_value_param.cluster_id;
    attr_id = device_cb_param-&amp;gt;cb_param.
            set_attr_value_param.attr_id;
    if (cluster_id == ZB_ZCL_CLUSTER_ID_ON_OFF) {
        if (attr_id == ZB_ZCL_ATTR_ON_OFF_START_UP_ON_OFF) {
            // Do something        }
    }
...&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;Regards,&lt;br /&gt;Amanda H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>