<?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>Implementing a zigbee endpoint callback handler</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/91693/implementing-a-zigbee-endpoint-callback-handler</link><description>I&amp;#39;m stuck trying to add a callback handler to a simple HA ON OFF SWITCH application. 
 The application is running on the nrf52840 DK. The coordinator is Zigbee2MQTT (Z2M). The SDK is connect SDK 1.9.1 
 Here&amp;#39;s my DK code: 
 
 
 
 Problem 1: 
 Z2M allows</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 12 Sep 2022 16:38:35 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/91693/implementing-a-zigbee-endpoint-callback-handler" /><item><title>RE: Implementing a zigbee endpoint callback handler</title><link>https://devzone.nordicsemi.com/thread/385801?ContentTypeID=1</link><pubDate>Mon, 12 Sep 2022 16:38:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ac13ccd3-b000-47ed-94ae-90c92b1e8c2f</guid><dc:creator>JONATHAN LL</dc:creator><description>[quote user="JnRF"]How can I receive this command? It&amp;#39;s an ON command.[/quote]
&lt;p&gt;You are using a ZCL commands handler not a endpoint handler. You can see how it is done in the light bulb sample, &lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/v2.0.2/samples/zigbee/light_bulb/src/main.c#L538"&gt;line 538&lt;/a&gt; register the callback function and the implementing is on &lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/v2.0.2/samples/zigbee/light_bulb/src/main.c#L434"&gt;line 434&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;Jonathan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Implementing a zigbee endpoint callback handler</title><link>https://devzone.nordicsemi.com/thread/385128?ContentTypeID=1</link><pubDate>Wed, 07 Sep 2022 23:41:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d8174ae2-9d11-461d-ae39-2fc93f239618</guid><dc:creator>JnRF</dc:creator><description>&lt;p&gt;OK, let&amp;#39;s deal with problem 1: how to receive data sent to the DK.&lt;/p&gt;
&lt;p&gt;The image shows the data being sent to the dev kit.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&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/pastedimage1662593917605v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&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/pastedimage1662593931126v3.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;How can I receive this command? It&amp;#39;s an ON command.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve created this code in the endpoint callback, but the&amp;nbsp;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;device_cb_param&lt;/span&gt;&lt;span&gt;-&amp;gt;&lt;/span&gt;&lt;span&gt;device_cb_id&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;and&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;device_cb_param&lt;/span&gt;&lt;span&gt;-&amp;gt;&lt;/span&gt;&lt;span&gt;endpoint&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;are not what I&amp;#39;d expect.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static zb_uint8_t on_off_switch_ep_handler_cb(zb_bufid_t bufid)
{
	zb_zcl_device_callback_param_t *device_cb_param = ZB_BUF_GET_PARAM(bufid, zb_zcl_device_callback_param_t);

	LOG_INF(&amp;quot;%s() device_cb_id=%d, endpoint=%d &amp;quot;, __func__, device_cb_param-&amp;gt;device_cb_id, device_cb_param-&amp;gt;endpoint);

	return ZB_FALSE;
}&lt;/pre&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;Output:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&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/pastedimage1662593980256v4.png" alt=" " /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Implementing a zigbee endpoint callback handler</title><link>https://devzone.nordicsemi.com/thread/385041?ContentTypeID=1</link><pubDate>Wed, 07 Sep 2022 13:21:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:798103c3-2ac7-4117-b98a-33552167bb1c</guid><dc:creator>JONATHAN LL</dc:creator><description>&lt;p&gt;Starting with Problem 1;&lt;br /&gt;&lt;br /&gt;To many unknowns to provide any useful feedback at this point. Could you share what data you are trying to send here? What exactly is the issue and what errors? What commands are you sending to get that info? Can you provide a sniffer log?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Problem 2;&lt;br /&gt;little experience with this, but it seems to be documented ok here&amp;nbsp;&lt;a href="https://www.zigbee2mqtt.io/advanced/support-new-devices/01_support_new_devices.html#_3-adding-converter-s-for-your-device"&gt;https://www.zigbee2mqtt.io/advanced/support-new-devices/01_support_new_devices.html#_3-adding-converter-s-for-your-device&lt;/a&gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;Jonathan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>