<?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>PyACI Serial Configuration and Model Subscription</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/40826/pyaci-serial-configuration-and-model-subscription</link><description>Hello, 
 In a nut shell i am try to get a Model in PyACI to subscribe to a group address and display events. i have had limited success. and will try to explain as best i can. thankyou for your help. 
 i have successfully completed all steps in the Interactive</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 13 Jun 2019 12:10:14 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/40826/pyaci-serial-configuration-and-model-subscription" /><item><title>RE: PyACI Serial Configuration and Model Subscription</title><link>https://devzone.nordicsemi.com/thread/192673?ContentTypeID=1</link><pubDate>Thu, 13 Jun 2019 12:10:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7dbbf31a-4a16-4f01-bec2-5b27f385d2b5</guid><dc:creator>timvan</dc:creator><description>&lt;p&gt;&lt;span&gt;I found that the messages coming in doing the above process are Subscription and not Unicast. Therefore to forward the data onto the Server model (or any model in that case)&amp;nbsp;&lt;/span&gt;&lt;span&gt;needs the&lt;/span&gt;&lt;span&gt;&amp;nbsp;following change to Access.__event_handler() in access.py line 212. [Mesh SDK v3.10]&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;# old
if event._opcode == Event.MESH_MESSAGE_RECEIVED_UNICAST:

# new
if event._opcode == Event.MESH_MESSAGE_RECEIVED_UNICAST or event._opcode == Event.MESH_MESSAGE_RECEIVED_SUBSCRIPTION:&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PyACI Serial Configuration and Model Subscription</title><link>https://devzone.nordicsemi.com/thread/160032?ContentTypeID=1</link><pubDate>Mon, 03 Dec 2018 15:17:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a27363c4-2ebd-4e9e-9f25-602a90f09bc3</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;I was able to receive the the events from a Generic OnOff Client model (external chip) by executing the same steps as you, except for one additional command:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;cc.model_publication_set(db.nodes[0].unicast_address+1, mt.ModelId(0x1001),mt.Publish(db.groups[0].address, index=0, ttl=1))&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;This will make the Generic OnOff client model publish its event to group address 0 (from example_database.json). Then, if an interactive python session is running, you will receive a message similar as below:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="python"&gt;2018-12-03 15:16:52,996 - INFO - COM7: {event: MeshMessageReceivedSubscription, data: {&amp;#39;src&amp;#39;: 17, &amp;#39;dst&amp;#39;: 1, &amp;#39;appkey_handle&amp;#39;: 0, &amp;#39;subnet_handle&amp;#39;: 0, &amp;#39;ttl&amp;#39;: 1, &amp;#39;adv_addr_type&amp;#39;: 1, &amp;#39;adv_addr&amp;#39;: bytearray(b&amp;#39;L\x9e\xfe \x83\xd4&amp;#39;), &amp;#39;rssi&amp;#39;: -60, &amp;#39;actual_length&amp;#39;: 6, &amp;#39;data&amp;#39;: bytearray(b&amp;#39;\x82\x02\x01\t\x01\n&amp;#39;)}}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I am not sure how to correctly forward the events to the Generic OnOff Server model, but&amp;nbsp;here is my guess:&amp;nbsp;Add the&amp;nbsp;&lt;em&gt;GenericOnOffServer&lt;/em&gt; class to &lt;em&gt;interactive_pyaci.py,&lt;/em&gt; and create an object, then modify&amp;nbsp;the event handler in the&amp;nbsp;&lt;em&gt;Interactive&lt;/em&gt; class&lt;em&gt;&amp;nbsp;&lt;/em&gt;to forward the events to the&amp;nbsp;&lt;em&gt;GenericOnOffServer&lt;/em&gt; class.&lt;/p&gt;
&lt;p&gt;I will ask somebody with more knowledge about this, and give you an update if needed.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;UPDATE (12.10.2018):&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;In addition to what I have mentioned (i.e. to see the events in the pyACI log), you will need to add the event filter to forward these events.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PyACI Serial Configuration and Model Subscription</title><link>https://devzone.nordicsemi.com/thread/159188?ContentTypeID=1</link><pubDate>Tue, 27 Nov 2018 10:05:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:89813752-0f00-4247-a1cf-efa1b16dac39</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;I am currently looking into your problem and will try to provide you with an answer by Thursday.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PyACI Serial Configuration and Model Subscription</title><link>https://devzone.nordicsemi.com/thread/158714?ContentTypeID=1</link><pubDate>Thu, 22 Nov 2018 16:05:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9a360b2e-ad46-4300-be19-afcd5dfd0b09</guid><dc:creator>AdamWaterman</dc:creator><description>&lt;p&gt;sorry, accidentally posted before finishing the last question.&lt;br /&gt;if this is the expected behavior then how are events addressed to different models in the PyACI because it clearly works for the ConfigurationClient Model.&lt;br /&gt;&lt;br /&gt;Thankyou.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>