<?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>Using PyACI how to model app unbind and bind again</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/77764/using-pyaci-how-to-model-app-unbind-and-bind-again</link><description>I have devices within an same group that bind with same app key, all are working normal together. But I want one device to be unbind and bind with another app key(out of the group) to control seperately. 
 After restart script, I tried these commands</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 05 Aug 2021 07:44:41 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/77764/using-pyaci-how-to-model-app-unbind-and-bind-again" /><item><title>RE: Using PyACI how to model app unbind and bind again</title><link>https://devzone.nordicsemi.com/thread/323446?ContentTypeID=1</link><pubDate>Thu, 05 Aug 2021 07:44:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6f935f97-6d48-4a80-8b1b-27d982f181b0</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Jawward,&amp;nbsp;&lt;br /&gt;So my understanding of your case is that the devices are subscribed to the same group address is considered in a same group.&lt;/p&gt;
&lt;p&gt;Therefore to change the group of a device, device D for example, you just need to call&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;cc.model_subscription_add(NODE D address,&amp;nbsp;&lt;/span&gt;&lt;strong&gt;GROUP B Address&lt;/strong&gt;&lt;span&gt;, mt.ModelId(0x1000))&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Usually you don&amp;#39;t have to change the app key if they use the same app key.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using PyACI how to model app unbind and bind again</title><link>https://devzone.nordicsemi.com/thread/323431?ContentTypeID=1</link><pubDate>Thu, 05 Aug 2021 05:56:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:da36ec15-7dae-429b-b788-90e813229ec0</guid><dc:creator>Jawwad</dc:creator><description>&lt;p&gt;I understood the &amp;quot;group&amp;quot; is an address that belong to set of devices that control by one command. In other word, change together devices status that belongs to a specific group address.&lt;/p&gt;
&lt;p&gt;&lt;span style="text-decoration:underline;"&gt;Configure node&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;cc = ConfigurationClient(db)&lt;br /&gt;device.model_add(cc)&lt;br /&gt;cc.publish_set(8, 0)&lt;br /&gt;cc.composition_data_get()&lt;br /&gt;cc.appkey_add(0)&lt;br /&gt;cc.model_app_bind(db.nodes[0].unicast_address, 0, mt.ModelId(0x1000))&lt;br /&gt;cc.model_subscription_add(db.nodes[0].unicast_address, &lt;strong&gt;0xc001&lt;/strong&gt;, mt.ModelId(0x1000))&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;According to this example:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1628142946899v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.meshsdk.v4.0.0%2Fmd_scripts_interactive_pyaci_doc_demo_configuration.html"&gt;infocenter.nordicsemi.com/index.jsp&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using PyACI how to model app unbind and bind again</title><link>https://devzone.nordicsemi.com/thread/322820?ContentTypeID=1</link><pubDate>Mon, 02 Aug 2021 09:41:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8818f777-7b9d-4cf7-8a10-9dc5385bb274</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Please clearly define what you mean by a &amp;quot;group&amp;quot;.&lt;br /&gt;How do you configure a node into a &amp;quot;group&amp;quot; in the first place ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using PyACI how to model app unbind and bind again</title><link>https://devzone.nordicsemi.com/thread/322771?ContentTypeID=1</link><pubDate>Mon, 02 Aug 2021 01:56:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:41890d87-5826-4d81-be63-5ea1610a591e</guid><dc:creator>Jawwad</dc:creator><description>&lt;p style="margin-top:0in;"&gt;&lt;span style="color:black;font-family:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;font-size:9.0pt;"&gt;My plan is to&amp;nbsp;test&amp;nbsp;the node from group A to group B and reverse it. I have a 4 lights in a group A that all controlling by one command and 2 lights in group B that also controlling by separate command. I want to move my node D from group A to group B.&lt;/span&gt;&lt;/p&gt;
&lt;p style="text-align:start;"&gt;&lt;span style="color:black;font-family:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;font-size:9.0pt;"&gt;Group: Controlling all nodes by one commands.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:150%;"&gt;&lt;strong&gt;Example:&amp;nbsp;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:150%;text-decoration:underline;"&gt;Before&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="text-decoration:underline;"&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1627869097124v1.png" alt=" " /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="text-decoration:underline;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:150%;text-decoration:underline;"&gt;After&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:150%;text-decoration:underline;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:150%;text-decoration:underline;"&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1627869208042v2.png" alt=" " /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:150%;text-decoration:underline;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Please let me know if this scnario is clear, so using PYACI can it do?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using PyACI how to model app unbind and bind again</title><link>https://devzone.nordicsemi.com/thread/322287?ContentTypeID=1</link><pubDate>Wed, 28 Jul 2021 15:13:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c947cf36-9101-4cfc-b917-18637aeb57a4</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Jawwad,&amp;nbsp;&lt;br /&gt;Please be aware that the PyACI was only an example on how you can use the serial interface. So it doesn&amp;#39;t show how to reinitialize the provisioner after resetting it.&amp;nbsp;&lt;br /&gt;You can have a look at this &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/77056/i-want-to-recover-control-provisoned-device-when-i-reopen-the-pyaci-script-and-reset-the-52840-dk"&gt;case.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;But I am not sure I fully understand what you plan to do. If you simply want to change the group (for subscription or publication) why do you need to change the appkey ? Would that work by simply change the publication and subscription addresses ?&amp;nbsp;&lt;br /&gt;What do you mean exactly by &amp;quot;group&amp;quot; ?&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using PyACI how to model app unbind and bind again</title><link>https://devzone.nordicsemi.com/thread/321923?ContentTypeID=1</link><pubDate>Tue, 27 Jul 2021 03:49:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a5444b3e-579c-421d-aa24-e3e4eeee3467</guid><dc:creator>Jawwad</dc:creator><description>&lt;p&gt;Thanks for your response.&lt;/p&gt;
&lt;p&gt;Actually I want to test to control all lights&amp;nbsp;in a group and then move one node to another group, and then test individually.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1627357348162v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Next, I want to reverse back this step. The purpose of this test to check how PYACI command can use to control nodes within a group or without group.&lt;/p&gt;
&lt;p&gt;If I restart pycai script, I am not sure what commands need to follow to archive above task.&lt;/p&gt;
&lt;p&gt;db = MeshDB(&amp;quot;database/example_database.json&amp;quot;)&lt;br /&gt;db.provisioners&lt;br /&gt;p = Provisioner(device, db)&lt;/p&gt;
&lt;p&gt;???&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using PyACI how to model app unbind and bind again</title><link>https://devzone.nordicsemi.com/thread/321528?ContentTypeID=1</link><pubDate>Fri, 23 Jul 2021 09:47:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6598a9de-6d21-4508-8196-187566ccd461</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Jawwad.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m not sure I understood correctly but why do you unbind the key before you bind anything to the model ?&amp;nbsp;&lt;br /&gt;If you call&amp;nbsp;&lt;br /&gt;&lt;span&gt;cc.model_app_bind(db.nodes[0].unicast_address, 0, mt.ModelId(0x1000))&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;and&amp;nbsp;&lt;br /&gt;&lt;span&gt;cc.model_app_unbind(db.nodes[0].unicast_address, 0, mt.ModelId(0x1000))&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;cc.model_app_bind(db.nodes[0].unicast_address, 1, mt.ModelId(0x1000))&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Would this work ?&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Please check on the peer node if you receive the&amp;nbsp;CONFIG_OPCODE_MODEL_APP_UNBIND command from the provisioner.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>