<?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>How to read cluster attribute values for on/Off cluster in Zigbee Network Coordinator</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/116721/how-to-read-cluster-attribute-values-for-on-off-cluster-in-zigbee-network-coordinator</link><description>Hi What is the best way to read cluster attributes periodically in zigbee network coordnicator? any sample code available for one time request or subscription for value change or periodic subscription ?</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 11 Dec 2024 13:09:05 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/116721/how-to-read-cluster-attribute-values-for-on-off-cluster-in-zigbee-network-coordinator" /><item><title>RE: How to read cluster attribute values for on/Off cluster in Zigbee Network Coordinator</title><link>https://devzone.nordicsemi.com/thread/514512?ContentTypeID=1</link><pubDate>Wed, 11 Dec 2024 13:09:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0d320d40-1ccc-4494-bab9-d6e279bfecb2</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Happy to hear that!&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll mark this case as verified. Please feel free to open new cases if you have any new questions.&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to read cluster attribute values for on/Off cluster in Zigbee Network Coordinator</title><link>https://devzone.nordicsemi.com/thread/514404?ContentTypeID=1</link><pubDate>Wed, 11 Dec 2024 06:16:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3300b751-6ad1-4621-a45d-6eefafa9c342</guid><dc:creator>Dhaval Dalvadi</dc:creator><description>&lt;p&gt;Thank you AHuag&amp;nbsp;&lt;br /&gt;finally we are able to fix it on nrf connect sdk as well we used to have coordniator short address instead of plug short address while&amp;nbsp;binfing&lt;br /&gt;but now we are good&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to read cluster attribute values for on/Off cluster in Zigbee Network Coordinator</title><link>https://devzone.nordicsemi.com/thread/514183?ContentTypeID=1</link><pubDate>Tue, 10 Dec 2024 09:20:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1415dbe3-c6c3-45f6-a91a-7ea59725b052</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Hi,&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/pastedimage1733822381856v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Unless you&amp;#39;ve changed the code, then the shell&amp;#39;s endpoint is 64 and not 1. Could you try with the following instead?&lt;/p&gt;
&lt;p&gt;&lt;em&gt;bind:&amp;nbsp; zdo bind on f4ce369c73f4aea1 10 f4ce36f9f41b69c4 64 0x0006 0x8259&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to read cluster attribute values for on/Off cluster in Zigbee Network Coordinator</title><link>https://devzone.nordicsemi.com/thread/514157?ContentTypeID=1</link><pubDate>Tue, 10 Dec 2024 07:59:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:763a86d0-232f-4f44-a4fa-0e01ed60f9a5</guid><dc:creator>Dhaval Dalvadi</dc:creator><description>&lt;p&gt;Hi AHaug I have sniffer with nrf52840 dongle&amp;nbsp;&lt;br /&gt;I will try that as well if needed&amp;nbsp;&lt;br /&gt;&lt;br /&gt;I tried the zigbee shell example with the plug but didnt worked so I was trying it with nrf connect sdk zigbee light_bulb sample&amp;nbsp;&lt;br /&gt;&lt;br /&gt;here are the command which I tried&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;turn on :&lt;/strong&gt; zcl cmd 0x8259 10 0x0006 0x01&lt;br /&gt;&lt;strong&gt;turn off :&lt;/strong&gt; zcl cmd 0x8259 10 0x0006 0x00&lt;br /&gt;&lt;strong&gt;attribute read:&lt;/strong&gt; zcl attr read 0x8259 10 0x0006 0x0104 0x00&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;bind:&amp;nbsp;&lt;/strong&gt; zdo bind on f4ce369c73f4aea1 10 f4ce36f9f41b69c4 1 0x0006 0x8259&lt;br /&gt;&lt;strong&gt;subscribe:&lt;/strong&gt; zcl subscribe on 0x8259 10 0x0006 0x0104 0x00 16&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;0x8259 device address&lt;br /&gt;f4ce36f9f41b69c4 coordniatore devEUI&lt;br /&gt;f4ce369c73f4aea1 bulb devEUI&lt;br /&gt;&lt;br /&gt;on off and attribute read works bund and subscribe there is no error but no response when I have executed on/off command after it&lt;br /&gt;&lt;br /&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/pastedimage1733817816669v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to read cluster attribute values for on/Off cluster in Zigbee Network Coordinator</title><link>https://devzone.nordicsemi.com/thread/513968?ContentTypeID=1</link><pubDate>Mon, 09 Dec 2024 09:10:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a52dbee2-f15c-4c3b-9ecf-954c48a36557</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Here&amp;#39;s a pointer to where to get started with this:&amp;nbsp;&lt;a href="https://www.nordicsemi.com/Products/Development-tools/nRF-Sniffer-for-802154"&gt;https://www.nordicsemi.com/Products/Development-tools/nRF-Sniffer-for-802154&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
[quote user="dhavaldalvadi"]but I am confused as well that all standard zigbee device will have attributing supported or not[/quote]
&lt;p&gt;It should be supported. What I want you to investigate with the sniffer is to see if you&amp;#39;re actually sending the signal so we can look closer into why it does not report anything.&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to read cluster attribute values for on/Off cluster in Zigbee Network Coordinator</title><link>https://devzone.nordicsemi.com/thread/513910?ContentTypeID=1</link><pubDate>Sat, 07 Dec 2024 05:44:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eccd345e-9602-49e4-ba8d-83177da7711f</guid><dc:creator>Dhaval Dalvadi</dc:creator><description>&lt;p&gt;Hi I dont have sniffer right now&lt;/p&gt;
&lt;p&gt;but I am confused as well that all standard zigbee device will have attributing supported or not&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to read cluster attribute values for on/Off cluster in Zigbee Network Coordinator</title><link>https://devzone.nordicsemi.com/thread/513765?ContentTypeID=1</link><pubDate>Fri, 06 Dec 2024 07:45:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b86de5c4-a75d-46cc-9c53-0718257fdb7d</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Could you do a Zigbee sniffer trace and see if your nodes actually does send attribute reports or not when the state changes?&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to read cluster attribute values for on/Off cluster in Zigbee Network Coordinator</title><link>https://devzone.nordicsemi.com/thread/512835?ContentTypeID=1</link><pubDate>Sat, 30 Nov 2024 06:14:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e3c6287b-ec81-41c5-95d2-f1147c09b29e</guid><dc:creator>Dhaval Dalvadi</dc:creator><description>&lt;p&gt;Hi Ahaug&amp;nbsp;&lt;br /&gt;&lt;br /&gt;I am using this method to on/off target device&amp;nbsp;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;ZB_ZCL_ON_OFF_SEND_REQ&lt;/span&gt;&lt;span&gt;(bufid,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;device_list&lt;/span&gt;&lt;span&gt;[u8IndexSelected].&lt;/span&gt;&lt;span&gt;joined_addr&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ZB_APS_ADDR_MODE_16_ENDP_PRESENT,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ZIGBEE_COORDINATOR_ENDPOINT,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ZB_AF_HA_PROFILE_ID,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ZB_ZCL_DISABLE_DEFAULT_RESPONSE,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cmd_id,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;NULL&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to read cluster attribute values for on/Off cluster in Zigbee Network Coordinator</title><link>https://devzone.nordicsemi.com/thread/512834?ContentTypeID=1</link><pubDate>Sat, 30 Nov 2024 05:13:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b329983a-9603-4592-90b8-7ffea9ba1042</guid><dc:creator>Dhaval Dalvadi</dc:creator><description>&lt;p&gt;Hi AHaug&amp;nbsp;&lt;br /&gt;I am sure the on/off is working and happending as its smart plug I used to send uart command to on or off and it reflects on plug.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to read cluster attribute values for on/Off cluster in Zigbee Network Coordinator</title><link>https://devzone.nordicsemi.com/thread/512729?ContentTypeID=1</link><pubDate>Fri, 29 Nov 2024 11:22:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:45ca0c8f-5541-4d67-ad71-a306455e4d6c</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Thank you for verifying. Could you post the command you&amp;#39;ve used and/or point me to where in the code you attached I should look?&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to read cluster attribute values for on/Off cluster in Zigbee Network Coordinator</title><link>https://devzone.nordicsemi.com/thread/512724?ContentTypeID=1</link><pubDate>Fri, 29 Nov 2024 11:09:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3514fcbb-19bb-4835-bd7e-f8c55706be1e</guid><dc:creator>Dhaval Dalvadi</dc:creator><description>&lt;p&gt;Hi &lt;a href="https://devzone.nordicsemi.com/members/ahaug"&gt;AHaug&lt;/a&gt;&amp;nbsp;&lt;br /&gt;Yes I changed value from coordinator to target device but still it didn&amp;#39;t gave any value change&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to read cluster attribute values for on/Off cluster in Zigbee Network Coordinator</title><link>https://devzone.nordicsemi.com/thread/512688?ContentTypeID=1</link><pubDate>Fri, 29 Nov 2024 08:38:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3b8b8ca0-5119-490d-b4e6-bc2ee2d4903b</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I edited your comment to use code blocks. Please use insert -&amp;gt; Code when uploading code and logs.&lt;/p&gt;
&lt;p&gt;Regarding why the subscription didn&amp;#39;t work. Are you certain the attribute you&amp;#39;re trying to monitor are changing? It won&amp;#39;t notify you unless its value has changed.&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to read cluster attribute values for on/Off cluster in Zigbee Network Coordinator</title><link>https://devzone.nordicsemi.com/thread/512669?ContentTypeID=1</link><pubDate>Fri, 29 Nov 2024 06:03:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fe4d2a9c-c7c9-4a82-a8b2-671268302b5a</guid><dc:creator>Dhaval Dalvadi</dc:creator><description>&lt;div&gt;
&lt;div&gt;&lt;span&gt;&lt;span&gt;I did binding as well subscription but it never reported values&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;div&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;
zb_uint8_t zcl_endpoint_handler(zb_uint8_t param)
{
&amp;#160; &amp;#160; LOG_INF(&amp;quot;Bulb state:&amp;quot;);
&amp;#160; &amp;#160; zb_zcl_parsed_hdr_t *cmd_info = ZB_BUF_GET_PARAM(param, zb_zcl_parsed_hdr_t);

&amp;#160; &amp;#160; if (cmd_info-&amp;gt;cmd_id == ZB_ZCL_CMD_READ_ATTRIB_RESP)
&amp;#160; &amp;#160; {
&amp;#160; &amp;#160; &amp;#160; &amp;#160; zb_zcl_read_attr_res_t *attr_resp;
&amp;#160; &amp;#160; &amp;#160; &amp;#160; ZB_ZCL_GENERAL_GET_NEXT_READ_ATTR_RES(param, attr_resp);
&amp;#160; &amp;#160; &amp;#160; &amp;#160; if (attr_resp-&amp;gt;status == ZB_ZCL_STATUS_SUCCESS)
&amp;#160; &amp;#160; &amp;#160; &amp;#160; {
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; zb_uint8_t on_off_value = attr_resp-&amp;gt;attr_value[0];
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; LOG_INF(&amp;quot;Bulb state: %s&amp;quot;, on_off_value ? &amp;quot;ON&amp;quot; : &amp;quot;OFF&amp;quot;);
&amp;#160; &amp;#160; &amp;#160; &amp;#160; }
&amp;#160; &amp;#160; &amp;#160; &amp;#160; else
&amp;#160; &amp;#160; &amp;#160; &amp;#160; {
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; LOG_ERR(&amp;quot;Failed to read attribute. Status: %d&amp;quot;, attr_resp-&amp;gt;status);
&amp;#160; &amp;#160; &amp;#160; &amp;#160; }
&amp;#160; &amp;#160; &amp;#160; &amp;#160; return ZB_TRUE;
&amp;#160; &amp;#160; }
&amp;#160; &amp;#160; if (cmd_info-&amp;gt;cmd_id == ZB_ZCL_CMD_REPORT_ATTRIB)
&amp;#160; &amp;#160; {
&amp;#160; &amp;#160; &amp;#160; &amp;#160; zb_zcl_report_attr_req_t *report_attr_req;
&amp;#160; &amp;#160; &amp;#160; &amp;#160; ZB_ZCL_GENERAL_GET_NEXT_REPORT_ATTR_REQ(param, report_attr_req);

&amp;#160; &amp;#160; &amp;#160; &amp;#160; if (report_attr_req-&amp;gt;attr_id == ZB_ZCL_ATTR_ON_OFF_ON_OFF_ID)
&amp;#160; &amp;#160; &amp;#160; &amp;#160; {
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; zb_uint8_t on_off_status = report_attr_req-&amp;gt;attr_value[0];
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; printf(&amp;quot;Received on/off status: %d\n&amp;quot;, on_off_status);
&amp;#160; &amp;#160; &amp;#160; &amp;#160; }
&amp;#160; &amp;#160; }
&amp;#160; &amp;#160; return ZB_FALSE;
}



