<snapdata remixID="14143069"><project name="MQTT collab 5.0" app="Snap! 10.4.5, https://snap.berkeley.edu" version="2"><notes></notes><thumbnail>data:image/png;base64,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</thumbnail><scenes select="1"><scene name="MQTT collab 5.0"><notes></notes><palette><category name="MQTT" color="143,0,100,1"/></palette><hidden></hidden><headers></headers><code></code><blocks><block-definition s="$cloudOutline MQTT connect to %&apos;broker&apos; $nl $options-1-192-192-192 %&apos;options&apos;" type="command" category="MQTT"><comment x="0" y="0" w="416.6666666666666" 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;Note: The connection callback doesn&apos;&apos;t have to be the 4th option - it just has to be the last (or only) option.&#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</options></input><input type="%mult%s"></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="doIf"><block s="reportNot"><block s="reportJoinWords"><block var="options"/></block></block><script><block s="doSetVar"><l>options</l><block s="reportNewList"><list></list></block></block></script><list></list></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><option>last</option></l><block var="options"/></block><l><option>command</option></l></block><script><block s="doSetVar"><l>callback</l><block s="reportListItem"><l><option>last</option></l><block var="options"/></block></block><block s="doDeleteFromList"><l><option>last</option></l><block var="options"/></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"><custom-block s="%mult%s"><list><block var="connection status"/><l>connecting</l></list></custom-block></block></block><block s="doIf"><block s="reportNot"><custom-block s="%mult%s"><list><block var="connection status"/><l>connected</l></list></custom-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; $nl $options-1-192-192-192 %&apos;options&apos;" type="command" category="MQTT"><comment x="0" y="0" w="239.99999999999977" 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;There is only 1 option at present&#xD;1. Buffer 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</options></input><input type="%s">name</input><input type="%cmdRing"></input><input type="%mult%s"></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="doIf"><block s="reportNot"><block s="reportJoinWords"><block var="options"/></block></block><script><block s="doSetVar"><l>options</l><block s="reportNewList"><list></list></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>mode</l><block s="reportListItem"><l>1</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; $nl $options-1-192-192-192 %&apos;options&apos;" type="command" category="MQTT"><comment x="0" y="0" w="310" 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)&#xD;&#xD;2. retain flag (boolean)&#xD;&#xD;3. Buffer 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.&#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</options></input><input type="%s">name</input><input type="%mlt">hello</input><input type="%mult%s"></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="doIf"><block s="reportNot"><block s="reportJoinWords"><block var="options"/></block></block><script><block s="doSetVar"><l>options</l><block s="reportNewList"><list></list></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>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</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</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; $nl $options-1-192-192-192 %&apos;$options&apos;" type="command" category="MQTT"><comment x="0" y="0" w="292.22207031250036" collapsed="false">1. Subscribe buffer 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;2.  Published buffer 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</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</options></input><input type="%s">name/#</input><input type="%repRing"></input><input type="%mult%s"></input></inputs><script><block s="doDeclareVariables"><list><l>resp</l><l>callbackTopic</l><l>error</l></list></block><custom-block s="$cloudOutline MQTT subscribe to %s topic %s %br on each message run %cmdRing %br $options-1-192-192-192 %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 %br $options-1-192-192-192 %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><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; $nl $options-1-192-192-192 %&apos;options&apos;" type="command" category="MQTT"><comment x="0" y="0" w="243" collapsed="false">The options are not required but can be filled if needed.&#xD;&#xD;1. Subscribe buffer 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..  &#xD;&#xD;2. Inform 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.  Published buffer 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</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</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"></input></inputs><script><block s="doDeclareVariables"><list><l>error</l><l>informTopic</l><l>topicCall</l></list></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><custom-block s="$cloudOutline MQTT subscribe to %s topic %s %br on each message run %cmdRing %br $options-1-192-192-192 %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><block s="reportListItem"><l>1</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 %br $options-1-192-192-192 %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; $nl $options-1-192-192-192 %&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. Subscribe buffer 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;3.  Inform 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;4.  Published buffer 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</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</options></input><input type="%s">name</input><input type="%s">name2</input><input type="%mlt">hello</input><input type="%mult%s"></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>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>3</l><block var="options"/></block><l><option>Boolean</option></l></block><block s="reportListItem"><l>3</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 %br $options-1-192-192-192 %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><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 %br $options-1-192-192-192 %mult%s"><block var="broker"/><block var="topicCall"/><block var="payload"/><list><l></l><l></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="MQTT Extension Examples" type="command" category="MQTT"><comment x="0" y="0" w="277" 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><script x="24.333333333333485" y="371.8666666666658"><custom-block s="$cloudOutline MQTT publish to %s topic %s payload %mlt %br $options-1-192-192-192 %mult%s"><l>broker.emqx.io</l><l>name</l><l>hello</l><list><l></l></list></custom-block></script><script x="22.333333333333485" y="271.19999999999976"><custom-block s="$cloudOutline MQTT subscribe to %s topic %s %br on each message run %cmdRing %br $options-1-192-192-192 %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>topic</l></list></block><list><l></l></list></custom-block></script><comment x="525.9999999999995" y="140.2" w="191" collapsed="false">To execute the examples, single click on blocks, following the corresponding steps.</comment><script x="28" y="1315.0333333333292"><custom-block s="$cloudOutline MQTT request %s topic %s %br response topic %s payload %mlt %br on response run %cmdRing %br $options-1-192-192-192 %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><l></l></list></custom-block></script><script x="24.333333333333485" y="1013.2000000000016"><custom-block s="$cloudOutline MQTT response %s topic %s %br reply %repRing %br $options-1-192-192-192 %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><l></l></list></custom-block></script><script x="28" y="498.6999999999993"><custom-block s="$cloudOutline MQTT subscribe to %s topic %s %br on each message run %cmdRing %br $options-1-192-192-192 %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 %br $options-1-192-192-192 %mult%s"><l>broker.emqx.io</l><l>name2</l><block var="payload"/><list><l></l></list></custom-block></script><list><l>payload</l><l>topic</l></list></block><list><l></l></list></custom-block></script><script x="30" y="633.0333333333344"><block s="doSayFor"><custom-block s="$cloudOutline MQTT request %s topic %s %br response topic %s payload %mlt %br $options-1-192-192-192 %mult%s"><l>broker.emqx.io</l><l>name1</l><l>name2</l><l>hello</l><list><l></l><l></l><block s="reportBoolean"><l><bool>false</bool></l></block></list></custom-block><l>2</l></block></script><comment x="487.99999999999955" y="1311.6999999999966" w="224" collapsed="false">Step 2 bis: Send a request (timer acts as idCall) and do not wait for the answer</comment><comment x="487.99999999999955" y="1013.7000000000012" w="220" collapsed="false">Step 1: Activate the responder</comment><comment x="483.66666666666697" y="805.3666666666666" w="224" collapsed="false">Step 2 bis: Send a request and do not wait for the answer</comment><comment x="487" y="495.6999999999983" w="220" collapsed="false">Step 1: Activate the responder as a simple subscription</comment><comment x="484.99999999999955" y="374.1999999999991" w="222" collapsed="false">Step 2: Publish a message</comment><comment x="485.99999999999955" y="293.1999999999993" w="222" collapsed="false">Step 1: Subscribe to a topic</comment><comment x="482.99999999999955" y="215.2" w="223" collapsed="false">Step 0: Connect to the broker</comment><comment x="485" y="635.6999999999996" w="220" collapsed="false">Step 2: Send a request and wait the answer.</comment><script x="24.333333333333485" y="209.2"><custom-block s="$cloudOutline MQTT connect to %s %br $options-1-192-192-192 %mult%s"><l>broker.emqx.io</l><list><l></l></list></custom-block></script><comment x="24.333333333333485" y="152.2000000000001" w="239.99999999999997" collapsed="false">PubSub Hello World!</comment><script x="26.333333333333485" y="1139.1999999999978"><block s="doSayFor"><custom-block s="$cloudOutline MQTT request %s topic %s %br response topic %s payload %mlt %br $options-1-192-192-192 %mult%s"><l>broker.emqx.io</l><l>name</l><block s="getTimer"></block><l>hello</l><list><l></l></list></custom-block><l>2</l></block></script><comment x="486.99999999999955" y="1138.6999999999982" w="219.00000000000023" collapsed="false">Step 2: Send a request (timer acts as idCall) and wait for the answer</comment><script x="27" y="803.0333333333335"><custom-block s="$cloudOutline MQTT request %s topic %s %br response topic %s payload %mlt %br on response run %cmdRing %br $options-1-192-192-192 %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></l><block s="reportBoolean"><l><bool>false</bool></l></block></list></custom-block></script><comment x="29" y="736.6999999999998" w="372.0000000000004" collapsed="false">Asynchronous client-server Hello World! with static response topic (name2)</comment><comment x="25.333333333333485" y="935.2000000000012" w="356.99999999999994" collapsed="false">Synchronous client-server Hello World! with dynamic response topic (timer)</comment><comment x="28" y="431.36666666666673" w="361.99999999999994" collapsed="false">Synchronous client-server Hello World! with static response topic (name2)</comment><comment x="27" y="1243.6999999999966" w="352.0000000000003" collapsed="false">Asynchronous client-server Hello World! with dynamic response topic (timer)</comment></scripts></block-definition><block-definition s="force list %&apos;lst&apos;" type="reporter" category="lists"><header></header><code></code><translations></translations><inputs><input type="%anyUE"></input></inputs><script><block s="doDeclareVariables"><list><l>current val</l></list></block><block s="doSetVar"><l>current val</l><block s="evaluate"><block var="lst"/><list></list></block></block><block s="doIf"><block s="reportNot"><block s="reportIsA"><block var="current val"/><l><option>list</option></l></block></block><script><block s="doRun"><block s="reifyScript"><script></script><list></list></block><list><block var="lst"/></list></block></script><list></list></block><block s="doReport"><block s="evaluate"><block var="lst"/><list></list></block></block></script></block-definition><block-definition s="look for %&apos;s&apos; in %&apos;lst&apos;" type="reporter" category="lists"><header></header><code></code><translations></translations><inputs><input type="%s">thing</input><input type="%l"></input></inputs><script><block s="doReport"><block s="reportFindFirst"><block s="reifyPredicate"><autolambda><block s="reportVariadicGreaterThan"><list><block s="reportListAttribute"><l><option>length</option></l><block s="reportTextSplit"><block var="item"/><block var="s"/></block></block><l>1</l></list></block></autolambda><list><l>item</l></list></block><block var="lst"/></block></block></script></block-definition><block-definition s="custom variable" type="reporter" category="variables"><variables><list struct="atomic" id="915">a</list></variables><header></header><code></code><translations></translations><inputs></inputs><script><block s="doReport"><block s="reportNewList"><list><l>Sprite</l><l>sprite</l><l>synch</l><l>scripts</l><l>&lt;scriptsonly app="Snap! 10.3.6, https://snap.berkeley.edu" version="2"&gt;&lt;/scriptsonly&gt;</l><l>1736970850794</l></list></block></block></script></block-definition><block-definition s="set custom variable to %&apos;anything!&apos;" type="command" category="variables"><header></header><code></code><translations></translations><inputs><input type="%s"></input></inputs><script><block s="doIfElse"><block s="reportIsA"><block var="anything!"/><l><option>list</option></l></block><script><block s="doSetBlockAttribute"><l><option>definition</option></l><block s="reifyReporter"><autolambda><custom-block s="custom variable"><variables><variable name="a"><l>0</l></variable></variables></custom-block></autolambda><list></list></block><block s="reportJoinWords"><list><block s="reifyReporter"><script><block s="doReport"><block var="#1"/></block></script><list><l>#1</l></list></block><block s="reportJoinWords"><list><block s="reifyReporter"><autolambda><block s="reportNewList"><list></list></block></autolambda><list></list></block><block s="reportConcatenatedLists"><list><block s="reportNewList"><list><block s="reportListAttribute"><l><option>length</option></l><block var="anything!"/></block></list></block><block var="anything!"/></list></block></list></block></list></block></block></script><script><block s="doSetBlockAttribute"><l><option>definition</option></l><block s="reifyReporter"><autolambda><custom-block s="custom variable"><variables><variable name="a"><l>0</l></variable></variables></custom-block></autolambda><list></list></block><block s="reportJoinWords"><list><block s="reifyReporter"><script><block s="doReport"><block var="#1"/></block></script><list><l>#1</l></list></block><block var="anything!"/></list></block></block></script></block></script><scripts><script x="179.0064453125001" y="244.66666666666669"><block s="reportJoinWords"><list><l>hello </l><l>world</l></list></block></script></scripts></block-definition><block-definition s="first word of %&apos;text&apos;" type="reporter" category="operators"><header></header><code></code><translations>de:erstes Wort von _&#xD;pl:pierwsze słowo _&#xD;</translations><inputs><input type="%s">this is fine</input></inputs><script><block s="doReport"><block s="reportListItem"><l>1</l><block s="reportTextSplit"><block var="text"/><l><option>word</option></l></block></block></block></script></block-definition><block-definition s="all but first word of %&apos;text&apos;" type="reporter" category="operators"><header></header><code></code><translations>de:alles außer dem ersten Wort von _&#xD;pl:_ bez pierwszego słowa&#xD;</translations><inputs><input type="%s">this is fine</input></inputs><script><block s="doReport"><block s="reportListAttribute"><l><option>text</option></l><block s="reportCDR"><block s="reportTextSplit"><block var="text"/><l><option>word</option></l></block></block></block></block></script></block-definition><block-definition s="sentence with %&apos;words&apos;" type="reporter" category="operators"><header></header><code></code><translations>de:Satz aus _&#xD;pl:zdanie z _&#xD;</translations><inputs><input type="%mult%s"></input></inputs><script><block s="doReport"><block s="reportListAttribute"><l><option>text</option></l><block var="words"/></block></block></script></block-definition><block-definition s="is %&apos;text&apos; empty?" type="predicate" category="operators"><header></header><code></code><translations>de:ist _ leer?&#xD;pl:_ jest puste?&#xD;</translations><inputs><input type="%s">word</input></inputs><script><block s="doReport"><block s="reportVariadicEquals"><list><block var="text"/><l></l></list></block></block></script></block-definition><block-definition s="create %&apos;_scope&apos; var %&apos;_names&apos;" type="command" category="variables"><comment x="0" y="0" w="146" collapsed="false">This block creates  new variables on the selected scope: global (for all sprites), sprite (for this sprite only) or script (only for that blocks stack) with the names given (in &apos;names&apos; list).&#xD;&#xD;If there is already a variable with that name in that scope, it does nothing: no errors and no overwrites.</comment><header></header><code></code><translations>pt:cria as variáveis _ _&#xD;ca:crea les _ variables _&#xD;es:crear las _ variables _&#xD;de:erstellen _ var _&#xD;pl:utwórz zmienną _ _&#xD;</translations><inputs><input type="%s" readonly="true">global<options>global&#xD;sprite&#xD;script</options></input><input type="%mult%txt"></input></inputs><script><block s="doWarp"><script><block s="doForEach"><l>_item</l><block var="_names"/><script><block s="doApplyExtension"><l>var_declare(scope, name)</l><list><block s="reportIfElse"><custom-block s="%mult%s"><list><block var="_scope"/><l>local</l></list></custom-block><l>sprite</l><l>global</l></block><block var="_item"/></list></block></script></block></script></block></script></block-definition><block-definition s="delete var %&apos;_names&apos;" type="command" category="variables"><comment x="0" y="0" w="217" collapsed="false">This block deletes all the variables with the names given (inside input list).&#xD;&#xD;Each name will make only one variable deletion, and this will be the variable found following the scope order: &apos;script&apos; -&gt; &apos;sprite&apos; -&gt; &apos;global&apos;.&#xD;&#xD;If we have a &quot;testing&quot; sprite variable and also a &quot;testing&quot; global one, deleting &quot;testing&quot; will delete only the sprite one (Yes! we can also do &quot;delete var (testing, testing)&quot; to delete both.&#xD;&#xD;If one variable does not exists (in any scope) an error happens, stopping block action in that point. You can check it before with the &quot;does var (name) exists?&quot;block. </comment><header></header><code></code><translations>pt:remove as variáveis _&#xD;ca:esborra les variables _&#xD;es:borrar variables _&#xD;de:löschen var _&#xD;pl:usuń zmienną _&#xD;</translations><inputs><input type="%mult%txt"></input></inputs><script><block s="doWarp"><script><block s="doForEach"><l>_item</l><block var="_names"/><script><block s="doApplyExtension"><l>err_ignore</l><list><custom-block s="var %s"><block var="_item"/></custom-block></list></block><block s="doApplyExtension"><l>var_delete(name)</l><list><block var="_item"/></list></block></script></block></script></block></script></block-definition><block-definition s="set var %&apos;_name&apos; to %&apos;_value&apos;" type="command" category="variables"><comment x="0" y="0" w="240.4931640625" collapsed="false">This block sets the given value (last input) to the variable named with the name givent (var input).&#xD;&#xD;It looks for that variable following the scope order &apos;script&apos; -&gt; &apos;sprite&apos; -&gt; &apos;global&apos; (the first match it finds).&#xD;&#xD;If that variable does not exist (in any scope) an error happens, stopping their script. You can check it before using the &quot;does var (name) exists?&quot; block. </comment><header></header><code></code><translations>ca:assigna a _ el valor _&#xD;es:asignar a _ el valor _&#xD;pt:altera _ para _&#xD;de:setze var _ auf _&#xD;pl:ustaw zmienną _ na _&#xD;</translations><inputs><input type="%s"><options>§_getVarNamesDict</options></input><input type="%s"></input></inputs><script><block s="doApplyExtension"><l>var_set(name, val)</l><list><block var="_name"/><block var="_value"/></list></block></script></block-definition><block-definition s="var %&apos;_name&apos;" type="reporter" category="variables"><comment x="0" y="0" w="178.00000000000003" collapsed="false">This block reports the value of the variable with the name given.&#xD;&#xD;It looks for that variable following the scope order &apos;script&apos; -&gt; &apos;sprite&apos; -&gt; &apos;global&apos; (the first match it finds).&#xD;&#xD;If that variable does not exist (in any scope) an error happens, stopping their script. You can check it before using the &quot;does var (name) exists?&quot; block. </comment><header></header><code></code><translations>pt:o valor de _&#xD;pl:zmienna _&#xD;</translations><inputs><input type="%s"><options>§_getVarNamesDict</options></input></inputs><script><block s="doReport"><block s="reportApplyExtension"><l>var_get(name)</l><list><block var="_name"/></list></block></block></script></block-definition><block-definition s="does var %&apos;_name&apos; exist?" type="predicate" category="variables"><comment x="0" y="0" w="146" collapsed="false">This block reports &quot;true&quot; if there is a variable with this given name (input slot) in that context.&#xD;&#xD;It can be a global, sprite or script variable.&#xD;&#xD;Otherwise it reports &quot;false&quot;.</comment><header></header><code></code><translations>pt:a variável _ existe&#xD;ca:existeix la variable _ ?&#xD;es:existe la variable _ ?&#xD;de:existiert var _ ?&#xD;pl:zmienna _ istnieje?&#xD;</translations><inputs><input type="%s"></input></inputs><script><block s="doApplyExtension"><l>err_try(cmd, catch, err)</l><list><block s="reifyScript"><script><block s="doApplyExtension"><l>err_ignore</l><list><block s="reportApplyExtension"><l>var_get(name)</l><list><block var="_name"/></list></block></list></block><block s="doReport"><block s="reportBoolean"><l><bool>true</bool></l></block></block></script><list></list></block><block s="reifyScript"><script><block s="doReport"><block s="reportBoolean"><l><bool>false</bool></l></block></block></script><list></list></block><l></l></list></block><block s="doApplyExtension"><l>err_reset</l><list></list></block></script></block-definition><block-definition s="show var %&apos;_name&apos;" type="command" category="variables"><comment x="0" y="0" w="181" collapsed="false">This block turns on (show) the watcher view on stage (if it was not already activated) of the variable with the given name (slot input).&#xD;&#xD;It can only access to the closest variable scope (if there different variables with the same name in different scopes) following the order &apos;script&apos; -&gt; &apos;sprite&apos; -&gt; &apos;global&apos;.&#xD;&#xD;No errors if that variable does not exist.</comment><header></header><code></code><translations>ca:mostra la variable _&#xD;es:mostrar variable _&#xD;pt:mostra a variável _&#xD;de:zeige var _&#xD;pl:pokaż zmienną _&#xD;</translations><inputs><input type="%s"><options>§_getVarNamesDict</options></input></inputs><script><block s="doApplyExtension"><l>var_show(name)</l><list><block var="_name"/></list></block></script></block-definition><block-definition s="hide var %&apos;_name&apos;" type="command" category="variables"><comment x="0" y="0" w="181" collapsed="false">This block turns off (hide) the watcher view on stage (if it was not already activated) of the variable with the given name (slot input).&#xD;&#xD;It can only access to the closest variable scope (if there different variables with the same name in different scopes) following the order &apos;script&apos; -&gt; &apos;sprite&apos; -&gt; &apos;global&apos;.&#xD;&#xD;No errors if that variable does not exist.</comment><header></header><code></code><translations>ca:amaga la variable _&#xD;es:esconder variable _&#xD;pt:esconde a variável _&#xD;de:verstecke var _&#xD;pl:ukryj zmienną _&#xD;</translations><inputs><input type="%s"><options>§_getVarNamesDict</options></input></inputs><script><block s="doApplyExtension"><l>var_hide(name)</l><list><block var="_name"/></list></block></script></block-definition><block-definition s="%&apos;#1&apos;" type="predicate" category="operators" selector="reportVariadicEquals" primitive="reportVariadicEquals"><header></header><code></code><translations></translations><inputs><input type="%mult%s" readonly="true" separator="=" collapse="all =" initial="2"></input></inputs><script><block s="doPrimitive"><l><bool>true</bool></l><l>reportVariadicEquals</l></block></script></block-definition><block-definition s="%&apos;#1&apos; (2)" type="predicate" category="operators" selector="reportVariadicEquals" primitive="reportVariadicEquals"><header></header><code></code><translations></translations><inputs><input type="%mult%s" readonly="true" separator="=" collapse="all =" initial="2"></input></inputs><script><block s="doPrimitive"><l><bool>true</bool></l><l>reportVariadicEquals</l></block></script></block-definition><block-definition s="%&apos;#1&apos; (3)" type="predicate" category="operators" selector="reportVariadicEquals" primitive="reportVariadicEquals"><header></header><code></code><translations></translations><inputs><input type="%mult%s" readonly="true" separator="=" collapse="all =" initial="2"></input></inputs><script><block s="doPrimitive"><l><bool>true</bool></l><l>reportVariadicEquals</l></block></script></block-definition><block-definition s="%&apos;#1&apos; (4)" type="predicate" category="operators" selector="reportVariadicEquals" primitive="reportVariadicEquals"><header></header><code></code><translations></translations><inputs><input type="%mult%s" readonly="true" separator="=" collapse="all =" initial="2"></input></inputs><script><block s="doPrimitive"><l><bool>true</bool></l><l>reportVariadicEquals</l></block></script></block-definition><block-definition s="topic" type="reporter" category="MQTT"><header></header><code></code><translations></translations><inputs></inputs><script><block s="doReport"><l>e55hyhfgy45sertgw45</l></block></script></block-definition><block-definition s="rename variable %&apos;oldname&apos; to %&apos;newname&apos;" type="command" category="variables"><header></header><code></code><translations></translations><inputs><input type="%s" readonly="true" initial="1"><options>§_getVarNamesDict</options></input><input type="%s" initial="1"></input></inputs><script><block s="doApplyExtension"><l>var_declare(scope, name)</l><list><block s="reportFindFirst"><block s="reifyPredicate"><autolambda><block s="reportListContainsItem"><block s="reportAskFor"><block s="reportEnvironment"><l><option>caller</option></l></block><block s="reifyReporter"><autolambda><block s="reportApplyExtension"><l>var_names(scope)</l><list><block var="#1"/></list></block></autolambda><list><l>#1</l></list></block><list><block var="value"/></list></block><block var="oldname"/></block></autolambda><list><l>value</l></list></block><block s="reportNewList"><list><l>global</l><l>sprite</l><l>script</l></list></block></block><block var="newname"/></list></block><block s="doIf"><block s="reportApplyExtension"><l>var_showing(name)?</l><list><block var="oldname"/></list></block><script><block s="doApplyExtension"><l>var_show(name)</l><list><block var="newname"/></list></block></script><list></list></block><block s="doApplyExtension"><l>var_set(name, val)</l><list><block var="newname"/><block s="reportApplyExtension"><l>var_get(name)</l><list><block var="oldname"/></list></block></list></block><block s="doApplyExtension"><l>var_delete(name)</l><list><block var="oldname"/></list></block></script></block-definition><block-definition s="a new %&apos;clone/sprite&apos; of %&apos;object&apos;" type="reporter" category="control"><comment x="0" y="0" w="90" collapsed="false">creates a permanent clone or sprite with the same scripts as the parent, and reports it.</comment><header></header><code></code><translations></translations><inputs><input type="%s" readonly="true"><options>clones={&#xD;permanent clone&#xD;deleted clone&#xD;temporary clone&#xD;}&#xD;duplicate sprite</options></input><input type="%s" readonly="true" initial="1"><options>§_clonablesMenuWithTurtle</options></input></inputs><script><block s="doRun"><block s="reifyScript"><script><block s="doTellTo"><block var="clone"/><block s="reportIfElse"><block s="reportVariadicEquals"><list><block var="clone/sprite"/><l>temporary clone</l></list></block><block s="reifyReporter"><script></script><list></list></block><block s="reportIfElse"><block s="reportVariadicEquals"><list><block var="clone/sprite"/><l>deleted clone</l></list></block><block s="reifyScript"><script><block s="removeClone"></block></script><list></list></block><block s="reportIfElse"><block s="reportVariadicEquals"><list><block var="clone/sprite"/><l>permanent clone</l></list></block><block s="reifyScript"><script><block s="doSetVar"><l><option>my temporary?</option></l><block s="reportBoolean"><l><bool>false</bool></l></block></block></script><list></list></block><block s="reportIfElse"><block s="reportVariadicEquals"><list><block var="clone/sprite"/><l>duplicate sprite</l></list></block><block s="reifyScript"><script><block s="doSetVar"><l><option>my temporary?</option></l><block s="reportBoolean"><l><bool>false</bool></l></block></block><block s="doSetVar"><l><option>my parent</option></l><l></l></block></script><list></list></block><block s="reifyReporter"><script><block s="removeClone"></block><block s="doStopThis"><l><option>this block</option></l></block></script><list></list></block></block></block></block></block><list></list></block><block s="doReport"><block var="clone"/></block></script><list><l>clone</l></list></block><list><block s="newClone"><block var="object"/></block></list></block></script></block-definition><block-definition s="name %&apos;obj&apos; as %&apos;thing&apos;" type="command" category="control"><header></header><code></code><translations></translations><inputs><input type="%obj"></input><input type="%txt"></input></inputs><script><block s="doApplyExtension"><l>obj_name(obj, name)</l><list><block var="obj"/><block var="thing"/></list></block></script></block-definition><block-definition s="set running to %&apos;anything!&apos;" type="command" category="variables"><header></header><code></code><translations></translations><inputs><input type="%b">true</input></inputs><script><block s="doSetBlockAttribute"><l><option>definition</option></l><block s="reifyReporter"><autolambda><custom-block s="custom variable"><variables><variable name="a"><l>0</l></variable></variables></custom-block></autolambda><list></list></block><block s="reportJoinWords"><list><block s="reifyReporter"><script><block s="doReport"><block var="#1"/></block></script><list><l>#1</l></list></block><block s="reportJoinWords"><list><block s="reifyReporter"><autolambda><block s="reportBoolean"><l><bool>true</bool></l></block></autolambda><list></list></block><block s="reportBoolean"><l><bool>true</bool></l></block></list></block></list></block></block></script><scripts><script x="334.728515625" y="156.66666666666663"><block var="anything!"/></script></scripts></block-definition><block-definition s="delete sprite %&apos;sprite&apos;" type="command" category="control"><header></header><code></code><translations></translations><inputs><input type="%s"><options>§_dynamicMenu</options></input></inputs><script><block s="doTellTo"><block var="sprite"/><block s="reifyScript"><script><block s="doSetVar"><l><option>my parent</option></l><l></l></block><block s="doSetVar"><l><option>my temporary?</option></l><block s="reportBoolean"><l><bool>true</bool></l></block></block><block s="removeClone"></block></script><list></list></block><list><block s="reportGet"><l><option>self</option></l></block></list></block></script><scripts><script x="10" y="173.66666666666669"><block s="receiveSlotEvent"><l>sprite</l><l><option>menu</option></l></block><block s="doReport"><block s="reportAskFor"><block s="reportGet"><l><option>other sprites</option></l></block><block s="reifyReporter"><autolambda><block s="reportGet"><l><option>name</option></l></block></autolambda><list></list></block><list></list></block></block></script></scripts></block-definition><block-definition s="%&apos;#1&apos; (5)" type="predicate" category="operators" selector="reportVariadicEquals" primitive="reportVariadicEquals"><header></header><code></code><translations></translations><inputs><input type="%mult%s" readonly="true" separator="=" collapse="all =" initial="2"></input></inputs><script><block s="doPrimitive"><l><bool>true</bool></l><l>reportVariadicEquals</l></block></script></block-definition><block-definition s="%&apos;f&apos;" type="reporter" category="sensing"><header></header><code></code><translations></translations><inputs><input type="%s" initial="1"></input></inputs><script><block s="doReport"><block var="f"/></block></script></block-definition><block-definition s="scan and replace %&apos;sprite&apos;" type="reporter" category="other"><header></header><code></code><translations></translations><inputs><input type="%s" initial="1"><options>§_clonablesMenu</options></input></inputs><script><block s="doWarp"><script><block s="doIfElse"><block s="reportListIsEmpty"><block s="reportAskFor"><block var="sprite"/><block s="reifyReporter"><autolambda><block s="reportGet"><l><option>scripts</option></l></block></autolambda><list></list></block><list></list></block></block><script><block s="doReport"><l>&lt;scriptsonly app="Snap! 10.3.6, https://snap.berkeley.edu" version="2"&gt;&lt;/scriptsonly&gt;</l></block></script><script><block s="doDeclareVariables"><list><l>x</l><l>y</l><l>combinedxml</l><l>modifiedScript</l></list></block><block s="doSetVar"><l>combinedxml</l><l>&lt;scriptsonly app=&apos;Snap! 10.3.6, https://snap.berkeley.edu&apos; version=&apos;2&apos;&gt;</l></block><block s="doDeclareVariables"><list><l>a</l></list></block><block s="doForEach"><l>item</l><block s="reportMap"><block s="reifyReporter"><autolambda><block s="reportApplyExtension"><l>snap_xml_encode(script)</l><list><l></l></list></block></autolambda><list></list></block><block s="reportAskFor"><block var="sprite"/><block s="reifyReporter"><autolambda><block s="reportGet"><l><option>scripts</option></l></block></autolambda><list></list></block><list></list></block></block><script><block s="doChangeVar"><l>y</l><l>100</l></block><block s="doChangeVar"><l>x</l><l>100</l></block><block s="doSetVar"><l>modifiedScript</l><block s="reportJoinWords"><list><l>&lt;script x="</l><block var="x"/><l>" y="</l><block var="y"/><l>"&gt;</l></list></block></block><block s="doSetVar"><l>a</l><l></l></block><block s="doFor"><l>i</l><l>75</l><block s="reportDifference"><block s="reportTextAttribute"><l><option>length</option></l><block var="item"/></block><l>9</l></block><script><block s="doSetVar"><l>a</l><block s="reportJoinWords"><list><block var="a"/><block s="reportLetter"><block var="i"/><block var="item"/></block></list></block></block></script></block><block s="doSetVar"><l>combinedxml</l><block s="reportJoinWords"><list><block var="combinedxml"/><block var="modifiedScript"/><block var="a"/></list></block></block></script></block><block s="doSetVar"><l>combinedxml</l><block s="reportJoinWords"><list><block var="combinedxml"/><l>&lt;/scriptsonly&gt;</l></list></block></block><block s="doReport"><block var="combinedxml"/></block></script></block></script></block></script></block-definition><block-definition s="set topic %&apos;collab_id&apos;" type="command" category="MQTT"><header></header><code></code><translations></translations><inputs><input type="%s" initial="1"></input></inputs><script><block s="doSetBlockAttribute"><l><option>definition</option></l><block s="reifyReporter"><autolambda><custom-block s="topic"></custom-block></autolambda><list></list></block><block s="reportJoinWords"><list><block s="reifyReporter"><script><block s="doReport"><block var="#1"/></block></script><list><l>#1</l></list></block><block var="collab_id"/></list></block></block></script></block-definition><block-definition s="create empty %&apos;sprite&apos;" type="command" category="control"><header></header><code></code><translations></translations><inputs><input type="%s" initial="1">Sprite</input></inputs><script><block s="doApplyExtension"><l>SciS_createObject(operation,sprite,spriteName)</l><list><l>newSprite</l><block s="reportGet"><l><option>stage</option></l></block><block var="sprite"/></list></block></script></block-definition></blocks><primitives><block-definition s="%&apos;#1&apos;" type="predicate" category="operators" selector="reportVariadicEquals" primitive="reportVariadicEquals"><header></header><code></code><translations></translations><inputs><input type="%mult%s" readonly="true" separator="=" collapse="all =" initial="2"></input></inputs><script><block s="doPrimitive"><l><bool>true</bool></l><l>reportVariadicEquals</l></block></script></block-definition><block-definition s="show variable %&apos;#1&apos;" type="command" category="variables" selector="doShowVar" primitive="doShowVar"><header></header><code></code><translations></translations><inputs><input type="%s" readonly="true" irreplaceable="true"><options>§_getVarNamesDict</options></input></inputs><script><block s="doPrimitive"><l><bool>true</bool></l><l>doShowVar</l></block></script></block-definition></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="1651"><pentrails>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeAAAAFoCAYAAACPNyggAAAAAXNSR0IArs4c6QAADoVJREFUeF7t1cEJAAAIxDDdf2m3sJ+4wEEQuuMIECBAgACBd4F9XzRIgAABAgQIjAB7AgIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECAiwHyBAgAABAoGAAAfoJgkQIECAgAD7AQIECBAgEAgIcIBukgABAgQICLAfIECAAAECgYAAB+gmCRAgQICAAPsBAgQIECAQCAhwgG6SAAECBAgIsB8gQIAAAQKBgAAH6CYJECBAgIAA+wECBAgQIBAICHCAbpIAAQIECByxcQFpoRMBzwAAAABJRU5ErkJggg==</pentrails><costumes><list struct="atomic" id="1652"></list></costumes><sounds><list struct="atomic" id="1653"></list></sounds><variables><variable name="running?"><bool>false</bool></variable></variables><blocks></blocks><scripts><comment x="20" y="20" w="223" collapsed="false">To Do:&#xD;&#xD;    6. Change costume (sprite)&#xD;    7. Add costume (sprite)&#xD;    8. Add sound (sprite)&#xD;    9. Save for offline changes (stage)&#xD;    10. Graphic change (sprite)</comment><script x="20" y="146.00000000000023"><custom-block s="set topic %s"><l></l><comment w="90" collapsed="false">Collab id</comment></custom-block></script><script x="20" y="203.00000000000023"><block s="receiveGo"></block><custom-block s="set topic %s"><l>e55hyhfgy45sertgw45</l><comment w="90" collapsed="false">Collab id</comment></custom-block><block s="doApplyExtension"><l>src_load(url)</l><list><l>libraries/SciSnap3Extensions.js</l></list></block><custom-block s="$cloudOutline MQTT connect to %s %br $options-1-192-192-192 %mult%s"><l>mqtt.eclipseprojects.io</l><list></list></custom-block><custom-block s="$cloudOutline MQTT subscribe to %s topic %s %br on each message run %cmdRing %br $options-1-192-192-192 %mult%s"><l>mqtt.eclipseprojects.io</l><custom-block s="topic"></custom-block><block s="reifyScript"><script><block s="doWarp"><script><block s="doDeclareVariables"><list><l>edits</l></list></block><block s="doSetVar"><l>edits</l><block s="reportTextSplit"><block var="data2"/><l><option>json</option></l></block></block><block s="doIf"><block s="reportVariadicNotEquals"><list><block var="custom var"/><block var="edits"/></list></block><script><block s="doSetVar"><l>running?</l><block s="reportBoolean"><l><bool>true</bool></l></block></block><block s="doIf"><custom-block s="%mult%s"><list><block s="reportListItem"><l>3</l><block var="edits"/></block><l>add</l></list></custom-block><script><custom-block s="create empty %s"><l>Sprite</l></custom-block></script><list><custom-block s="%mult%s"><list><block s="reportListItem"><l>3</l><block var="edits"/></block><l>clone</l></list></custom-block><script><block s="doTellTo"><block s="newClone"><block s="reportListItem"><l>4</l><block var="edits"/></block></block><block s="reifyScript"><script><block s="doSetVar"><l><option>my temporary?</option></l><block s="reportBoolean"><l><bool>false</bool></l></block></block></script><list></list></block><list></list></block><block s="doWait"><l>1</l></block></script><custom-block s="%mult%s"><list><block s="reportListItem"><l>3</l><block var="edits"/></block><l>duplicate</l></list></custom-block><script><block s="doTellTo"><block s="newClone"><block s="reportListItem"><l>4</l><block var="edits"/></block></block><block s="reifyScript"><script><block s="doSetVar"><l><option>my temporary?</option></l><block s="reportBoolean"><l><bool>false</bool></l></block></block><block s="doSetVar"><l><option>my parent</option></l><l></l></block></script><list></list></block><list></list></block><block s="doWait"><l>1</l></block></script><custom-block s="%mult%s"><list><block s="reportListItem"><l>3</l><block var="edits"/></block><l>delete</l></list></custom-block><script><block s="doApplyExtension"><l>SciS_removeSprite(sprite)</l><list><block s="reportObject"><block s="reportListItem"><l>1</l><block var="edits"/></block></block></list></block><block s="doWait"><l>0.1</l></block></script><block s="reportVariadicAnd"><list><custom-block s="%mult%s"><list><block s="reportListItem"><l>2</l><block var="edits"/></block><l>scripts</l></list><comment w="90" collapsed="false">blocks</comment></custom-block><block s="reportVariadicNotEquals"><list><block s="reportListItem"><l>4</l><block var="edits"/></block><l>grab</l></list></block></list></block><script><block s="doIf"><block s="reportVariadicAnd"><list><custom-block s="%mult%s"><list><block s="reportListItem"><l>3</l><block var="edits"/></block><l>custom block</l></list></custom-block><block s="reportVariadicEquals"><list><block s="reportListItem"><l>5</l><block var="edits"/></block><l>changed attribute</l></list></block><l/></list></block><script><block s="doTellTo"><block s="reportListItem"><l>1</l><block var="edits"/></block><block s="reifyScript"><script><block s="doSetBlockAttribute"><l><option>scope</option></l><block s="reportFindFirst"><block s="reifyPredicate"><autolambda><block s="reportVariadicAnd"><list><block s="reportVariadicEquals"><list><block s="reportBlockAttribute"><l><option>label</option></l><block s="reifyReporter"><script></script><list></list></block></block><block var="#1"/></list></block><block s="reportVariadicEquals"><list><block s="reportBlockAttribute"><l><option>scope</option></l><block s="reifyReporter"><script></script><list></list></block></block><block var="#2"/></list></block><block s="reportBlockAttribute"><l><option>custom?</option></l><block s="reifyReporter"><script></script><list></list></block></block></list></block></autolambda><list></list></block><block s="reportGet"><l><option>blocks</option></l></block></block><block var="#3"/></block></script><list><l>#1</l><l>#2</l><l>#3</l></list></block><list><block s="reportListItem"><l>6</l><block var="edits"/></block><block s="reportListItem"><block s="reportListItem"><l>4</l><block var="edits"/></block><block s="reportNewList"><list><block s="reportNewList"><list><l>global</l><l>2</l></list></block><block s="reportNewList"><list><l>local</l><l>1</l></list></block></list></block></block><block s="reportListItem"><l>4</l><block var="edits"/></block></list></block></script><list></list></block><block s="doTellTo"><block s="reportListItem"><l>1</l><block var="edits"/></block><block s="reifyScript"><script><block s="doApplyExtension"><l>syn_scripts([xml])</l><list><block var="script"/></list></block></script><list><l>script</l></list></block><list><custom-block s="look for %s in %l"><l>&lt;scriptsonly app=</l><block var="edits"/></custom-block></list></block><block s="doWait"><l>0.1</l></block></script><block s="reportVariadicAnd"><list><custom-block s="%mult%s"><list><block s="reportListItem"><l>2</l><block var="edits"/></block><l>sprite</l></list></custom-block><custom-block s="%mult%s"><list><block s="reportListItem"><l>3</l><block var="edits"/></block><l>name</l></list></custom-block></list></block><script><block s="doTellTo"><block s="reportListItem"><l>4</l><block var="edits"/></block><block s="reifyScript"><script><block s="doSetVar"><l><option>my name</option></l><block s="reportListItem"><l>1</l><block var="#1"/></block></block></script><list><l>#1</l></list></block><list><block var="edits"/></list></block></script><custom-block s="%mult%s"><list><block s="reportListItem"><l>3</l><block var="#1"/></block><l>variable</l></list></custom-block><script><block s="doTellTo"><block s="reportListItem"><l>1</l><block var="edits"/></block><block s="reifyScript"><script><block s="doIf"><custom-block s="%mult%s"><list><block s="reportListItem"><l>5</l><block var="#1"/></block><l>delete</l></list></custom-block><script><block s="doApplyExtension"><l>var_delete(name)</l><list><block s="reportListItem"><l>6</l><block var="#1"/></block></list></block></script><list><custom-block s="%mult%s"><list><block s="reportListItem"><l>5</l><block var="#1"/></block><l>new</l></list></custom-block><script><custom-block s="create %s var %mult%txt"><block s="reportListItem"><l>4</l><block var="#1"/></block><list><block s="reportListItem"><l>6</l><block var="#1"/></block></list></custom-block><block s="doRun"><block s="reifyScript"><script><block s="doShowVar"><l></l></block></script><list></list></block><list><block s="reportListItem"><l>6</l><block var="#1"/></block></list></block></script><custom-block s="%mult%s"><list><block s="reportListItem"><l>5</l><block var="#1"/></block><l>rename</l></list></custom-block><script><block s="doDeclareVariables"><list><l>shown</l></list></block><block s="doSetVar"><l>shown</l><block s="reportApplyExtension"><l>var_showing(name)?</l><list><block s="reportListItem"><l>8</l><block var="#1"/></block></list></block></block><block s="doApplyExtension"><l>var_delete(name)</l><list><block s="reportListItem"><l>7</l><block var="#1"/></block></list></block><block s="doWait"><l>0.1</l></block><block s="doApplyExtension"><l>var_declare(scope, name)</l><list><block s="reportListItem"><l>4</l><block var="#1"/></block><block s="reportListItem"><l>8</l><block var="#1"/></block></list></block><block s="doIf"><block var="shown"/><script><block s="doApplyExtension"><l>var_show(name)</l><list><block var="saveName"/></list></block></script><list></list></block></script></list></block></script><list><l>#1</l></list></block><list><block var="edits"/></list></block></script></list></block><block s="doSetVar"><l>running?</l><block s="reportBoolean"><l><bool>false</bool></l></block></block></script><list></list></block></script></block></script><list><l>data2</l></list></block><list><l></l></list></custom-block><block s="doSetVar"><l>custom var</l><l></l></block><block s="doSetVar"><l>running?</l><block s="reportBoolean"><l><bool>false</bool></l></block></block></script><script x="20" y="2117.750000000002"><block s="receiveUserEdit"><l><option>anything</option></l><list><l>data</l></list></block><block s="doWarp"><script><block s="doIf"><block s="reportVariadicAnd"><list><block s="reportVariadicNotEquals"><list><block s="reportListItem"><l>1</l><block var="data"/></block><l>Stage</l></list></block><custom-block s="%mult%s"><list><block var="running?"/><block s="reportBoolean"><l><bool>false</bool></l></block></list></custom-block></list></block><script><block s="doIfElse"><block s="reportVariadicAnd"><list><custom-block s="%mult%s"><list><block s="reportListItem"><l>6</l><block var="data"/></block><l>all</l></list></custom-block><custom-block s="%mult%s"><list><block s="reportListItem"><l>5</l><block var="data"/></block><l>rename</l></list></custom-block></list></block><script><custom-block s="$cloudOutline MQTT publish to %s topic %s payload %mlt %br $options-1-192-192-192 %mult%s"><l>mqtt.eclipseprojects.io</l><custom-block s="topic"></custom-block><block var="data"/><list></list></custom-block><block s="doForEach"><l>item</l><block s="reportGet"><l><option>other sprites</option></l></block><script><custom-block s="$cloudOutline MQTT publish to %s topic %s payload %mlt %br $options-1-192-192-192 %mult%s"><l>mqtt.eclipseprojects.io</l><custom-block s="topic"></custom-block><block s="reportNewList"><list><block s="reportAskFor"><block var="item"/><block s="reifyReporter"><autolambda><block s="reportGet"><l><option>name</option></l></block></autolambda><list></list></block><list></list></block><l>scripts</l><l>block</l><l>snap</l><l>block_type</l><custom-block s="scan and replace %s"><block var="item"/></custom-block><l>ID</l></list></block><list></list></custom-block><block s="doWait"><l>0.1</l></block></script></block></script><script><custom-block s="$cloudOutline MQTT publish to %s topic %s payload %mlt %br $options-1-192-192-192 %mult%s"><l>mqtt.eclipseprojects.io</l><custom-block s="topic"></custom-block><block var="data"/><list></list></custom-block></script></block><block s="doSetVar"><l>custom var</l><block var="data"/></block></script><list></list></block></script></block></script></scripts><sprites select="0"><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="2317"><costumes><list struct="atomic" id="2318"></list></costumes><sounds><list struct="atomic" id="2319"></list></sounds><blocks></blocks><variables></variables><scripts></scripts></sprite><watcher scope="Stage" var="running?" style="normal" x="160" y="17" color="243,118,29" hidden="true"/><watcher var="test" style="normal" x="4" y="17" color="243,118,29" extX="80" extY="70"/></sprites></stage><variables><variable name="test"><list struct="atomic" id="2326">Sprite,scripts,comment,delete,&quot;&lt;scriptsonly app=&quot;&quot;Snap! 10.3.6, https://snap.berkeley.edu&quot;&quot; version=&quot;&quot;2&quot;&quot;&gt;&lt;/scriptsonly&gt;&quot;,1736971296150</list></variable></variables></scene></scenes></project><media name="MQTT collab 5.0" app="Snap! 10.4.5, https://snap.berkeley.edu" version="2"></media></snapdata>