@paul53 sagte:
Woher nimmst Du die Variable timeout für "stop timeout" ?
Ach verdammt, das ist noch ein Fehler im Programmablauf den ich vergessen habe zu löschen. Die Variable "timeout" wird für die Variante 1 nicht benötig und sollte gelöscht werden.
Der Haken bei "löschen falls läuft" ist wichtig.
ja, ganz genau, sonst würde weiterhin der von @rubi007 beschriebene Fehler auftreten.
Variante 1 nochmal korrigiert:
001e82d2-2372-4d59-9bc4-c1b930571b4f-image.png
<block xmlns="https://developers.google.com/blockly/xml" type="on_ext" id="?$ZL{)2ZrU?V0x83{lJr" x="838" y="213">
<mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
<field name="CONDITION">ne</field>
<field name="ACK_CONDITION"></field>
<value name="OID0">
<shadow type="field_oid" id="yNzDiLRx@jk{)/w0~Cos">
<field name="oid">default</field>
</shadow>
</value>
<statement name="STATEMENT">
<block type="comment" id="55;}3SEt7To9QDNn.i-U">
<field name="COMMENT">Monitor ein sofern eine Bewegung erkannt wurde</field>
<next>
<block type="controls_if" id="XZPE*IGWxQ`/sWhiD}Xx">
<value name="IF0">
<block type="on_source" id="J!lUX,GiUaSJG{KpdSa1">
<field name="ATTR">state.val</field>
</block>
</value>
<statement name="DO0">
<block type="comment" id="QPJZHFFLVWWdD^30~t-z">
<field name="COMMENT">Schaltet den Monitor ein</field>
<next>
<block type="control" id="DMK?M;{W-jB3taA4pJwW">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">Object ID</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="logic_boolean" id="f^=Yz[wvo?-{z:[jOx.I">
<field name="BOOL">TRUE</field>
</block>
</value>
<next>
<block type="comment" id=",c5Mk?0Lz$bDcZZW:M4s">
<field name="COMMENT">Schaltet den Monitor verzögert aus</field>
<next>
<block type="control" id="wBbgV9}phr{qN,Wb[W=r">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
<field name="OID">Object ID</field>
<field name="WITH_DELAY">TRUE</field>
<field name="DELAY_MS">5</field>
<field name="UNIT">min</field>
<field name="CLEAR_RUNNING">TRUE</field>
<value name="VALUE">
<block type="logic_boolean" id="1o-AG]v?Bkte.o(-Mx3)">
<field name="BOOL">FALSE</field>
</block>
</value>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</statement>
</block>
</next>
</block>
</statement>
</block>