static zb_callback_t zb_bind_callback()
{
&amp;#160; &amp;#160; printf(&amp;quot;Device Binding Completed:\n&amp;quot;);
}

static void bind_req(uint16_t short_addr, zb_ieee_addr_t iee_addr, uint16_t ep)
{
&amp;#160; &amp;#160; zb_bufid_t bufid;
&amp;#160; &amp;#160; zb_ieee_addr_t recv_nwk_addr;
&amp;#160; &amp;#160; zb_zdo_bind_req_param_t *p_req;

&amp;#160; &amp;#160; bufid = zb_buf_get_out();

&amp;#160; &amp;#160; // Get the long address of the reporting device
&amp;#160; &amp;#160; zb_osif_get_ieee_eui64(recv_nwk_addr);

&amp;#160; &amp;#160; zb_uint16_t receiver_short_addr = 0x0000;

&amp;#160; &amp;#160; p_req = ZB_BUF_GET_PARAM(bufid, zb_zdo_bind_req_param_t);
&amp;#160; &amp;#160; // receiver_nwk_addr is the long address of the device that will receive the reports
&amp;#160; &amp;#160; // This needs to be retrieved in some way
&amp;#160; &amp;#160; ZB_MEMCPY(p_req-&amp;gt;src_address, iee_addr, sizeof(zb_ieee_addr_t));
&amp;#160; &amp;#160; p_req-&amp;gt;src_endp = ep;
&amp;#160; &amp;#160; p_req-&amp;gt;cluster_id = ZB_ZCL_ATTR_ON_OFF_ON_OFF_ID;
&amp;#160; &amp;#160; p_req-&amp;gt;dst_addr_mode = ZB_BIND_DST_ADDR_MODE_64_BIT_EXTENDED;
&amp;#160; &amp;#160; ZB_MEMCPY(p_req-&amp;gt;dst_address.addr_long, recv_nwk_addr, sizeof(zb_ieee_addr_t));
&amp;#160; &amp;#160; p_req-&amp;gt;dst_endp = ZIGBEE_COORDINATOR_ENDPOINT;

&amp;#160; &amp;#160; p_req-&amp;gt;req_dst_addr = receiver_short_addr;

&amp;#160; &amp;#160; zb_zdo_bind_req(bufid, zb_bind_callback);
}

