<snapdata remixID="15101492"><project name="IoT-02_board_segur_100100C40A27_brokerPropi" app="Snap! 11.0.8, https://snap.berkeley.edu" version="2"><notes></notes><thumbnail>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAB4CAYAAAB1ovlvAAAL+0lEQVR4AeydCXAUxxWG/x3tIa0kjDEQAgo+IFzmEmBBQRmKS+ZIBVNOBAICZUxEABMMFW5Mwn0lgaoYymWCE6eAcB92MMFQBkJKXBUgYFIII0AGjIiEhaTVvdrxvF5mkZBWEqwW9c48ld52T3dPz3v/+7ZHQj2LovIXK1CHCijgL1agDhVgAOtQfL40wAAyBXWqgF8AXS4Xjh8/juTkZGEnT54UJR3XRp3mIKut+fzNQ9cg89dfW+10DTLS7M6dO3Wa1FC6eKUA7t69G+np6YiJiUHjxo2f2s7v+wit9oxAq90JaK2VZHqdSrKybcGo0zXIgjF32Tnb7klA8+bN0axZMxQWFuLQoUOhxEGd+VoBwJycHLRr1w4lJSUoLi5Gdna2r05tZNROZVZWlhhDdTK9Xa/H5x1GeJgFDhmtln2yKhZE2hWfVgTjpUuX6iyxoXJh5XFH6RZCAOk2evRoLFiwQAi7ceNGZGZmYtasWeI4Li4OixYtEvVJkyaJcvPmzbhx44aoPz53VcfOOcmwvTYCzpnH/Q6LWnbNb1/YK919fUqz9r562Ur4uE2wOKLKNlVaj1r1ja/dGpeIyAX/QdSKG4h49zNYIp6D0vBlhL3cHRGTdqPsWI9HFXHr2tEb1DcRVypVoAKAHo9HrGq0mpHR8dy5c3Hw4EGkpqbi9OnTWLNmDTp16iQmvHbtGmbOnImbN2/i2LFjOHXqlLhl07k0wBY3Eo6EtVB+FAulSWuEJ34AWBRErUyDtW1/6F+eby/D8eZS/RCOn/9BG3MT1jY0xgI90RETd8LWOwnWzsNgHzgDkYu+8p1DFRrn/PXniHhnMx3C+uobiJi4XZxvURSoRS4ojVvAOfeU6KfxohJmQ1hMR69/osH7Yu85DpboRoASBveFfSDQPZk3YHt9Agr+PBql1096B2q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QvLmXInIGUIo0mNcJBtC8uZcicgZQijSY1wkG0Hi5D6mIGMCQSpfxnGUAjZfTkIqIAQypdBnPWQbQeDkNqYgYwJBKl/GcZQCNl9OQiqhWAQypyNlZKRRgAKVIg3mdYADNm3spImcApUiDeZ1gAM2beykiZwClSIN5nWAA/eR+6NCh4j/f9tP9WDMfPq0CDKAf5Q4cOIAVK1Zg+PDhwiZPniw+kNPPcG5+SgUYwCqE27//0ae90kfVTZ8+XcBIUC5cuFB8ZmIVp3NXDRRgAGsgUmVDhgwZgujo6Mq6uO0JFGAAqxCLVjq9e/DgwdixYwf27t0rjD5JVu/j8ukVYAD9aEc/823fvl3ARtAlJSXBZrP5Gc3NT6sAA+hHuQ0bNoA+rthPNzc/VCDQggEMVEE+PyAFGMCA5OOTA1WAAQxUQT4/IAUYwIDk45MDVYABDFRBPj8gBRjAgOTjkwNVIHQBDDRyPl8KBRhAKdJgXicYQPPmXorIGUAp0mBeJxhA8+ZeisgZQCnSYF4nGMDQy72hPGYADZXO0AuGAQy9nBnKYwbQUOkMvWAYwNDLmaE8ZgANlc7QC4YBDL2cGcrjJwLQUJFzMFIowABKkQbzOsEAmjf3UkTOAEqRBvM6wQCaN/dSRM4ASpEG8zrBANYo9zwoWAowgMFSluetkQIMYI1k4kHBUoABDJayPG+NFGAAayQTDwqWAgxgsJTleWukAANYI5nMOyjYkTOAwVaY569SAQawSnm4M9gKMIDBVpjnr1IBBrBKebgz2AowgMFWmOevUgEGsEp5uDPYCsgLYLAj5/mlUIABlCIN5nWCATRv7qWInAGUIg3mdYIBNG/upYicAZQiDeZ1ggGUL/em8ogBNFW65QuWAZQvJ6byiAE0VbrlC5YBlC8npvKIATRVuuULlgGULyem8qgcgKaKnIOVQgEGUIo0mNcJBtC8uZcicgZQijSY1wkG0Ly5lyLy7wEAAP//LoY4kAAAAAZJREFUAwALtkv4AFuCLQAAAABJRU5ErkJggg==</thumbnail><scenes select="1"><scene name="IoT-02_board_segur_100100C40A27_brokerPropi"><notes></notes><palette><category name="MQTT" color="143,0,100,1"/><category name="IoT-02 Board" color="0,245,24,1"/></palette><hidden></hidden><headers></headers><code></code><blocks><block-definition s="$cloudOutline MQTT connect to %&apos;broker&apos; %&apos;options&apos;" type="command" category="MQTT"><comment x="0" y="0" w="455" collapsed="false">Connect to a broker&#xD;&#xD;The options are not required but can be filled if needed&#xD;&#xD;1. username (some brokers need this)&#xD;2. password (some brokers need this)&#xD;3. keepalive (default time is 60 seconds but some brokers need a shorter time)&#xD;4. connection callback (ringed set of scripts to be run when connection is made or remade)&#xD;&#xD;ADVANCED: The brokers offered in the menu are accessed using default ports and  basepaths (if needed).  If accessing other brokers, the complete urls should be formed like this:&#xD;&#xD;siteURL:port/basepath &#xD;e.g mqtt.eclipseprojects.io:443/mqtt&#xD;&#xD;It is possible to have more than one connection to the same broker, for instance, using two different user/pass accounts simultaneously. To do this, add a connection id at the end of the broker:&#xD;&#xD;e.g mqtt.eclipseprojects.io:443/mqtt|1&#xD;</comment><header></header><code></code><translations></translations><inputs><input type="%s">broker.emqx.io<options>broker.emqx.io&#xD;mqtt.eclipseprojects.io&#xD;test.mosquitto.org&#xD;broker.xmqtt.net&#xD;broker.hivemq.com</options></input><input type="%mult%s" expand="username&#xD;password&#xD;keepalive&#xD;connection callback" max="4">​&#xD;​&#xD;60</input></inputs><script><block s="doApplyExtension"><l>src_load(url)</l><list><l>libraries/mqtt.js</l></list></block><block s="doApplyExtension"><l>src_load(url)</l><list><l>libraries/mqttExtension.js</l></list></block><block s="doSetVar"><l>options</l><custom-block s="sanitise options %l mask %l"><block var="options"/><l/></custom-block></block><block s="doDeclareVariables"><list><l>connection status</l><l>callback</l></list></block><block s="doSetVar"><l>connection status</l><l>connecting</l></block><block s="doSetVar"><l>callback</l><l></l></block><block s="doIf"><block s="reportIsA"><block s="reportListItem"><l>4</l><block var="options"/></block><l><option>command</option></l></block><script><block s="doSetVar"><l>callback</l><block s="reportListItem"><l>4</l><block var="options"/></block></block></script><list></list></block><block s="doSetVar"><l>options</l><block s="reportListAttribute"><l><option>json</option></l><block s="reportNewList"><list><block s="reportNewList"><list><l>username</l><block s="reportListItem"><l>1</l><block var="options"/></block></list></block><block s="reportNewList"><list><l>password</l><block s="reportListItem"><l>2</l><block var="options"/></block></list></block><block s="reportNewList"><list><l>keepalive</l><block s="reportListItem"><l>3</l><block var="options"/></block></list></block></list></block></block></block><block s="doApplyExtension"><l>mqt_connect(broker,callback,options)</l><list><block var="broker"/><block var="callback"/><block var="options"/></list></block><block s="doWaitUntil"><block s="reportNot"><block s="reportVariadicEquals"><list><block var="connection status"/><l>connecting</l></list></block></block></block><block s="doIf"><block s="reportNot"><block s="reportVariadicEquals"><list><block var="connection status"/><l>connected</l></list></block></block><script><block s="doApplyExtension"><l>err_error(msg)</l><list><block var="connection status"/></list></block></script><list></list></block></script></block-definition><block-definition s="$cloudOutline MQTT subscribe to %&apos;broker&apos; topic %&apos;topic&apos; $nl on each message run %&apos;callback&apos; %&apos;options&apos;" type="command" category="MQTT"><comment x="0" y="0" w="306.99999999999943" collapsed="false">Subscribe to a topic on a broker&#xD;&#xD;Make sure you have already run an MQTT connect block before using this one&#xD;&#xD;You should add a script to be run inside he grey ring.&#xD;&#xD;It will be run each time a message is received&#xD;&#xD;If you click on the arrow on the grey ring twice, you can use #1 and #2 inside your script.&#xD;&#xD;#1 will contain the received payload&#xD;&#xD;#2 will contain the received topic name&#xD;&#xD;The options are not required but can be filled if needed&#xD;&#xD;1. Subscribed QoS (0,1 or 2)  Note this will be downgraded if it exceeds the QoS of the stored message held on the broker &#xD;&#xD;2. Binary mode (boolean) Default (false) - payload is returned as text&#xD;&#xD;If true, payload returned as single column list of values in the range of 0 to 255..  </comment><header></header><code></code><translations></translations><inputs><input type="%s">broker.emqx.io<options>broker.emqx.io&#xD;mqtt.eclipseprojects.io&#xD;test.mosquitto.org&#xD;broker.xmqtt.net&#xD;broker.hivemq.com</options></input><input type="%s">name</input><input type="%cmdRing"></input><input type="%mult%s" expand="QoS&#xD;binary mode" max="2">0&#xD;false</input></inputs><script><block s="doApplyExtension"><l>src_load(url)</l><list><l>libraries/mqtt.js</l></list></block><block s="doApplyExtension"><l>src_load(url)</l><list><l>libraries/mqttExtension.js</l></list></block><block s="doSetVar"><l>options</l><custom-block s="sanitise options %l mask %l"><block var="options"/><block s="reportNewList"><list><l></l><block s="reportBoolean"><l><bool>true</bool></l></block></list></block></custom-block></block><block s="doSetVar"><l>options</l><block s="reportListAttribute"><l><option>json</option></l><block s="reportNewList"><list><block s="reportNewList"><list><l>qos</l><block s="reportListItem"><l>1</l><block var="options"/></block></list></block><block s="reportNewList"><list><l>mode</l><block s="reportListItem"><l>2</l><block var="options"/></block></list></block></list></block></block></block><block s="doApplyExtension"><l>mqt_sub(broker,topic,callback,options)</l><list><block var="broker"/><block var="topic"/><block var="callback"/><block var="options"/></list></block></script></block-definition><block-definition s="$cloudOutline MQTT publish to %&apos;broker&apos; topic %&apos;topic&apos; payload %&apos;payload&apos; %&apos;options&apos;" type="command" category="MQTT"><comment x="0" y="0" w="455" collapsed="false">Publish a message to an MQTT broker&#xD;&#xD;The options are not required but can be filled if needed&#xD;&#xD;1. QoS (quality of service 0,1 or 2 - see  https://www.emqx.com/en/blog/introduction-to-mqtt-qos)&#xD;&#xD;2. Retain flag (boolean)&#xD;&#xD;3. Binary mode (boolean).    Default (false) - the payload is published as text&#xD;&#xD;If set to true then payload is expected to be a single column list of values in the 0 to 255 range and is published to the broker as a buffer of bytes.&#xD;&#xD;Note:  If the payload is a list and you don&apos;t set the buffer mode option, it will be automatically be converted into JSON and sent as text. Note that many brokers are configured to limit the payload size to 1 MB.&#xD;&#xD;</comment><header></header><code></code><translations></translations><inputs><input type="%s">broker.emqx.io<options>broker.emqx.io&#xD;mqtt.eclipseprojects.io&#xD;test.mosquitto.org&#xD;broker.xmqtt.net&#xD;broker.hivemq.com</options></input><input type="%s">name</input><input type="%mlt">hello</input><input type="%mult%s" expand="QoS&#xD;retain flag&#xD;binary mode" max="3">0&#xD;false&#xD;false</input></inputs><script><block s="doApplyExtension"><l>src_load(url)</l><list><l>libraries/mqtt.js</l></list></block><block s="doApplyExtension"><l>src_load(url)</l><list><l>libraries/mqttExtension.js</l></list></block><block s="doSetVar"><l>options</l><custom-block s="sanitise options %l mask %l"><block var="options"/><block s="reportNewList"><list><l></l><block s="reportBoolean"><l><bool>true</bool></l></block><block s="reportBoolean"><l><bool>true</bool></l></block></list></block></custom-block></block><block s="doSetVar"><l>options</l><block s="reportListAttribute"><l><option>json</option></l><block s="reportNewList"><list><block s="reportNewList"><list><l>qos</l><block s="reportListItem"><l>1</l><block var="options"/></block></list></block><block s="reportNewList"><list><l>retain</l><block s="reportListItem"><l>2</l><block var="options"/></block></list></block><block s="reportNewList"><list><l>mode</l><block s="reportListItem"><l>3</l><block var="options"/></block></list></block></list></block></block></block><block s="doIf"><block s="reportNot"><block s="reportListItem"><l>2</l><block s="reportListItem"><l>3</l><block s="reportTextSplit"><block var="options"/><l><option>json</option></l></block></block></block></block><script><block s="doIf"><block s="reportIsA"><block var="payload"/><l><option>list</option></l></block><script><block s="doSetVar"><l>payload</l><block s="reportListAttribute"><l><option>json</option></l><block var="payload"/></block></block></script><list></list></block><block s="doIf"><block s="reportIsA"><block var="payload"/><l><option>number</option></l></block><script><block s="doSetVar"><l>payload</l><block s="reportJoinWords"><list><block var="payload"/></list></block></block></script><list></list></block></script><list></list></block><block s="doApplyExtension"><l>mqt_pub(broker,topic,payload,options)</l><list><block var="broker"/><block var="topic"/><block var="payload"/><block var="options"/></list></block></script></block-definition><block-definition s="$cloudOutline MQTT unsubscribe from %&apos;broker&apos; topic %&apos;topic&apos;" type="command" category="MQTT"><header></header><code></code><translations></translations><inputs><input type="%s">broker.emqx.io<options>broker.emqx.io&#xD;mqtt.eclipseprojects.io&#xD;test.mosquitto.org&#xD;broker.xmqtt.net&#xD;broker.hivemq.com</options></input><input type="%s">name</input></inputs><script><block s="doApplyExtension"><l>src_load(url)</l><list><l>libraries/mqtt.js</l></list></block><block s="doApplyExtension"><l>src_load(url)</l><list><l>libraries/mqttExtension.js</l></list></block><block s="doApplyExtension"><l>mqt_unsub(broker,topic)</l><list><block var="broker"/><block var="topic"/></list></block></script></block-definition><block-definition s="$cloudOutline MQTT disconnect from %&apos;broker&apos;" type="command" category="MQTT"><header></header><code></code><translations></translations><inputs><input type="%s">all<options>all&#xD;broker.emqx.io&#xD;mqtt.eclipseprojects.io&#xD;test.mosquitto.org&#xD;broker.xmqtt.net&#xD;broker.hivemq.com</options></input></inputs><script><block s="doApplyExtension"><l>src_load(url)</l><list><l>libraries/mqtt.js</l></list></block><block s="doApplyExtension"><l>src_load(url)</l><list><l>libraries/mqttExtension.js</l></list></block><block s="doApplyExtension"><l>mqt_disconnect(broker)</l><list><block var="broker"/></list></block></script></block-definition><block-definition s="$cloudOutline MQTT response %&apos;broker&apos; topic %&apos;topic&apos; $nl reply %&apos;reply&apos; %&apos;options&apos;" type="command" category="MQTT"><comment x="0" y="0" w="292.22207031250036" collapsed="false">Options:&#xD;&#xD;1. Sub binary mode (boolean) Default (false) - received payload is returned as text. &#xD;&#xD;If true then subscribed, received payload is returned as single column list of values in the range of 0 to 255..  Default (false) - it is returned as text&#xD;&#xD;2.  Pub binary mode (boolean).  Default (false) - the payload is published as text.&#xD;&#xD;If set to true then published payload is expected to be a single column list of values in the 0 to 255 range and is published to the broker as a buffer of bytes.&#xD;&#xD;Note:  If the payload is a list and you don&apos;t set the buffer mode option, it will be automatically be converted into JSON and sent as text&#xD;&#xD;</comment><header></header><code></code><translations></translations><inputs><input type="%s">broker.emqx.io<options>broker.emqx.io&#xD;mqtt.eclipseprojects.io&#xD;test.mosquitto.org&#xD;broker.xmqtt.net&#xD;broker.hivemq.com</options></input><input type="%s">name/#</input><input type="%repRing"></input><input type="%mult%s" expand="sub binary mode&#xD;pub binary mode" max="2">false&#xD;false</input></inputs><script><block s="doDeclareVariables"><list><l>resp</l><l>callbackTopic</l><l>error</l></list></block><block s="doSetVar"><l>options</l><custom-block s="sanitise options %l mask %l"><block var="options"/><block s="reportNewList"><list><block s="reportBoolean"><l><bool>true</bool></l></block><block s="reportBoolean"><l><bool>true</bool></l></block></list></block></custom-block></block><custom-block s="$cloudOutline MQTT subscribe to %s topic %s %br on each message run %cmdRing %mult%s"><block var="broker"/><block var="topic"/><block s="reifyScript"><script><block s="doIf"><block s="reportVariadicGreaterThan"><list><block s="reportApplyExtension"><l>txt_indexof(sub, txt)</l><list><l>/@</l><block var="received topic"/></list></block><l>0</l></list></block><script><block s="doApplyExtension"><l>err_try(cmd, catch, err)</l><list><block s="reifyScript"><script><block s="doSetVar"><l>resp</l><block s="evaluate"><block var="reply"/><list><block var="received payload"/><block var="received topic"/></list></block></block></script><list></list></block><block s="reifyScript"><script><block s="doSetVar"><l>resp</l><block s="evaluate"><block var="reply"/><list></list></block></block></script><list></list></block><block var="error"/></list></block><block s="doApplyExtension"><l>err_reset</l><list></list></block><block s="doSetVar"><l>callbackTopic</l><block s="reportListItem"><l><option>last</option></l><block s="reportTextSplit"><block var="received topic"/><l>@</l></block></block></block><custom-block s="$cloudOutline MQTT publish to %s topic %s payload %mlt %mult%s"><block var="broker"/><block var="callbackTopic"/><block var="resp"/><list><l></l><l></l><block s="reportListItem"><l>2</l><block var="options"/></block></list></custom-block></script><list></list></block></script><list><l>received payload</l><l>received topic</l></list></block><list><l>0</l><block s="reportListItem"><l>1</l><block var="options"/></block></list></custom-block></script></block-definition><block-definition s="$cloudOutline MQTT request %&apos;broker&apos; topic %&apos;topic&apos; $nl response topic %&apos;rtopic&apos; payload %&apos;payload&apos; $nl on response run %&apos;callback&apos; %&apos;options&apos;" type="command" category="MQTT"><comment x="0" y="0" w="242.99999999999997" collapsed="false">The options are not required but can be filled if needed.&#xD;&#xD;1. Append response topic (boolean): If true, the response topic is added at the end of the call topic after @ sign. The default condition (true) response topic is added.&#xD;&#xD;2. Sub binary mode (boolean) Default (false) - received payload is returned as text. &#xD;&#xD;If true,then the subscribed, received payload is returned as a single column list of values in the range of 0 to 255..  &#xD;&#xD;3.  Pub binary mode (boolean).  Default (false) - the payload is published as text.&#xD;&#xD;If set to true then published payload is expected to be a single column list of values in the 0 to 255 range and is published to the broker as a buffer of bytes.&#xD;&#xD;Note:  If the payload is a list and you don&apos;t set the buffer mode option, it will be automatically be converted into JSON and sent as text&#xD;&#xD;</comment><header></header><code></code><translations></translations><inputs><input type="%s">broker.emqx.io<options>broker.emqx.io&#xD;mqtt.eclipseprojects.io&#xD;test.mosquitto.org&#xD;broker.xmqtt.net&#xD;broker.hivemq.com</options></input><input type="%s">name</input><input type="%s">name2</input><input type="%mlt">hello</input><input type="%cmdRing"></input><input type="%mult%s" expand="append response topic&#xD;sub binary mode&#xD;pub binary mode&#xD;" max="3">true&#xD;false&#xD;false</input></inputs><script><block s="doDeclareVariables"><list><l>error</l><l>informTopic</l><l>topicCall</l></list></block><block s="doSetVar"><l>options</l><custom-block s="sanitise options %l mask %l"><block var="options"/><block s="reportNewList"><list><block s="reportBoolean"><l><bool>true</bool></l></block><block s="reportBoolean"><l><bool>true</bool></l></block><block s="reportBoolean"><l><bool>true</bool></l></block></list></block></custom-block></block><block s="doSetVar"><l>informTopic</l><block s="reportIfElse"><block s="reportIsA"><block s="reportListItem"><l>1</l><block var="options"/></block><l><option>Boolean</option></l></block><block s="reportListItem"><l>1</l><block var="options"/></block><block s="reportBoolean"><l><bool>true</bool></l></block></block></block><custom-block s="$cloudOutline MQTT subscribe to %s topic %s %br on each message run %cmdRing %mult%s"><block var="broker"/><block s="reportJoinWords"><list><block var="rtopic"/></list></block><block s="reifyScript"><script><block s="doApplyExtension"><l>err_try(cmd, catch, err)</l><list><block s="reifyScript"><script><block s="doRun"><block var="callback"/><list><block var="received payload"/><block var="received topic"/></list></block></script><list></list></block><block s="reifyScript"><script><block s="doRun"><block var="callback"/><list></list></block></script><list></list></block><block var="error"/></list></block></script><list><l>received payload</l><l>received topic</l></list></block><list><l>0</l><block s="reportListItem"><l>2</l><block var="options"/></block></list></custom-block><block s="doIfElse"><block var="informTopic"/><script><block s="doSetVar"><l>topicCall</l><block s="reportJoinWords"><list><block var="topic"/><l>/</l><block s="reportJoinWords"><list><l>@</l><block var="rtopic"/></list></block></list></block></block></script><script><block s="doSetVar"><l>topicCall</l><block var="topic"/></block></script></block><custom-block s="$cloudOutline MQTT publish to %s topic %s payload %mlt %mult%s"><block var="broker"/><block var="topicCall"/><block var="payload"/><list><l></l><l></l><block s="reportListItem"><l>3</l><block var="options"/></block></list></custom-block></script></block-definition><block-definition s="$cloudOutline MQTT example response reporter payload %&apos;payload&apos; topic %&apos;topic&apos;" type="reporter" category="MQTT"><comment x="0" y="0" w="90" collapsed="false">This is a simple echo example.&#xD;Topic can be used to filter the response.</comment><header></header><code></code><translations></translations><inputs><input type="%mlt">hello</input><input type="%txt">name</input></inputs><script><block s="doReport"><block var="payload"/></block></script></block-definition><block-definition s="$cloudOutline MQTT request %&apos;broker&apos; topic %&apos;topic&apos; $nl response topic %&apos;rtopic&apos; payload %&apos;payload&apos; %&apos;options&apos;" type="reporter" category="MQTT"><comment x="0" y="0" w="343" collapsed="false">The response topic should be a unique value for each call e.g. use timer&#xD;&#xD;The options are not required but can be filled if needed&#xD;&#xD;1.  Timeout value - default is 3 seconds&#xD;&#xD;2.  Append response topic (boolean): If true, the response topic is added at the end of the call topic after @ sign. The default condition (true) response topic is added.&#xD;&#xD;3. Sub binary mode (boolean) Default (false) - received payload is returned as text. &#xD;&#xD;If true, subscribed, received payload returned as single column list of values in the range of 0 to 255..  Default (false) - it is returned as text&#xD;&#xD;4.  Pub binary mode (boolean).  Default (false) - the payload is published as text.&#xD;&#xD;If set to true then published payload is expected to be a single column list of values in the 0 to 255 range and is published to the broker as a buffer of bytes.&#xD;&#xD;Note:  If the payload is a list and you don&apos;t set the buffer mode option, it will be automatically be converted into JSON and sent as text&#xD;&#xD;</comment><header></header><code></code><translations></translations><inputs><input type="%s">broker.emqx.io<options>broker.emqx.io&#xD;mqtt.eclipseprojects.io&#xD;test.mosquitto.org&#xD;broker.xmqtt.net&#xD;broker.hivemq.com</options></input><input type="%s">name</input><input type="%s">name2</input><input type="%mlt">hello</input><input type="%mult%s" expand="timeout&#xD;append response topic&#xD;sub binary mode&#xD;pub binary mode&#xD;" max="4">3&#xD;true&#xD;false&#xD;false</input></inputs><script><block s="doDeclareVariables"><list><l>resp</l><l>semaphore</l><l>timer0</l><l>timeout</l><l>informTopic</l><l>topicCall</l></list></block><block s="doSetVar"><l>options</l><custom-block s="sanitise options %l mask %l"><block var="options"/><block s="reportNewList"><list><l></l><block s="reportBoolean"><l><bool>true</bool></l></block><block s="reportBoolean"><l><bool>true</bool></l></block><block s="reportBoolean"><l><bool>true</bool></l></block></list></block></custom-block></block><block s="doSetVar"><l>semaphore</l><l>0</l></block><block s="doSetVar"><l>timeout</l><block s="reportIfElse"><block s="reportIsA"><block s="reportListItem"><l>1</l><block var="options"/></block><l><option>number</option></l></block><block s="reportListItem"><l>1</l><block var="options"/></block><l>3</l></block></block><block s="doSetVar"><l>informTopic</l><block s="reportIfElse"><block s="reportIsA"><block s="reportListItem"><l>2</l><block var="options"/></block><l><option>Boolean</option></l></block><block s="reportListItem"><l>2</l><block var="options"/></block><block s="reportBoolean"><l><bool>true</bool></l></block></block></block><block s="doSetVar"><l>resp</l><l>timeout</l></block><custom-block s="$cloudOutline MQTT subscribe to %s topic %s %br on each message run %cmdRing %mult%s"><block var="broker"/><block s="reportJoinWords"><list><block var="rtopic"/></list></block><block s="reifyScript"><script><block s="doSetVar"><l>resp</l><block var="received payload"/></block><block s="doSetVar"><l>semaphore</l><l>1</l></block></script><list><l>received payload</l><l>received topic</l></list></block><list><l>0</l><block s="reportListItem"><l>3</l><block var="options"/></block></list></custom-block><block s="doIfElse"><block var="informTopic"/><script><block s="doSetVar"><l>topicCall</l><block s="reportJoinWords"><list><block var="topic"/><l>/</l><block s="reportJoinWords"><list><l>@</l><block var="rtopic"/></list></block></list></block></block></script><script><block s="doSetVar"><l>topicCall</l><block var="topic"/></block></script></block><custom-block s="$cloudOutline MQTT publish to %s topic %s payload %mlt %mult%s"><block var="broker"/><block var="topicCall"/><block var="payload"/><list><l>0</l><l>false</l><block s="reportListItem"><l>4</l><block var="options"/></block></list></custom-block><block s="doSetVar"><l>timer0</l><block s="reportDate"><l><option>time in milliseconds</option></l></block></block><block s="doWaitUntil"><block s="reportVariadicOr"><list><block s="reportVariadicEquals"><list><block var="semaphore"/><l>1</l></list></block><block s="reportVariadicGreaterThan"><list><block s="reportDifference"><block s="reportDate"><l><option>time in milliseconds</option></l></block><block var="timer0"/></block><block s="reportVariadicProduct"><list><block var="timeout"/><l>1000</l></list></block></list></block></list></block></block><custom-block s="$cloudOutline MQTT unsubscribe from %s topic %s"><block var="broker"/><block s="reportJoinWords"><list><block var="rtopic"/></list></block></custom-block><block s="doReport"><block var="resp"/></block></script></block-definition><block-definition s="%&apos;data&apos; to base64" type="reporter" category="MQTT"><comment x="0" y="0" w="290" collapsed="false">Encode costume, sound or data to Base64</comment><header></header><code></code><translations></translations><inputs><input type="%s" initial="1"></input></inputs><script><block s="doApplyExtension"><l>src_load(url)</l><list><l>libraries/mqttExtension.js</l></list></block><block s="doReport"><block s="reportApplyExtension"><l>mqt_to_base64(media_or_data)</l><list><block var="data"/></list></block></block></script></block-definition><block-definition s="sanitise options %&apos;data&apos; mask %&apos;mask&apos;" type="reporter" category="MQTT" helper="true"><comment x="0" y="0" w="226" collapsed="false">Modify V10 variadic defaults to be able to work for blank and psuedo (false/true) boolean entries&#xD;&#xD;Blank defaults are set as zero width spaces which are removed when block is executed&#xD;&#xD;This is needed for the connect block&#xD;&#xD;The options are then checked to see if they should be boolean and if they are not aready a boolean value, then they are replaced with boolean true if default is text &quot;true&quot;, otherwise boolean false.</comment><header></header><code></code><translations></translations><inputs><input type="%l" initial="1"></input><input type="%l" initial="1"></input></inputs><script><block s="doDeclareVariables"><list><l>zero width space</l></list></block><block s="doSetVar"><l>zero width space</l><block s="reportUnicodeAsLetter"><l>8203</l></block></block><block s="doSetVar"><l>data</l><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportIfElse"><block s="reportIsA"><block var="value"/><l><option>text</option></l></block><block s="reportCombine"><block s="reportTextSplit"><block var="value"/><block var="zero width space"/></block><block s="reifyReporter"><autolambda><block s="reportJoinWords"><list><l></l><l></l><l></l></list></block></autolambda><list></list></block></block><block var="value"/></block></autolambda><list><l>value</l></list></block><block var="data"/></block></block><block s="doReport"><block s="reportListAttribute"><l><option>flatten</option></l><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportIfElse"><block s="reportVariadicAnd"><list><block s="reportIsA"><block s="reportListItem"><l>2</l><block var="value"/></block><l><option>Boolean</option></l></block><block s="reportNot"><block s="reportIsA"><block s="reportListItem"><l>1</l><block var="value"/></block><l><option>Boolean</option></l></block></block></list></block><block s="reportIfElse"><block s="reportVariadicEquals"><list><block s="reportListItem"><l>1</l><block var="value"/></block><l>true</l></list></block><block s="reportBoolean"><l><bool>true</bool></l></block><block s="reportBoolean"><l><bool>false</bool></l></block></block><block s="reportListItem"><l>1</l><block var="value"/></block></block></autolambda><list><l>value</l><l>index</l></list></block><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportNewList"><list><block var="value"/><block s="reportListItem"><block var="index"/><block var="mask"/></block></list></block></autolambda><list><l>value</l><l>index</l></list></block><block var="data"/></block></block></block></block></script></block-definition><block-definition s="%&apos;data&apos; from base64 %&apos;options&apos;" type="reporter" category="MQTT"><comment x="0" y="0" w="290" collapsed="false">Decode costume, sound or data from Base64</comment><header></header><code></code><translations></translations><inputs><input type="%s" initial="1"></input><input type="%mult%b" expand="as list" max="1">true</input></inputs><script><block s="doApplyExtension"><l>src_load(url)</l><list><l>libraries/mqttExtension.js</l></list></block><block s="doIf"><block s="reportVariadicEquals"><list><block s="reportListItem"><l>1</l><block var="options"/></block><block s="reportBoolean"><l><bool>true</bool></l></block></list></block><script><block s="doReport"><block s="reportApplyExtension"><l>mqt_binary_to_list(bytes)</l><list><block s="reportApplyExtension"><l>mqt_from_base64(b64)</l><list><block s="reportListItem"><l><option>last</option></l><block s="reportTextSplit"><block var="data"/><l>,</l></block></block></list></block></list></block></block></script><list><l><bool>true</bool></l><script><block s="doReport"><block s="reportApplyExtension"><l>mqt_from_base64(b64)</l><list><block var="data"/></list></block></block></script></list></block></script></block-definition><block-definition s="MQTT Extension Examples" type="command" category="MQTT"><comment x="0" y="0" w="385.99999999999983" collapsed="false">Open (edit) this block to look at examples how to use the MQTT Extension blocks&#xD;&#xD;Background documentation:&#xD;https://github.com/pixavier/mqtt4snap&#xD;&#xD;Last source code version (mqtt.xml and mqttExtension.js):&#xD;https://gitlab.com/cymplecy/Snap/-/tree/master/libraries</comment><header></header><code></code><translations></translations><inputs></inputs><scripts><comment x="489.99999999999955" y="215.1999999999999" w="222.99999999999997" collapsed="false">Step 0: Connect to the broker</comment><comment x="31.33333333333337" y="152.20000000000016" w="239.99999999999997" collapsed="false">PubSub Hello World!</comment><comment x="489.99999999999955" y="271.19999999999953" w="222" collapsed="false">Step 1: Subscribe to a topic</comment><script x="25.33333333333337" y="272.1999999999993"><custom-block s="$cloudOutline MQTT subscribe to %s topic %s %br on each message run %cmdRing %mult%s"><l>broker.emqx.io</l><l>name</l><block s="reifyScript"><script><block s="doSayFor"><block var="payload"/><l>2</l></block></script><list><l>payload</l><l>received topic</l></list></block><list></list></custom-block></script><script x="29.33333333333337" y="366.86666666666605"><custom-block s="$cloudOutline MQTT publish to %s topic %s payload %mlt %mult%s"><l>broker.emqx.io</l><l>name</l><l>hello</l><list></list></custom-block></script><comment x="492.99999999999955" y="357.1999999999993" w="222" collapsed="false">Step 2: Publish a message</comment><script x="33.99999999999966" y="484.1999999999998"><custom-block s="$cloudOutline MQTT subscribe to %s topic %s %br on each message run %cmdRing %mult%s"><l>broker.emqx.io</l><l>name1</l><block s="reifyScript"><script><custom-block s="$cloudOutline MQTT publish to %s topic %s payload %mlt %mult%s"><l>broker.emqx.io</l><l>name2</l><block var="payload"/><list></list></custom-block></script><list><l>payload</l><l>topic</l></list></block><list></list></custom-block></script><comment x="499" y="481.69999999999817" w="220" collapsed="false">Step 1: Activate the responder as a simple subscription</comment><script x="32.999999999999886" y="602.0333333333335"><block s="doSayFor"><custom-block s="$cloudOutline MQTT request %s topic %s %br response topic %s payload %mlt %mult%s"><l>broker.emqx.io</l><l>name1</l><l>name2</l><l>hello</l><list><l>3</l><l>false</l></list></custom-block><l>2</l></block></script><comment x="500" y="606.6999999999989" w="220" collapsed="false">Step 2: Send a request and wait the answer.</comment><comment x="504.99999999999955" y="131.19999999999993" w="191" collapsed="false">To execute the examples, single click on blocks, following the corresponding steps.</comment><comment x="499.66666666666697" y="756.3666666666654" w="224.00000000000003" collapsed="false">Step 2 bis: Send a request and do not wait for the answer</comment><comment x="24.33333333333337" y="871.1999999999988" w="356.99999999999994" collapsed="false">Synchronous client-server Hello World! with dynamic response topic (timer)</comment><comment x="510.9999999999996" y="930.7000000000011" w="220" collapsed="false">Step 1: Activate the responder</comment><script x="34.33333333333337" y="1048.1999999999982"><block s="doSayFor"><custom-block s="$cloudOutline MQTT request %s topic %s %br response topic %s payload %mlt %mult%s"><l>broker.emqx.io</l><l>name</l><block s="getTimer"></block><l>hello</l><list></list></custom-block><l>2</l></block></script><comment x="510.9999999999996" y="1050.6999999999987" w="219.0000000000002" collapsed="false">Step 2: Send a request (timer acts as idCall) and wait for the answer</comment><comment x="31.999999999999886" y="1138.6999999999982" w="352.0000000000003" collapsed="false">Asynchronous client-server Hello World! with dynamic response topic (timer)</comment><script x="31.999999999999886" y="1207.0333333333313"><custom-block s="$cloudOutline MQTT request %s topic %s %br response topic %s payload %mlt %br on response run %cmdRing %mult%s"><l>broker.emqx.io</l><l>name</l><block s="getTimer"></block><l>hello</l><block s="reifyScript"><script><block s="doSayFor"><block var="payload"/><l>2</l></block></script><list><l>payload</l><l>topic</l></list></block><list></list></custom-block></script><comment x="514.9999999999995" y="1204.6999999999991" w="224.00000000000003" collapsed="false">Step 2 bis: Send a request (timer acts as idCall) and do not wait for the answer</comment><script x="28.999999999999662" y="225.20000000000013"><custom-block s="$cloudOutline MQTT connect to %s %mult%s"><l>broker.emqx.io</l><list></list></custom-block></script><script x="25.33333333333337" y="932.2000000000013"><custom-block s="$cloudOutline MQTT response %s topic %s %br reply %repRing %mult%s"><l>broker.emqx.io</l><l>name/#</l><block s="reifyReporter"><autolambda><custom-block s="$cloudOutline MQTT example response reporter payload %mlt topic %txt"><block var="payload"/><block var="topic"/></custom-block></autolambda><list><l>payload</l><l>topic</l></list></block><list></list></custom-block></script><comment x="26.999999999999886" y="685.6999999999983" w="372.0000000000004" collapsed="false">Asynchronous client-server Hello World! with static response topic (name2)</comment><script x="27.999999999999883" y="751.0333333333324"><custom-block s="$cloudOutline MQTT request %s topic %s %br response topic %s payload %mlt %br on response run %cmdRing %mult%s"><l>broker.emqx.io</l><l>name1</l><l>name2</l><l>hello</l><block s="reifyScript"><script><block s="doSayFor"><block var="payload"/><l>2</l></block></script><list><l>payload</l><l>topic</l></list></block><list><l>false</l></list></custom-block></script><comment x="28.999999999999886" y="412.36666666666696" w="361.99999999999994" collapsed="false">Synchronous client-server Hello World! with static response topic (name2)</comment></scripts></block-definition><block-definition s="setBroker" type="command" category="IoT-02 Board"><header></header><code></code><translations></translations><inputs></inputs><script><block s="doSetVar"><l>broker</l><l>wss://broker.binefa.cat:9002</l></block><block s="doSetVar"><l>brokerCredentials</l><block s="reportNewList"><list><l>ecat</l><l>clotClot</l></list></block></block></script></block-definition><block-definition s="setMAC MAC: %&apos;MAC_IoT-02&apos;" type="command" category="IoT-02 Board"><header></header><code></code><translations></translations><inputs><input type="%s" initial="1"></input></inputs><script><block s="doSetVar"><l>MAC</l><block var="MAC_IoT-02"/></block></script></block-definition><block-definition s="setMacTopics" type="command" category="IoT-02 Board"><header></header><code></code><translations></translations><inputs></inputs><script><block s="doSetVar"><l>topicMacReq</l><l>/macReq</l></block><block s="doSetVar"><l>topicMac</l><l>/mac</l></block></script></block-definition><block-definition s="setCtrlTopics MAC: %&apos;MAC_IoT-02&apos;" type="command" category="IoT-02 Board"><header></header><code></code><translations></translations><inputs><input type="%s" initial="1"></input></inputs><script><block s="doSetVar"><l>topicLedW</l><block s="reportJoinWords"><list><l>/</l><block var="MAC_IoT-02"/><l>/ledW</l></list></block></block><block s="doSetVar"><l>topicLedR</l><block s="reportJoinWords"><list><l>/</l><block var="MAC_IoT-02"/><l>/ledR</l></list></block></block><block s="doSetVar"><l>topicLedY</l><block s="reportJoinWords"><list><l>/</l><block var="MAC_IoT-02"/><l>/ledY</l></list></block></block><block s="doSetVar"><l>topicLedG</l><block s="reportJoinWords"><list><l>/</l><block var="MAC_IoT-02"/><l>/ledG</l></list></block></block><block s="doSetVar"><l>topicLatchingRelay</l><block s="reportJoinWords"><list><l>/</l><block var="MAC_IoT-02"/><l>/latchingRelay</l></list></block></block><block s="doSetVar"><l>topicJsonLeds</l><block s="reportJoinWords"><list><l>/</l><block var="MAC_IoT-02"/><l>/jsonLeds</l></list></block></block></script></block-definition><block-definition s="subscrTopics Broker: %&apos;brk&apos; MAC: %&apos;mac&apos;" type="command" category="IoT-02 Board"><header></header><code></code><translations></translations><inputs><input type="%s" initial="1"></input><input type="%s" initial="1"></input></inputs><script><custom-block s="$cloudOutline MQTT subscribe to %s topic %s %br on each message run %cmdRing %mult%s"><block var="brk"/><block s="reportJoinWords"><list><l>/</l><block var="mac"/><l>/#</l></list></block><block s="reifyScript"><script><block s="doIf"><block s="reportVariadicEquals"><list><block s="reportJoinWords"><list><l>/</l><block var="mac"/><l>/btIO0</l></list></block><block var="topic"/></list></block><script><block s="doSayFor"><block s="reportJoinWords"><list><l>btIO0: </l><block var="payload"/></list></block><l>.5</l></block></script><list></list></block><block s="doIf"><block s="reportVariadicEquals"><list><block s="reportJoinWords"><list><l>/</l><block var="mac"/><l>/btI34</l></list></block><block var="topic"/></list></block><script><block s="doSayFor"><block s="reportJoinWords"><list><l>btI34: </l><block var="payload"/></list></block><l>.5</l></block></script><list></list></block><block s="doIf"><block s="reportVariadicEquals"><list><block s="reportJoinWords"><list><l>/</l><block var="mac"/><l>/btI35</l></list></block><block var="topic"/></list></block><script><block s="doSayFor"><block s="reportJoinWords"><list><l>btI35: </l><block var="payload"/></list></block><l>.5</l></block></script><list></list></block><block s="doIf"><block s="reportVariadicEquals"><list><block s="reportJoinWords"><list><l>/</l><block var="mac"/><l>/latchingRelayState</l></list></block><block var="topic"/></list></block><script><block s="doSayFor"><block s="reportJoinWords"><list><l>Relay State: </l><block var="payload"/></list></block><l>.5</l></block></script><list></list></block><block s="doIf"><block s="reportVariadicEquals"><list><block s="reportJoinWords"><list><l>/</l><block var="mac"/><l>/ldr</l></list></block><block var="topic"/></list></block><script><block s="doSayFor"><block s="reportJoinWords"><list><l>LDR: </l><block var="payload"/></list></block><l>.5</l></block></script><list></list></block><block s="doIf"><block s="reportVariadicEquals"><list><block s="reportJoinWords"><list><l>/</l><block var="mac"/><l>/temp</l></list></block><block var="topic"/></list></block><script><block s="doSayFor"><block s="reportJoinWords"><list><l>T: </l><block var="payload"/><l>ºC</l></list></block><l>.5</l></block></script><list></list></block><block s="doIf"><block s="reportVariadicEquals"><list><block s="reportJoinWords"><list><l>/</l><block var="mac"/><l>/jsonIn</l></list></block><block var="topic"/></list></block><script><block s="doSetVar"><l>jsonIn</l><block s="reportTextSplit"><block var="payload"/><l><option>json</option></l></block></block><block s="doSayFor"><block s="reportJoinWords"><list><l>jsonIn: </l><block var="payload"/></list></block><l>.5</l></block></script><list></list></block></script><list><l>payload</l><l>topic</l></list></block><list></list></custom-block></script><scripts><script x="147" y="659.2500000000023"><block s="doIf"><block s="reportVariadicEquals"><list><block s="reportJoinWords"><list><l>/</l><block var="mac"/><l>/jsonBme</l></list></block><block var="topic"/></list></block><script><block s="doSetVar"><l>jsonBme</l><block s="reportTextSplit"><block var="payload"/><l><option>json</option></l></block></block><block s="doSayFor"><block s="reportJoinWords"><list><l>jsonBme: </l><block var="payload"/></list></block><l>.5</l></block></script><list></list></block></script></scripts></block-definition><block-definition s="remoteMAC Broker: %&apos;brkr&apos;" type="reporter" category="IoT-02 Board"><header></header><code></code><translations></translations><inputs><input type="%s" initial="1"></input></inputs><script><custom-block s="$cloudOutline MQTT subscribe to %s topic %s %br on each message run %cmdRing %mult%s"><block var="brkr"/><block var="topicMac"/><block s="reifyScript"><script><block s="doIf"><block s="reportVariadicEquals"><list><block var="topicMac"/><block var="topic"/></list></block><script><block s="doSetVar"><l>MAC</l><block var="payload"/></block><custom-block s="$cloudOutline MQTT unsubscribe from %s topic %s"><block var="brkr"/><block var="topicMac"/></custom-block><custom-block s="setCtrlTopics MAC: %s"><block var="MAC"/></custom-block><custom-block s="subscrTopics Broker: %s MAC: %s"><block var="brkr"/><block var="MAC"/></custom-block><block s="doReport"><block var="MAC"/></block></script><list></list></block></script><list><l>payload</l><l>topic</l></list></block><list></list></custom-block><block s="doReport"><block var="MAC"/></block></script></block-definition><block-definition s="unsubscrAll Broker: %&apos;brk&apos; MAC: %&apos;mac&apos;" type="command" category="IoT-02 Board"><header></header><code></code><translations></translations><inputs><input type="%s" initial="1"></input><input type="%s" initial="1"></input></inputs><script><custom-block s="$cloudOutline MQTT unsubscribe from %s topic %s"><block var="brk"/><block var="topicMac"/></custom-block><custom-block s="$cloudOutline MQTT unsubscribe from %s topic %s"><block var="brk"/><block s="reportJoinWords"><list><l>/</l><block var="mac"/><l>/#</l></list></block></custom-block></script></block-definition><block-definition s="connect &amp; subscribe IoT-02 Broker: %&apos;brk&apos; Credentials: %&apos;cred&apos; MAC: %&apos;mac_IoT-02&apos;" type="command" category="IoT-02 Board"><header></header><code></code><translations></translations><inputs><input type="%s" initial="1"></input><input type="%s" initial="1"></input><input type="%s" initial="1"></input></inputs><script><custom-block s="$cloudOutline MQTT connect to %s %mult%s"><block var="brk"/><list><block s="reportListItem"><l>1</l><block var="cred"/></block><block s="reportListItem"><l><option>last</option></l><block var="cred"/></block><l>60</l><block s="reifyReporter"><script><custom-block s="setCtrlTopics MAC: %s"><block var="mac_IoT-02"/></custom-block><custom-block s="subscrTopics Broker: %s MAC: %s"><block var="brk"/><block var="mac_IoT-02"/></custom-block><block s="doSayFor"><l>Connected!</l><l>2</l></block></script><list></list></block></list></custom-block></script></block-definition><block-definition s="led %&apos;color&apos; %&apos;state&apos; Broker: %&apos;brk&apos; MAC: %&apos;MAC_IoT-02&apos;" type="command" category="IoT-02 Board"><header></header><code></code><translations></translations><inputs><input type="%s" readonly="true" initial="1">W<options>W&#xD;R&#xD;Y&#xD;G</options></input><input type="%b" initial="1">true</input><input type="%s" initial="1"></input><input type="%s" initial="1"></input></inputs><script><block s="doIf"><block s="reportVariadicEquals"><list><block var="color"/><l>W</l></list></block><script><custom-block s="$cloudOutline MQTT publish to %s topic %s payload %mlt %mult%s"><block var="brk"/><block s="reportJoinWords"><list><l>/</l><block var="MAC_IoT-02"/><l>/ledW</l></list></block><block s="reportIfElse"><block var="state"/><l>1</l><l>0</l></block><list></list></custom-block></script><list><block s="reportVariadicEquals"><list><block var="color"/><l>R</l></list></block><script><custom-block s="$cloudOutline MQTT publish to %s topic %s payload %mlt %mult%s"><block var="brk"/><block s="reportJoinWords"><list><l>/</l><block var="MAC_IoT-02"/><l>/ledR</l></list></block><block s="reportIfElse"><block var="state"/><l>1</l><l>0</l></block><list></list></custom-block></script><block s="reportVariadicEquals"><list><block var="color"/><l>Y</l></list></block><script><custom-block s="$cloudOutline MQTT publish to %s topic %s payload %mlt %mult%s"><block var="brk"/><block s="reportJoinWords"><list><l>/</l><block var="MAC_IoT-02"/><l>/ledY</l></list></block><block s="reportIfElse"><block var="state"/><l>1</l><l>0</l></block><list></list></custom-block></script><block s="reportVariadicEquals"><list><block var="color"/><l>G</l></list></block><script><custom-block s="$cloudOutline MQTT publish to %s topic %s payload %mlt %mult%s"><block var="brk"/><block s="reportJoinWords"><list><l>/</l><block var="MAC_IoT-02"/><l>/ledG</l></list></block><block s="reportIfElse"><block var="state"/><l>1</l><l>0</l></block><list></list></custom-block></script></list></block></script></block-definition><block-definition s="relay %&apos;state&apos; Broker: %&apos;brk&apos; MAC: %&apos;MAC_IoT-02&apos;" type="command" category="IoT-02 Board"><header></header><code></code><translations></translations><inputs><input type="%s" readonly="true" initial="1">SET<options>SET&#xD;RESET</options></input><input type="%s" initial="1"></input><input type="%s" initial="1"></input></inputs><script><custom-block s="$cloudOutline MQTT publish to %s topic %s payload %mlt %mult%s"><block var="brk"/><block s="reportJoinWords"><list><l>/</l><block var="MAC_IoT-02"/><l>/latchingRelay</l></list></block><block s="reportIfElse"><block s="reportVariadicEquals"><list><block var="state"/><l>SET</l></list></block><l>1</l><l>0</l></block><list></list></custom-block></script></block-definition><block-definition s="getLDR Broker: %&apos;brk&apos; MAC: %&apos;MAC_IoT-02&apos;" type="reporter" category="IoT-02 Board"><header></header><code></code><translations></translations><inputs><input type="%s" initial="1"></input><input type="%s" initial="1"></input></inputs><script><block s="doDeclareVariables"><list><l>ldr</l></list></block><block s="doSetVar"><l>ldr</l><custom-block s="$cloudOutline MQTT request %s topic %s %br response topic %s payload %mlt %mult%s"><block var="brk"/><block s="reportJoinWords"><list><l>/</l><block var="MAC_IoT-02"/><l>/ldrReq</l></list></block><block s="reportJoinWords"><list><l>/</l><block var="MAC_IoT-02"/><l>/ldr</l></list></block><l>hello</l><list><l>3</l><l>false</l></list></custom-block></block><block s="doReport"><block var="ldr"/></block></script></block-definition><block-definition s="BME280 %&apos;question&apos; Broker: %&apos;brk&apos; MAC: %&apos;MAC_IoT-02&apos;" type="reporter" category="IoT-02 Board"><header></header><code></code><translations></translations><inputs><input type="%s" readonly="true" initial="1">T<options>T&#xD;RH&#xD;P&#xD;json</options></input><input type="%s" initial="1"></input><input type="%s" initial="1"></input></inputs><script><block s="doDeclareVariables"><list><l>answer</l></list></block><block s="doSetVar"><l>answer</l><custom-block s="$cloudOutline MQTT request %s topic %s %br response topic %s payload %mlt %mult%s"><block var="brk"/><block s="reportJoinWords"><list><l>/</l><block var="MAC_IoT-02"/><l>/jsonBmeReq</l></list></block><block s="reportJoinWords"><list><l>/</l><block var="MAC_IoT-02"/><l>/jsonBme</l></list></block><l>hello</l><list><l>3</l><l>false</l></list></custom-block></block><block s="doIfElse"><block s="reportVariadicEquals"><list><block var="answer"/><l>timeout</l></list></block><script><block s="doReport"><l>timeout</l></block></script><script><block s="doIf"><block s="reportVariadicEquals"><list><block var="question"/><l>T</l></list></block><script><block s="doSetVar"><l>answer</l><block s="reportJoinWords"><list><l>T: </l><block s="reportQuotient"><block s="reportListItem"><l>Tx100</l><block s="reportTextSplit"><block var="answer"/><l><option>json</option></l></block></block><l>100</l></block><l>ºC</l></list></block></block></script><list><block s="reportVariadicEquals"><list><block var="question"/><l>RH</l></list></block><script><block s="doSetVar"><l>answer</l><block s="reportJoinWords"><list><l>RH: </l><block s="reportQuotient"><block s="reportListItem"><l>RHx100</l><block s="reportTextSplit"><block var="answer"/><l><option>json</option></l></block></block><l>100</l></block><l>%</l></list></block></block></script><block s="reportVariadicEquals"><list><block var="question"/><l>P</l></list></block><script><block s="doSetVar"><l>answer</l><block s="reportJoinWords"><list><l>P: </l><block s="reportQuotient"><block s="reportListItem"><l>Px100</l><block s="reportTextSplit"><block var="answer"/><l><option>json</option></l></block></block><l>100</l></block><l>mBar</l></list></block></block></script><block s="reportVariadicEquals"><list><block var="question"/><l>json</l></list></block><script><block s="doSetVar"><l>answer</l><block s="reportTextSplit"><block var="answer"/><l><option>json</option></l></block></block></script></list></block></script></block><block s="doReport"><block var="answer"/></block></script></block-definition><block-definition s="OLED %&apos;fontSize&apos; Text: %&apos;txt&apos; Broker %&apos;brk&apos; MAC: %&apos;MAC_IoT-02&apos;" type="command" category="IoT-02 Board"><header></header><code></code><translations></translations><inputs><input type="%s" readonly="true" initial="1">16px<options>24px&#xD;16px&#xD;10px</options></input><input type="%s" initial="1"></input><input type="%s" initial="1"></input><input type="%s" initial="1"></input></inputs><script><custom-block s="$cloudOutline MQTT publish to %s topic %s payload %mlt %mult%s"><block var="brk"/><block s="reportJoinWords"><list><l>/</l><block var="MAC_IoT-02"/><block s="reportIfElse"><block s="reportVariadicEquals"><list><block var="fontSize"/><l>24px</l></list></block><l>/24pxTxt</l><block s="reportIfElse"><block s="reportVariadicEquals"><list><block var="fontSize"/><l>16px</l></list></block><l>/16pxTxt</l><l>/10pxTxt</l></block></block></list></block><block var="txt"/><list></list></custom-block></script></block-definition><block-definition s="IoT-02 Board Examples" type="command" category="IoT-02 Board"><header></header><code></code><translations></translations><inputs></inputs><scripts><script x="10.5" y="80.70000000000006"><custom-block s="setBroker"></custom-block><custom-block s="connect &amp; subscribe IoT-02 Broker: %s Credentials: %s MAC: %s"><block var="broker"/><block var="brokerCredentials"/><l>7C9EBDEA5BCC</l></custom-block></script><script x="470.50000000000006" y="89.53333333333343"><custom-block s="unsubscrAll Broker: %s MAC: %s"><block var="broker"/><block var="MAC"/></custom-block><custom-block s="$cloudOutline MQTT disconnect from %s"><block var="broker"/></custom-block></script><script x="21.5" y="177.69999999999996"><custom-block s="led %s %b Broker: %s MAC: %s"><l>W</l><l><bool>true</bool></l><block var="broker"/><block var="MAC"/></custom-block></script><script x="321.5" y="178.69999999999996"><custom-block s="led %s %b Broker: %s MAC: %s"><l>W</l><l><bool>false</bool></l><block var="broker"/><block var="MAC"/></custom-block></script><script x="22.5" y="234.69999999999996"><custom-block s="relay %s Broker: %s MAC: %s"><l>SET</l><block var="broker"/><block var="MAC"/></custom-block></script><script x="322.5" y="235.69999999999996"><custom-block s="relay %s Broker: %s MAC: %s"><l>RESET</l><block var="broker"/><block var="MAC"/></custom-block></script><script x="20.5" y="284.7"><custom-block s="getLDR Broker: %s MAC: %s"><block var="broker"/><block var="MAC"/></custom-block></script><script x="24.5" y="323.7"><custom-block s="BME280 %s Broker: %s MAC: %s"><l>T</l><block var="broker"/><block var="MAC"/></custom-block></script><script x="27.5" y="365.7"><custom-block s="OLED %s Text: %s Broker %s MAC: %s"><l>24px</l><l>UPC-School</l><block var="broker"/><block var="MAC"/></custom-block></script><script x="25.5" y="422.0333333333335"><custom-block s="$cloudOutline MQTT publish to %s topic %s payload %mlt %mult%s"><block var="broker"/><block s="reportJoinWords"><list><l>/</l><block var="MAC"/><l>/jsonLeds</l></list></block><l>{"ledW": true, "ledR": 0, "ledY": 1, "ledG": 0}</l><list></list></custom-block></script></scripts></block-definition><block-definition s="connect IoT-02 Broker: %&apos;brk&apos; Credentials: %&apos;cred&apos;" type="command" category="IoT-02 Board"><header></header><code></code><translations></translations><inputs><input type="%s" initial="1"></input><input type="%s" initial="1"></input></inputs><script><custom-block s="$cloudOutline MQTT connect to %s %mult%s"><block var="brk"/><list><block s="reportListItem"><l>1</l><block var="cred"/></block><block s="reportListItem"><l><option>last</option></l><block var="cred"/></block><l>60</l><block s="reifyReporter"><script><block s="doBroadcast"><l>IoT-02 connected</l><list><l><option>all</option></l><block var="brk"/></list></block></script><list></list></block></list></custom-block></script></block-definition><block-definition s="key %&apos;key&apos; value %&apos;value&apos; with comma %&apos;comma&apos;" type="reporter" category="IoT-02 Board"><header></header><code></code><translations></translations><inputs><input type="%s" initial="1"></input><input type="%s" initial="1"></input><input type="%b" initial="1">true</input></inputs><script><block s="doReport"><block s="evaluate"><block s="reportJSFunction"><list><l>k,v,c</l></list><l>if(c) return `"${k}": ${v},`;&#xD;else return `"${k}": ${v}`;</l></block><list><block var="key"/><block var="value"/><block var="comma"/></list></block></block></script></block-definition><block-definition s="json %&apos;kvA&apos; %&apos;kvB&apos; %&apos;kvC&apos; %&apos;kvD&apos;" type="reporter" category="IoT-02 Board"><header></header><code></code><translations></translations><inputs><input type="%s" initial="1"></input><input type="%s" initial="1"></input><input type="%s" initial="1"></input><input type="%s" initial="1"></input></inputs><script><block s="doReport"><block s="evaluate"><block s="reportJSFunction"><list><l>a,b,c,d</l></list><l>return `{ ${a} ${b} ${c} ${d} }`;</l></block><list><block var="kvA"/><block var="kvB"/><block var="kvC"/><block var="kvD"/></list></block></block></script></block-definition><block-definition s="leds G: %&apos;g&apos; Y: %&apos;y&apos; R: %&apos;r&apos; W: %&apos;w&apos; Broker: %&apos;brk&apos; MAC: %&apos;MAC_IoT-02&apos;" type="command" category="IoT-02 Board"><header></header><code></code><translations></translations><inputs><input type="%b" initial="1">false</input><input type="%b" initial="1">false</input><input type="%b" initial="1">false</input><input type="%b" initial="1">false</input><input type="%s" initial="1"></input><input type="%s" initial="1"></input></inputs><script><custom-block s="$cloudOutline MQTT publish to %s topic %s payload %mlt %mult%s"><block var="brk"/><block s="reportJoinWords"><list><l>/</l><block var="MAC_IoT-02"/><l>/jsonLeds</l></list></block><custom-block s="json %s %s %s %s"><custom-block s="key %s value %s with comma %b"><l>ledW</l><block var="w"/><l><bool>true</bool></l></custom-block><custom-block s="key %s value %s with comma %b"><l>ledR</l><block s="reportIfElse"><block var="r"/><l>1</l><l>0</l></block><l><bool>true</bool></l></custom-block><custom-block s="key %s value %s with comma %b"><l>ledY</l><block s="reportIfElse"><block var="y"/><l>1</l><l>0</l></block><l><bool>true</bool></l></custom-block><custom-block s="key %s value %s with comma %b"><l>ledG</l><block s="reportIfElse"><block var="g"/><l>1</l><l>0</l></block><l><bool>false</bool></l></custom-block></custom-block><list></list></custom-block></script></block-definition></blocks><primitives></primitives><stage name="Stage" width="480" height="360" costume="0" color="255,255,255,1" tempo="60" threadsafe="false" penlog="false" volume="100" pan="0" lines="round" ternary="false" hyperops="true" codify="false" inheritance="true" sublistIDs="false" id="1958"><pentrails>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeAAAAFoCAYAAACPNyggAAAQAElEQVR4AezVC27kNhAEUCP3P3SC/NZeez6SSDWb9YJg1zsjkV2vDdQfH/4jQIAAAQIEbhdQwLeTu5AAAQIECHx8ZBew3wACBAgQIFAkoICL4F1LgAABAtkCCjh3/5ITIECAQKGAAi7EdzUBAgQI5Aoo4NzdZyeXngABAsUCCrh4Aa4nQIAAgUwBBZy5d6mzBaQnQGABAQW8wBKMQIAAAQJ5Ago4b+cSE8gWkJ7AIgIKeJFFGIMAAQ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J0CAQHsBBdx+hQIQIECAQEcBBdxxa2bOFpCeAIEtBBTwFmsUggABAgS6CSjgbhszL4FsAekJbCOggLdZpSAECBAg0ElAAXfallkJEMgWkH4rAQW81TqFIUCAAIEuAgq4y6bMSYAAgWyB7dIr4O1WKhABAgQIdBBQwB22ZEYCBAgQ2E7gUAFvl14gAgQIECBQJKCAi+BdS4AAAQLZAgr47f17kAABAgQIjBNQwOMsnUSAAAECBN4WUMBvU2U/KD0BAgQIjBVQwGM9nUaAAAECBN4SUMBvMXkoW0B6AgQIjBdQwONNnUiAAAECBF4KKOCXRB4gkC0gPQECcwQU8BxXpxIgQIAAgacCCvgpjy8JEMgWkJ7APAEFPM/WyQQIECBA4KGAAn5I4wsCBAhkC0g/V0ABz/V1OgECBAgQ+FFAAf/I4kMCBAgQyBaYn14Bzzd2AwECBAgQ+CaggL+R+IAAAQIECMwXWLmA56d3AwECBAgQKBJQwEXwriVAgACBbAEFvOr+zUWAAAECWwso4K3XKxwBAgQIrCrwJwAAAP//lVwoVAAAAAZJREFUAwDU5ALRcl29HAAAAABJRU5ErkJggg==</pentrails><costumes><list struct="atomic" id="1959"></list></costumes><sounds><list struct="atomic" id="1960"></list></sounds><variables></variables><blocks></blocks><scripts></scripts><sprites select="1"><sprite name="Sprite" idx="1" x="0" y="0" heading="90" scale="1" volume="100" pan="0" rotation="1" draggable="true" costume="0" color="80,80,80,1" pen="tip" id="1965"><costumes><list struct="atomic" id="1966"></list></costumes><sounds><list struct="atomic" id="1967"></list></sounds><blocks></blocks><variables></variables><scripts><script x="20" y="5"><block s="receiveGo"><comment w="90" collapsed="false">Click on green flag after your IoT-02 board MAC has been set.</comment></block><custom-block s="setBroker"></custom-block><custom-block s="connect IoT-02 Broker: %s Credentials: %s"><block var="broker"/><block var="brokerCredentials"/></custom-block></script><script x="295" y="229.83333333333343"><custom-block s="led %s %b Broker: %s MAC: %s"><l>W</l><l><bool>false</bool></l><block var="broker"/><block var="MAC"/></custom-block></script><script x="19" y="283.33333333333377"><custom-block s="led %s %b Broker: %s MAC: %s"><l>R</l><l><bool>true</bool></l><block var="broker"/><block var="MAC"/></custom-block></script><script x="296" y="283.83333333333377"><custom-block s="led %s %b Broker: %s MAC: %s"><l>R</l><l><bool>false</bool></l><block var="broker"/><block var="MAC"/></custom-block></script><script x="19" y="340.3333333333336"><custom-block s="led %s %b Broker: %s MAC: %s"><l>Y</l><l><bool>true</bool></l><block var="broker"/><block var="MAC"/></custom-block></script><script x="296" y="336.83333333333366"><custom-block s="led %s %b Broker: %s MAC: %s"><l>Y</l><l><bool>false</bool></l><block var="broker"/><block var="MAC"/></custom-block></script><script x="17" y="395.3333333333334"><custom-block s="led %s %b Broker: %s MAC: %s"><l>G</l><l><bool>true</bool></l><block var="broker"/><block var="MAC"/></custom-block></script><script x="298.00000000000017" y="393.8333333333334"><custom-block s="led %s %b Broker: %s MAC: %s"><l>G</l><l><bool>false</bool></l><block var="broker"/><block var="MAC"/></custom-block></script><script x="19" y="444.3333333333334"><custom-block s="relay %s Broker: %s MAC: %s"><l>SET</l><block var="broker"/><block var="MAC"/></custom-block></script><script x="297" y="443.8333333333334"><custom-block s="relay %s Broker: %s MAC: %s"><l>RESET</l><block var="broker"/><block var="MAC"/></custom-block></script><script x="20" y="708.5000000000002"><custom-block s="OLED %s Text: %s Broker %s MAC: %s"><l>10px</l><l>IoT amb placa IoT-02</l><block var="broker"/><block var="MAC"/></custom-block></script><script x="24" y="879.8888888888898"><custom-block s="leds G: %b Y: %b R: %b W: %b Broker: %s MAC: %s"><l><bool>false</bool></l><l><bool>false</bool></l><l><bool>false</bool></l><l><bool>false</bool></l><block var="broker"/><block var="MAC"/></custom-block></script><script x="20" y="482.33333333333337"><custom-block s="getLDR Broker: %s MAC: %s"><block var="broker"/><block var="MAC"/></custom-block></script><script x="20" y="510.9999999999999"><custom-block s="BME280 %s Broker: %s MAC: %s"><l>T</l><block var="broker"/><block var="MAC"/></custom-block></script><script x="20" y="536.8333333333333"><custom-block s="BME280 %s Broker: %s MAC: %s"><l>RH</l><block var="broker"/><block var="MAC"/></custom-block></script><script x="20" y="561.8333333333333"><custom-block s="BME280 %s Broker: %s MAC: %s"><l>P</l><block var="broker"/><block var="MAC"/></custom-block></script><script x="19" y="585.8333333333336"><custom-block s="BME280 %s Broker: %s MAC: %s"><l>json</l><block var="broker"/><block var="MAC"/></custom-block></script><script x="18" y="663.0000000000006"><custom-block s="OLED %s Text: %s Broker %s MAC: %s"><l>16px</l><l>Placa IoT-02</l><block var="broker"/><block var="MAC"/></custom-block></script><script x="19" y="617.5000000000002"><custom-block s="OLED %s Text: %s Broker %s MAC: %s"><l>24px</l><l>   IoT-02</l><block var="broker"/><block var="MAC"/></custom-block></script><script x="297" y="502.83333333333337"><block s="doSayFor"><custom-block s="BME280 %s Broker: %s MAC: %s"><l>T</l><block var="broker"/><block var="MAC"/></custom-block><l>.5</l></block></script><script x="415" y="663.0000000000002"><custom-block s="OLED %s Text: %s Broker %s MAC: %s"><l>16px</l><block var="MAC"/><block var="broker"/><block var="MAC"/></custom-block></script><script x="21" y="760.1111111111125"><custom-block s="leds G: %b Y: %b R: %b W: %b Broker: %s MAC: %s"><l><bool>false</bool></l><l><bool>true</bool></l><l><bool>false</bool></l><l><bool>true</bool></l><block var="broker"/><block var="MAC"/></custom-block></script><script x="23" y="810.9444444444451"><custom-block s="$cloudOutline MQTT publish to %s topic %s payload %mlt %mult%s"><block var="broker"/><block s="reportJoinWords"><list><l>/</l><block var="MAC"/><l>/jsonLeds</l></list></block><l>{"ledW": false, "ledR": 1, "ledY": 0, "ledG": 1}</l><list></list></custom-block></script><script x="22" y="95.99999999999989"><block s="receiveMessage"><l>IoT-02 connected</l><list><l>brk</l></list></block><block s="doSetVar"><l>MAC</l><l>100100C40A27</l><comment w="90" collapsed="false">Your IoT-02 board MAC</comment></block><custom-block s="subscrTopics Broker: %s MAC: %s"><block var="brk"/><block var="MAC"/></custom-block><block s="doSayFor"><l>Connected!</l><l>2</l></block></script><script x="380" y="88.6666666666668"><block s="receiveKey"><l><option>x</option></l><list></list></block><custom-block s="unsubscrAll Broker: %s MAC: %s"><block var="broker"/><block var="MAC"/></custom-block><custom-block s="$cloudOutline MQTT disconnect from %s"><block var="broker"/></custom-block><block s="doSetVar"><l>MAC</l><l>0</l></block><block s="doSayFor"><l>Disconnected!</l><l>2</l></block></script><script x="700.3333333333334" y="323.5555555555556"><custom-block s="$cloudOutline MQTT publish to %s topic %s payload %mlt %mult%s"><block var="broker"/><block s="reportJoinWords"><list><l>/</l><block var="MAC"/><l>/btIO0</l></list></block><l>hello</l><list></list></custom-block></script><script x="20" y="225.77777777777777"><custom-block s="led %s %b Broker: %s MAC: %s"><l>W</l><l><bool>true</bool></l><block var="broker"/><block var="MAC"/></custom-block></script></scripts></sprite><watcher var="broker" style="normal" x="12.76595744680817" y="12.765957446808521" color="243,118,29"/><watcher var="brokerCredentials" style="normal" x="12.76595744680817" y="39.57447063829792" color="243,118,29" hidden="true"/><watcher var="topicMac" style="normal" x="17.081850533806282" y="52.95374007117431" color="243,118,29" hidden="true"/><watcher var="topicMacReq" style="normal" x="17.081850533806282" y="88.82562960854088" color="243,118,29" hidden="true"/><watcher var="topicLedW" style="normal" x="17.081850533806282" y="124.69751914590695" color="243,118,29" hidden="true"/><watcher var="topicLedR" style="normal" x="17.081850533806282" y="160.56940868327374" color="243,118,29" hidden="true"/><watcher var="topicLedY" style="normal" x="17.081850533806282" y="196.44129822064042" color="243,118,29" hidden="true"/><watcher var="topicLedG" style="normal" x="17.081850533806282" y="232.3131877580069" color="243,118,29" hidden="true"/><watcher var="topicLatchingRelay" style="normal" x="17.081850533806282" y="268.1850772953735" color="243,118,29" hidden="true"/><watcher var="topicJsonLeds" style="normal" x="17.081850533806282" y="304.0569668327403" color="243,118,29" hidden="true"/><watcher var="jsonIn" style="normal" x="17.081850533806282" y="324.1281104626332" color="243,118,29" hidden="true"/><watcher var="jsonBme" style="normal" x="17.081850533806282" y="324.1281104626332" color="243,118,29" hidden="true"/><watcher var="MAC" style="normal" x="11.081850533806573" y="62.08185053380775" color="243,118,29"/></sprites></stage><variables><variable name="broker"><l>wss://broker.binefa.cat:9002</l></variable><variable name="brokerCredentials"><list struct="atomic" id="2151">ecat,clotClot</list></variable><variable name="MAC"><l>100100C40A27</l></variable><variable name="topicMac"><l>/mac</l></variable><variable name="topicMacReq"><l>/macReq</l></variable><variable name="topicLedW"><l>/7C9EBDEA5BCC/ledW</l></variable><variable name="topicLedR"><l>/7C9EBDEA5BCC/ledR</l></variable><variable name="topicLedY"><l>/7C9EBDEA5BCC/ledY</l></variable><variable name="topicLedG"><l>/7C9EBDEA5BCC/ledG</l></variable><variable name="topicLatchingRelay"><l>/7C9EBDEA5BCC/latchingRelay</l></variable><variable name="topicJsonLeds"><l>/7C9EBDEA5BCC/jsonLeds</l></variable><variable name="jsonIn"><l>0</l></variable><variable name="jsonBme"><list id="2152"><item><list struct="atomic" id="2153">Tx100,2552</list></item><item><list struct="atomic" id="2154">RHx100,4826</list></item><item><list struct="atomic" id="2155">Px100,101452</list></item><item><list struct="atomic" id="2156">G,0</list></item><item><list struct="atomic" id="2157">Ax100,-1057</list></item></list></variable></variables></scene></scenes></project><media name="IoT-02_board_segur_100100C40A27_brokerPropi" app="Snap! 11.0.8, https://snap.berkeley.edu" version="2"></media></snapdata>