<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Dan Benitah]]></title><description><![CDATA[A basic technical blog by Dan Benitah]]></description><link>https://www.danuw.com/</link><image><url>https://www.danuw.com//logos/logo-48.png</url><title>Dan Benitah</title><link>https://www.danuw.com/</link></image><generator>GatsbyJS Advanced Starter</generator><lastBuildDate>Fri, 04 Jun 2021 17:41:24 GMT</lastBuildDate><atom:link href="https://www.danuw.com//rss.xml" rel="self" type="application/rss+xml"/><copyright><![CDATA[Copyright © 2020. All rights reserved.]]></copyright><item><title><![CDATA[Azure Digital Twins (ADT) Explorer]]></title><description><![CDATA[Since last summer, a great tool was made available to easily browse Azure Digital Twins v2's graph called the ADT Explorer. First and…]]></description><link>https://www.danuw.com//azure-digital-twins-adt-explorer</link><guid isPermaLink="false">https://www.danuw.com//azure-digital-twins-adt-explorer</guid><category><![CDATA[iot]]></category><category><![CDATA[azure iot]]></category><category><![CDATA[azure digital twins (adt)]]></category><category><![CDATA[smart building]]></category><category><![CDATA[adt explorer]]></category><pubDate>Wed, 02 Jun 2021 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Since last summer, a great tool was made available to easily browse Azure Digital Twins v2&apos;s graph called the ADT Explorer.&lt;/p&gt;
&lt;p&gt;First and foremost, it allowed you to visualise your graph, and for those who tried, this was absolutely crucial in validating it all made sense (e.g. to identify &quot;orphans&quot; for missed relationships - are all floors linked to a building, all occupancy sensors links to a desk etc...).&lt;/p&gt;
&lt;p&gt;It also allowed for some editing capabilities, such as the ability to import a graph or models, create twins and relationships. It was especially useful to be able to edit basic properties on the fly (for testing or demo purposes).&lt;/p&gt;
&lt;p&gt;To run that tool though, you either could do it locally (which I mainly relied upon), or deploy your own instance (including some configuration for each instance).&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto;  max-width: 690px;&quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/a6eff8a95bf438aa04ae3975093c7337/ca44b/adt-explorer-from-portal.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 21.89119170984456%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAECAYAAACOXx+WAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAvUlEQVQY042P7WqDQBBFff8XDLWC0ag1um7ibvbLuHu6kVIo/ZOBy70wzBluUZonp2GkqUqqz5JL29BdWtZ1Zd933pmU0q+KLxOpJkXdzzSjROjArLdj6Z/xgFrnUUqhtcq+on/yS9aYP/CiFXc+zj11NzLkPEpFN99x1qBtoOt6FnlDLgtinlheEvPh03XkJuXxPMaYPWZgBtRNg7gObN4SnCHYByF4nLP5WKC0RvnEI0SkTeQSSJfY0v/K336jM/S42ghrAAAAAElFTkSuQmCC&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Launch Explorer from the Azure Portal&quot;
        title=&quot;Launch Explorer from the Azure Portal&quot;
        src=&quot;/static/a6eff8a95bf438aa04ae3975093c7337/36727/adt-explorer-from-portal.png&quot;
        srcset=&quot;/static/a6eff8a95bf438aa04ae3975093c7337/acf4b/adt-explorer-from-portal.png 173w,
/static/a6eff8a95bf438aa04ae3975093c7337/fc834/adt-explorer-from-portal.png 345w,
/static/a6eff8a95bf438aa04ae3975093c7337/36727/adt-explorer-from-portal.png 690w,
/static/a6eff8a95bf438aa04ae3975093c7337/17fa4/adt-explorer-from-portal.png 1035w,
/static/a6eff8a95bf438aa04ae3975093c7337/a5044/adt-explorer-from-portal.png 1380w,
/static/a6eff8a95bf438aa04ae3975093c7337/ca44b/adt-explorer-from-portal.png 1544w&quot;
        sizes=&quot;(max-width: 690px) 100vw, 690px&quot;
        loading=&quot;lazy&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;They have now announced a publicly available instance at &lt;a href=&quot;https://explorer.digitaltwins.azure.net/&quot;&gt;https://explorer.digitaltwins.azure.net/&lt;/a&gt; as well as run through of its awesome latest capabilities, such as:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;filtering the loaded graph: for big instances, it used to take a while to load a full graph (all nodes and relationships), it now seems to load much faster and simply allows to more easily single out or highlight some nodes or groups of nodes from these key words&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto;  max-width: 690px;&quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/f4f5ce5accf1ed0035b03a92014c78b2/e0e65/filter-and-highlight.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 63.089430894308954%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAANCAYAAACpUE5eAAAACXBIWXMAABYlAAAWJQFJUiTwAAABIUlEQVQ4y62S3U7DMAyF8xDNj9MsLdJSViHEJjEkqj0B3PIi3PPuBzvNytYNMQYXX+06J8dOG6W1hjHmBKkfcqlG7ZOfDLSea843KIYa1hosaodQ25xLbd6AnEETCJ7syRDZQyb0RGxCiMFz9GzKcF57YgMH4nXJpb7XSJw05DJZwzVlrYXLGNTc2R8QvEOzkCZizhomR9bLNONJzLSeJ6ylgxMDh7ZsdmXTXlh7NxnGMJ7IlfesC5TrolHjwjh2jgV3hiMNUanR1zqj5n/3r+Rv+N09uwYlo/6roTyqqjq6sNrYkWuOvOrvsFwmxBjRxIYJiN6i5UveNi3a9uZXqOdhh8ftEzbrNR62A/rhBZu3D6xe35H6e3QpIXW3SKm7iE8Z7FB01PROfQAAAABJRU5ErkJggg==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Filter or highlight&quot;
        title=&quot;Filter or highlight&quot;
        src=&quot;/static/f4f5ce5accf1ed0035b03a92014c78b2/36727/filter-and-highlight.png&quot;
        srcset=&quot;/static/f4f5ce5accf1ed0035b03a92014c78b2/acf4b/filter-and-highlight.png 173w,
/static/f4f5ce5accf1ed0035b03a92014c78b2/fc834/filter-and-highlight.png 345w,
/static/f4f5ce5accf1ed0035b03a92014c78b2/36727/filter-and-highlight.png 690w,
/static/f4f5ce5accf1ed0035b03a92014c78b2/17fa4/filter-and-highlight.png 1035w,
/static/f4f5ce5accf1ed0035b03a92014c78b2/a5044/filter-and-highlight.png 1380w,
/static/f4f5ce5accf1ed0035b03a92014c78b2/e0e65/filter-and-highlight.png 2460w&quot;
        sizes=&quot;(max-width: 690px) 100vw, 690px&quot;
        loading=&quot;lazy&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;model graph: which similar to what I started doing &lt;a href=&quot;/dtdl-models-inheritance&quot;&gt;here&lt;/a&gt; enables straight in the explorer to visualise relationships between models &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto;  max-width: 690px;&quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/40feb3ef5aef5a739af4141875cd74b5/8072a/model-graph.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 66.52360515021459%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAANCAYAAACpUE5eAAAACXBIWXMAABYlAAAWJQFJUiTwAAACOElEQVQ4y21Tu24TQRTdnoQkO6+d3dmn92Hv2o5ijAlYFJA6IhJQo9CRIg0FSoOQaEA08MWHO7NePxDFkWYfc+45957rVVWFpmmQ5TmauoZ9NsYgiqJDhLpH9J9vhDiOHbw4NmjbMSbjMdbXt0iKMZh/BiElhBA7RCmENhDsrH/e+845R5IkhBRekhfo5uc4n8/x+t0nZFXnCKVUBOkg7LlZQBadI3bviVhyBkmEco/c01rj5PgIp4+PcXL0yFVzF7jvLgjmQyu6xE6dKtZewu/W4MWUyDMIFWxJLbxxN8XVm7e4unmPV9c3iNMUnBGRvZC3EMkIaraGSGsoKqIDDkV9ZGkDXi8grADBXTFL7C3XL3H/4zfuf/7B3fdfKJu+h9Jkjky2K6iqRRCGkHEBFWcwUUCqiSQIILoXEGFCbnpS72J1idsvX/Hx4Rs+fH5AUdVgZNNWDbVEpAUUWY4MEZYd9GwJNaqgKQkqUEQa9j3eDMozNOpsVCInZAXZs1U3DZZJDpnmzmpQlNDzZ5CjMcziOUxODvKGXJS97cGyPTDfJ1XMQQxTsxbKGfVpDtU+JdsTKBMjpMwFkkEnMcRkeUDoFCq1i8c2JgOpnTCFOUhJuQ4o2KReSQSRRpiSwvqCshkdDsXG5oBkS9z3pC9IecsqyCgBb56Al9M+g3Z4e2ROoU23XR0hdrIH2MlxmjafUmwmq37yNAAhN3125x2Zy2Ga9oTbQG+3Y/iRFCrdr9ywGXvb8W+7/gLGvFwhbeEa6wAAAABJRU5ErkJggg==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Model graph&quot;
        title=&quot;Model graph&quot;
        src=&quot;/static/40feb3ef5aef5a739af4141875cd74b5/36727/model-graph.png&quot;
        srcset=&quot;/static/40feb3ef5aef5a739af4141875cd74b5/acf4b/model-graph.png 173w,
/static/40feb3ef5aef5a739af4141875cd74b5/fc834/model-graph.png 345w,
/static/40feb3ef5aef5a739af4141875cd74b5/36727/model-graph.png 690w,
/static/40feb3ef5aef5a739af4141875cd74b5/17fa4/model-graph.png 1035w,
/static/40feb3ef5aef5a739af4141875cd74b5/a5044/model-graph.png 1380w,
/static/40feb3ef5aef5a739af4141875cd74b5/8072a/model-graph.png 1864w&quot;
        sizes=&quot;(max-width: 690px) 100vw, 690px&quot;
        loading=&quot;lazy&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I am really excited about how these new features will improve my productivity and the productivity of my teams and colleagues. &lt;/p&gt;
&lt;p&gt;Be sure to keep an eye on the &lt;a href=&quot;https://github.com/Azure-Samples/digital-twins-explorer/issues?q=is%3Aopen+is%3Aissue+label%3Aenhancement&quot;&gt;enhancement requests&lt;/a&gt; and/or contribute for these to come to life faster :)&lt;/p&gt;
&lt;p&gt;One more things...&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto;  max-width: 690px;&quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/ca60a908a56ec435cf1b16a18ec0bfb5/c4421/unauthorised.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 49.75728155339806%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAKCAYAAAC0VX7mAAAACXBIWXMAABYlAAAWJQFJUiTwAAABU0lEQVQoz51Ty27CMBB0RSBOAiGCAw2vSk3ivCh5kCKQKvVxr3rosaf+Ua/92qnXyCi0SJU4jGa82R3vehUWBSEyESPLVwjDCIE8E18KtroN8FRv8Pj8gjRJEUXij2kQ/G9EdQSWZjma+y2aTYPdbo+N5DhOkKYZEnkBQWuKn4M2U4aUWBSlQlXVJ7osK8W1nIA0xYnLsmzp6mQqtlgs0e/3MRgMYNs2XNeV2pXaQbfbRa/XO8I0zTPgqo6++/4UbD5fwLIsjMdjeJ6H0WikQEkUJ3acg9ZnYjJrxzqdDiaTCdhsNlfuw+FQgRIpgZhzLgu4YoKOEVONNrcsaWgY0vAabLm8UeNSdzTuoSNHjUz6wFrbR815q2PTgGlcYer7YPSgv9cfhuJkc23onDUtpVhD3G1RfHyh/vyG2L2C0XYugZA/QyzkBSJHvH9D8vCOMG/wAzPwC/lB75ygAAAAAElFTkSuQmCC&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Unauthorised error...&quot;
        title=&quot;Unauthorised error...&quot;
        src=&quot;/static/ca60a908a56ec435cf1b16a18ec0bfb5/36727/unauthorised.png&quot;
        srcset=&quot;/static/ca60a908a56ec435cf1b16a18ec0bfb5/acf4b/unauthorised.png 173w,
/static/ca60a908a56ec435cf1b16a18ec0bfb5/fc834/unauthorised.png 345w,
/static/ca60a908a56ec435cf1b16a18ec0bfb5/36727/unauthorised.png 690w,
/static/ca60a908a56ec435cf1b16a18ec0bfb5/17fa4/unauthorised.png 1035w,
/static/ca60a908a56ec435cf1b16a18ec0bfb5/a5044/unauthorised.png 1380w,
/static/ca60a908a56ec435cf1b16a18ec0bfb5/c4421/unauthorised.png 1648w&quot;
        sizes=&quot;(max-width: 690px) 100vw, 690px&quot;
        loading=&quot;lazy&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;
&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto;  max-width: 684px;&quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/b90e995885300177d9ad70b7f7b0ea49/238ba/directories.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 50.29239766081871%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAKCAYAAAC0VX7mAAAACXBIWXMAABYlAAAWJQFJUiTwAAAB6klEQVQoz32SXWsaURCG91cIit9XqSjGZdfVbjSaRkOlSdFQ2vskrab0b5ailsZEk6yIWPGj6tnVhN4oytszR5SEll48zDvnzM6Zj5V0PYX9/UPOK5De+MnkARKJA6RSGQHd0znpdJrIcn24PdvbS4t4KR5P4vT0AwqF9yBNAbncW0SjOnZ3VRwdvUE2m0MkEkUm8xr5/DscH+dF/MlJAbFYgvsFqOpLKEockqrG8RRFiUHTdJydfUKp9AWXl2uKxc84Py/i4qIo7FqXeNxHYcmnbyS32w2XyyUgbbfbEQ6HYRgGKpUKqtUqyuUyms0mptMpTNN8hmVZW0uIhITX64XP54PT6eTtRdButwWtVkvQ7XbBGMNkMvkno9EI4/EYUigUQjAYFAk9Hg8cDoeokBKsVissl8utXSwWfzGfz/ndCsPhEL1eD5KmaXwBUT47hW8rxRcT58PPoN/vixaoKnqZKvgfg8FAWEmWZdHizs4LULWBQID/Ojo6nZ+4uzM49+J1y9rMjx6xhN3A2LMZrhdCsyNsNpsYQafTxu1tDY1GDRP2C4+P6+E/PJhcm5jN1nr2xKd7iRaxwe/38+RuyHIETWOI2tVvGPcz1K9NXF9R6ww3NYZKmaFRZ/jxnaF+w/DtK+OdMJgWwx9/SBjgJNW/ewAAAABJRU5ErkJggg==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;... and an empty list of directories for your (live?) account&quot;
        title=&quot;... and an empty list of directories for your (live?) account&quot;
        src=&quot;/static/b90e995885300177d9ad70b7f7b0ea49/238ba/directories.png&quot;
        srcset=&quot;/static/b90e995885300177d9ad70b7f7b0ea49/acf4b/directories.png 173w,
/static/b90e995885300177d9ad70b7f7b0ea49/fc834/directories.png 345w,
/static/b90e995885300177d9ad70b7f7b0ea49/238ba/directories.png 684w&quot;
        sizes=&quot;(max-width: 684px) 100vw, 684px&quot;
        loading=&quot;lazy&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;In the event you get an unauthorized error and are not able to change the directory (blank list) as shown below, there is currently a work around by using the following URL format:&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;shell&quot;&gt;&lt;pre class=&quot;language-shell&quot;&gt;&lt;code class=&quot;language-shell&quot;&gt;https://explorer.digitaltwins.azure.net/?tid&lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;&amp;lt;&lt;/span&gt;TENANT_ID&lt;span class=&quot;token operator&quot;&gt;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&quot;token assign-left variable&quot;&gt;eid&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;&amp;lt;&lt;/span&gt;ADT_HOSTNAME&lt;span class=&quot;token operator&quot;&gt;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h3 id=&quot;references&quot;&gt;&lt;a href=&quot;#references&quot; aria-label=&quot;references permalink&quot; class=&quot;anchor&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; focusable=&quot;false&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewBox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path fill-rule=&quot;evenodd&quot; d=&quot;M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;References:&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://explorer.digitaltwins.azure.net/&quot;&gt;https://explorer.digitaltwins.azure.net/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;IoT Show episode: &lt;a href=&quot;https://youtu.be/qbs6XRlIxes&quot;&gt;https://youtu.be/qbs6XRlIxes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;ADT explorer repo : &lt;a href=&quot;https://github.com/Azure-Samples/digital-twins-explorer&quot;&gt;https://github.com/Azure-Samples/digital-twins-explorer&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content:encoded><author>danuw@volto.io</author></item><item><title><![CDATA[DTDL models inheritance]]></title><description><![CDATA[Digital Twin Language Definition (DTDL) is brilliant and helps standardize how to create your twin models and how they relate to each other…]]></description><link>https://www.danuw.com//dtdl-models-inheritance</link><guid isPermaLink="false">https://www.danuw.com//dtdl-models-inheritance</guid><category><![CDATA[iot]]></category><category><![CDATA[azure iot]]></category><category><![CDATA[azure digital twins (adt)]]></category><category><![CDATA[smart building]]></category><category><![CDATA[documentation]]></category><pubDate>Sun, 20 Dec 2020 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;a href=&quot;https://github.com/Azure/opendigitaltwins-dtdl/blob/master/DTDL/v2/dtdlv2.md&quot;&gt;Digital Twin Language Definition (DTDL)&lt;/a&gt; is brilliant and helps standardize how to create your twin models and how they relate to each other. How about using it also to generate documentation in combination with mermaid?&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://mermaid-js.github.io/mermaid/#/&quot;&gt;Mermaid&lt;/a&gt; &quot;lets you represent diagrams using text and code&quot;. It makes it very easy to generate from what you are doing. Take a look at the samples in the &lt;a href=&quot;https://mermaid-js.github.io/mermaid-live-editor/&quot;&gt;online editor&lt;/a&gt; for reference.&lt;/p&gt;