void print_read_attr_subscribe_resp(zb_bufid_t bufid)
{
&amp;#160; &amp;#160; zb_zcl_configure_reporting_res_t *resp;
&amp;#160; &amp;#160; ZB_ZCL_GENERAL_GET_NEXT_CONFIGURE_REPORTING_RES(bufid, resp);

&amp;#160; &amp;#160; if (resp != NULL)
&amp;#160; &amp;#160; {
&amp;#160; &amp;#160; &amp;#160; &amp;#160; printf(&amp;quot;Configure Reporting Response:\n&amp;quot;);
&amp;#160; &amp;#160; &amp;#160; &amp;#160; printf(&amp;quot;Status: 0x%02x\n&amp;quot;, resp-&amp;gt;status);
&amp;#160; &amp;#160; &amp;#160; &amp;#160; printf(&amp;quot;Direction: 0x%02x\n&amp;quot;, resp-&amp;gt;direction);
&amp;#160; &amp;#160; &amp;#160; &amp;#160; printf(&amp;quot;Attribute ID: 0x%04x\n&amp;quot;, resp-&amp;gt;attr_id);

&amp;#160; &amp;#160; &amp;#160; &amp;#160; if (resp-&amp;gt;status == ZB_ZCL_STATUS_SUCCESS)
&amp;#160; &amp;#160; &amp;#160; &amp;#160; {
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; printf(&amp;quot;Configure Reporting request was successful\n&amp;quot;);
&amp;#160; &amp;#160; &amp;#160; &amp;#160; }
&amp;#160; &amp;#160; &amp;#160; &amp;#160; else
&amp;#160; &amp;#160; &amp;#160; &amp;#160; {
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; printf(&amp;quot;Configure Reporting request failed\n&amp;quot;);
&amp;#160; &amp;#160; &amp;#160; &amp;#160; }
&amp;#160; &amp;#160; }
&amp;#160; &amp;#160; else
&amp;#160; &amp;#160; {
&amp;#160; &amp;#160; &amp;#160; &amp;#160; printf(&amp;quot;No Configure Reporting response received\n&amp;quot;);
&amp;#160; &amp;#160; }
}
void read_device_state(uint16_t short_addr, uint16_t ep)
{
&amp;#160; &amp;#160; zb_uint8_t *p_cmd_buf;
&amp;#160; &amp;#160; zb_bufid_t bufid;
&amp;#160; &amp;#160; bufid = zb_buf_get_out();

&amp;#160; &amp;#160; ZB_ZCL_GENERAL_INIT_READ_ATTR_REQ(bufid, p_cmd_buf, ZB_ZCL_ENABLE_DEFAULT_RESPONSE);
&amp;#160; &amp;#160; // printf(&amp;quot;log3 %s\n&amp;quot;, bufid);
&amp;#160; &amp;#160; ZB_ZCL_GENERAL_ADD_ID_READ_ATTR_REQ(p_cmd_buf, ZB_ZCL_ATTR_ON_OFF_ON_OFF_ID);
&amp;#160; &amp;#160; ZB_ZCL_GENERAL_SEND_READ_ATTR_REQ(bufid, p_cmd_buf, short_addr,
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; ZB_APS_ADDR_MODE_16_ENDP_PRESENT, ep,
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; ZIGBEE_COORDINATOR_ENDPOINT, ZB_AF_HA_PROFILE_ID,
&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; ZB_ZCL_CLUSTER_ID_ON_OFF, print_read_attr_resp); // print_read_attr_resp);

