<?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>Matter: Correct handling of binding to the same node id or group which has this node</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/95959/matter-correct-handling-of-binding-to-the-same-node-id-or-group-which-has-this-node</link><description>Hello, I am developing an On/Off Light Matter device, which has buttons onboard. Currently, I&amp;#39;d like to make it possible to &amp;#39;unbound&amp;#39; buttons from controlling On/Off Light device directly to create another endpoint with On/Off Switch device definition</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 26 Jan 2023 08:18:33 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/95959/matter-correct-handling-of-binding-to-the-same-node-id-or-group-which-has-this-node" /><item><title>RE: Matter: Correct handling of binding to the same node id or group which has this node</title><link>https://devzone.nordicsemi.com/thread/406582?ContentTypeID=1</link><pubDate>Thu, 26 Jan 2023 08:18:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3a48d975-a8e4-4da6-be48-0db83b4b208d</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Glad to hear you found what you needed!&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please feel free to open new tickets if you have any additional 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: Matter: Correct handling of binding to the same node id or group which has this node</title><link>https://devzone.nordicsemi.com/thread/406491?ContentTypeID=1</link><pubDate>Wed, 25 Jan 2023 14:38:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:244e0af0-4ceb-442d-bcc8-a6256d28c9ea</guid><dc:creator>Denys Kalynichenko</dc:creator><description>&lt;p&gt;Hello,&lt;br /&gt;I found the answer to my question after analyzing application source code.&lt;br /&gt;&lt;br /&gt;I can receive pointer to Fabric table through using Server class method GetFabricTable.&lt;br /&gt;&lt;br /&gt;Function that I used to log Fabric Index and Node Id (node identifiers used in Binding Table) is put below:&lt;br /&gt;&lt;pre class="ui-code" data-mode="csharp"&gt;void LoggingCurrentFabricIdAndNodeId(void)
{
	FabricTable *fabricTable = nullptr;
	fabricTable = &amp;amp;Server::GetInstance().GetFabricTable();
	uint16_t fabricTableSize = fabricTable-&amp;gt;FabricCount();
	NodeId nodeIdArray[fabricTableSize];
	FabricIndex fabricIndexArray[fabricTableSize];
	uint16_t fabricTableIteration = 0;
	for (const FabricInfo &amp;amp; fabricInfo : *fabricTable)
    {
		fabricIndexArray[fabricTableIteration] = fabricInfo.GetFabricIndex();
		nodeIdArray[fabricTableIteration] = fabricInfo.GetNodeId();
		LOG_INF(&amp;quot;Fabric Table entry #%d: fabricIndex - %d, nodeId - %lld&amp;quot;,
					fabricTableIteration, 
					fabricIndexArray[fabricTableIteration], 
					nodeIdArray[fabricTableIteration]);
		//prepare to write next nodeid fabricindex values
		fabricTableIteration++;
	}
}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Thank you for help!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Matter: Correct handling of binding to the same node id or group which has this node</title><link>https://devzone.nordicsemi.com/thread/406347?ContentTypeID=1</link><pubDate>Tue, 24 Jan 2023 20:04:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c4e72627-9645-41a7-af6a-2ef93e7c7184</guid><dc:creator>Denys Kalynichenko</dc:creator><description>&lt;p&gt;Hello,&lt;br /&gt;The first part of my original question was rather an attempt to confirm my correct interpretation of the Matter specification, that my scenario is actually allowed by it. Thank you for confirmation!&lt;br /&gt;&lt;br /&gt;Before I opened this ticket, I have already tried to &amp;#39;mix&amp;#39; Light Bulb (as endpoint 1) and Light Switch (as endoint 2) sample apps, with buttons sending commands to bound endpoints. I even successfully managed to bind the two endpoints together through chip-tool binding command and I can even see correct BindingTableEntry with correct Node Id and Endpoint Id in my logs. Hovewer, unchanged BindingHandler implementation, copied from Light Switch app, tries to directly send command via network protocol. And this implementation is, of course. not suitable, as SoC obviously cannot receive command that it is sending right in that moment...&lt;br /&gt;&lt;br /&gt;These findings led me to my question as to how retrieve Fabric Id and Node Id in my application code to compare them with binding table entry, and then directly change attributes of endpoint 1 instead of command send (or change attributes AND send group command if my device is in that group).&lt;br /&gt;Now that I see that it is possible, I&amp;#39;d like to get specific functions/methods to retrieve Fabric Id and Node id, as it is.&lt;br /&gt;&lt;br /&gt;It seems required information about fabric Id and node Id is stored in Fabrics attribute (Operational Credentials Cluster), but currently I can directly access only&amp;nbsp;Commis&amp;shy;sionedFab&amp;shy;rics and&amp;nbsp;Current&amp;shy;FabricIn&amp;shy;dex, which, unfortunately, are not very helpful in my case.&lt;br /&gt;Please correct me if I am wrong and there are other methods to access this information from application code.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Matter: Correct handling of binding to the same node id or group which has this node</title><link>https://devzone.nordicsemi.com/thread/406314?ContentTypeID=1</link><pubDate>Tue, 24 Jan 2023 15:15:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ba836305-279f-4288-9ebf-98c2d46e9334</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""] Hovewer, I could not find any information regarding such implementation.[/quote]
&lt;p&gt;If you haven&amp;#39;t seen them already, the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/ug_matter.html"&gt;Matter documentation&lt;/a&gt;&amp;nbsp;+ &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/samples_matter.html"&gt;light switch and bulb samples&lt;/a&gt;&amp;nbsp;should be a good starting point together with the&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/matter/chip_tool_guide.html"&gt;chip-tool-guide page&lt;/a&gt;&amp;nbsp;and the subpages here regarding testing Matter in nRF Connect SDK:&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/ug_matter_gs_testing.html"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/ug_matter_gs_testing.html&lt;/a&gt;&lt;/p&gt;
[quote user=""]1) Is my scenario of binding two endpoints with the same node id even possible under Matter specification?&lt;br /&gt;&lt;br /&gt;My idea, if this is possible under Matter specification, would be then by reading Binding Table Entry data and comparing it with current Fabric Id and Node id data to take decision between directly changing attribute (planned &amp;#39;commands&amp;#39; would be On/Off/Toggle with immediate execution) of the first endpoint or sending corresponding command to a bound node if it is separate device.[/quote]
&lt;p&gt;As far as I can see this should be possible. One node may have multiple endpoints and each endpoint is individually addressable, so binding both endpoints should not be an issue.&lt;/p&gt;
[quote user=""]2) What would be my steps to retrieve Fabric Id and Node Id for my device in my firmware (specific functions to call) so I would use it for the implementation of my idea?[/quote]
&lt;p&gt;I will have to look some more for how to retrieve the Fabric Id and Node Id, but initially I would recommend you have a look through the Matter documentation pages we have available, as well as investigating the Matter Core spec, cluster spec and device library spec provided by CSA&amp;nbsp;&lt;a href="https://csa-iot.org/all-solutions/matter/"&gt;csa-iot.org/.../&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Let me know if this answers your 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></channel></rss>