<?xml-stylesheet type="text/xsl" href="https://community.element14.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/"><channel><title>Arduino MKR WAN 1310 integration with Node-RED via The Things Network</title><link>/technologies/internet-of-things/b/blog/posts/arduino-mkr-wan-1310-integration-with-node-red-via-the-things-network</link><description>I connected an Arduino MKR WAN 1310 to The Things Network (TTN). Then tested if the Arduino integrates with TTN MQTT service. Now I&amp;#39;m working with the Arduino&amp;#39;s payload in Node-RED. This post is my log of the activity.
image source...</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Arduino MKR WAN 1310 integration with Node-RED via The Things Network</title><link>https://community.element14.com/technologies/internet-of-things/b/blog/posts/arduino-mkr-wan-1310-integration-with-node-red-via-the-things-network</link><pubDate>Fri, 26 Jan 2024 11:27:43 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:61397af4-4139-4efe-8d83-055cea7e87ba</guid><dc:creator>Jan Cumps</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;&lt;span&gt;I wrote a follow-up, to enable&amp;nbsp;&lt;/span&gt;&lt;span&gt;secure MQTTS with TLS&lt;/span&gt;&lt;span&gt;&amp;nbsp;connection:&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;a class="ui-contentpeek internal-link" href="/technologies/internet-of-things/b/blog/posts/secure-mqtt-integration-between-node-red-and-the-things-network" data-contentid="ce653cf57ba4428695c689c84f92f70b" data-contenttypeid="f7d226abd59f475c9d224a79e3f0ec07" data-e14adj="t"&gt;Secure MQTT integration between Node-RED and The Things Network&lt;/a&gt;&lt;span&gt;&amp;nbsp;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=27443&amp;AppID=27&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Arduino MKR WAN 1310 integration with Node-RED via The Things Network</title><link>https://community.element14.com/technologies/internet-of-things/b/blog/posts/arduino-mkr-wan-1310-integration-with-node-red-via-the-things-network</link><pubDate>Mon, 22 Jan 2024 12:43:12 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:61397af4-4139-4efe-8d83-055cea7e87ba</guid><dc:creator>Jan Cumps</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;In the blog, I used a split, and two change nodes, to&amp;nbsp;turn payload object into a simple boolean. Sticking to the principle of using graphic nodes in a workflow design.&lt;/p&gt;
&lt;p&gt;&lt;img height="122" src="/cfs-file/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-61397af4-4139-4efe-8d83-055cea7e87ba/pastedimage1705256270565v8.png" width="389" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Another way to retrieve the LED status from the payload, and send it on as a boolean payload: using a js function. A bit of programming (not a lot)&lt;/p&gt;
&lt;p&gt;&lt;img height="46" src="/resized-image/__size/588x92/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-61397af4-4139-4efe-8d83-055cea7e87ba/pastedimage1705927027270v1.png" width="294" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;function&amp;#39;s javascript code:&lt;/p&gt;
&lt;p&gt;[embed:dc8ab71f-3b98-42d9-b0f6-e21e02a0f8e2:d55fe7cb-4d5c-480e-8108-bba1308cf3b6:type=javascript&amp;text=var%20led%20%3D%20false%3B%0A%0Aif%20%28msg.payload.uplink_message.decoded_payload.ledState%20%3D%3D%3D%20%22on%22%29%20%7B%0A%20%20led%20%3D%20true%3B%0A%7D%0A%0Amsg.payload%20%3D%20led%3B%0A%0Areturn%20msg%3B]&lt;/p&gt;
&lt;p&gt;Opinions on what a flow developer should prefer, are welcome...&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=27443&amp;AppID=27&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Arduino MKR WAN 1310 integration with Node-RED via The Things Network</title><link>https://community.element14.com/technologies/internet-of-things/b/blog/posts/arduino-mkr-wan-1310-integration-with-node-red-via-the-things-network</link><pubDate>Sat, 20 Jan 2024 11:26:11 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:61397af4-4139-4efe-8d83-055cea7e87ba</guid><dc:creator>Jan Cumps</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;A bit of playing around with subflows and dashboard elements.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Custom &lt;a href="https://www.w3schools.com/icons/fontawesome_icons_webapp.asp" rel="noopener noreferrer nofollow" target="_blank" data-e14adj="t"&gt;Font Awesome&lt;/a&gt;&amp;nbsp;icons for the on-off indicator:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " height="138" src="/resized-image/__size/608x276/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-61397af4-4139-4efe-8d83-055cea7e87ba/pastedimage1705748737717v1.png" width="304" /&gt;&lt;/p&gt;
&lt;p&gt;Top is the the standard switch UI. Bottom is a custom one.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Settings:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " height="187" src="/resized-image/__size/742x374/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-61397af4-4139-4efe-8d83-055cea7e87ba/pastedimage1705748906348v2.png" width="371" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Group&amp;nbsp;related nodes in a subflow. &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;In this case, I grouped all dashboard elements. They were starting to clutter up the main flow.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Original&lt;/strong&gt; (simulated - I didn&amp;#39;t capture a screen before I made the changes):&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " height="145" src="/resized-image/__size/988x290/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-61397af4-4139-4efe-8d83-055cea7e87ba/pastedimage1705749648687v3.png" width="494" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Subflow&lt;/strong&gt; refactor:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;main:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " height="82" src="/resized-image/__size/428x164/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-61397af4-4139-4efe-8d83-055cea7e87ba/pastedimage1705749694417v4.png" width="214" /&gt;&lt;/p&gt;
&lt;p&gt;sub:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " height="256" src="/resized-image/__size/784x512/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-61397af4-4139-4efe-8d83-055cea7e87ba/pastedimage1705749739274v5.png" width="392" /&gt;&lt;/p&gt;
&lt;p&gt;This is a full overview of the main flow:&lt;/p&gt;
&lt;p&gt;&lt;img height="154" src="/resized-image/__size/1000x308/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-61397af4-4139-4efe-8d83-055cea7e87ba/pastedimage1705750433697v1.png" width="500" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Opinions may vary. &lt;br /&gt;I personally prefer the standard switch indicator to the custom one.&lt;/p&gt;
&lt;p&gt;Subflows make sense, I think. &lt;br /&gt;My example may be a&amp;nbsp;border case. The full flow wasn&amp;#39;t cluttered (yet). &lt;br /&gt;Grouping all dashboard elements into a dashboard subflow&amp;nbsp;has some merits. The subflow has the full payload. I can add additional indicators without having to reorganise the main flow.&lt;/p&gt;
&lt;p&gt;Your milage may vary ...&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=27443&amp;AppID=27&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Arduino MKR WAN 1310 integration with Node-RED via The Things Network</title><link>https://community.element14.com/technologies/internet-of-things/b/blog/posts/arduino-mkr-wan-1310-integration-with-node-red-via-the-things-network</link><pubDate>Fri, 19 Jan 2024 17:20:50 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:61397af4-4139-4efe-8d83-055cea7e87ba</guid><dc:creator>Jan Cumps</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;I haven&amp;#39;t solved the MQTT TLS connectivity yet, but implemented another security measure:&lt;/p&gt;
&lt;p&gt;Node-RED over https only:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " height="139" src="/resized-image/__size/994x278/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-61397af4-4139-4efe-8d83-055cea7e87ba/pastedimage1705684766042v1.png" width="497" /&gt;&lt;/p&gt;
&lt;p&gt;last line in the log is the (still plain mqtt) connection to The Things Network&amp;#39;s MQTT service.&lt;/p&gt;
&lt;p&gt;Plain http requests to Node-RED&amp;#39;s editor or dashboard will fail:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " height="126" src="/resized-image/__size/416x252/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-61397af4-4139-4efe-8d83-055cea7e87ba/pastedimage1705684829464v2.png" width="208" /&gt;&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=27443&amp;AppID=27&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Arduino MKR WAN 1310 integration with Node-RED via The Things Network</title><link>https://community.element14.com/technologies/internet-of-things/b/blog/posts/arduino-mkr-wan-1310-integration-with-node-red-via-the-things-network</link><pubDate>Mon, 15 Jan 2024 19:26:36 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:61397af4-4139-4efe-8d83-055cea7e87ba</guid><dc:creator>DAB</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Nice update Jan.&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=27443&amp;AppID=27&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Arduino MKR WAN 1310 integration with Node-RED via The Things Network</title><link>https://community.element14.com/technologies/internet-of-things/b/blog/posts/arduino-mkr-wan-1310-integration-with-node-red-via-the-things-network</link><pubDate>Sun, 14 Jan 2024 19:39:49 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:61397af4-4139-4efe-8d83-055cea7e87ba</guid><dc:creator>Jan Cumps</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;More info is available in the payload. Capture of&amp;nbsp;3 connections:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " height="172" src="/resized-image/__size/414x344/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-61397af4-4139-4efe-8d83-055cea7e87ba/pastedimage1705261174065v1.png" width="207" /&gt;&amp;nbsp;&lt;img alt=" " height="166" src="/resized-image/__size/408x332/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-61397af4-4139-4efe-8d83-055cea7e87ba/pastedimage1705262268118v1.png" width="204" /&gt;&amp;nbsp;&lt;img height="182" src="/resized-image/__size/374x364/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-61397af4-4139-4efe-8d83-055cea7e87ba/pastedimage1705262963865v1.png" width="187" alt=" " /&gt;&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=27443&amp;AppID=27&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item></channel></rss>