&amp;#160; &amp;#160; zb_bufid_t cfg_buf = zb_buf_get_out();
&amp;#160; &amp;#160; ZB_ZCL_GENERAL_INIT_CONFIGURE_REPORTING_SRV_REQ(cfg_buf, p_cmd_buf, ZB_ZCL_ENABLE_DEFAULT_RESPONSE);
&amp;#160; &amp;#160; ZB_ZCL_GENERAL_ADD_SEND_REPORT_CONFIGURE_REPORTING_REQ(
&amp;#160; &amp;#160; &amp;#160; &amp;#160; p_cmd_buf,
&amp;#160; &amp;#160; &amp;#160; &amp;#160; ZB_ZCL_ATTR_ON_OFF_ON_OFF_ID,
&amp;#160; &amp;#160; &amp;#160; &amp;#160; ZB_ZCL_ATTR_TYPE_BOOL,
&amp;#160; &amp;#160; &amp;#160; &amp;#160; 0x0005,
&amp;#160; &amp;#160; &amp;#160; &amp;#160; 0x0010,
&amp;#160; &amp;#160; &amp;#160; &amp;#160; 0); // reportable change for Boolean is always 0
&amp;#160; &amp;#160; ZB_ZCL_GENERAL_SEND_CONFIGURE_REPORTING_REQ(
&amp;#160; &amp;#160; &amp;#160; &amp;#160; cfg_buf,
&amp;#160; &amp;#160; &amp;#160; &amp;#160; p_cmd_buf,
&amp;#160; &amp;#160; &amp;#160; &amp;#160; short_addr,
&amp;#160; &amp;#160; &amp;#160; &amp;#160; ZB_APS_ADDR_MODE_16_ENDP_PRESENT,
&amp;#160; &amp;#160; &amp;#160; &amp;#160; ep,
&amp;#160; &amp;#160; &amp;#160; &amp;#160; ZIGBEE_COORDINATOR_ENDPOINT,
&amp;#160; &amp;#160; &amp;#160; &amp;#160; ZB_AF_HA_PROFILE_ID,
&amp;#160; &amp;#160; &amp;#160; &amp;#160; ZB_ZCL_CLUSTER_ID_ON_OFF,
&amp;#160; &amp;#160; &amp;#160; &amp;#160; print_read_attr_subscribe_resp);
}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Here is logs&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;
[00:00:42.424,224] &amp;lt;inf&amp;gt; app: New device commissioned or rejoined (short: 0xc3cf)
[00:00:42.448,852] &amp;lt;inf&amp;gt; app: IEEE Address: 30:88:e7:fe:ff:44:5b:38