&lt;p&gt;I first heard of mermaid in the Azure DevOps context, but I really first started getting value out of it, by using the mermaid &lt;em&gt;flow chart&lt;/em&gt; to represent the digital twin graphs we would generate through an import process. We would therefore get visual confirmation of what had been imported (a bit like what &lt;a href=&quot;https://docs.microsoft.com/en-us/samples/azure-samples/digital-twins-explorer/digital-twins-explorer/&quot;&gt;ADT Explorer&lt;/a&gt; is now used for). &lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto;  max-width: 690px;&quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/01fb2211e875303fb6b9818c2c1529ec/1c80d/mermaid-classdiagram-example.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 37.55924170616114%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAICAYAAAD5nd/tAAAACXBIWXMAABYlAAAWJQFJUiTwAAABl0lEQVQoz12Q3U7bQBCF/Ta9KkXqTXmh3lCoRF+Gl0AUetEr1N7QihgR8ZeQ4CRO3BR7wQQ7xvvvw+wG0ZSVPp3d2dmzMxOsffmGlc19rBIr67v/sbrxFW8+7uB7K8bm9i982NrH+897eEt37z4RGwtdfhO0LhIc/Gjj5+Eljro3aF2lCHsZjvsMvy+nOAgjsPsK/WSGk2uG4x6jnAxHHYbDs5RyMoR0djGnAdAgS4a4/TtBcc+g5SP+rYbQgLW0tUsxYMYqtMM+6sJgeQWakkdxjHGSIBoMMBwNIYQgDwvbOBooqSAJJbWnLOfodiYIWwOM4xxFUUAp43MC9zBJJojjEaIoQp7fwRjtK2maBVrpZwx4LSC49J/kd7lXXnNIIWGNRWCsQVk8kNk10vQGnNfPZvbF1GgN/qjR6zL0aHaCW5QPCoN+7lVy4+O3Wb0wrOsK0+kfX5nDmS0bWmNQlRyn7THGo8obsrSkM819plDNBTrnKRlyBIp+L6hCxjJU1Xwx9leGrl3XkqglqfZtOlzl7u5lTzwBQRpEx+bgLZoAAAAASUVORK5CYII=&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Default sample from the mermaid editor&quot;
        title=&quot;Default sample from the mermaid editor&quot;
        src=&quot;/static/01fb2211e875303fb6b9818c2c1529ec/36727/mermaid-classdiagram-example.png&quot;
        srcset=&quot;/static/01fb2211e875303fb6b9818c2c1529ec/acf4b/mermaid-classdiagram-example.png 173w,
/static/01fb2211e875303fb6b9818c2c1529ec/fc834/mermaid-classdiagram-example.png 345w,
/static/01fb2211e875303fb6b9818c2c1529ec/36727/mermaid-classdiagram-example.png 690w,
/static/01fb2211e875303fb6b9818c2c1529ec/17fa4/mermaid-classdiagram-example.png 1035w,
/static/01fb2211e875303fb6b9818c2c1529ec/a5044/mermaid-classdiagram-example.png 1380w,
/static/01fb2211e875303fb6b9818c2c1529ec/1c80d/mermaid-classdiagram-example.png 1688w&quot;
        sizes=&quot;(max-width: 690px) 100vw, 690px&quot;
        loading=&quot;lazy&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;However, I recently wondered how I could document the hierarchy I had in my &lt;em&gt;/Models&lt;/em&gt; folders alongside with the code, and got inspired by the &lt;em&gt;class diagram&lt;/em&gt; type of diagrams this time.
That would help visualise the inheritance (through DTDL&apos;s &lt;em&gt;extends&lt;/em&gt; property), and likely the main properties each model would each bring as part of their extendability.&lt;/p&gt;
&lt;p&gt;DTDL defines that you can extend with up to 2 interface at the time of writing.&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto;  max-width: 690px;&quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/de2f9f29f087ab92cd91fbb57adde783/bd138/extends-example.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 19.147084421235856%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAECAYAAACOXx+WAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAxklEQVQY011Q2XLEIAzL/39hp9s9s2VzEY7lCIGMKnhqy4wGY0uycfd8SOypYBAaVkd4l/C4LoghQ0mH735lPUM8VUPeS7sDeWr1GF+m6fu7hLMbuuvXiC3uuJ0HLJOhqcfpQ+BtAuRsmZ9Qj6Bxf1vITTh/CmjlMA8a9wv1IaH6OBvRlZLZtSIhxojgPad8w2gDYzRNJS6nGdO48q1a3rFeeRv5VVf1B31KLjTkF2rwG0c5GmqcOL3VgStI/2rHXx196jp+ANu3M1P7nAyDAAAAAElFTkSuQmCC&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Example of just extracting the extend properties to model inheritance from the ADT Explorer&amp;#39;s examples&quot;
        title=&quot;Example of just extracting the extend properties to model inheritance from the ADT Explorer&amp;#39;s examples&quot;
        src=&quot;/static/de2f9f29f087ab92cd91fbb57adde783/36727/extends-example.png&quot;
        srcset=&quot;/static/de2f9f29f087ab92cd91fbb57adde783/acf4b/extends-example.png 173w,
/static/de2f9f29f087ab92cd91fbb57adde783/fc834/extends-example.png 345w,
/static/de2f9f29f087ab92cd91fbb57adde783/36727/extends-example.png 690w,
/static/de2f9f29f087ab92cd91fbb57adde783/17fa4/extends-example.png 1035w,
/static/de2f9f29f087ab92cd91fbb57adde783/a5044/extends-example.png 1380w,
/static/de2f9f29f087ab92cd91fbb57adde783/bd138/extends-example.png 2298w&quot;
        sizes=&quot;(max-width: 690px) 100vw, 690px&quot;
        loading=&quot;lazy&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;h1 id=&quot;how-to-generate-the-graph&quot;&gt;&lt;a href=&quot;#how-to-generate-the-graph&quot; aria-label=&quot;how to generate the graph permalink&quot; class=&quot;anchor&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; focusable=&quot;false&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewBox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path fill-rule=&quot;evenodd&quot; d=&quot;M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;How to generate the graph?&lt;/h1&gt;
&lt;p&gt;To get started quickly is very easy using dotnet core with the following steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Create a project&lt;/li&gt;
&lt;li&gt;Add newtonsoft.json package&lt;/li&gt;
&lt;li&gt;Use Json2csharp to get strongly typed classes of your models and import into your project&lt;/li&gt;
&lt;li&gt;Iterate through your models and output as text the data (extendability and properties)&lt;/li&gt;
&lt;li&gt;output to console and/or file&lt;/li&gt;
&lt;li&gt;Generate diagram from output&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&quot;set-up-the-project&quot;&gt;&lt;a href=&quot;#set-up-the-project&quot; aria-label=&quot;set up the project permalink&quot; class=&quot;anchor&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; focusable=&quot;false&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewBox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path fill-rule=&quot;evenodd&quot; d=&quot;M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;Set up the project&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;Note the source code is available at &lt;a href=&quot;https://github.com/danuw/AdtGraphModel&quot;&gt;https://github.com/danuw/AdtGraphModel&lt;/a&gt; and uses models from &lt;a href=&quot;https://github.com/Azure-Samples/digital-twins-explorer/tree/master/client/examples&quot;&gt;ADT explorer&lt;/a&gt; or &lt;a href=&quot;https://github.com/Azure/opendigitaltwins-building/tree/master/Ontology&quot;&gt;realestatecore ontology&lt;/a&gt; as examples.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 id=&quot;create-a-new-folder-and-browse-to-it&quot;&gt;&lt;a href=&quot;#create-a-new-folder-and-browse-to-it&quot; aria-label=&quot;create a new folder and browse to it permalink&quot; class=&quot;anchor&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; focusable=&quot;false&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewBox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path fill-rule=&quot;evenodd&quot; d=&quot;M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;Create a new folder and browse to it.&lt;/h3&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;text&quot;&gt;&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;mkdir AdtModelsGraph
cd AdtModelsGraph/&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h3 id=&quot;create-the-console-app-and-add-the-newtonsoftjson-nuget-package&quot;&gt;&lt;a href=&quot;#create-the-console-app-and-add-the-newtonsoftjson-nuget-package&quot; aria-label=&quot;create the console app and add the newtonsoftjson nuget package permalink&quot; class=&quot;anchor&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; focusable=&quot;false&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewBox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path fill-rule=&quot;evenodd&quot; d=&quot;M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;Create the console app and add the Newtonsoft.Json nuget package.&lt;/h3&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;text&quot;&gt;&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;dotnet new console
dotnet add package Newtonsoft.Json&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h3 id=&quot;optionally-make-sure-it-all-compiles-and-carry-on&quot;&gt;&lt;a href=&quot;#optionally-make-sure-it-all-compiles-and-carry-on&quot; aria-label=&quot;optionally make sure it all compiles and carry on permalink&quot; class=&quot;anchor&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; focusable=&quot;false&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewBox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path fill-rule=&quot;evenodd&quot; d=&quot;M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;(optionally) Make sure it all compiles and carry on...&lt;/h3&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;text&quot;&gt;&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;dotnet build&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h2 id=&quot;generate-the-classes&quot;&gt;&lt;a href=&quot;#generate-the-classes&quot; aria-label=&quot;generate the classes permalink&quot; class=&quot;anchor&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; focusable=&quot;false&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewBox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path fill-rule=&quot;evenodd&quot; d=&quot;M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;Generate the classes&lt;/h2&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto;  max-width: 690px;&quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/28e8cf14a833da1e04573fd3b426653f/29c43/json2csharp-model.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 29.706115965051627%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAGCAYAAADDl76dAAAACXBIWXMAABYlAAAWJQFJUiTwAAAA/klEQVQY04WQ60rDQBCF8/4PpyL6o9RkE9M02Vwbc91L9nMbqLSgOPAxh+FwZmeDMBI8vTxzOB74CCPE8Uhd5shSUtWSpvIUBdM4orTBWLujjdkxxj4QhOKT1/c3oiQiPRVUsaA9C5I0IcsF5TmmECFD1zBcOoa23vU89kxDx9i3nuanB9Ya3DCgygolJbrvsfMC28Z9aaNZLhNZnJMXkqnr0fOK2+wDwbIsKB+ydB2rx/jT7Lpi/Nz605xzPnvbA9WsiEVKcoqps5zpa8Fo77lbHGit+a+uoUor1KRpZU/WSLLs7HXLfJn3xTffHngVf3Ezrv7V2903OLf96vsG5h3PbOf0dAkAAAAASUVORK5CYII=&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Using json2csharp to convert models&quot;
        title=&quot;Using json2csharp to convert models&quot;
        src=&quot;/static/28e8cf14a833da1e04573fd3b426653f/36727/json2csharp-model.png&quot;
        srcset=&quot;/static/28e8cf14a833da1e04573fd3b426653f/acf4b/json2csharp-model.png 173w,
/static/28e8cf14a833da1e04573fd3b426653f/fc834/json2csharp-model.png 345w,
/static/28e8cf14a833da1e04573fd3b426653f/36727/json2csharp-model.png 690w,
/static/28e8cf14a833da1e04573fd3b426653f/17fa4/json2csharp-model.png 1035w,
/static/28e8cf14a833da1e04573fd3b426653f/a5044/json2csharp-model.png 1380w,
/static/28e8cf14a833da1e04573fd3b426653f/29c43/json2csharp-model.png 2518w&quot;
        sizes=&quot;(max-width: 690px) 100vw, 690px&quot;
        loading=&quot;lazy&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Using a combination of your models you may end up with the following classes using json2csharp.com.&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;csharp&quot;&gt;&lt;pre class=&quot;language-csharp&quot;&gt;&lt;code class=&quot;language-csharp&quot;&gt;  &lt;span class=&quot;token keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;token class-name&quot;&gt;Property&lt;/span&gt;    &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;token keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;string&lt;/span&gt; name &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;set&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt; 
      &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token class-name&quot;&gt;JsonProperty&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;@type&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;
      &lt;span class=&quot;token keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;string&lt;/span&gt; Type &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;set&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt; 
      &lt;span class=&quot;token keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;string&lt;/span&gt; schema &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;set&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt; 
  &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;

  &lt;span class=&quot;token keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;token class-name&quot;&gt;Content&lt;/span&gt;    &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token class-name&quot;&gt;JsonProperty&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;@type&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;
      &lt;span class=&quot;token keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;string&lt;/span&gt; Type &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;set&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt; 
      &lt;span class=&quot;token keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;string&lt;/span&gt; name &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;set&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt; 
      &lt;span class=&quot;token keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;object&lt;/span&gt; schema &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;set&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt; 
      &lt;span class=&quot;token keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;bool&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;?&lt;/span&gt; writable &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;set&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt; 
      &lt;span class=&quot;token keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;string&lt;/span&gt; displayName &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;set&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt; 
      &lt;span class=&quot;token keyword&quot;&gt;public&lt;/span&gt; List&lt;span class=&quot;token operator&quot;&gt;&amp;lt;&lt;/span&gt;Property&lt;span class=&quot;token operator&quot;&gt;&gt;&lt;/span&gt; properties &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;set&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt; 
  &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;

  &lt;span class=&quot;token keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;token class-name&quot;&gt;Root&lt;/span&gt;    &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token class-name&quot;&gt;JsonProperty&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;@id&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;
      &lt;span class=&quot;token keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;string&lt;/span&gt; Id &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;set&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt; 
      &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token class-name&quot;&gt;JsonProperty&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;@type&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;
      &lt;span class=&quot;token keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;string&lt;/span&gt; Type &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;set&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt; 
      &lt;span class=&quot;token keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;string&lt;/span&gt; displayName &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;set&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt; 
      &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token class-name&quot;&gt;JsonProperty&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;@context&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;
      &lt;span class=&quot;token keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;string&lt;/span&gt; Context &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;set&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt; 
      &lt;span class=&quot;token keyword&quot;&gt;public&lt;/span&gt; List&lt;span class=&quot;token operator&quot;&gt;&amp;lt;&lt;/span&gt;Content&lt;span class=&quot;token operator&quot;&gt;&gt;&lt;/span&gt; contents &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;set&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
      &lt;span class=&quot;token keyword&quot;&gt;public&lt;/span&gt; List&lt;span class=&quot;token operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token keyword&quot;&gt;string&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;&gt;&lt;/span&gt; extends &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;set&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt; 
  &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h2 id=&quot;extract-the-data-in-a-mermaid-format&quot;&gt;&lt;a href=&quot;#extract-the-data-in-a-mermaid-format&quot; aria-label=&quot;extract the data in a mermaid format permalink&quot; class=&quot;anchor&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; focusable=&quot;false&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewBox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path fill-rule=&quot;evenodd&quot; d=&quot;M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;Extract the data in a mermaid format&lt;/h2&gt;
&lt;p&gt;Looking back at the examples, we can construct that graph using the following steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;start with &lt;code class=&quot;language-text&quot;&gt;classDiagram&lt;/code&gt; and subsequently use correct indentation for the connections&lt;/li&gt;
&lt;li&gt;Inheritance connections for classes (which we will use for DTDL interfaces) are represented with this pattern &lt;code class=&quot;language-text&quot;&gt;Class1 &amp;lt;|-- Class2&lt;/code&gt; as in &lt;code class=&quot;language-text&quot;&gt;Vehicule &amp;lt;|-- Car&lt;/code&gt; or &lt;code class=&quot;language-text&quot;&gt;Animal &amp;lt;|-- Chicken&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Properties use this pattern &lt;code class=&quot;language-text&quot;&gt;Class1 : +PropertyType PropertyName&lt;/code&gt; such as &lt;code class=&quot;language-text&quot;&gt;Vehicule : +Integer NumberOfWheeels&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Methods (which we will use for relationships) use this pattern &lt;code class=&quot;language-text&quot;&gt;Class1 : +MethodName()&lt;/code&gt; such as &lt;code class=&quot;language-text&quot;&gt;Vehicule : +MoveForward()&lt;/code&gt; and in our case &lt;code class=&quot;language-text&quot;&gt;Building : +contains()&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;So, first, make sure you add the Newtonsoft.Json in the usings, although  you will be needing the following ones:&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;csharp&quot;&gt;&lt;pre class=&quot;language-csharp&quot;&gt;&lt;code class=&quot;language-csharp&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;using&lt;/span&gt; System&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;using&lt;/span&gt; System&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;Collections&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;Generic&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;using&lt;/span&gt; System&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;IO&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;using&lt;/span&gt; System&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;Text&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;using&lt;/span&gt; System&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;Text&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;Json&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;using&lt;/span&gt; Newtonsoft&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;Json&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Then lets create these connections between classes, and list the contents.&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;csharp&quot;&gt;&lt;pre class=&quot;language-csharp&quot;&gt;&lt;code class=&quot;language-csharp&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;Main&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token keyword&quot;&gt;string&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt; args&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;            
    Console&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;WriteLine&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;Hello World!&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;

    &lt;span class=&quot;token keyword&quot;&gt;var&lt;/span&gt; currentDir &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; Directory&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;GetCurrentDirectory&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;token keyword&quot;&gt;var&lt;/span&gt; docPath &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; Path&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;Combine&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;currentDir&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;Models&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;

    &lt;span class=&quot;token keyword&quot;&gt;var&lt;/span&gt; models &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; Directory&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;EnumerateFiles&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;docPath&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;*.json&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; SearchOption&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;AllDirectories&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;

    &lt;span class=&quot;token keyword&quot;&gt;var&lt;/span&gt; sb &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;token class-name&quot;&gt;StringBuilder&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;token keyword&quot;&gt;var&lt;/span&gt; sbProps &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;token class-name&quot;&gt;StringBuilder&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
    sb&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;AppendLine&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;$&lt;span class=&quot;token string&quot;&gt;&quot;classDiagram&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;

    &lt;span class=&quot;token comment&quot;&gt;// Step 1 : Iterate through each model and save model id and relatioinship in mermaid format&lt;/span&gt;
    &lt;span class=&quot;token keyword&quot;&gt;foreach&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token keyword&quot;&gt;var&lt;/span&gt; m &lt;span class=&quot;token keyword&quot;&gt;in&lt;/span&gt; models&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;token keyword&quot;&gt;var&lt;/span&gt; myJsonString &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; File&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;ReadAllText&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;m&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;token keyword&quot;&gt;var&lt;/span&gt; model &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; JsonConvert&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token generic-method&quot;&gt;&lt;span class=&quot;token function&quot;&gt;DeserializeObject&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token class-name&quot;&gt;Root&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;myJsonString&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
        
        &lt;span class=&quot;token comment&quot;&gt;// Step 1.a : Record the inheritance&lt;/span&gt;
        &lt;span class=&quot;token keyword&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;model&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;extends &lt;span class=&quot;token operator&quot;&gt;!=&lt;/span&gt;&lt;span class=&quot;token keyword&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;token keyword&quot;&gt;foreach&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token keyword&quot;&gt;var&lt;/span&gt; e &lt;span class=&quot;token keyword&quot;&gt;in&lt;/span&gt; model&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;extends&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;
            &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
                sb&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;AppendLine&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;$&lt;span class=&quot;token string&quot;&gt;&quot;    {GetName(model.Id)} &amp;lt;|-- {GetName(e)}&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;token keyword&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;token comment&quot;&gt;// In cases where a model does have any inheritance so we can add properties to an existing &quot;class&quot;/model (and avoid errors)&lt;/span&gt;
        &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
            sb&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;AppendLine&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;$&lt;span class=&quot;token string&quot;&gt;&quot;    class {GetName(model.Id)}{{&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
            sb&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;AppendLine&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;    }&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;

        &lt;span class=&quot;token comment&quot;&gt;// Step 1.b: If there are properties, record them for that &quot;class&quot;&lt;/span&gt;
        &lt;span class=&quot;token keyword&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;model&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;contents &lt;span class=&quot;token operator&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;
            &lt;span class=&quot;token keyword&quot;&gt;continue&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;

        &lt;span class=&quot;token keyword&quot;&gt;foreach&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token keyword&quot;&gt;var&lt;/span&gt; c &lt;span class=&quot;token keyword&quot;&gt;in&lt;/span&gt; model&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;contents&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;token keyword&quot;&gt;var&lt;/span&gt; s &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; c&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;schema &lt;span class=&quot;token keyword&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;string&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;token keyword&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;c&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;Type&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;Contains&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;Relationship&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;
            &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
                sbProps&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;AppendLine&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;$&lt;span class=&quot;token string&quot;&gt;&quot;    {GetName(model.Id)} : +{c.name}()&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
            &lt;span class=&quot;token keyword&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;s &lt;span class=&quot;token operator&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;null&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;||&lt;/span&gt; s&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;Contains&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;{&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;||&lt;/span&gt; s&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;Contains&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;:&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;token comment&quot;&gt;// Complex type, simplified as &quot;Object&quot; for now&lt;/span&gt;
                sbProps&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;AppendLine&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;$&lt;span class=&quot;token string&quot;&gt;&quot;    {GetName(model.Id)} : +Object {c.name}&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
            &lt;span class=&quot;token keyword&quot;&gt;else&lt;/span&gt;
            &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
                sbProps&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;AppendLine&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;$&lt;span class=&quot;token string&quot;&gt;&quot;    {GetName(model.Id)} : +{c.schema} {c.name}&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
            &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;   
        &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;

    &lt;span class=&quot;token comment&quot;&gt;// Step 2 : Output the results&lt;/span&gt;
    &lt;span class=&quot;token keyword&quot;&gt;var&lt;/span&gt; mermaidPath &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; Path&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;Combine&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;currentDir&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;mermaid.mmd&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
    Console&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;WriteLine&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;mermaidPath&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;

    &lt;span class=&quot;token comment&quot;&gt;// output all the recorded connections to create a mermaid graph of the relationships&lt;/span&gt;
    &lt;span class=&quot;token keyword&quot;&gt;var&lt;/span&gt; mermaid &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; sb&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;ToString&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;+&lt;/span&gt; sbProps&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;ToString&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
    Console&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;WriteLine&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;mermaid&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;

    &lt;span class=&quot;token comment&quot;&gt;// Save it to file to view in a mermaid (pre-)viewer.&lt;/span&gt;
    File&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;WriteAllText&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;mermaidPath&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; mermaid&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;

    Console&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;WriteLine&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;$&lt;span class=&quot;token string&quot;&gt;&quot;Mermaid saved to {mermaidPath} &quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
  &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Above, we only differentiate between &lt;em&gt;Property&lt;/em&gt; and &lt;em&gt;RelationShip&lt;/em&gt; in contents. I may in the future, start to differentiate between &lt;em&gt;Property&lt;/em&gt; and &lt;em&gt;Telemetry&lt;/em&gt; as this is easily missed difference at first.&lt;/p&gt;
&lt;p&gt;Finally, model id characters are not accepted so here we are simplifying the names by removing the domains and keeping the version, but this should be adapted to the complexity of your scenario.&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;csharp&quot;&gt;&lt;pre class=&quot;language-csharp&quot;&gt;&lt;code class=&quot;language-csharp&quot;&gt;    &lt;span class=&quot;token keyword&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;string&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;GetName&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token keyword&quot;&gt;string&lt;/span&gt; id&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;token keyword&quot;&gt;var&lt;/span&gt; position &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; id&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;LastIndexOf&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;:&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;token comment&quot;&gt;// I believe that charater is mandatory so no extra check needed here to ensure it does not fail (safe assumption)&lt;/span&gt;
        id &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; id&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;Substring&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;position&lt;span class=&quot;token operator&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;token comment&quot;&gt;// removing the domain info from id&lt;/span&gt;
        &lt;span class=&quot;token keyword&quot;&gt;return&lt;/span&gt; id&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;Replace&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;;&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;token comment&quot;&gt;// removing the &apos;;&apos;and keeping the version&lt;/span&gt;
    &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Find the complete code at &lt;a href=&quot;https://github.com/danuw/AdtGraphModel&quot;&gt;https://github.com/danuw/AdtGraphModel&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;convert-to-diagram&quot;&gt;&lt;a href=&quot;#convert-to-diagram&quot; aria-label=&quot;convert to diagram permalink&quot; class=&quot;anchor&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; focusable=&quot;false&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewBox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path fill-rule=&quot;evenodd&quot; d=&quot;M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;Convert to diagram&lt;/h2&gt;
&lt;p&gt;Finally, visualise the converted diagram using some of the many options such as &lt;a href=&quot;https://github.com/mermaid-js/mermaid-cli&quot;&gt;mermaid-cli&lt;/a&gt;, or one of the mainly previewing extensions in VS code for example. An easy one remains the &lt;a href=&quot;https://mermaid-js.github.io/mermaid-live-editor/&quot;&gt;online editor at https://mermaid-js.github.io/mermaid-live-editor/&lt;/a&gt;. You can also use the npm package (&lt;a href=&quot;https://github.com/mermaid-js/mermaid-cli#run-with-npx&quot;&gt;try npx version of the cli for a quick and clutter free test&lt;/a&gt; to install packages and execute on the fly), to generate a transparent svg and/or complete the automation of getting your relationships into a diagram locally.&lt;/p&gt;
&lt;h1 id=&quot;finally&quot;&gt;&lt;a href=&quot;#finally&quot; aria-label=&quot;finally permalink&quot; class=&quot;anchor&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; focusable=&quot;false&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewBox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path fill-rule=&quot;evenodd&quot; d=&quot;M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;Finally...&lt;/h1&gt;
&lt;p&gt;Whether you were asked, or you simply needed it for yourself, this should now give you a great way to document your models going forward.&lt;/p&gt;
&lt;p&gt;This is especially useful when you want to make some updates and refactor/refine models&apos; inheritance and/or properties.&lt;/p&gt;
&lt;p&gt;This is still a very basic implementation though, which, for example, does not cover complex data types, so feel free to &lt;a href=&quot;https://github.com/danuw/AdtGraphModel&quot;&gt;help extend it&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/fd5baa96d5cff8a075564ac27185e4fc/realestatecore-fullontology.svg&quot; alt=&quot;RealEstateCore full ontology&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/58eb2fadc1789e19bd674ab4dd6b690b/realestatecore-HVACEquipmentOntology.svg&quot; alt=&quot;RealEstateCore HVAC Equipment ontology only&quot;&gt;&lt;/p&gt;
&lt;h3 id=&quot;references&quot;&gt;&lt;a href=&quot;#references&quot; aria-label=&quot;references permalink&quot; class=&quot;anchor&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; focusable=&quot;false&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewBox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path fill-rule=&quot;evenodd&quot; d=&quot;M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;References:&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Mermaid online editor at &lt;a href=&quot;https://mermaid-js.github.io/mermaid-live-editor/&quot;&gt;https://mermaid-js.github.io/mermaid-live-editor/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Example models from:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;ADT explorer at &lt;/li&gt;
&lt;li&gt;Azure RealEstate Ontology at &lt;a href=&quot;https://github.com/Azure/opendigitaltwins-building/tree/master/Ontology&quot;&gt;https://github.com/Azure/opendigitaltwins-building/tree/master/Ontology&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;</content:encoded><author>danuw@volto.io</author></item><item><title><![CDATA[New query COUNT functionality for Azure Digital Twins]]></title><description><![CDATA[A quick one in case people did not notice it is now possible to use COUNT in queries to the Digital Twins v2. Very basic, but makes a big…]]></description><link>https://www.danuw.com//new-query-count-functionality-for-azure-digital-twins</link><guid isPermaLink="false">https://www.danuw.com//new-query-count-functionality-for-azure-digital-twins</guid><category><![CDATA[iot]]></category><category><![CDATA[azure iot]]></category><category><![CDATA[azure digital twins (adt)]]></category><category><![CDATA[smart building]]></category><pubDate>Mon, 12 Oct 2020 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;A quick one in case people did not notice it is now possible to use COUNT in queries to the Digital Twins v2.&lt;/p&gt;
&lt;p&gt;Very basic, but makes a big difference in practice.&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;sql&quot;&gt;&lt;pre class=&quot;language-sql&quot;&gt;&lt;code class=&quot;language-sql&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;SELECT&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;COUNT&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;FROM&lt;/span&gt; DIGITALTWINS&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;returned ...&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;json&quot;&gt;&lt;pre class=&quot;language-json&quot;&gt;&lt;code class=&quot;language-json&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;&quot;COUNT&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;547&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Should help with a lot of basic scenarios for showing totals on dashboards, notifications badges, or simply paging...&lt;/p&gt;
&lt;p&gt;Anyway, more on queries at &lt;a href=&quot;https://docs.microsoft.com/en-us/azure/digital-twins/how-to-query-graph#count-items&quot;&gt;https://docs.microsoft.com/en-us/azure/digital-twins/how-to-query-graph#count-items&lt;/a&gt;&lt;/p&gt;</content:encoded><author>danuw@volto.io</author></item><item><title><![CDATA[SPFx not appearing on refresh anymore!]]></title><description><![CDATA[Last summer I started looking a little bit more into SPFx development, having to port a very basic HTML/CSS/JS component from content editor…]]></description><link>https://www.danuw.com//sp-fx-not-appearing-on-refresh-anymore</link><guid isPermaLink="false">https://www.danuw.com//sp-fx-not-appearing-on-refresh-anymore</guid><category><![CDATA[Office365]]></category><category><![CDATA[Power Automate]]></category><category><![CDATA[MS Flow]]></category><category><![CDATA[MS Planner]]></category><category><![CDATA[Microsoft]]></category><pubDate>Tue, 15 Sep 2020 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Last summer I started looking a little bit more into SPFx development, having to port a very basic HTML/CSS/JS component from content editor WebPart to Modern SharePoint site (where iFrame was not a viable option).&lt;/p&gt;
&lt;p&gt;After I successfully, though basically, ported my code over, my deployed package started disappearing on page refresh whether it was while saving a draft or while publishing the page. When editing the page, the WebPart container would still look bigger, as if a ghost of my web part was still there and duplicating that section would reveal the app in the new copy until the next save and refresh cycle.&lt;/p&gt;
&lt;p&gt;I like to start versionning to the minimum so I can incrementally get a first minor version as the first draft.&lt;/p&gt;
&lt;p&gt;This issue occurring on refresh, I could not easily undo the last thing I had done, as I had &quot;made changes -&gt; refreshed -&gt; made changes -&gt; ...&quot; a few times.&lt;/p&gt;
&lt;p&gt;We were striping the code of anything that could be the issue and that is when it struck me: I had read (and I cannot find where anymore) that data version was meant to be only two parts, so:&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;typescript&quot;&gt;&lt;pre class=&quot;language-typescript&quot;&gt;&lt;code class=&quot;language-typescript&quot;&gt;    &lt;span class=&quot;token keyword&quot;&gt;protected&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;get&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;dataVersion&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; Version &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;token keyword&quot;&gt;return&lt;/span&gt; Version&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;parse&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&apos;1.0&apos;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;as opposed to &lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;typescript&quot;&gt;&lt;pre class=&quot;language-typescript&quot;&gt;&lt;code class=&quot;language-typescript&quot;&gt;    &lt;span class=&quot;token keyword&quot;&gt;protected&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;get&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;dataVersion&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; Version &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;token keyword&quot;&gt;return&lt;/span&gt; Version&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;parse&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&apos;0.0.1&apos;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Changing this back and forth confirmed this was the exact issue.&lt;/p&gt;
&lt;p&gt;Even though the answer was in my head from something I had read while the app was still working, I still needed some help, so, I hope this helps some out there (and do let me know if you found where this is in the documentation so I can add a reference - thanks).&lt;/p&gt;</content:encoded><author>danuw@volto.io</author></item><item><title><![CDATA[Using tags with Azure Digital Twins]]></title><description><![CDATA[The latest version Azure Digital Twins' DTDL (Digital Twin Definition Language v2) supports a wide variety of schemas. One of them is the…]]></description><link>https://www.danuw.com//using-tags-with-azure-digital-twins</link><guid isPermaLink="false">https://www.danuw.com//using-tags-with-azure-digital-twins</guid><category><![CDATA[iot]]></category><category><![CDATA[azure iot]]></category><category><![CDATA[azure digital twins (adt)]]></category><category><![CDATA[smart building]]></category><pubDate>Tue, 01 Sep 2020 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;The latest version Azure Digital Twins&apos; DTDL (Digital Twin Definition Language v2) supports a wide variety of schemas.&lt;/p&gt;
&lt;p&gt;One of them is the ability to add tags using a &lt;a href=&quot;https://github.com/Azure/opendigitaltwins-dtdl/blob/master/DTDL/v2/dtdlv2.md#map&quot;&gt;Map&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The documentation found &lt;a href=&quot;https://docs.microsoft.com/en-us/azure/digital-twins/how-to-use-tags&quot;&gt;here&lt;/a&gt; shows you how to leverage the Map type to add &lt;a href=&quot;https://docs.microsoft.com/en-us/azure/digital-twins/how-to-use-tags#marker-tags&quot;&gt;marker&lt;/a&gt; or &lt;a href=&quot;https://docs.microsoft.com/en-us/azure/digital-twins/how-to-use-tags#value-tags&quot;&gt;value&lt;/a&gt; tags.&lt;/p&gt;
&lt;p&gt;The following in the case of a value tag.&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;json&quot;&gt;&lt;pre class=&quot;language-json&quot;&gt;&lt;code class=&quot;language-json&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;&quot;@type&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;Property&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;&quot;name&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;tags&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;&quot;schema&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;token property&quot;&gt;&quot;@type&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;Map&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;token property&quot;&gt;&quot;mapKey&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;token property&quot;&gt;&quot;name&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;tagName&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;token property&quot;&gt;&quot;schema&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;string&quot;&lt;/span&gt;
    &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;token property&quot;&gt;&quot;mapValue&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;token property&quot;&gt;&quot;name&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;tagValue&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
      &lt;span class=&quot;token property&quot;&gt;&quot;schema&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;string&quot;&lt;/span&gt;
    &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;... but I did not easily find examples of how to create new twins in code using these more complex schemas (&lt;a href=&quot;https://github.com/Azure/opendigitaltwins-dtdl/blob/master/DTDL/v2/dtdlv2.md#map&quot;&gt;Map&lt;/a&gt;, &lt;a href=&quot;https://github.com/Azure/opendigitaltwins-dtdl/blob/master/DTDL/v2/dtdlv2.md#array&quot;&gt;Array&lt;/a&gt;, &lt;a href=&quot;https://github.com/Azure/opendigitaltwins-dtdl/blob/master/DTDL/v2/dtdlv2.md#enum&quot;&gt;Enum&lt;/a&gt;, &lt;a href=&quot;https://github.com/Azure/opendigitaltwins-dtdl/blob/master/DTDL/v2/dtdlv2.md#object&quot;&gt;object&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;So to stay on the &lt;a href=&quot;https://docs.microsoft.com/en-us/azure/digital-twins/how-to-use-tags#add-value-tags-to-digital-twins&quot;&gt;example&lt;/a&gt; from the Microsoft&apos;s documentation, to add tags using the Map schema, you can create a &lt;code class=&quot;language-text&quot;&gt;Dictionary&amp;lt;string, string&amp;gt;&lt;/code&gt; to add tags to your metadata as follows.&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;csharp&quot;&gt;&lt;pre class=&quot;language-csharp&quot;&gt;&lt;code class=&quot;language-csharp&quot;&gt;myTwinMetadata&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;Add&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;$&lt;span class=&quot;token string&quot;&gt;&quot;tags&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;token generic-method&quot;&gt;&lt;span class=&quot;token function&quot;&gt;Dictionary&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;token keyword&quot;&gt;string&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;string&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;red&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;&quot;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;size&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;large&quot;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;What would or do you use the tags for?&lt;/p&gt;
&lt;p&gt;Feel free to message on twitter to let me know...&lt;/p&gt;</content:encoded><author>danuw@volto.io</author></item><item><title><![CDATA[Asking for confirmation when using Microsoft Power Automate and Planner]]></title><description><![CDATA[As discussed in my previous post, posting via flow immediatly after people would inadverdetly tick a box (which completes that task) would…]]></description><link>https://www.danuw.com//asking-for-confirmation-when-using-microsoft-power-automate-and-planner</link><guid isPermaLink="false">https://www.danuw.com//asking-for-confirmation-when-using-microsoft-power-automate-and-planner</guid><category><![CDATA[Office365]]></category><category><![CDATA[Power Automate]]></category><category><![CDATA[MS Flow]]></category><category><![CDATA[MS Planner]]></category><category><![CDATA[Microsoft]]></category><pubDate>Tue, 25 Aug 2020 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;As discussed in my &lt;a href=&quot;/ce39c0afcee31ac313b38d16553dcee1/2020-08-04-using-flow-with-planner-for-praise.md&quot;&gt;previous post&lt;/a&gt;, posting via flow immediatly after people would inadverdetly tick a box (which completes that task) would not allow deleting that message on the channel. So we needed to give a chance to people to correct that mistake before Flow would post that message.&lt;/p&gt;
&lt;p&gt;The solution seemed to use a timeout. We wanted the post to happen pretty quickly after completion of the task, but like the &quot;delay send&quot; functionality in mailboxes, here we needed to say: &quot;give it 5 minutes!&quot;.&lt;/p&gt;
&lt;p&gt;It is possible to &quot;configure run after&quot; actions that activate on error, time out etc... When timing out, the whole flow was failing and it was not possible to go ahead and post anymore.&lt;/p&gt;
&lt;p&gt;That is how I found out about the Try/Catch/Finally pattern and how to apply it to flow. In our case here, finally is not necessary.&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto;  max-width: 620px;&quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/9aeed18d70041b30e606ba4d360822d9/a5ed1/try-catch.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 39.193548387096776%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAICAYAAAD5nd/tAAAACXBIWXMAAAsSAAALEgHS3X78AAABIUlEQVQoz5WPwU7CQBCG9zl5Ebno0ZMXDL6DHsWERC/qWU9CaRuJlNDdbrftdpFEiKH7O1tTIggmTvLl3535Z3aHPV918HTZgclSLApFNPo/3nPq0znYzUkL18ctxOMQOo6+4XuIJygO1Yh8RnUxA7PWwtFEc99AufVyiUWW4WO12u/ZzLBgD90j3Hfb4JMxcj7FPOUwP5grgZJ+VkRjGDqbnXrtIUoZY55JsMeLNhzx2yvy+PfABtdgXFMqas829Kgkn6KBn+sKjr9iRaumStXqFqsqi8pu06zNTs/O4QjCEJ43wsj34fsBaYCXwRDeyMdg6CGKppCpgkgkkl2kBBdOFVivf4de/7ZOiiTZmIRIwLmoc46i0NC6PEihNUpj8AWM11FfWi/IpwAAAABJRU5ErkJggg==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;try catch&quot;
        title=&quot;try catch&quot;
        src=&quot;/static/9aeed18d70041b30e606ba4d360822d9/a5ed1/try-catch.png&quot;
        srcset=&quot;/static/9aeed18d70041b30e606ba4d360822d9/acf4b/try-catch.png 173w,
/static/9aeed18d70041b30e606ba4d360822d9/fc834/try-catch.png 345w,
/static/9aeed18d70041b30e606ba4d360822d9/a5ed1/try-catch.png 620w&quot;
        sizes=&quot;(max-width: 620px) 100vw, 620px&quot;
        loading=&quot;lazy&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;h2 id=&quot;&quot;&gt;&lt;a href=&quot;#&quot; aria-label=&quot; permalink&quot; class=&quot;anchor&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; focusable=&quot;false&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewBox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path fill-rule=&quot;evenodd&quot; d=&quot;M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Here we are using try/catch on the confirmation request and response or non response/time out. Should the user respond, we record his choice in a variable and act according to his response. Should it time out, we assume the completion was intentional and go ahead.&lt;/p&gt;
&lt;ol start=&quot;0&quot;&gt;
&lt;li&gt;Initialise a variable to track the response
&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto;  max-width: 504px;&quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/ac4709e206176f2ec79bfbcc51f72c96/1654f/add-variable.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 45.436507936507944%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAJCAYAAAAywQxIAAAACXBIWXMAAAsSAAALEgHS3X78AAABaUlEQVQoz4WRS07DMBRFuydWw5hVMIQxQ5aAEBPGMECIDVBQW0SgnzRpfrXjNH/bbdqL7SgSQm2xdPzes6+vf737/hPObi8x9ueYRS4mgYNp6OLbszEnPrxkiUUSHcVTOHGIOEvQu3t9xOnNOUb2F0YzC0PFYPqJvjXAJHTgrZZwWGDQi90/Zl1txwGoNuSFQJ1IbNYbbDaNio3J13INXgsILsBihpgylUvUFVfjB+AcvZfrEFcnY4yHIaz3Baw3D7MPAuoKEIeryBHZlYGqmuxBa8IZR0Iq9KznFR4ufLCoVBSgQW5IqUAWC+RMomBrQ34APbciAkWqTthAYgeu2KJtO8SMIgh8ELpEVZf/UvMKeZ61V9ZvVGYlmm1r2DQNCCHKMECW5UqYm2jyPXQaxhLUda0+RbmWZYmubZVxmqZKwEApRVEUkFJCCHGUqqraE+pOSmEWdQje/phGi/XOms5Y/sLUso1a/wObJqe2fNM90QAAAABJRU5ErkJggg==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;0- Initialise a variable to track the response&quot;
        title=&quot;0- Initialise a variable to track the response&quot;
        src=&quot;/static/ac4709e206176f2ec79bfbcc51f72c96/1654f/add-variable.png&quot;
        srcset=&quot;/static/ac4709e206176f2ec79bfbcc51f72c96/acf4b/add-variable.png 173w,
/static/ac4709e206176f2ec79bfbcc51f72c96/fc834/add-variable.png 345w,
/static/ac4709e206176f2ec79bfbcc51f72c96/1654f/add-variable.png 504w&quot;
        sizes=&quot;(max-width: 504px) 100vw, 504px&quot;
        loading=&quot;lazy&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Try and get a response
&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto;  max-width: 690px;&quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/82440db2449b7d420af817826e49afd8/0d2ff/try.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 89.79007633587787%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAYAAABb0P4QAAAACXBIWXMAAAsSAAALEgHS3X78AAACUElEQVQ4y41UW27bMBDU/W/Q7wK9RQ/QtGjSFkESFIgby5IjWU+T4puaLinZsWMFyQKDpShydri7ZPL18yesH1NsnraEjJAjW+fI0y3y9Xby8zjMx/9Pkz/F+l+O53SDRA0M4wh47+GcR7Dr3xX+3BYoihZZViPPG+TbFkW5R9NK1LUAY4r2jbRvxOhnT9+JNRqTjZE4WN1wlGULKRWGQUIIFSGlhtaWxjr+W7LEKDnRjVOEYMYo9D0RKgVLyo0xJ9Cw1sYTHfacIjFaXRBqrdF1Pbq6gqrLuBl0pEB0IA7j1/smhQuEilQ752DEgOLvPR7SR/xa3aHruxhMCBH9BwinXFrrMGgHSRiERFY94yFfgVOAoDaoCwE/rJAxDsY5KVXxeJ6qP1p/JHuH8KUoMVdkVz+u8e3qBmmaId1k2O0qapkSVV1TyzSoqhp7xs4Ij0Vxcy4wBwmToR+zvEfbcmilYUiRNqSMVLk5aFB4quyokIseyilaSItHR23ioKhtGO8pfxzGUWWpSJYzGAoe+jbAUDrGQHoKCpbc13d47FeQVoJZjsEO4OSZIWgG5gV4scHw84ZIBVy/h9uzCE+5dnR0R96HOSlfGvtg1tGRPc7SoLjD9y8NtquOelOh21GfludoCwUlLRJNhIeCBAhlIY07fk85dWDtQCnxKG5zlE9FvEViEDMkBlIfOmKxbaZ7/YJIjLkYFNAaewz4Ghd3eRGHe+ungI78XtiYnteBE2cN3rNA48fLucXXZlcW9BB01HPtIpqmRf5coayaN9ec4j/P03iqEK+MVwAAAABJRU5ErkJggg==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;1- Try and get a response&quot;
        title=&quot;1- Try and get a response&quot;
        src=&quot;/static/82440db2449b7d420af817826e49afd8/36727/try.png&quot;
        srcset=&quot;/static/82440db2449b7d420af817826e49afd8/acf4b/try.png 173w,
/static/82440db2449b7d420af817826e49afd8/fc834/try.png 345w,
/static/82440db2449b7d420af817826e49afd8/36727/try.png 690w,
/static/82440db2449b7d420af817826e49afd8/17fa4/try.png 1035w,
/static/82440db2449b7d420af817826e49afd8/0d2ff/try.png 1048w&quot;
        sizes=&quot;(max-width: 690px) 100vw, 690px&quot;
        loading=&quot;lazy&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Catch any issue&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto;  max-width: 643px;&quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/be70ce7170a1058a316328e9f073552b/b6592/catch.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 52.41057542768274%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAKCAYAAAC0VX7mAAAACXBIWXMAAAsSAAALEgHS3X78AAABd0lEQVQoz6VRzU7CQBjsm/govo6P4NWjF0+cTDSevHjxHfRgiBKJhCYCLS2ltGxbWlp2S9vdcbv8RAT04CazM7vfZL790e7PTvF0ewnXthGMDERjaxeu3Lf6CG1D6b36xuNI9sbQnq/PMXx7RJrMwGKCfB6BzcMtsyQA3SA+gnUti0NooQ28PzDMwxxxRBGHFEnEMAsWirOkAMs4aPo3yoJDe7nzcXGiQ29O0G1Z6L7a0FsOPppDxZYegVhL+CY7iOlwBdegWKRLaAUrkccVfhvpPJXdS6UFFzvgFUdVVVvW2h2Cxo0OwyQYjQiG1hT2KFixTZT+7DnoD1ylazjjSMGdxCBkgSCUpwwoGJMnbLUJrhod9Po+LBkyGExgGJ5cj2GavgobyHWt61rNhunJZqtw309BZJg3XYBSGSgEx/+HUDPn8sqcrwKFEHuojbF8aJpXyEv5i5WojT98autboHzMQ2Fi7QqTHLOsQJSVYAVXTY7560/5AhQj9qYF+X0XAAAAAElFTkSuQmCC&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;2- Catch any issue&quot;
        title=&quot;2- Catch any issue&quot;
        src=&quot;/static/be70ce7170a1058a316328e9f073552b/b6592/catch.png&quot;
        srcset=&quot;/static/be70ce7170a1058a316328e9f073552b/acf4b/catch.png 173w,
/static/be70ce7170a1058a316328e9f073552b/fc834/catch.png 345w,
/static/be70ce7170a1058a316328e9f073552b/b6592/catch.png 643w&quot;
        sizes=&quot;(max-width: 643px) 100vw, 643px&quot;
        loading=&quot;lazy&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;ol start=&quot;3&quot;&gt;
&lt;li&gt;Send messages accordingly&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto;  max-width: 690px;&quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/26e9916a4d2f99ab111f0302e6c99865/7449d/act.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 50.853889943074%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAKCAYAAAC0VX7mAAAACXBIWXMAAAsSAAALEgHS3X78AAABnklEQVQoz42S63KbMBCFef83a91p7Iw7aWtnnNTGBF0RCATocrqAmTpNf3RnvlkkDoeVdrOUElZijJjiy8MOu/0ejDFc8hzn8wUlZ9BVBakUhJSwtp21999PZOvD+nKK2li87DlEaWAqg9a1kEcGdRYYxhHee4yU/xUZ0vu/TFXGEKFFDdu0SDFNEvg+wA8e8abzIXyobq7we/0Dpq/Qxx4uupnWd7Dewo5E6NA0CvHbA2JjkFqLaBskAi0dm9ZrTs4h2+SP+HTagmmBXBa4qrc5TxSagZFZR8ZPuxwvJw7JNVipoGRNV+PQ3KgrKqYbkG2Pr/j8dITUBgWXyBnHuShRSgVOexNu6LHZChyeJQRdBeM1SmaoORaV6alZDko7dG5E9uu1xeFQQesGnIRixkCplo46oq5HakDA9pHj+SQhqTIhFq3WHepZM8zGbjIE0rsu9T5iCOvenwnYfC3x88DxRsfNrxJX4pILygrXQlHVDbqODOeu3hHCwrJONyKNyvqOuu0DXQONjr/XL7oM/xHLSMS70UpkGGbDv0fuN1hGBB0e7Yc6AAAAAElFTkSuQmCC&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;3- Send messages accordingly&quot;
        title=&quot;3- Send messages accordingly&quot;
        src=&quot;/static/26e9916a4d2f99ab111f0302e6c99865/36727/act.png&quot;
        srcset=&quot;/static/26e9916a4d2f99ab111f0302e6c99865/acf4b/act.png 173w,
/static/26e9916a4d2f99ab111f0302e6c99865/fc834/act.png 345w,
/static/26e9916a4d2f99ab111f0302e6c99865/36727/act.png 690w,
/static/26e9916a4d2f99ab111f0302e6c99865/17fa4/act.png 1035w,
/static/26e9916a4d2f99ab111f0302e6c99865/7449d/act.png 1054w&quot;
        sizes=&quot;(max-width: 690px) 100vw, 690px&quot;
        loading=&quot;lazy&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;h2 id=&quot;thats-it-should-work-like-a-charm-&quot;&gt;&lt;a href=&quot;#thats-it-should-work-like-a-charm-&quot; aria-label=&quot;thats it should work like a charm  permalink&quot; class=&quot;anchor&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; focusable=&quot;false&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewBox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path fill-rule=&quot;evenodd&quot; d=&quot;M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;THAT&apos;s IT! (should work like a charm ;)&lt;/h2&gt;
&lt;p&gt;I had issues getting the confirmation working (trial and error on the syntax), so I hope the screenshots help.&lt;/p&gt;
&lt;p&gt;Thank you...&lt;/p&gt;
&lt;h2 id=&quot;resources&quot;&gt;&lt;a href=&quot;#resources&quot; aria-label=&quot;resources permalink&quot; class=&quot;anchor&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; focusable=&quot;false&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewBox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path fill-rule=&quot;evenodd&quot; d=&quot;M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;Resources:&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://poszytek.eu/en/microsoft-en/office-365-en/powerautomate-en/try-catch-pattern-in-microsoft-flow/&quot;&gt;Try Catch main reference&lt;/a&gt; &lt;/p&gt;</content:encoded><author>danuw@volto.io</author></item><item><title><![CDATA[Querying Rigado data through IoT Central]]></title><description><![CDATA[Quick one around querying IoTC Rest API to retrieve the last known values of some of your Rigado connected sensors...  It starts with the…]]></description><link>https://www.danuw.com//querying-rigado-data-through-io-t-central</link><guid isPermaLink="false">https://www.danuw.com//querying-rigado-data-through-io-t-central</guid><category><![CDATA[iot]]></category><category><![CDATA[azure iot]]></category><category><![CDATA[azure digital twins (adt)]]></category><pubDate>Fri, 07 Aug 2020 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Quick one around querying IoTC Rest API to retrieve the last known values of some of your &lt;a href=&quot;https://www.rigado.com/&quot;&gt;Rigado&lt;/a&gt; connected sensors...&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto;  max-width: 690px;&quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/406597bfce2bb2c2a602df37f5e9cfaf/3df95/device-raw-data.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 64.45623342175067%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAANCAYAAACpUE5eAAAACXBIWXMAABYlAAAWJQFJUiTwAAACAUlEQVQ4y21S6ZqiMBCc93+s3ZlxVJBbCFfCEcIl6r5AbQeU0U9/VDrH15Xqrv44DR3apoZ9MAgmzP0Wtmkg5RE24V+Y7AcGwUlNNKrENPQY+xY67xH3uw+9dEqiLgVUXULkKSHD2KmZoJIcVcPnOPQKp35JvuOFcDoNEDyDsd/Bd21ESY5C9rhMA6ZxwJXeLzdMY7dg+I13ol+FtOl4Chn6aNgRXcow5Al6kVErSLls0DRqRS3V0/lOthJeKg7hHrDbfM199OwDLGMHtv9G7Eb4Y3FsXYGdJ7AlBHEFOyzxQ3cbR7wSaoV9kUMlIerQm9EmEaoshyhqFFUDXkiIsiHIWWEmJFql3pc8jT1qMsOxDnAtk6KJJDoi4gpfNodFapyoxN4v5qjVaWX6o/P4rofaZRqbUpAZnEBR1tWcoBWxrKYRkkh4jZyU6n2ULfvHcp8UyqpAGHjwHQu+bYAxhjCVs6Jvh+OT+qjVmkEBg6AV6rfpHaFeFCksaHTargcT1Bv6RJejcT11NDILzrd4PS3vwwPRLyElN9TDOHDRCY4oyHChx7MmpcSZYOrxb+pXYg191vcr2VqyqtFEPmLbREqzmB4dxM4BgkqPGYfLKhyOxWqKHhv3ZpLHylnls8utJMIAzNwhtowVpWdBZAJhJnFMKvhEpM1IxWKKJgvT6oXwP3xJsyMToyJOAAAAAElFTkSuQmCC&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Device&amp;#39;s telemetry data &quot;
        title=&quot;Device&amp;#39;s telemetry data &quot;
        src=&quot;/static/406597bfce2bb2c2a602df37f5e9cfaf/36727/device-raw-data.png&quot;
        srcset=&quot;/static/406597bfce2bb2c2a602df37f5e9cfaf/acf4b/device-raw-data.png 173w,
/static/406597bfce2bb2c2a602df37f5e9cfaf/fc834/device-raw-data.png 345w,
/static/406597bfce2bb2c2a602df37f5e9cfaf/36727/device-raw-data.png 690w,
/static/406597bfce2bb2c2a602df37f5e9cfaf/3df95/device-raw-data.png 754w&quot;
        sizes=&quot;(max-width: 690px) 100vw, 690px&quot;
        loading=&quot;lazy&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;It starts with the device template which contains the important information:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;property name you are after&lt;/li&gt;
&lt;li&gt;property type&lt;/li&gt;
&lt;li&gt;property&apos;s interface name&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto;  max-width: 690px;&quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/3d7622cf16949221ed249fafaaa297be/af534/device-template.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 29.010416666666668%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAGCAYAAADDl76dAAAACXBIWXMAABYlAAAWJQFJUiTwAAAA3klEQVQY05VQzU7DMBjL+78XO44HgGpcYKCpbZq/5t9zAosYp2HJag62P7vCGo2X1wmnaYKVC+y2Qa8r3ysaaq3/ojBa4XB4wvPxCLUuuJw/EKyFdw6llM5HwxqEZBPLAK01UsqwDFJKIaaEECMiWf6Y6q05MFZk6hMp1HyBkhLzPMMxzBgLpQ1yzp27NUje35xwXNTMDZnHPMv8/jXi/e0EuSy9ld93OM9mCQOezfPuhsluEoWHGlJM9PFYLUMvvj7PPay1awwUGWp8/B7UJ5cyAkMIP9M5kx8XcdfwCszL1RF5faIAAAAAAElFTkSuQmCC&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Temperature telemetry property from the device template&quot;
        title=&quot;Temperature telemetry property from the device template&quot;
        src=&quot;/static/3d7622cf16949221ed249fafaaa297be/36727/device-template.png&quot;
        srcset=&quot;/static/3d7622cf16949221ed249fafaaa297be/acf4b/device-template.png 173w,
/static/3d7622cf16949221ed249fafaaa297be/fc834/device-template.png 345w,
/static/3d7622cf16949221ed249fafaaa297be/36727/device-template.png 690w,
/static/3d7622cf16949221ed249fafaaa297be/17fa4/device-template.png 1035w,
/static/3d7622cf16949221ed249fafaaa297be/a5044/device-template.png 1380w,
/static/3d7622cf16949221ed249fafaaa297be/af534/device-template.png 3840w&quot;
        sizes=&quot;(max-width: 690px) 100vw, 690px&quot;
        loading=&quot;lazy&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Using the device id, we will then use the following to find out the interface name:&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;text&quot;&gt;&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;https://{{IOTC-name}}.azureiotcentral.com/api/preview/devices/{{deviceId}}/components&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;In my case it returns something like that:&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;json&quot;&gt;&lt;pre class=&quot;language-json&quot;&gt;&lt;code class=&quot;language-json&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;token property&quot;&gt;&quot;value&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;
        &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;token property&quot;&gt;&quot;@id&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;urn:rigado:HoboMX100:HoboMX100:2&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
            &lt;span class=&quot;token property&quot;&gt;&quot;@type&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;
                &lt;span class=&quot;token string&quot;&gt;&quot;InterfaceInstance&quot;&lt;/span&gt;
            &lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
            &lt;span class=&quot;token property&quot;&gt;&quot;name&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;HoboMX100&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
            &lt;span class=&quot;token property&quot;&gt;&quot;displayName&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;HoboMX100&quot;&lt;/span&gt;
        &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;token property&quot;&gt;&quot;@id&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;urn:rigado:HoboMX100:DeviceInformation_HoboMX100:1&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
            &lt;span class=&quot;token property&quot;&gt;&quot;@type&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;
                &lt;span class=&quot;token string&quot;&gt;&quot;InterfaceInstance&quot;&lt;/span&gt;
            &lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
            &lt;span class=&quot;token property&quot;&gt;&quot;name&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;DeviceInformation_HoboMX100&quot;&lt;/span&gt;
        &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
            &lt;span class=&quot;token property&quot;&gt;&quot;@id&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;urn:rigado:HoboMX100:IoTDevice_HoboMX100:1&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
            &lt;span class=&quot;token property&quot;&gt;&quot;@type&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;
                &lt;span class=&quot;token string&quot;&gt;&quot;InterfaceInstance&quot;&lt;/span&gt;
            &lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
            &lt;span class=&quot;token property&quot;&gt;&quot;name&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;IoTDevice_HoboMX100&quot;&lt;/span&gt;
        &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;We can then form the query to get our property value.&lt;/p&gt;
&lt;p&gt;Temperature, for example, used the &lt;code class=&quot;language-text&quot;&gt;HoboMX100&lt;/code&gt; interface and was a telemetry property &lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto;  max-width: 690px;&quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/66ca6796af0d66572f0ffda2ec59fe1b/7a1d1/temperature.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 8.691910499139416%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAACCAYAAABYBvyLAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAS0lEQVQI122OwQqAMAxD9/9/ai3OQ9tDSxsVZUw0lxBeCGmZiUtVNbz3DncfeWZEBGb+sIjAsm5oT/UFzQwi8juoqphP3KiQp+8GHN+lnbbIKF8WAAAAAElFTkSuQmCC&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Temperature telemetry property from the device template&quot;
        title=&quot;Temperature telemetry property from the device template&quot;
        src=&quot;/static/66ca6796af0d66572f0ffda2ec59fe1b/36727/temperature.png&quot;
        srcset=&quot;/static/66ca6796af0d66572f0ffda2ec59fe1b/acf4b/temperature.png 173w,
/static/66ca6796af0d66572f0ffda2ec59fe1b/fc834/temperature.png 345w,
/static/66ca6796af0d66572f0ffda2ec59fe1b/36727/temperature.png 690w,
/static/66ca6796af0d66572f0ffda2ec59fe1b/17fa4/temperature.png 1035w,
/static/66ca6796af0d66572f0ffda2ec59fe1b/a5044/temperature.png 1380w,
/static/66ca6796af0d66572f0ffda2ec59fe1b/7a1d1/temperature.png 2324w&quot;
        sizes=&quot;(max-width: 690px) 100vw, 690px&quot;
        loading=&quot;lazy&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;
... so it will be requested like that:&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;text&quot;&gt;&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;https://{{iotcname}}.azureiotcentral.com/api/preview/devices/e25f2ace9e55/components/HoboMX100/telemetry/temperature&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;text&quot;&gt;&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;{
    &amp;quot;value&amp;quot;: &amp;quot;12.73700287704178&amp;quot;,
    &amp;quot;timestamp&amp;quot;: &amp;quot;2020-08-03T22:47:42.442Z&amp;quot;
}&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;... while the battery Level was a telemetry from the IoT Device interface called &lt;code class=&quot;language-text&quot;&gt;IoTDevice_HoboMX100&lt;/code&gt; &lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto;  max-width: 690px;&quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/8cc4c10c4b4897525ed89b5eaac39887/3855b/battery-level.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 5.658783783783783%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAABCAYAAADeko4lAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAMklEQVQI11XIQQoAIBBC0e5/3IymRWrFUJCbj6+0ISPk3K0NwBGRKr0eJ/n5pFy7zP0XfF9O+Fj0pL0AAAAASUVORK5CYII=&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Battery Level telemetry property from the device template&quot;
        title=&quot;Battery Level telemetry property from the device template&quot;
        src=&quot;/static/8cc4c10c4b4897525ed89b5eaac39887/36727/battery-level.png&quot;
        srcset=&quot;/static/8cc4c10c4b4897525ed89b5eaac39887/acf4b/battery-level.png 173w,
/static/8cc4c10c4b4897525ed89b5eaac39887/fc834/battery-level.png 345w,
/static/8cc4c10c4b4897525ed89b5eaac39887/36727/battery-level.png 690w,
/static/8cc4c10c4b4897525ed89b5eaac39887/17fa4/battery-level.png 1035w,
/static/8cc4c10c4b4897525ed89b5eaac39887/a5044/battery-level.png 1380w,
/static/8cc4c10c4b4897525ed89b5eaac39887/3855b/battery-level.png 2368w&quot;
        sizes=&quot;(max-width: 690px) 100vw, 690px&quot;
        loading=&quot;lazy&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;... so it will be requested like that:&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;text&quot;&gt;&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;https://{{iotcname}}.azureiotcentral.com/api/preview/devices/e25f2ace9e55/components/IoTDevice_HoboMX100/telemetry/batteryLevel&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Curious to know you would use this for...&lt;/p&gt;
&lt;h3 id=&quot;references&quot;&gt;&lt;a href=&quot;#references&quot; aria-label=&quot;references permalink&quot; class=&quot;anchor&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; focusable=&quot;false&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewBox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path fill-rule=&quot;evenodd&quot; d=&quot;M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;References:&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://docs.microsoft.com/en-us/learn/modules/manage-iot-central-apps-with-rest-api/&quot;&gt;https://docs.microsoft.com/en-us/learn/modules/manage-iot-central-apps-with-rest-api/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://docs.microsoft.com/en-us/rest/api/iotcentral/&quot;&gt;https://docs.microsoft.com/en-us/rest/api/iotcentral/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://learning.postman.com/docs/sending-requests/variables/&quot;&gt;https://learning.postman.com/docs/sending-requests/variables/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content:encoded><author>danuw@volto.io</author></item><item><title><![CDATA[Using Microsoft Power Automate and Planner to automate praise]]></title><description><![CDATA[This year, my company had an Azure certification challenge and the team started to track people's certification status using planner. That…]]></description><link>https://www.danuw.com//using-microsoft-power-automate-and-planner-to-automate-praise</link><guid isPermaLink="false">https://www.danuw.com//using-microsoft-power-automate-and-planner-to-automate-praise</guid><category><![CDATA[Office365]]></category><category><![CDATA[Power Automate]]></category><category><![CDATA[MS Flow]]></category><category><![CDATA[MS Planner]]></category><category><![CDATA[Microsoft]]></category><pubDate>Tue, 04 Aug 2020 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;This year, my company had an Azure certification challenge and the team started to track people&apos;s certification status using planner. That helped them understand better who was planning to get what certification by which date and whether it was &quot;completed&quot;.&lt;/p&gt;
&lt;p&gt;Flow (or Power Automate) has a few available triggers and action for planner.&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto;  max-width: 690px;&quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/a2cd8cd9c5d2b7961767b3ea608eccbb/f3c61/0-flow-planner-triggers.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 58.25471698113207%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAMCAYAAABiDJ37AAAACXBIWXMAABYlAAAWJQFJUiTwAAABz0lEQVQoz4WSuY7UQBCGnfA25CTEvACPQIJEziuQkCIk3gDERkhEECwZwQqxIIJZL8zhGd/u9tn2+Phot3d2DhCUVP5LVV1//V1uK0sFy8UvAt/D3azZOCuc1YIo9LGvZsjIp1IDskLbwN9tn7dc0fJjLrhaCex1ihM3LAPFWqPtSJyoxpWwkQNBdugcxb5GV/ZY87Dj68zjehkQioZiC1kNqYK8mTCtJpdHPhxhknds4hqr1E1RAXEJy0Thpa2e2BPmenLam/gWb+KxFuW6z+DkyUiqOSzozd3taMHd5w95ffEelUiEiBj3m8kEmUSoKkfEIVLE7Hr2uxvMmaHbYvXDlFzLkMdvn3E+u6BKC2SW8i8b2wb9mRCKoqTrOqzhhjBVBWeXH/kZOmxVQ9M05HlOVVXGx7gsS+NKKXZ9OxzJxtjq+kn+N9fmztN7vPz0hixI8AKfLMsMwUgmhDBYFIXJ7Yh2pJ7nGRG3Cuu24fPiu164oFE1tS7+z6YrH79NvcNJ4XXkcP/FI86+fKASWlEq8X3fKJNSEgQBrusaladkI8ZxTNu2e8J5suHBqye8uzynSFLiJPlDzWl8mBsHmZ9yWpgewXCk4pDglOy09zfrYZg5FYzkwgAAAABJRU5ErkJggg==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Planner&amp;#39;s triggers in MS Flow&quot;
        title=&quot;Planner&amp;#39;s triggers in MS Flow&quot;
        src=&quot;/static/a2cd8cd9c5d2b7961767b3ea608eccbb/36727/0-flow-planner-triggers.png&quot;
        srcset=&quot;/static/a2cd8cd9c5d2b7961767b3ea608eccbb/acf4b/0-flow-planner-triggers.png 173w,
/static/a2cd8cd9c5d2b7961767b3ea608eccbb/fc834/0-flow-planner-triggers.png 345w,
/static/a2cd8cd9c5d2b7961767b3ea608eccbb/36727/0-flow-planner-triggers.png 690w,
/static/a2cd8cd9c5d2b7961767b3ea608eccbb/f3c61/0-flow-planner-triggers.png 848w&quot;
        sizes=&quot;(max-width: 690px) 100vw, 690px&quot;
        loading=&quot;lazy&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;So while it does not offer anything (at the time of writing) when a task is updated (in our case the bucket was used to track status), it does offer a trigger when a task completes which is what we will be using here.&lt;/p&gt;
&lt;p&gt;The scenario was to use flow to post an adaptive card to the related channel announcing to everyone someone had passed an exam and encourage discussion and praise(congratulations, tips, etc...).&lt;/p&gt;
&lt;p&gt;While you may think of some other scenario to apply this to, this is what we used:&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto;  max-width: 690px;&quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/07a6e3a5a633357f5b0a537999148504/2afcc/1-flow-planner-trigger.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 30.11093502377179%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAGCAYAAADDl76dAAAACXBIWXMAABYlAAAWJQFJUiTwAAAA7klEQVQY032OS04DMRBEfUSugsQ5cgTEDYALZM0GCZRAsiAzMc58Mr/AyPirSdE2GYksJi09V1vqrmp2/zrH9cMMm3yLbSmQFpz0E5sshahz5N0eWVdeJCd2bYGuP4DdPj3i6u4Gy3SNt2SNZbLC4uMdz6sXJCVH9rXH7lAQ5SQZwcmw+e7AvHUwSsFai7GGYYh6HI7w3sM5N4knDHn8KAtrDJgjI9n3MPQZq2kacM4hhEDbtnExBE6htEUvTfRg4QnOMY2uCSi6WEoZ0VrTkjnptKkxAQ0WBoNp0JEYEof+guq6RlVVsf8/d7Zz0l9RJ8gFXvvHLQAAAABJRU5ErkJggg==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Configure trigger for your Teams and planner board&quot;
        title=&quot;Configure trigger for your Teams and planner board&quot;
        src=&quot;/static/07a6e3a5a633357f5b0a537999148504/36727/1-flow-planner-trigger.png&quot;
        srcset=&quot;/static/07a6e3a5a633357f5b0a537999148504/acf4b/1-flow-planner-trigger.png 173w,
/static/07a6e3a5a633357f5b0a537999148504/fc834/1-flow-planner-trigger.png 345w,
/static/07a6e3a5a633357f5b0a537999148504/36727/1-flow-planner-trigger.png 690w,
/static/07a6e3a5a633357f5b0a537999148504/17fa4/1-flow-planner-trigger.png 1035w,
/static/07a6e3a5a633357f5b0a537999148504/2afcc/1-flow-planner-trigger.png 1262w&quot;
        sizes=&quot;(max-width: 690px) 100vw, 690px&quot;
        loading=&quot;lazy&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto;  max-width: 690px;&quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/9b00d9fd37bf2cf1e4769c153e534d81/015f2/2-flow-planner-get-user-profile.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 26.37540453074434%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAFCAYAAABFA8wzAAAACXBIWXMAABYlAAAWJQFJUiTwAAAA9ElEQVQY03XQwU7CQBDG8b6xiQ+iiTdfwKNevBqfAEuKRVIlCggFQmml3W673d2/0xhNjLjJL3OY2S+zGxQ3lxRXZxTxgOJpSB4/UIxD1PMI/RJTC/1t+lffzyYxSmqVjAjy8xPUxSm7eMh2HLEehayiAXo+he0S1gt8Osf9w67m7N9mmPQdNRkS6HRBXZWo8gB4+nMd3XEb3pNME6Lkkdd0RikztuswbYsxv1nRWYuSrEBnW2oHpe5QxiOFzSEnqz6omwala3R/wTmc90fZvieLaHlRoDZL9mXLrlA/vJFU2+E7A8JLoGsbnGm+6hFe5rV8zycgw3gW7LKdpQAAAABJRU5ErkJggg==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Get user profile&quot;
        title=&quot;Get user profile&quot;
        src=&quot;/static/9b00d9fd37bf2cf1e4769c153e534d81/36727/2-flow-planner-get-user-profile.png&quot;
        srcset=&quot;/static/9b00d9fd37bf2cf1e4769c153e534d81/acf4b/2-flow-planner-get-user-profile.png 173w,
/static/9b00d9fd37bf2cf1e4769c153e534d81/fc834/2-flow-planner-get-user-profile.png 345w,
/static/9b00d9fd37bf2cf1e4769c153e534d81/36727/2-flow-planner-get-user-profile.png 690w,
/static/9b00d9fd37bf2cf1e4769c153e534d81/17fa4/2-flow-planner-get-user-profile.png 1035w,
/static/9b00d9fd37bf2cf1e4769c153e534d81/015f2/2-flow-planner-get-user-profile.png 1236w&quot;
        sizes=&quot;(max-width: 690px) 100vw, 690px&quot;
        loading=&quot;lazy&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto;  max-width: 690px;&quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/7d84be8b67f18d24d5dc38e78ede3a40/3e755/3-flow-planner-get-mention-token-and-post-praise.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 31.239669421487605%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAGCAYAAADDl76dAAAACXBIWXMAABYlAAAWJQFJUiTwAAABEUlEQVQY033RO0/CUBQH8H5iVxc3Nzfj5Pdw0M3FpLXQB4UWxD5pSyhYsZW+b/+eFiEM4k1+OY+cnOTmcBeXPG5uVWhjG4L4hqFkQlQdjIwQysiFNvEx0QOYdgzPT+Eukj+kcLwEppuAe3h08cIv8bndIVoniDbfCLUxgukcwWKF9SbtfcQZzRQkPysmHFChZQUOryWl8IRYfMZ26YM1NRhrek1doaH6nLouu4W/i1p2xNoWp/2qqpDnOeUtLWb/4jQ9huUkKIoau6xCltd7XU6KktF3E6yiuM8P/eMcyU9wV9cD3N1rdBQLkmJhIM3BCzpkyoVXo4+SYmIov/exq2V13+tmjWkIYxbC9r5g0WF+AB7pwNT11dqpAAAAAElFTkSuQmCC&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Get user mention and trigger post of praise&quot;
        title=&quot;Get user mention and trigger post of praise&quot;
        src=&quot;/static/7d84be8b67f18d24d5dc38e78ede3a40/36727/3-flow-planner-get-mention-token-and-post-praise.png&quot;
        srcset=&quot;/static/7d84be8b67f18d24d5dc38e78ede3a40/acf4b/3-flow-planner-get-mention-token-and-post-praise.png 173w,
/static/7d84be8b67f18d24d5dc38e78ede3a40/fc834/3-flow-planner-get-mention-token-and-post-praise.png 345w,
/static/7d84be8b67f18d24d5dc38e78ede3a40/36727/3-flow-planner-get-mention-token-and-post-praise.png 690w,
/static/7d84be8b67f18d24d5dc38e78ede3a40/17fa4/3-flow-planner-get-mention-token-and-post-praise.png 1035w,
/static/7d84be8b67f18d24d5dc38e78ede3a40/3e755/3-flow-planner-get-mention-token-and-post-praise.png 1210w&quot;
        sizes=&quot;(max-width: 690px) 100vw, 690px&quot;
        loading=&quot;lazy&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;For the praise&apos;s adaptive card, you will likely want to design it here: &lt;a href=&quot;https://adaptivecards.io/designer/&quot;&gt;https://adaptivecards.io/designer/&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;You can also start from some of the examples at &lt;a href=&quot;https://adaptivecards.io/samples/&quot;&gt;https://adaptivecards.io/samples/&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto;  max-width: 690px;&quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/459a3a005e2f535eb2f2fa30c3c111dd/b828e/flow-planner-adaptive-card.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 40.48780487804878%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAICAYAAAD5nd/tAAAACXBIWXMAABYlAAAWJQFJUiTwAAABV0lEQVQoz3WRvU7DMBSF80zwDgiJjTdC3ZgYECMrYmTiBWCBpYguDBXQX4XEjh07cWwnOVw7bdUOjfTlypLvuedcJ+9ThcmsQlMJqFISAlpJOGsiflOdrY/SNGZHcvVscPfCYWuJeaqQsoAGUz6Sl45qC667o1jn0bUeLZFIKVAIDu89FmmBz+kaX78pFus/zJdrzBYrGEsNADz92n6ovt2Der13kUSRYE0Rq8bi4v4Hl6MnnI5e8TjmYMtvME7DnIMxIZ5FXVfkhlTi10eCsyC2cxh2VhmLs9sJzm/ecHL9gYexJDs1pNIkUqOqaM9NE2vXdYNc30cOBEs5PIZzFjnj+KXYq4wjzzMURQEhBBhjkFLGc4CT6yzLSGBwehB5KxgOUigUTMBSfGtdvBiaAmVZRvEtYYBSauOwje4OHFraj9Y6NhqKb4yLF0O8wH7TQLsbGNJt+QeIEWJDf7YXDwAAAABJRU5ErkJggg==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;flow planner adaptive card&quot;
        title=&quot;flow planner adaptive card&quot;
        src=&quot;/static/459a3a005e2f535eb2f2fa30c3c111dd/36727/flow-planner-adaptive-card.png&quot;
        srcset=&quot;/static/459a3a005e2f535eb2f2fa30c3c111dd/acf4b/flow-planner-adaptive-card.png 173w,
/static/459a3a005e2f535eb2f2fa30c3c111dd/fc834/flow-planner-adaptive-card.png 345w,
/static/459a3a005e2f535eb2f2fa30c3c111dd/36727/flow-planner-adaptive-card.png 690w,
/static/459a3a005e2f535eb2f2fa30c3c111dd/17fa4/flow-planner-adaptive-card.png 1035w,
/static/459a3a005e2f535eb2f2fa30c3c111dd/b828e/flow-planner-adaptive-card.png 1230w&quot;
        sizes=&quot;(max-width: 690px) 100vw, 690px&quot;
        loading=&quot;lazy&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;That has turned out to drive great engagement on the channel and almost fostered motivation to pass the exam and be the one to get the praise.&lt;/p&gt;
&lt;p&gt;So far, the only issue has been that once a message has been posted as the Flow bot, it cannot be updated. So if the task was marked as completed in error, the post cannot be deleted.
So that certainly is something to update in the future.&lt;/p&gt;
&lt;p&gt;Other possible improvements:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Flow message to user on registration (creation of task) to help with resources linked to certification&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;./2020-08-06-confirmation-in-your-flow.md&quot;&gt;Flow message on completion to confirm next steps&lt;/a&gt; (&quot;don&apos;t forget to register your cert at this link&quot;, &quot;people usually do &lt;em&gt;this cert&lt;/em&gt; as the following exam&quot;...)&lt;/li&gt;
&lt;li&gt;automation around reminders when date approaches (Planner has built in reminder already so whatever it does not cover :-P )&lt;/li&gt;
&lt;li&gt;auto suggestion on people to create a study group with&lt;/li&gt;
&lt;/ul&gt;</content:encoded><author>danuw@volto.io</author></item><item><title><![CDATA[Azure Digital Twins new Multi join query feature]]></title><description><![CDATA[Microsoft's Azure Digital Twins Preview v2 team has released a new feature. It allows to query the twin graph with up to 5 joins. Concretely…]]></description><link>https://www.danuw.com//azure-digital-twins-new-multi-join-query-feature</link><guid isPermaLink="false">https://www.danuw.com//azure-digital-twins-new-multi-join-query-feature</guid><category><![CDATA[iot]]></category><category><![CDATA[azure iot]]></category><category><![CDATA[azure digital twins (adt)]]></category><category><![CDATA[smart building]]></category><pubDate>Sun, 02 Aug 2020 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Microsoft&apos;s Azure Digital Twins Preview v2 team has released a new feature. It allows to query the twin graph with up to 5 joins.&lt;/p&gt;
&lt;p&gt;Concretely, what that has meant for me is that I can surface some aggregates a lot more easily. In my case, I have a list of buildings, that have floors, that have zones, that have desks and rooms (aka Spaces), and finally that have sensors.&lt;/p&gt;
&lt;p&gt;I needed to be able to run quick aggregate from the building or floor perspective. For example, using occupancy sensors, this allows me to quickly find out occupancy per floor.&lt;/p&gt;
&lt;p&gt;The following would return all the nodes (all sensors in my case) contained in my spaces (i.e. desks and rooms):&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;sql&quot;&gt;&lt;pre class=&quot;language-sql&quot;&gt;&lt;code class=&quot;language-sql&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;SELECT&lt;/span&gt; Sensor
&lt;span class=&quot;token keyword&quot;&gt;FROM&lt;/span&gt; DIGITALTWINS Building
&lt;span class=&quot;token keyword&quot;&gt;JOIN&lt;/span&gt; Floor RELATED Building&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token keyword&quot;&gt;contains&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;JOIN&lt;/span&gt; Zone RELATED Floor&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token keyword&quot;&gt;contains&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;JOIN&lt;/span&gt; Space RELATED Zone&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token keyword&quot;&gt;contains&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;JOIN&lt;/span&gt; Sensor RELATED Space&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token keyword&quot;&gt;contains&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;WHERE&lt;/span&gt; Building&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;$dtId &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&apos;myBuildingId&apos;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;See &lt;a href=&quot;https://github.com/Azure-Samples/digital-twins-samples/issues/24&quot;&gt;github issue&lt;/a&gt; for references.&lt;/p&gt;
&lt;p&gt;What challenge did that solve for you? Use Twitter (#AdtMultiJoin?) to let me know... :)&lt;/p&gt;</content:encoded><author>danuw@volto.io</author></item><item><title><![CDATA[Azure IoT Hub test data using Particle Internet Button]]></title><description><![CDATA[Particle internet buttons as IoT hub test data source. Use a Particle internet button to create test data for your Azure IoT projects…]]></description><link>https://www.danuw.com//azure-io-t-hub-test-data-using-particle-internet-button</link><guid isPermaLink="false">https://www.danuw.com//azure-io-t-hub-test-data-using-particle-internet-button</guid><category><![CDATA[iot]]></category><category><![CDATA[azure]]></category><category><![CDATA[test data]]></category><pubDate>Mon, 01 Jun 2020 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Particle internet buttons as IoT hub test data source.&lt;/p&gt;
&lt;p&gt;Use a Particle internet button to create test data for your Azure IoT projects ...&lt;/p&gt;
&lt;h1 id=&quot;context&quot;&gt;&lt;a href=&quot;#context&quot; aria-label=&quot;context permalink&quot; class=&quot;anchor&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; focusable=&quot;false&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewBox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path fill-rule=&quot;evenodd&quot; d=&quot;M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;Context&lt;/h1&gt;
&lt;p&gt;On one of my recent IoT projects I needed a quick way to interact with IoT Hub to create test occupancy and temperature data. That was what fitted best my scenario but feel free to adapt this to your needs.&lt;/p&gt;
&lt;p&gt;I recycled an unused Internet button once used for tracking (DevOps) builds, by setting up simple button clicks to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;publish an event as occupied or available to the iot hub&lt;/li&gt;
&lt;li&gt;publish changes of temperatures to the IoT (increment temperature between two thresholds easily and update the LEDs to confirm)&lt;/li&gt;
&lt;/ul&gt;
&lt;h1 id=&quot;in-short&quot;&gt;&lt;a href=&quot;#in-short&quot; aria-label=&quot;in short permalink&quot; class=&quot;anchor&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; focusable=&quot;false&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewBox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path fill-rule=&quot;evenodd&quot; d=&quot;M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;In short...&lt;/h1&gt;
&lt;p&gt;The basic idea is to use the internet button sample that publishes different events on some of the button clicks and use the integration to send a custom payload. &lt;/p&gt;
&lt;p&gt;So you can click the different available buttons to trigger different payloads of test data&lt;/p&gt;
&lt;h2 id=&quot;set-up-your-device&quot;&gt;&lt;a href=&quot;#set-up-your-device&quot; aria-label=&quot;set up your device permalink&quot; class=&quot;anchor&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; focusable=&quot;false&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewBox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path fill-rule=&quot;evenodd&quot; d=&quot;M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;Set up your device&lt;/h2&gt;
&lt;p&gt;To get started quickly with the most basic implementation, simply:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;look for the InternetButton library on the Particle Cloud (using &lt;a href=&quot;https://build.particle.io&quot;&gt;https://build.particle.io&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;select the most &quot;advanced&quot; example (basically the last one number 9) - and flash it to your device.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto;  max-width: 600px;&quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/635ffad7f3b3b9680b436985a3afa26e/34e8a/search-library-internetbutton.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 84.66666666666669%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAARCAYAAADdRIy+AAAACXBIWXMAABYlAAAWJQFJUiTwAAACyElEQVQ4y4VU2U7bUBD1v1fiEyrxDZWqqg8V0AKipE2AQGIn8b7v2ezEISQByunMBacpVYWlo9nuzJxrz1j68PETDo9PcPDtGIdbnODoxffl8OsbOBLnfrQuRZ4UxAmKaoE4HyKfTAXS0VjYo6LA7XrzXyxWa6wefyEbj/F+fx9RlkNSTQt9TUej1ULz8oo6XaDRbOGs0cBF+xpDajCcFv9gVJRCTucVHD/Au709GLYDySajXCxEoFzcPoMYz26Xgvm4nInYLtjHBQWo6GQ2x939gzgvma6HKM3gxzGcIIAXRsLmrlGaIqPru0Eo/F4UwQ1DcUUuPJlRMyrGkotzI1FQdzzIqo7uQCNpQB6wrgvdcH3c9AZoyz0Rv+oqML0Qw3KObFpukRO4sKRTQjLfICVk1b0A6/niHslsTbE18mrzF9LZCnFxh6S828pgukQymUPq2z69LypmqnD7CiJThyV3EBoaPLa1AZ42K7z1bB6fEI4rSJofIakekOYFEjtA6hCoScIIc8TDGTJilBGzbE6SGO8iJ4wWz7dKpsTQIRaZ0kXUuUbS7yFSZATEMOopiOUu0p6M1LJpNmk+pzNCuZUZyWg0gZfkcKJEjJHkHXyGfdWC3OlA93wouom20oNiWBioKizThk/zuExCFMsVpuWfL1tUFcIkhWrQh+wPxEJINhmhfAOncYbg53e456cwT4+EDJrnsJoNOMTWomZ+FIuZ4/EQYJ1gU8x0XLFlkuWHcKjLwDAp4EF72RzNNGnybeg0VgbNpEpxns162Bl1cdN1wQvCsyhZnECJTFknqQxUtOn6LLlIX9VwI8tC5zPtTlcMe70x3IAbsf+ZIdHNxxMExJJ/CLwlYa3TstdIXuyYsMuOZUb5IeWJTeH7l7S39Z5yR/5azIL113vMPi7Aydyg/kOxn4sLhrvvZXfxd32v45xcn9k9+xvqMNsMgmKV/gAAAABJRU5ErkJggg==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Search for the internet button library&quot;
        title=&quot;Search for the internet button library&quot;
        src=&quot;/static/635ffad7f3b3b9680b436985a3afa26e/34e8a/search-library-internetbutton.png&quot;
        srcset=&quot;/static/635ffad7f3b3b9680b436985a3afa26e/acf4b/search-library-internetbutton.png 173w,
/static/635ffad7f3b3b9680b436985a3afa26e/fc834/search-library-internetbutton.png 345w,
/static/635ffad7f3b3b9680b436985a3afa26e/34e8a/search-library-internetbutton.png 600w&quot;
        sizes=&quot;(max-width: 600px) 100vw, 600px&quot;
        loading=&quot;lazy&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;
&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto;  max-width: 690px;&quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/6e699bfd11870eb78b41d4a0962a9164/e3589/sample-code-9.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 92.93712316968131%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAATCAYAAACQjC21AAAACXBIWXMAABYlAAAWJQFJUiTwAAAD1klEQVQ4y21UWW9TVxj0D6jECzW2kwhfL3dfvZsmqSASREVqkNqnPlZ9KIpUCUicxaD+l0qVkPojeGgw1EIKdTHEcWLsJDbBCXacsGRpmX7n2E5N4WH0Hcv23Jlv5lxXsVRCdauOSm0DL3Z28fb4b1yfvo4zZz6Dz+eBb8iDkREfvF43hod9BC/OeT7H0JCXf+c+d5ZPL/3W7T4L1/2Hf6BQfIYnKyXU6g28PjpGZv4WgsFhJBIWEklCQkeSZjSqwbZlOI7Kp6aHoWohKEoQkixAVgJwLeVyqG1uYrNexwbNvf19zGRuICT5EYkZ0E0ZFiOJ6nSWoKghIglzyHQW5QCRBSAyUkmA68FyAY9W1pB/uopc4RkqzRbm5mdgyn5cGUvi8pdJJG2FPguwSYGjBWCrNNUgn/1zRA1yYtf0vQquLnXwXa6Nb35/hW/z7/D9zRnoggeWpeLa15MYH03BtkKwSKGpa4g4GtkMQCZFfVjkSGQK88US1nfaXNk6ofHmhCtUBB8cW4dJpLouk70ghyTTJHvsz2GRQJOdTSLkCv8qFlGt1dDY3kar3cbh8TGyCzOQAz6MpmK4cvkiBaBBo+Vrmkg7DPM9GoZIDmSYpJoFY9FKOOGfxae8NvWXTV6bA0p5kQhFwQvdUjAxMU4JR0lpGLpGu7Q0ggKdCB1H4YEZRBrVQ/xBrkfLj7FSXkORalOuPOe1WVjoWk7FHURjFu0rhFCY7chPNs8T/KSWHqB3wdTGjDCvjyv/uIBCqYzyxhY2m7voHJLCxVlIpDCViODa1FXE4zYpCpFCUmMopEjmvZN6lWE4tbyaz6FZXMZu6Qne1avA+xP8fHuO79AwFcTiFpyIQSUOQlVFmhIvtNgLQxwIhad8594Kflhq4sb9BqaXGvipcIgfMxkYwSGMpRO4dGmcE3UtC9wuAy+z9J9KTsgU3i3U8EvlNe6ud/BruY3fto5wcz5DCruhTE5OIJ2Ow3ZEmAa7egad1VMyflP6ChlhY6OK928PcLS/h8NOC/jnBHeys5D9Xh5KhOyyqjBVgxb7CkXpf4Srz6vY6Rxgu7WHF69aPJRsNgPR70GSCKemvkKMkmY71DSJl1zTxQG7woeEa0TY2j/ATnsPTSJktclmuymbFEoqHaW+GVD1ANVC5ITsJcHV9SyLgzscJHzZI1xYzEAlwoupCMboFfYFvXVStooU7S5GnTOJzCACcwCnd/mThFQbPyv2hTilPIr0hSi9C02yblMoOqXOrl/wgx728RHhGyKcnbuF4RE3v1JxUhiJ6DxhnTooK0KPTKAqnf8I/wIlAQ5CBsXxAwAAAABJRU5ErkJggg==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Sample code number 9 from library&quot;
        title=&quot;Sample code number 9 from library&quot;
        src=&quot;/static/6e699bfd11870eb78b41d4a0962a9164/36727/sample-code-9.png&quot;
        srcset=&quot;/static/6e699bfd11870eb78b41d4a0962a9164/acf4b/sample-code-9.png 173w,
/static/6e699bfd11870eb78b41d4a0962a9164/fc834/sample-code-9.png 345w,
/static/6e699bfd11870eb78b41d4a0962a9164/36727/sample-code-9.png 690w,
/static/6e699bfd11870eb78b41d4a0962a9164/17fa4/sample-code-9.png 1035w,
/static/6e699bfd11870eb78b41d4a0962a9164/a5044/sample-code-9.png 1380w,
/static/6e699bfd11870eb78b41d4a0962a9164/e3589/sample-code-9.png 2322w&quot;
        sizes=&quot;(max-width: 690px) 100vw, 690px&quot;
        loading=&quot;lazy&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;h2 id=&quot;configure-the-integration-to-iot-hub&quot;&gt;&lt;a href=&quot;#configure-the-integration-to-iot-hub&quot; aria-label=&quot;configure the integration to iot hub permalink&quot; class=&quot;anchor&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; focusable=&quot;false&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewBox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path fill-rule=&quot;evenodd&quot; d=&quot;M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;Configure the integration to IoT Hub&lt;/h2&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto;  max-width: 690px;&quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/ddeb25fe97c02c3e737a2baf44028a4d/4dfc7/integration.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 44.56424079065588%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAJCAYAAAAywQxIAAAACXBIWXMAABYlAAAWJQFJUiTwAAABFklEQVQoz52S63KEIAyFff8X7J/W3V5WRVRAAcHbaULX7czO2nbKzDd4SU6SA1ltHOwYEsu6YlkWrLRv2/YvMqUNbFxg4ooYI7z3mOcZP60jMV6ZGywuusTb6QmGxGXbwI8jJhKN04RARXiP/M7PxJ78qFDmrIXqWuTnAl1Voiku0LWA1wpOdQlLeIrhWOfcTfgetiszQw8pOjznJepzjur0gub9FaYqoMtvvBQIZMcYQrLlHi400SSZDjN9sOiFSJ12bQtJHbZSIlJypPEDW0AdcALDHh8eShqBBF1DguRh3/e3qjxGIFGGOxtJmGHRQ0FLgtYMEB/kH3WnlPoSuSYzu+hfTjp1yPdvD1qvd/ER/O+3O/oJDVm+BpMgZykAAAAASUVORK5CYII=&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Select Azure IoT Hub interface&quot;
        title=&quot;Select Azure IoT Hub interface&quot;
        src=&quot;/static/ddeb25fe97c02c3e737a2baf44028a4d/36727/integration.png&quot;
        srcset=&quot;/static/ddeb25fe97c02c3e737a2baf44028a4d/acf4b/integration.png 173w,
/static/ddeb25fe97c02c3e737a2baf44028a4d/fc834/integration.png 345w,
/static/ddeb25fe97c02c3e737a2baf44028a4d/36727/integration.png 690w,
/static/ddeb25fe97c02c3e737a2baf44028a4d/17fa4/integration.png 1035w,
/static/ddeb25fe97c02c3e737a2baf44028a4d/a5044/integration.png 1380w,
/static/ddeb25fe97c02c3e737a2baf44028a4d/4dfc7/integration.png 2226w&quot;
        sizes=&quot;(max-width: 690px) 100vw, 690px&quot;
        loading=&quot;lazy&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;
&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto;  max-width: 690px;&quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/d74c0bfa8c0e4ca71cbb63871008838d/751e3/custom-json-data-payload.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 58.0896686159844%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAMCAYAAABiDJ37AAAACXBIWXMAABYlAAAWJQFJUiTwAAABlUlEQVQoz52S626jMBSEef+n2rTdNpGym2QDZUNSBcLNhIC52IAp1eyxq0jt/kqLNDo+Bn+esbFe2gl70lFM8JoJz/WEpHvDdx9LqFc0aoIY36DHVafQ9Aqvo8I4jl+Wdc4ysDRBHIWoyhJ932PIEsi2Rdd1X5aVsQRJooERiqqCoH6IAgzThE4pSCEgpbxZVnhRSFJmoDUvITdLsPUvRH9W4HsX/aBoZ3m7Q8Y7gqU4nU6oKXKXxsg9F+FqCX7yMZBLfQy3ypKiASdQRXHrpkFDEWvOIVpBY4mKV59VvdeS0nD67n9ZnF4yxkxzOBywmM8RxzF20Q4z9wfud3dYviyp3uNp/4S7vzOqj/ATn4xwFEXxSZbeMc9ztHSrnudhsVgYsO3ZcALHLJ4R5MF7wKP304DnBF4f1whZiPPljEtxQUkptQxQO9Q1CAI4jgPbtuE+u0jjFFEWYRtssTquYAe20cbfUP8bW39rkrCcGZhxqJ3VdW0aPamja7iupqdYH8/wY6/HWleYcaj/HX0718nv6rr+Hzu4icFXYRZhAAAAAElFTkSuQmCC&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;Select Custom Json Data to use your own payload template&quot;
        title=&quot;Select Custom Json Data to use your own payload template&quot;
        src=&quot;/static/d74c0bfa8c0e4ca71cbb63871008838d/36727/custom-json-data-payload.png&quot;
        srcset=&quot;/static/d74c0bfa8c0e4ca71cbb63871008838d/acf4b/custom-json-data-payload.png 173w,
/static/d74c0bfa8c0e4ca71cbb63871008838d/fc834/custom-json-data-payload.png 345w,
/static/d74c0bfa8c0e4ca71cbb63871008838d/36727/custom-json-data-payload.png 690w,
/static/d74c0bfa8c0e4ca71cbb63871008838d/751e3/custom-json-data-payload.png 1026w&quot;
        sizes=&quot;(max-width: 690px) 100vw, 690px&quot;
        loading=&quot;lazy&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;You can set whatever payload you want using handlebars (see &lt;a href=&quot;https://docs.particle.io/reference/device-cloud/webhooks/&quot;&gt;here&lt;/a&gt; for more documentation).&lt;/p&gt;
&lt;h3 id=&quot;set-the-integration-payload&quot;&gt;&lt;a href=&quot;#set-the-integration-payload&quot; aria-label=&quot;set the integration payload permalink&quot; class=&quot;anchor&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; focusable=&quot;false&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewBox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path fill-rule=&quot;evenodd&quot; d=&quot;M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;Set the integration payload&lt;/h3&gt;
&lt;p&gt;Use it to set static or dynamic properties. &lt;/p&gt;
&lt;h4 id=&quot;static-payload&quot;&gt;&lt;a href=&quot;#static-payload&quot; aria-label=&quot;static payload permalink&quot; class=&quot;anchor&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; focusable=&quot;false&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewBox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path fill-rule=&quot;evenodd&quot; d=&quot;M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;Static payload&lt;/h4&gt;
&lt;p&gt;In the following example, &lt;code class=&quot;language-text&quot;&gt;IsOccupied&lt;/code&gt; is set to always send &lt;code class=&quot;language-text&quot;&gt;true&lt;/code&gt;. You could consider sending false when clicking another button such:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;button1 -&gt; occupied&lt;/li&gt;
&lt;li&gt;button3 -&gt; free&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;json&quot;&gt;&lt;pre class=&quot;language-json&quot;&gt;&lt;code class=&quot;language-json&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;token property&quot;&gt;&quot;event&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;{{{PARTICLE_EVENT_NAME}}}&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;token property&quot;&gt;&quot;data&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;{{{PARTICLE_EVENT_VALUE}}}&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;token property&quot;&gt;&quot;device_id&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;{{{PARTICLE_DEVICE_ID}}}&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;token property&quot;&gt;&quot;published_at&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;{{{PARTICLE_PUBLISHED_AT}}}&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;token property&quot;&gt;&quot;IsOccupied&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token boolean&quot;&gt;true&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h4 id=&quot;dynamic-payload&quot;&gt;&lt;a href=&quot;#dynamic-payload&quot; aria-label=&quot;dynamic payload permalink&quot; class=&quot;anchor&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; focusable=&quot;false&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewBox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path fill-rule=&quot;evenodd&quot; d=&quot;M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;Dynamic payload&lt;/h4&gt;
&lt;p&gt;You could also customise the code to change a temperature property before it publishes an event such as:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;button2 -&gt; decrement temperature by 1 degree and &lt;em&gt;then&lt;/em&gt; publish&lt;/li&gt;
&lt;li&gt;button4 -&gt; increment temperature by 0.5 degree and &lt;em&gt;then&lt;/em&gt; publish&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You would then use a similar json data template to this:&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;json&quot;&gt;&lt;pre class=&quot;language-json&quot;&gt;&lt;code class=&quot;language-json&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;token property&quot;&gt;&quot;temperature&quot;&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;{{{temperature}}}&quot;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;If you are going to be handling json, I would recommend using &lt;a href=&quot;https://build.particle.io/libs/ArduinoJson&quot;&gt;ArduinoJson&lt;/a&gt; and publish using that json data. Checkout the examples for ways on how to use it - I personally used &lt;a href=&quot;https://blog.particle.io/integrate-particle-with-azure-iot-central/&quot;&gt;this article&lt;/a&gt; to get started quickly.&lt;/p&gt;
&lt;h2 id=&quot;video&quot;&gt;&lt;a href=&quot;#video&quot; aria-label=&quot;video permalink&quot; class=&quot;anchor&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; focusable=&quot;false&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewBox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path fill-rule=&quot;evenodd&quot; d=&quot;M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;Video&lt;/h2&gt;
&lt;p&gt;I go through that process in that video if that helps.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=30VliGVqnIg&quot; title=&quot;Azure IoT Hub Test Data with Particle Button&quot;&gt;&lt;img src=&quot;http://img.youtube.com/vi/30VliGVqnIg/0.jpg&quot; alt=&quot;Azure IoT Hub Test Data with Particle Button&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h1 id=&quot;so&quot;&gt;&lt;a href=&quot;#so&quot; aria-label=&quot;so permalink&quot; class=&quot;anchor&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; focusable=&quot;false&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewBox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path fill-rule=&quot;evenodd&quot; d=&quot;M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;So...&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;The above is a flexible base. We are giving a temperature or occupancy example, but you could also use it for any types of gauge simulation (battery level, signal strength, fuel tank level etc...)&lt;/li&gt;
&lt;li&gt;If you are working with third parties, you can easily simulate their payload via the Particle Cloud integration interface&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You probably have all sort of test data generators lying around but I found this very practical for quick tests to check everything is going as expected, and simulating predefined sensor data during demos for perfectly times effects.&lt;/p&gt;</content:encoded><author>danuw@volto.io</author></item><item><title><![CDATA[Automate daily time-lapses]]></title><description><![CDATA[Looking back at picture of how the garden evolved throughout the spring and summer, I kept on thinking that a time-lapse of this would look…]]></description><link>https://www.danuw.com//automate-daily-time-lapses</link><guid isPermaLink="false">https://www.danuw.com//automate-daily-time-lapses</guid><category><![CDATA[raspberry pi]]></category><category><![CDATA[iot]]></category><category><![CDATA[time-lapse]]></category><pubDate>Fri, 28 Feb 2020 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Looking back at picture of how the garden evolved throughout the spring and summer, I kept on thinking that a time-lapse of this would look incredible.
I once did a time-lapse of the outside and you have to admit that looking at the clouds at that speed really makes a great sight and this is how the idea came to life.&lt;/p&gt;
&lt;p&gt;So although the one about the garden is still in the works, following are instructions on how to automate daily time-lapses of your outside view.&lt;/p&gt;
&lt;p&gt;Also we will be using a raspberry pi, IP camera and docker.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;I assume the raspberry pi to be already set up (nothing special, just accessible via ssh or that you can use the terminal).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;if you have a Pi Camera, feel free to use the following to take your pictures &lt;a href=&quot;https://www.raspberrypi.org/documentation/usage/camera/raspicam/raspistill.md&quot;&gt;doc for raspistill&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;a href=&quot;https://youtu.be/oXuxmVnX5Og&quot;&gt;&lt;img src=&quot;/636f16366daa8cc9f140145506f080ba/timelapse_2020_03_28-short.gif&quot; alt=&quot;time-lapse&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&quot;step21---install-docker-on-the-raspberry-pi&quot;&gt;&lt;a href=&quot;#step21---install-docker-on-the-raspberry-pi&quot; aria-label=&quot;step21   install docker on the raspberry pi permalink&quot; class=&quot;anchor&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; focusable=&quot;false&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewBox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path fill-rule=&quot;evenodd&quot; d=&quot;M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;Step2.1 - Install Docker on the Raspberry pi&lt;/h3&gt;
&lt;p&gt;Might be able to use this now: &lt;a href=&quot;https://docs.microsoft.com/en-gb/azure/iot-edge/how-to-install-iot-edge-linux#install-the-container-runtime&quot;&gt;https://docs.microsoft.com/en-gb/azure/iot-edge/how-to-install-iot-edge-linux#install-the-container-runtime&lt;/a&gt;&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;text&quot;&gt;&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;curl https://packages.microsoft.com/config/debian/stretch/multiarch/prod.list &amp;gt; ./microsoft-prod.list&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;text&quot;&gt;&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;sudo cp ./microsoft-prod.list /etc/apt/sources.list.d/&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;text&quot;&gt;&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor &amp;gt; microsoft.gpg
sudo cp ./microsoft.gpg /etc/apt/trusted.gpg.d/&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;text&quot;&gt;&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;sudo apt-get update&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;span
      class=&quot;gatsby-resp-image-wrapper&quot;
      style=&quot;position: relative; display: block; margin-left: auto; margin-right: auto;  max-width: 690px;&quot;
    &gt;
      &lt;a
    class=&quot;gatsby-resp-image-link&quot;
    href=&quot;/static/c796919b8e5744d3ce64d258d092d654/34743/ms-apt-get.png&quot;
    style=&quot;display: block&quot;
    target=&quot;_blank&quot;
    rel=&quot;noopener&quot;
  &gt;
    &lt;span
    class=&quot;gatsby-resp-image-background-image&quot;
    style=&quot;padding-bottom: 24.57293035479632%; position: relative; bottom: 0; left: 0; background-image: url(&apos;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAFCAYAAABFA8wzAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAuElEQVQY032PSw7DIAxEyW+TJlEjIBCcf4/Q+59t2rFE1W66eBpsw5gx7ulxi3d4K3DOYpomzPOMruvQ970yDINS1zWMMf8JMcB7/zFKKSnWWq05IzFGjOOIoihQliWqqvrRj6Ek0YfkPE+IiLKuKx7XhWVZsO+7wh7vUdmnEi5zzmkqkyRpgxevtwF/l01pwlmuaRJCUGXN83EcarptG9q2heEwR2U0bqI2TaNRMjnaN4zPPuGZkV9NxnfnEsGaGQAAAABJRU5ErkJggg==&apos;); background-size: cover; display: block;&quot;
  &gt;&lt;/span&gt;
  &lt;img
        class=&quot;gatsby-resp-image-image&quot;
        alt=&quot;successful apt get output&quot;
        title=&quot;successful apt get output&quot;
        src=&quot;/static/c796919b8e5744d3ce64d258d092d654/36727/ms-apt-get.png&quot;
        srcset=&quot;/static/c796919b8e5744d3ce64d258d092d654/acf4b/ms-apt-get.png 173w,
/static/c796919b8e5744d3ce64d258d092d654/fc834/ms-apt-get.png 345w,
/static/c796919b8e5744d3ce64d258d092d654/36727/ms-apt-get.png 690w,
/static/c796919b8e5744d3ce64d258d092d654/17fa4/ms-apt-get.png 1035w,
/static/c796919b8e5744d3ce64d258d092d654/a5044/ms-apt-get.png 1380w,
/static/c796919b8e5744d3ce64d258d092d654/34743/ms-apt-get.png 1522w&quot;
        sizes=&quot;(max-width: 690px) 100vw, 690px&quot;
        loading=&quot;lazy&quot;
      /&gt;
  &lt;/a&gt;
    &lt;/span&gt;&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;text&quot;&gt;&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;sudo apt-get install moby-engine
sudo apt-get install moby-cli&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h3 id=&quot;step-22---create-folder-structure-and-set-up-the-cron&quot;&gt;&lt;a href=&quot;#step-22---create-folder-structure-and-set-up-the-cron&quot; aria-label=&quot;step 22   create folder structure and set up the cron permalink&quot; class=&quot;anchor&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; focusable=&quot;false&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewBox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path fill-rule=&quot;evenodd&quot; d=&quot;M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;Step 2.2 - Create folder structure and set up the cron&lt;/h3&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;text&quot;&gt;&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;mkdir ~/timelapse&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;text&quot;&gt;&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;cd ~/timelapse&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;text&quot;&gt;&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;mkdir -p ~/timelapse/output/today&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Let&apos;s create the script file to take that picture&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;text&quot;&gt;&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;nano ~/timelapse/takephoto.sh&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Paste the following &lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;text&quot;&gt;&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;#!/bin/sh
today=`date &amp;#39;+%Y_%m_%d_%H%M_%S&amp;#39;`;
filename=&amp;quot;/tmp/ffmpeg/picture_$today.jpg&amp;quot;

sudo docker run -v=/home/pi/timelapse/output/today:/tmp/ffmpeg —rm mhiro2/rpi-ffmpeg:3.3 -rtsp_transport tcp -i &amp;quot;rtsp://admin:&amp;lt;yourpassword&amp;gt;@&amp;lt;your iP of type 192.168.0.x&amp;gt;:554&amp;quot; -vcodec mjpeg -frames 1 $filename&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h4 id=&quot;try-it&quot;&gt;&lt;a href=&quot;#try-it&quot; aria-label=&quot;try it permalink&quot; class=&quot;anchor&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; focusable=&quot;false&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewBox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path fill-rule=&quot;evenodd&quot; d=&quot;M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;Try it&lt;/h4&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;text&quot;&gt;&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;~/timelapse/takephoto.sh&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;To test, check the output using &lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;text&quot;&gt;&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;ls ~/timelapse/output/today&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;blockquote&gt;
&lt;p&gt;If you have an issue with permissions, I used the following but that may be too much actually : &lt;code class=&quot;language-text&quot;&gt;sudo chmod a+rwx ~/timelapse/takephoto.sh&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;If you can see a file, you can also download it to check what it looks like&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;text&quot;&gt;&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;scp [-P &amp;lt;port number&amp;gt;] pi@192.168.x.x:/home/pi/timelapse/output/taday/* .&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Set up the crontab&lt;/p&gt;
&lt;p&gt;&lt;code class=&quot;language-text&quot;&gt;crontab -e&lt;/code&gt; &lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;(I chose 1 for nano if you are asked to confirm because it is the first time you set up then cron)&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;On new line at the end, add:&lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;text&quot;&gt;&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;* 07-18 * * * /home/pi/timelapse/takephoto.sh&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;... where we basically ask for that job to take a photo every minutes between 7am and 6.59pm.&lt;/p&gt;
&lt;p&gt;You can then check a few pictures were taken using again the command &lt;/p&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;text&quot;&gt;&lt;pre class=&quot;language-text&quot;&gt;&lt;code class=&quot;language-text&quot;&gt;ls ~/timelapse/output/today&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;insert image&gt;
&lt;h3 id=&quot;making-the-time-lapse&quot;&gt;&lt;a href=&quot;#making-the-time-lapse&quot; aria-label=&quot;making the time lapse permalink&quot; class=&quot;anchor&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; focusable=&quot;false&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewBox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path fill-rule=&quot;evenodd&quot; d=&quot;M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;Making the time-lapse&lt;/h3&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;bash&quot;&gt;&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;&lt;span class=&quot;token function&quot;&gt;nano&lt;/span&gt; ~/timelapse/move_and_convert_to_timelapse.sh&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;bash&quot;&gt;&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;&lt;span class=&quot;token shebang important&quot;&gt;#!/bin/sh&lt;/span&gt;
&lt;span class=&quot;token assign-left variable&quot;&gt;today&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token variable&quot;&gt;&lt;span class=&quot;token variable&quot;&gt;`&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;date&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&apos;+%Y_%m_%d_%H%M_%S&apos;&lt;/span&gt;&lt;span class=&quot;token variable&quot;&gt;`&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token assign-left variable&quot;&gt;foldername&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token variable&quot;&gt;&lt;span class=&quot;token variable&quot;&gt;`&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;date&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&apos;+%Y_%m_%d&apos;&lt;/span&gt;&lt;span class=&quot;token variable&quot;&gt;`&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;token assign-left variable&quot;&gt;filename&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;/tmp/ffmpeg/timelapse_&lt;span class=&quot;token variable&quot;&gt;$foldername&lt;/span&gt;.mp4&quot;&lt;/span&gt;
&lt;span class=&quot;token assign-left variable&quot;&gt;targetFolder&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;/home/pi/timelapse/output/&lt;span class=&quot;token variable&quot;&gt;$foldername&lt;/span&gt;&quot;&lt;/span&gt;

&lt;span class=&quot;token comment&quot;&gt;#Ensure the folder exists&lt;/span&gt;
&lt;span class=&quot;token function&quot;&gt;mkdir&lt;/span&gt; -p &lt;span class=&quot;token variable&quot;&gt;$targetFolder&lt;/span&gt;

&lt;span class=&quot;token comment&quot;&gt;#Move today&apos;s pictures into a different folder&lt;/span&gt;
&lt;span class=&quot;token function&quot;&gt;mv&lt;/span&gt; -f /home/pi/timelapse/output/today/* &lt;span class=&quot;token variable&quot;&gt;$targetFolder&lt;/span&gt;

&lt;span class=&quot;token comment&quot;&gt;#Rename all pictures&lt;/span&gt;
&lt;span class=&quot;token assign-left variable&quot;&gt;aa&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;token keyword&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;token for-or-select variable&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;token variable&quot;&gt;&lt;span class=&quot;token variable&quot;&gt;`&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;ls&lt;/span&gt; $targetFolder/*&lt;span class=&quot;token variable&quot;&gt;`&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;mv&lt;/span&gt; &lt;span class=&quot;token variable&quot;&gt;$i&lt;/span&gt; &lt;span class=&quot;token variable&quot;&gt;$targetFolder&lt;/span&gt;/&lt;span class=&quot;token variable&quot;&gt;&lt;span class=&quot;token variable&quot;&gt;`&lt;/span&gt;&lt;span class=&quot;token builtin class-name&quot;&gt;printf&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;%04d&quot;&lt;/span&gt; $aa&lt;span class=&quot;token variable&quot;&gt;`&lt;/span&gt;&lt;/span&gt;.jpg&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token assign-left variable&quot;&gt;aa&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token variable&quot;&gt;&lt;span class=&quot;token variable&quot;&gt;$((&lt;/span&gt;$aa&lt;span class=&quot;token operator&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;token variable&quot;&gt;))&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;token keyword&quot;&gt;done&lt;/span&gt;

&lt;span class=&quot;token comment&quot;&gt;#Create the time-lapse from the pictures&lt;/span&gt;
&lt;span class=&quot;token function&quot;&gt;sudo&lt;/span&gt; docker run -v&lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token variable&quot;&gt;$targetFolder&lt;/span&gt;:/tmp/ffmpeg mhiro2/rpi-ffmpeg:3.3 -r &lt;span class=&quot;token number&quot;&gt;30&lt;/span&gt; -i /tmp/ffmpeg/%04d.jpg -r &lt;span class=&quot;token number&quot;&gt;10&lt;/span&gt; -vcodec libx264 -vf &lt;span class=&quot;token assign-left variable&quot;&gt;scale&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;1280&lt;/span&gt;:720&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</content:encoded><author>danuw@volto.io</author></item></channel></rss>