[00:00:42.489,288] &amp;lt;inf&amp;gt; app: 0
[00:00:42.508,544] &amp;lt;inf&amp;gt; app: Joining period extended.
Device Binding Completed:
[00:00:42.597,106] &amp;lt;inf&amp;gt; app: Bulb state:
[00:00:42.618,743] &amp;lt;inf&amp;gt; app: Bulb state: ON
[00:00:42.647,247] &amp;lt;inf&amp;gt; app: read attribute called!

[00:00:42.669,036] &amp;lt;inf&amp;gt; app: Bulb state:
Configure Reporting Response:
Status: 0x00
Direction: 0x01
Attribute ID: 0x0006
Configure Reporting request was successful
[00:00:45.282,226] &amp;lt;inf&amp;gt; zigbee_app_utils: Device authorization event received (short: 0xc3cf, long: 385b44fffee78830, authorization type: 1, authorization status: 0)
[00:00:48.439,147] &amp;lt;inf&amp;gt; zigbee_app_utils: Unimplemented signal (signal: 54, status: 0)
&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;It works to read values but subscription didnt responded&lt;/strong&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to read cluster attribute values for on/Off cluster in Zigbee Network Coordinator</title><link>https://devzone.nordicsemi.com/thread/512324?ContentTypeID=1</link><pubDate>Wed, 27 Nov 2024 11:50:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ae78f074-5ffb-4613-85c8-b191861db9f3</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You can for instance use attribute reporting. This method allows the coordinator to receive automatic updates from devices when attribute values change, without having to constantly poll for data. Here&amp;#39;s how you can set it up:&lt;/p&gt;
&lt;p&gt;1. Create a binding between the coordinator and the device for the specific cluster you want to monitor. This is done using the `zdo bind on` command [Zigbee shell](&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.5.0/nrf/libraries/zigbee/shell.html)."&gt;developer.nordicsemi.com/.../shell.html).&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;2. Configure attribute reporting using the `zcl subscribe on` command. This sets up the reporting intervals for the attributes you&amp;#39;re interested in [Zigbee shell](&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.5.0/nrf/libraries/zigbee/shell.html)."&gt;developer.nordicsemi.com/.../shell.html).&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s an example of how to set this up:&lt;/p&gt;
&lt;p&gt;1. Create a binding:&amp;nbsp;&lt;em&gt;zdo bind on &amp;lt;source_eui64&amp;gt; &amp;lt;source_ep&amp;gt; &amp;lt;dst_addr&amp;gt; &amp;lt;dst_ep&amp;gt; &amp;lt;cluster_id&amp;gt; &amp;lt;request_dst_addr&amp;gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;2. Configure attribute reporting:&amp;nbsp;&lt;em&gt;zcl subscribe on &amp;lt;addr&amp;gt; &amp;lt;ep&amp;gt; &amp;lt;cluster&amp;gt; &amp;lt;profile&amp;gt; &amp;lt;attr_id&amp;gt; &amp;lt;attr_type&amp;gt; [&amp;lt;min_interval&amp;gt;] [&amp;lt;max_interval&amp;gt;]&amp;nbsp;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;For example, to set up reporting for a temperature attribute every 5 to 20 seconds:&amp;nbsp;&lt;em&gt;zcl subscribe on 0x1234 10 0x0402 0x0104 0x0000 29 5 20&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;This approach is more efficient than constantly reading attributes, as it reduces network traffic and power consumption on battery-operated devices. The coordinator will receive automatic updates when attribute values change within the specified intervals &lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/applications/zigbee_weather_station/README.html#creating_bindings_for_periodic_notifications"&gt;https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/applications/zigbee_weather_station/README.html#creating_bindings_for_periodic_notifications&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you need to manually read attributes at specific times, you can use the `zcl attr read` command &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.5.0/nrf/libraries/zigbee/shell.html"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.5.0/nrf/libraries/zigbee/shell.html&lt;/a&gt;, but this is not recommended for frequent, periodic readings.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>