Weiter zum Inhalt
  • Home
  • Aktuell
  • Tags
  • 0 Ungelesen 0
  • Kategorien
  • Unreplied
  • Beliebt
  • GitHub
  • Docu
  • Hilfe
Skins
  • Hell
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dunkel
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Standard: (Kein Skin)
  • Kein Skin
Einklappen
ioBroker Logo

Community Forum

donate donate
  1. ioBroker Community Home
  2. Deutsch
  3. Skripten / Logik
  4. Blockly
  5. [gelöst] Blockly startet ungewollt mehrfach

NEWS

  • Neuer ioBroker-Blog online: Monatsrückblick März/April 2026
    BluefoxB
    Bluefox
    8
    1
    435

  • Verwendung von KI bitte immer deutlich kennzeichnen
    HomoranH
    Homoran
    10
    1
    362

  • Monatsrückblick Januar/Februar 2026 ist online!
    BluefoxB
    Bluefox
    18
    1
    962

[gelöst] Blockly startet ungewollt mehrfach

Geplant Angeheftet Gesperrt Verschoben Blockly
5 Beiträge 3 Kommentatoren 399 Aufrufe 2 Beobachtet
  • Älteste zuerst
  • Neuste zuerst
  • Meiste Stimmen
Antworten
  • In einem neuen Thema antworten
Anmelden zum Antworten
Dieses Thema wurde gelöscht. Nur Nutzer mit entsprechenden Rechten können es sehen.
  • Daniel BohnD Offline
    Daniel BohnD Offline
    Daniel Bohn
    schrieb am zuletzt editiert von Daniel Bohn
    #1

    Moin zusammen,

    ich versuche nun seit bestimmt zwei Wochen ein Problem zu lösen.

    Szenarion:
    Meine Familie lässt permanent die Wohnzimmertüre aufstehen - Und ich bin es leid immer zu rufen "Macht die Tür zu!".
    Also soll das Alexa für mich erledigen :D

    Ich habe schon diverse Scripts in Blockly gebastelt, jeweils mit 3x Exkalationsstufen:

    1. Türe wird geöffnet --> Türsensor setzt Wert auf "true"
    2. 10s Pause
    3. Wenn Türe immer noch offen, dann Alex Ansage: "Bitte Wohnzimmertüre schließen"
    4. 10s Pause
    5. Wenn TÜre immer noch offen, dann Alexa Ansage: "Jetzt aber bitte wirklich schließen"
    6. 10s Pause
    7. Wenn Türe immer noch offen "TV aus".

    Das funktioniert soweit, jedoch, wenn jemand die Türe mehrfach auf und zu macht, dann werden meine Scripte immer mehrfach gestartet und laufen immer noch parallel ohne abzubrechen, da der Wert "Tür offen" ja meisten auf "true" steht.

    Am liebsten würde ich gerne das gesamte Script sofort abbrechen, wenn die Türe auch nur kurz geschlossen wird. Ich habe aber leide keine Ahnung, wie ich das sinnvoll umsetzen kann.

    Hat jemand eine Idee?? Danke :)

    1.JPG

    
    BlocklyJavascriptTypeScriptRules
    16:01:16.203	info	javascript.0 (1602) Stop script script.js.Skript_1
    16:01:58.855	info	javascript.0 (1602) Stop script script.js.Skript_1
    16:14:24.143	info	javascript.0 (1602) Stop script script.js.Skript_1
    16:16:03.220	info	javascript.0 (1602) Stop script script.js.Skript_1
    16:16:21.814	info	javascript.0 (1602) Start javascript script.js.Skript_1
    16:16:21.824	info	javascript.0 (1602) script.js.Skript_1: registered 1 subscription and 0 schedules
    16:16:27.181	info	javascript.0 (1602) script.js.Skript_1: Türe steht auf
    16:16:37.183	info	javascript.0 (1602) script.js.Skript_1: Bitte Wohnzimmertüre schließen
    16:16:47.186	info	javascript.0 (1602) script.js.Skript_1: Nochmal, bitte Wohnzimmertüre schließen
    16:16:57.188	info	javascript.0 (1602) script.js.Skript_1: Fernseher aus
    16:16:57.189	info	javascript.0 (1602) script.js.Skript_1: Ende
    16:22:15.395	info	javascript.0 (1602) script.js.Skript_1: Türe steht auf
    16:22:25.395	info	javascript.0 (1602) script.js.Skript_1: Bitte Wohnzimmertüre schließen
    16:22:45.397	info	javascript.0 (1602) script.js.Skript_1: Ende
    16:23:34.413	info	javascript.0 (1602) script.js.Skript_1: Türe steht auf
    16:24:04.416	info	javascript.0 (1602) script.js.Skript_1: Ende
    16:24:36.893	info	javascript.0 (1602) script.js.Skript_1: Türe steht auf
    16:24:46.894	info	javascript.0 (1602) script.js.Skript_1: Bitte Wohnzimmertüre schließen
    16:28:50.434	info	javascript.0 (1602) script.js.Skript_1: Ende
    Ausgewählte Blöcke exportieren
    <xml xmlns="https://developers.google.com/blockly/xml">
      <block type="on_ext" id="QAjUk{ctD;8:E3G~-+AC" x="87" y="-387">
        <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
        <field name="CONDITION">true</field>
        <field name="ACK_CONDITION"></field>
        <value name="OID0">
          <shadow type="field_oid" id="`efFw?QgQ[ckI/,6Fv]9">
            <field name="oid">deconz.0.Sensors.6.open</field>
          </shadow>
        </value>
        <statement name="STATEMENT">
          <block type="controls_if" id="GXpRkJ`12/PQ9E+^9qR,">
            <value name="IF0">
              <block type="logic_compare" id="=n:0(=zo8gURrRqLS44Q">
                <field name="OP">EQ</field>
                <value name="A">
                  <block type="get_value" id="4qrGG3Bf~S*-f~v$y^jJ">
                    <field name="ATTR">val</field>
                    <field name="OID">deconz.0.Sensors.6.open</field>
                  </block>
                </value>
                <value name="B">
                  <block type="logic_boolean" id="udIz(+eA{8{ImPvz!i[#">
                    <field name="BOOL">TRUE</field>
                  </block>
                </value>
              </block>
            </value>
            <statement name="DO0">
              <block type="debug" id="r4]Dk(;r{cf%WFt/F$T|">
                <field name="Severity">log</field>
                <value name="TEXT">
                  <shadow type="text" id="BsDZ[@SJ3NTme,OvBE!#">
                    <field name="TEXT">Türe steht auf</field>
                  </shadow>
                </value>
                <next>
                  <block type="timeouts_wait" id="$AUq%b751Tw/wsaBrLhn">
                    <field name="DELAY">10</field>
                    <field name="UNIT">sec</field>
                    <next>
                      <block type="controls_if" id="~^?=49Q~Xfb@2Ja3A#%[">
                        <value name="IF0">
                          <block type="logic_compare" id="cCeWOiTud601$1[_g{M9">
                            <field name="OP">EQ</field>
                            <value name="A">
                              <block type="get_value" id="6h)m}H/i}N[|,Q++G2ol">
                                <field name="ATTR">val</field>
                                <field name="OID">deconz.0.Sensors.6.open</field>
                              </block>
                            </value>
                            <value name="B">
                              <block type="logic_boolean" id="+XslM;0H#]Vv$-Gen7d,">
                                <field name="BOOL">TRUE</field>
                              </block>
                            </value>
                          </block>
                        </value>
                        <statement name="DO0">
                          <block type="debug" id="v=/I#%r8^P-B|`gj8Hb$">
                            <field name="Severity">log</field>
                            <value name="TEXT">
                              <shadow type="text" id="ruF*^eoL~zmJSfo0-8)1">
                                <field name="TEXT">Bitte Wohnzimmertüre schließen</field>
                              </shadow>
                            </value>
                            <next>
                              <block type="control" id="`[2)[_Dq5Ckb*H~bOVq-">
                                <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                                <field name="OID">alexa2.0.Echo-Devices.G2A1A603142401EC.Player.volume</field>
                                <field name="WITH_DELAY">TRUE</field>
                                <field name="DELAY_MS">1000</field>
                                <field name="UNIT">ms</field>
                                <field name="CLEAR_RUNNING">FALSE</field>
                                <value name="VALUE">
                                  <block type="math_number" id="hqwJWY$GB+3t$m)j]Gv9">
                                    <field name="NUM">30</field>
                                  </block>
                                </value>
                                <next>
                                  <block type="control" id="V^),v/Eovu*S2ZE=H%e@">
                                    <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                                    <field name="OID">alexa2.0.Echo-Devices.G2A1A603142401EC.Commands.speak</field>
                                    <field name="WITH_DELAY">TRUE</field>
                                    <field name="DELAY_MS">500</field>
                                    <field name="UNIT">ms</field>
                                    <field name="CLEAR_RUNNING">TRUE</field>
                                    <value name="VALUE">
                                      <block type="text" id=":BZN+L%v@~_;2X23tpqr">
                                        <field name="TEXT">&lt;speak&gt;&lt;voice name="Hans"&gt;Bitte Wohnzimmertüre schließen&lt;/voice&gt;&lt;/speak&gt;</field>
                                      </block>
                                    </value>
                                  </block>
                                </next>
                              </block>
                            </next>
                          </block>
                        </statement>
                        <next>
                          <block type="timeouts_wait" id="=K%-2!wwhBhW2?}xcX`h">
                            <field name="DELAY">10</field>
                            <field name="UNIT">sec</field>
                            <next>
                              <block type="controls_if" id="nI/F#V?Q`DCgSr78?7VK">
                                <value name="IF0">
                                  <block type="logic_compare" id="LK8bQSG)ru~9gA_Y;fku">
                                    <field name="OP">EQ</field>
                                    <value name="A">
                                      <block type="get_value" id="HnUDIm*H7Vh%?-7,Q(/1">
                                        <field name="ATTR">val</field>
                                        <field name="OID">deconz.0.Sensors.6.open</field>
                                      </block>
                                    </value>
                                    <value name="B">
                                      <block type="logic_boolean" id="!*k(4jr685em*Q:IB.Ma">
                                        <field name="BOOL">TRUE</field>
                                      </block>
                                    </value>
                                  </block>
                                </value>
                                <statement name="DO0">
                                  <block type="debug" id="[FfI.l]YjnxpZ[v(ljIt">
                                    <field name="Severity">log</field>
                                    <value name="TEXT">
                                      <shadow type="text" id="=2W1R!gLP6L9CjO!$JMP">
                                        <field name="TEXT">Nochmal, bitte Wohnzimmertüre schließen</field>
                                      </shadow>
                                    </value>
                                    <next>
                                      <block type="control" id="xMDk1xMsqX~}%;93`qN)">
                                        <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                                        <field name="OID">alexa2.0.Echo-Devices.G2A1A603142401EC.Player.volume</field>
                                        <field name="WITH_DELAY">TRUE</field>
                                        <field name="DELAY_MS">1000</field>
                                        <field name="UNIT">ms</field>
                                        <field name="CLEAR_RUNNING">FALSE</field>
                                        <value name="VALUE">
                                          <block type="math_number" id="L}Z?9+(_tWPhh:c!/**4">
                                            <field name="NUM">70</field>
                                          </block>
                                        </value>
                                        <next>
                                          <block type="control" id="M,+]z+Q||67efs`4P(qM">
                                            <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                                            <field name="OID">alexa2.0.Echo-Devices.G2A1A603142401EC.Commands.ssml</field>
                                            <field name="WITH_DELAY">TRUE</field>
                                            <field name="DELAY_MS">500</field>
                                            <field name="UNIT">ms</field>
                                            <field name="CLEAR_RUNNING">TRUE</field>
                                            <value name="VALUE">
                                              <block type="text" id="B!2rp_FLs97FqG:]Ot}i">
                                                <field name="TEXT">&lt;speak&gt;&lt;voice name="Hans"&gt;Bitte Wohnzimmertüre schließen&lt;/voice&gt;&lt;/speak&gt;</field>
                                              </block>
                                            </value>
                                            <next>
                                              <block type="control" id="Lc3bwLQ[Qf3=AF^`vp+c">
                                                <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                                                <field name="OID">alexa2.0.Echo-Devices.G2A1A603142401EC.Player.volume</field>
                                                <field name="WITH_DELAY">TRUE</field>
                                                <field name="DELAY_MS">1000</field>
                                                <field name="UNIT">ms</field>
                                                <field name="CLEAR_RUNNING">FALSE</field>
                                                <value name="VALUE">
                                                  <block type="math_number" id="`In#_5()1Y.;{+x?8z3_">
                                                    <field name="NUM">40</field>
                                                  </block>
                                                </value>
                                              </block>
                                            </next>
                                          </block>
                                        </next>
                                      </block>
                                    </next>
                                  </block>
                                </statement>
                                <next>
                                  <block type="timeouts_wait" id="2=HlE}W#eABOI7l$bcPH">
                                    <field name="DELAY">10</field>
                                    <field name="UNIT">sec</field>
                                    <next>
                                      <block type="controls_if" id="!);IimU,eoTViXPH08Is">
                                        <value name="IF0">
                                          <block type="logic_compare" id=",N/.p)~`avB8YL7_}9~I">
                                            <field name="OP">EQ</field>
                                            <value name="A">
                                              <block type="get_value" id="dvUA_ePa*aS80EQO}j,W">
                                                <field name="ATTR">val</field>
                                                <field name="OID">deconz.0.Sensors.6.open</field>
                                              </block>
                                            </value>
                                            <value name="B">
                                              <block type="logic_boolean" id="M-Bl`DSiJ)SL7!/2*V{3">
                                                <field name="BOOL">TRUE</field>
                                              </block>
                                            </value>
                                          </block>
                                        </value>
                                        <statement name="DO0">
                                          <block type="debug" id="TS!Ch:jL1vk/u-_P^86s">
                                            <field name="Severity">log</field>
                                            <value name="TEXT">
                                              <shadow type="text" id="9GS[,%s1rsq1C(1[W$is">
                                                <field name="TEXT">Fernseher aus</field>
                                              </shadow>
                                            </value>
                                            <next>
                                              <block type="control" id="xG-OY0=_ht?|pc]sCWRi">
                                                <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                                                <field name="OID">alexa2.0.Echo-Devices.G2A1A603142401EC.Player.volume</field>
                                                <field name="WITH_DELAY">TRUE</field>
                                                <field name="DELAY_MS">1000</field>
                                                <field name="UNIT">ms</field>
                                                <field name="CLEAR_RUNNING">FALSE</field>
                                                <value name="VALUE">
                                                  <block type="math_number" id="kyM4IJwdVIF~[),L_Tkh">
                                                    <field name="NUM">70</field>
                                                  </block>
                                                </value>
                                                <next>
                                                  <block type="control" id="jzr2HXZyRz2Ttr#.-]`4">
                                                    <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                                                    <field name="OID">alexa2.0.Echo-Devices.G2A1A603142401EC.Commands.ssml</field>
                                                    <field name="WITH_DELAY">TRUE</field>
                                                    <field name="DELAY_MS">500</field>
                                                    <field name="UNIT">ms</field>
                                                    <field name="CLEAR_RUNNING">TRUE</field>
                                                    <value name="VALUE">
                                                      <block type="text" id="mu96DP;qKETm^}gW].vf">
                                                        <field name="TEXT">&lt;speak&gt;&lt;voice name="Hans"&gt;Fernseher wird gleich ausgeschaltet&lt;/voice&gt;&lt;/speak&gt;</field>
                                                      </block>
                                                    </value>
                                                    <next>
                                                      <block type="control" id="wVybb^e$UNTYv!$zcZ#{">
                                                        <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                                                        <field name="OID">alexa2.0.Echo-Devices.G2A1A603142401EC.Player.volume</field>
                                                        <field name="WITH_DELAY">TRUE</field>
                                                        <field name="DELAY_MS">1000</field>
                                                        <field name="UNIT">ms</field>
                                                        <field name="CLEAR_RUNNING">FALSE</field>
                                                        <value name="VALUE">
                                                          <block type="math_number" id="*$sIagAP/AcnY($ycUBF">
                                                            <field name="NUM">40</field>
                                                          </block>
                                                        </value>
                                                      </block>
                                                    </next>
                                                  </block>
                                                </next>
                                              </block>
                                            </next>
                                          </block>
                                        </statement>
                                      </block>
                                    </next>
                                  </block>
                                </next>
                              </block>
                            </next>
                          </block>
                        </next>
                      </block>
                    </next>
                  </block>
                </next>
              </block>
            </statement>
            <next>
              <block type="debug" id="Y)9Gm$ANlJed{ib;ebzD">
                <field name="Severity">log</field>
                <value name="TEXT">
                  <shadow type="text" id="8dO-g6Fs2=Y5_y1WgyNF">
                    <field name="TEXT">Ende</field>
                  </shadow>
                </value>
              </block>
            </next>
          </block>
        </statement>
      </block>
    </xml>
    <xml xmlns="https://developers.google.com/blockly/xml">
      <block type="on_ext" id="QAjUk{ctD;8:E3G~-+AC" x="87" y="-387">
        <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
        <field name="CONDITION">true</field>
        <field name="ACK_CONDITION"></field>
        <value name="OID0">
          <shadow type="field_oid" id="`efFw?QgQ[ckI/,6Fv]9">
            <field name="oid">deconz.0.Sensors.6.open</field>
          </shadow>
        </value>
        <statement name="STATEMENT">
          <block type="controls_if" id="GXpRkJ`12/PQ9E+^9qR,">
            <value name="IF0">
              <block type="logic_compare" id="=n:0(=zo8gURrRqLS44Q">
                <field name="OP">EQ</field>
                <value name="A">
                  <block type="get_value" id="4qrGG3Bf~S*-f~v$y^jJ">
                    <field name="ATTR">val</field>
                    <field name="OID">deconz.0.Sensors.6.open</field>
                  </block>
                </value>
                <value name="B">
                  <block type="logic_boolean" id="udIz(+eA{8{ImPvz!i[#">
                    <field name="BOOL">TRUE</field>
                  </block>
                </value>
              </block>
            </value>
            <statement name="DO0">
              <block type="debug" id="r4]Dk(;r{cf%WFt/F$T|">
                <field name="Severity">log</field>
                <value name="TEXT">
                  <shadow type="text" id="BsDZ[@SJ3NTme,OvBE!#">
                    <field name="TEXT">Türe steht auf</field>
                  </shadow>
                </value>
                <next>
                  <block type="timeouts_wait" id="$AUq%b751Tw/wsaBrLhn">
                    <field name="DELAY">10</field>
                    <field name="UNIT">sec</field>
                    <next>
                      <block type="controls_if" id="~^?=49Q~Xfb@2Ja3A#%[">
                        <value name="IF0">
                          <block type="logic_compare" id="cCeWOiTud601$1[_g{M9">
                            <field name="OP">EQ</field>
                            <value name="A">
                              <block type="get_value" id="6h)m}H/i}N[|,Q++G2ol">
                                <field name="ATTR">val</field>
                                <field name="OID">deconz.0.Sensors.6.open</field>
                              </block>
                            </value>
                            <value name="B">
                              <block type="logic_boolean" id="+XslM;0H#]Vv$-Gen7d,">
                                <field name="BOOL">TRUE</field>
                              </block>
                            </value>
                          </block>
                        </value>
                        <statement name="DO0">
                          <block type="debug" id="v=/I#%r8^P-B|`gj8Hb$">
                            <field name="Severity">log</field>
                            <value name="TEXT">
                              <shadow type="text" id="ruF*^eoL~zmJSfo0-8)1">
                                <field name="TEXT">Bitte Wohnzimmertüre schließen</field>
                              </shadow>
                            </value>
                            <next>
                              <block type="control" id="`[2)[_Dq5Ckb*H~bOVq-">
                                <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                                <field name="OID">alexa2.0.Echo-Devices.G2A1A603142401EC.Player.volume</field>
                                <field name="WITH_DELAY">TRUE</field>
                                <field name="DELAY_MS">1000</field>
                                <field name="UNIT">ms</field>
                                <field name="CLEAR_RUNNING">FALSE</field>
                                <value name="VALUE">
                                  <block type="math_number" id="hqwJWY$GB+3t$m)j]Gv9">
                                    <field name="NUM">30</field>
                                  </block>
                                </value>
                                <next>
                                  <block type="control" id="V^),v/Eovu*S2ZE=H%e@">
                                    <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                                    <field name="OID">alexa2.0.Echo-Devices.G2A1A603142401EC.Commands.speak</field>
                                    <field name="WITH_DELAY">TRUE</field>
                                    <field name="DELAY_MS">500</field>
                                    <field name="UNIT">ms</field>
                                    <field name="CLEAR_RUNNING">TRUE</field>
                                    <value name="VALUE">
                                      <block type="text" id=":BZN+L%v@~_;2X23tpqr">
                                        <field name="TEXT">&lt;speak&gt;&lt;voice name="Hans"&gt;Bitte Wohnzimmertüre schließen&lt;/voice&gt;&lt;/speak&gt;</field>
                                      </block>
                                    </value>
                                  </block>
                                </next>
                              </block>
                            </next>
                          </block>
                        </statement>
                        <next>
                          <block type="timeouts_wait" id="=K%-2!wwhBhW2?}xcX`h">
                            <field name="DELAY">10</field>
                            <field name="UNIT">sec</field>
                            <next>
                              <block type="controls_if" id="nI/F#V?Q`DCgSr78?7VK">
                                <value name="IF0">
                                  <block type="logic_compare" id="LK8bQSG)ru~9gA_Y;fku">
                                    <field name="OP">EQ</field>
                                    <value name="A">
                                      <block type="get_value" id="HnUDIm*H7Vh%?-7,Q(/1">
                                        <field name="ATTR">val</field>
                                        <field name="OID">deconz.0.Sensors.6.open</field>
                                      </block>
                                    </value>
                                    <value name="B">
                                      <block type="logic_boolean" id="!*k(4jr685em*Q:IB.Ma">
                                        <field name="BOOL">TRUE</field>
                                      </block>
                                    </value>
                                  </block>
                                </value>
                                <statement name="DO0">
                                  <block type="debug" id="[FfI.l]YjnxpZ[v(ljIt">
                                    <field name="Severity">log</field>
                                    <value name="TEXT">
                                      <shadow type="text" id="=2W1R!gLP6L9CjO!$JMP">
                                        <field name="TEXT">Nochmal, bitte Wohnzimmertüre schließen</field>
                                      </shadow>
                                    </value>
                                    <next>
                                      <block type="control" id="xMDk1xMsqX~}%;93`qN)">
                                        <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                                        <field name="OID">alexa2.0.Echo-Devices.G2A1A603142401EC.Player.volume</field>
                                        <field name="WITH_DELAY">TRUE</field>
                                        <field name="DELAY_MS">1000</field>
                                        <field name="UNIT">ms</field>
                                        <field name="CLEAR_RUNNING">FALSE</field>
                                        <value name="VALUE">
                                          <block type="math_number" id="L}Z?9+(_tWPhh:c!/**4">
                                            <field name="NUM">70</field>
                                          </block>
                                        </value>
                                        <next>
                                          <block type="control" id="M,+]z+Q||67efs`4P(qM">
                                            <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                                            <field name="OID">alexa2.0.Echo-Devices.G2A1A603142401EC.Commands.ssml</field>
                                            <field name="WITH_DELAY">TRUE</field>
                                            <field name="DELAY_MS">500</field>
                                            <field name="UNIT">ms</field>
                                            <field name="CLEAR_RUNNING">TRUE</field>
                                            <value name="VALUE">
                                              <block type="text" id="B!2rp_FLs97FqG:]Ot}i">
                                                <field name="TEXT">&lt;speak&gt;&lt;voice name="Hans"&gt;Bitte Wohnzimmertüre schließen&lt;/voice&gt;&lt;/speak&gt;</field>
                                              </block>
                                            </value>
                                            <next>
                                              <block type="control" id="Lc3bwLQ[Qf3=AF^`vp+c">
                                                <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                                                <field name="OID">alexa2.0.Echo-Devices.G2A1A603142401EC.Player.volume</field>
                                                <field name="WITH_DELAY">TRUE</field>
                                                <field name="DELAY_MS">1000</field>
                                                <field name="UNIT">ms</field>
                                                <field name="CLEAR_RUNNING">FALSE</field>
                                                <value name="VALUE">
                                                  <block type="math_number" id="`In#_5()1Y.;{+x?8z3_">
                                                    <field name="NUM">40</field>
                                                  </block>
                                                </value>
                                              </block>
                                            </next>
                                          </block>
                                        </next>
                                      </block>
                                    </next>
                                  </block>
                                </statement>
                                <next>
                                  <block type="timeouts_wait" id="2=HlE}W#eABOI7l$bcPH">
                                    <field name="DELAY">10</field>
                                    <field name="UNIT">sec</field>
                                    <next>
                                      <block type="controls_if" id="!);IimU,eoTViXPH08Is">
                                        <value name="IF0">
                                          <block type="logic_compare" id=",N/.p)~`avB8YL7_}9~I">
                                            <field name="OP">EQ</field>
                                            <value name="A">
                                              <block type="get_value" id="dvUA_ePa*aS80EQO}j,W">
                                                <field name="ATTR">val</field>
                                                <field name="OID">deconz.0.Sensors.6.open</field>
                                              </block>
                                            </value>
                                            <value name="B">
                                              <block type="logic_boolean" id="M-Bl`DSiJ)SL7!/2*V{3">
                                                <field name="BOOL">TRUE</field>
                                              </block>
                                            </value>
                                          </block>
                                        </value>
                                        <statement name="DO0">
                                          <block type="debug" id="TS!Ch:jL1vk/u-_P^86s">
                                            <field name="Severity">log</field>
                                            <value name="TEXT">
                                              <shadow type="text" id="9GS[,%s1rsq1C(1[W$is">
                                                <field name="TEXT">Fernseher aus</field>
                                              </shadow>
                                            </value>
                                            <next>
                                              <block type="control" id="xG-OY0=_ht?|pc]sCWRi">
                                                <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                                                <field name="OID">alexa2.0.Echo-Devices.G2A1A603142401EC.Player.volume</field>
                                                <field name="WITH_DELAY">TRUE</field>
                                                <field name="DELAY_MS">1000</field>
                                                <field name="UNIT">ms</field>
                                                <field name="CLEAR_RUNNING">FALSE</field>
                                                <value name="VALUE">
                                                  <block type="math_number" id="kyM4IJwdVIF~[),L_Tkh">
                                                    <field name="NUM">70</field>
                                                  </block>
                                                </value>
                                                <next>
                                                  <block type="control" id="jzr2HXZyRz2Ttr#.-]`4">
                                                    <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                                                    <field name="OID">alexa2.0.Echo-Devices.G2A1A603142401EC.Commands.ssml</field>
                                                    <field name="WITH_DELAY">TRUE</field>
                                                    <field name="DELAY_MS">500</field>
                                                    <field name="UNIT">ms</field>
                                                    <field name="CLEAR_RUNNING">TRUE</field>
                                                    <value name="VALUE">
                                                      <block type="text" id="mu96DP;qKETm^}gW].vf">
                                                        <field name="TEXT">&lt;speak&gt;&lt;voice name="Hans"&gt;Fernseher wird gleich ausgeschaltet&lt;/voice&gt;&lt;/speak&gt;</field>
                                                      </block>
                                                    </value>
                                                    <next>
                                                      <block type="control" id="wVybb^e$UNTYv!$zcZ#{">
                                                        <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                                                        <field name="OID">alexa2.0.Echo-Devices.G2A1A603142401EC.Player.volume</field>
                                                        <field name="WITH_DELAY">TRUE</field>
                                                        <field name="DELAY_MS">1000</field>
                                                        <field name="UNIT">ms</field>
                                                        <field name="CLEAR_RUNNING">FALSE</field>
                                                        <value name="VALUE">
                                                          <block type="math_number" id="*$sIagAP/AcnY($ycUBF">
                                                            <field name="NUM">40</field>
                                                          </block>
                                                        </value>
                                                      </block>
                                                    </next>
                                                  </block>
                                                </next>
                                              </block>
                                            </next>
                                          </block>
                                        </statement>
                                      </block>
                                    </next>
                                  </block>
                                </next>
                              </block>
                            </next>
                          </block>
                        </next>
                      </block>
                    </next>
                  </block>
                </next>
              </block>
            </statement>
            <next>
              <block type="debug" id="Y)9Gm$ANlJed{ib;ebzD">
                <field name="Severity">log</field>
                <value name="TEXT">
                  <shadow type="text" id="8dO-g6Fs2=Y5_y1WgyNF">
                    <field name="TEXT">Ende</field>
                  </shadow>
                </value>
              </block>
            </next>
          </block>
        </statement>
      </block>
    </xml>
    
    
    CinimodC paul53P 2 Antworten Letzte Antwort
    0
    • Daniel BohnD Daniel Bohn

      Moin zusammen,

      ich versuche nun seit bestimmt zwei Wochen ein Problem zu lösen.

      Szenarion:
      Meine Familie lässt permanent die Wohnzimmertüre aufstehen - Und ich bin es leid immer zu rufen "Macht die Tür zu!".
      Also soll das Alexa für mich erledigen :D

      Ich habe schon diverse Scripts in Blockly gebastelt, jeweils mit 3x Exkalationsstufen:

      1. Türe wird geöffnet --> Türsensor setzt Wert auf "true"
      2. 10s Pause
      3. Wenn Türe immer noch offen, dann Alex Ansage: "Bitte Wohnzimmertüre schließen"
      4. 10s Pause
      5. Wenn TÜre immer noch offen, dann Alexa Ansage: "Jetzt aber bitte wirklich schließen"
      6. 10s Pause
      7. Wenn Türe immer noch offen "TV aus".

      Das funktioniert soweit, jedoch, wenn jemand die Türe mehrfach auf und zu macht, dann werden meine Scripte immer mehrfach gestartet und laufen immer noch parallel ohne abzubrechen, da der Wert "Tür offen" ja meisten auf "true" steht.

      Am liebsten würde ich gerne das gesamte Script sofort abbrechen, wenn die Türe auch nur kurz geschlossen wird. Ich habe aber leide keine Ahnung, wie ich das sinnvoll umsetzen kann.

      Hat jemand eine Idee?? Danke :)

      1.JPG

      
      BlocklyJavascriptTypeScriptRules
      16:01:16.203	info	javascript.0 (1602) Stop script script.js.Skript_1
      16:01:58.855	info	javascript.0 (1602) Stop script script.js.Skript_1
      16:14:24.143	info	javascript.0 (1602) Stop script script.js.Skript_1
      16:16:03.220	info	javascript.0 (1602) Stop script script.js.Skript_1
      16:16:21.814	info	javascript.0 (1602) Start javascript script.js.Skript_1
      16:16:21.824	info	javascript.0 (1602) script.js.Skript_1: registered 1 subscription and 0 schedules
      16:16:27.181	info	javascript.0 (1602) script.js.Skript_1: Türe steht auf
      16:16:37.183	info	javascript.0 (1602) script.js.Skript_1: Bitte Wohnzimmertüre schließen
      16:16:47.186	info	javascript.0 (1602) script.js.Skript_1: Nochmal, bitte Wohnzimmertüre schließen
      16:16:57.188	info	javascript.0 (1602) script.js.Skript_1: Fernseher aus
      16:16:57.189	info	javascript.0 (1602) script.js.Skript_1: Ende
      16:22:15.395	info	javascript.0 (1602) script.js.Skript_1: Türe steht auf
      16:22:25.395	info	javascript.0 (1602) script.js.Skript_1: Bitte Wohnzimmertüre schließen
      16:22:45.397	info	javascript.0 (1602) script.js.Skript_1: Ende
      16:23:34.413	info	javascript.0 (1602) script.js.Skript_1: Türe steht auf
      16:24:04.416	info	javascript.0 (1602) script.js.Skript_1: Ende
      16:24:36.893	info	javascript.0 (1602) script.js.Skript_1: Türe steht auf
      16:24:46.894	info	javascript.0 (1602) script.js.Skript_1: Bitte Wohnzimmertüre schließen
      16:28:50.434	info	javascript.0 (1602) script.js.Skript_1: Ende
      Ausgewählte Blöcke exportieren
      <xml xmlns="https://developers.google.com/blockly/xml">
        <block type="on_ext" id="QAjUk{ctD;8:E3G~-+AC" x="87" y="-387">
          <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
          <field name="CONDITION">true</field>
          <field name="ACK_CONDITION"></field>
          <value name="OID0">
            <shadow type="field_oid" id="`efFw?QgQ[ckI/,6Fv]9">
              <field name="oid">deconz.0.Sensors.6.open</field>
            </shadow>
          </value>
          <statement name="STATEMENT">
            <block type="controls_if" id="GXpRkJ`12/PQ9E+^9qR,">
              <value name="IF0">
                <block type="logic_compare" id="=n:0(=zo8gURrRqLS44Q">
                  <field name="OP">EQ</field>
                  <value name="A">
                    <block type="get_value" id="4qrGG3Bf~S*-f~v$y^jJ">
                      <field name="ATTR">val</field>
                      <field name="OID">deconz.0.Sensors.6.open</field>
                    </block>
                  </value>
                  <value name="B">
                    <block type="logic_boolean" id="udIz(+eA{8{ImPvz!i[#">
                      <field name="BOOL">TRUE</field>
                    </block>
                  </value>
                </block>
              </value>
              <statement name="DO0">
                <block type="debug" id="r4]Dk(;r{cf%WFt/F$T|">
                  <field name="Severity">log</field>
                  <value name="TEXT">
                    <shadow type="text" id="BsDZ[@SJ3NTme,OvBE!#">
                      <field name="TEXT">Türe steht auf</field>
                    </shadow>
                  </value>
                  <next>
                    <block type="timeouts_wait" id="$AUq%b751Tw/wsaBrLhn">
                      <field name="DELAY">10</field>
                      <field name="UNIT">sec</field>
                      <next>
                        <block type="controls_if" id="~^?=49Q~Xfb@2Ja3A#%[">
                          <value name="IF0">
                            <block type="logic_compare" id="cCeWOiTud601$1[_g{M9">
                              <field name="OP">EQ</field>
                              <value name="A">
                                <block type="get_value" id="6h)m}H/i}N[|,Q++G2ol">
                                  <field name="ATTR">val</field>
                                  <field name="OID">deconz.0.Sensors.6.open</field>
                                </block>
                              </value>
                              <value name="B">
                                <block type="logic_boolean" id="+XslM;0H#]Vv$-Gen7d,">
                                  <field name="BOOL">TRUE</field>
                                </block>
                              </value>
                            </block>
                          </value>
                          <statement name="DO0">
                            <block type="debug" id="v=/I#%r8^P-B|`gj8Hb$">
                              <field name="Severity">log</field>
                              <value name="TEXT">
                                <shadow type="text" id="ruF*^eoL~zmJSfo0-8)1">
                                  <field name="TEXT">Bitte Wohnzimmertüre schließen</field>
                                </shadow>
                              </value>
                              <next>
                                <block type="control" id="`[2)[_Dq5Ckb*H~bOVq-">
                                  <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                                  <field name="OID">alexa2.0.Echo-Devices.G2A1A603142401EC.Player.volume</field>
                                  <field name="WITH_DELAY">TRUE</field>
                                  <field name="DELAY_MS">1000</field>
                                  <field name="UNIT">ms</field>
                                  <field name="CLEAR_RUNNING">FALSE</field>
                                  <value name="VALUE">
                                    <block type="math_number" id="hqwJWY$GB+3t$m)j]Gv9">
                                      <field name="NUM">30</field>
                                    </block>
                                  </value>
                                  <next>
                                    <block type="control" id="V^),v/Eovu*S2ZE=H%e@">
                                      <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                                      <field name="OID">alexa2.0.Echo-Devices.G2A1A603142401EC.Commands.speak</field>
                                      <field name="WITH_DELAY">TRUE</field>
                                      <field name="DELAY_MS">500</field>
                                      <field name="UNIT">ms</field>
                                      <field name="CLEAR_RUNNING">TRUE</field>
                                      <value name="VALUE">
                                        <block type="text" id=":BZN+L%v@~_;2X23tpqr">
                                          <field name="TEXT">&lt;speak&gt;&lt;voice name="Hans"&gt;Bitte Wohnzimmertüre schließen&lt;/voice&gt;&lt;/speak&gt;</field>
                                        </block>
                                      </value>
                                    </block>
                                  </next>
                                </block>
                              </next>
                            </block>
                          </statement>
                          <next>
                            <block type="timeouts_wait" id="=K%-2!wwhBhW2?}xcX`h">
                              <field name="DELAY">10</field>
                              <field name="UNIT">sec</field>
                              <next>
                                <block type="controls_if" id="nI/F#V?Q`DCgSr78?7VK">
                                  <value name="IF0">
                                    <block type="logic_compare" id="LK8bQSG)ru~9gA_Y;fku">
                                      <field name="OP">EQ</field>
                                      <value name="A">
                                        <block type="get_value" id="HnUDIm*H7Vh%?-7,Q(/1">
                                          <field name="ATTR">val</field>
                                          <field name="OID">deconz.0.Sensors.6.open</field>
                                        </block>
                                      </value>
                                      <value name="B">
                                        <block type="logic_boolean" id="!*k(4jr685em*Q:IB.Ma">
                                          <field name="BOOL">TRUE</field>
                                        </block>
                                      </value>
                                    </block>
                                  </value>
                                  <statement name="DO0">
                                    <block type="debug" id="[FfI.l]YjnxpZ[v(ljIt">
                                      <field name="Severity">log</field>
                                      <value name="TEXT">
                                        <shadow type="text" id="=2W1R!gLP6L9CjO!$JMP">
                                          <field name="TEXT">Nochmal, bitte Wohnzimmertüre schließen</field>
                                        </shadow>
                                      </value>
                                      <next>
                                        <block type="control" id="xMDk1xMsqX~}%;93`qN)">
                                          <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                                          <field name="OID">alexa2.0.Echo-Devices.G2A1A603142401EC.Player.volume</field>
                                          <field name="WITH_DELAY">TRUE</field>
                                          <field name="DELAY_MS">1000</field>
                                          <field name="UNIT">ms</field>
                                          <field name="CLEAR_RUNNING">FALSE</field>
                                          <value name="VALUE">
                                            <block type="math_number" id="L}Z?9+(_tWPhh:c!/**4">
                                              <field name="NUM">70</field>
                                            </block>
                                          </value>
                                          <next>
                                            <block type="control" id="M,+]z+Q||67efs`4P(qM">
                                              <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                                              <field name="OID">alexa2.0.Echo-Devices.G2A1A603142401EC.Commands.ssml</field>
                                              <field name="WITH_DELAY">TRUE</field>
                                              <field name="DELAY_MS">500</field>
                                              <field name="UNIT">ms</field>
                                              <field name="CLEAR_RUNNING">TRUE</field>
                                              <value name="VALUE">
                                                <block type="text" id="B!2rp_FLs97FqG:]Ot}i">
                                                  <field name="TEXT">&lt;speak&gt;&lt;voice name="Hans"&gt;Bitte Wohnzimmertüre schließen&lt;/voice&gt;&lt;/speak&gt;</field>
                                                </block>
                                              </value>
                                              <next>
                                                <block type="control" id="Lc3bwLQ[Qf3=AF^`vp+c">
                                                  <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                                                  <field name="OID">alexa2.0.Echo-Devices.G2A1A603142401EC.Player.volume</field>
                                                  <field name="WITH_DELAY">TRUE</field>
                                                  <field name="DELAY_MS">1000</field>
                                                  <field name="UNIT">ms</field>
                                                  <field name="CLEAR_RUNNING">FALSE</field>
                                                  <value name="VALUE">
                                                    <block type="math_number" id="`In#_5()1Y.;{+x?8z3_">
                                                      <field name="NUM">40</field>
                                                    </block>
                                                  </value>
                                                </block>
                                              </next>
                                            </block>
                                          </next>
                                        </block>
                                      </next>
                                    </block>
                                  </statement>
                                  <next>
                                    <block type="timeouts_wait" id="2=HlE}W#eABOI7l$bcPH">
                                      <field name="DELAY">10</field>
                                      <field name="UNIT">sec</field>
                                      <next>
                                        <block type="controls_if" id="!);IimU,eoTViXPH08Is">
                                          <value name="IF0">
                                            <block type="logic_compare" id=",N/.p)~`avB8YL7_}9~I">
                                              <field name="OP">EQ</field>
                                              <value name="A">
                                                <block type="get_value" id="dvUA_ePa*aS80EQO}j,W">
                                                  <field name="ATTR">val</field>
                                                  <field name="OID">deconz.0.Sensors.6.open</field>
                                                </block>
                                              </value>
                                              <value name="B">
                                                <block type="logic_boolean" id="M-Bl`DSiJ)SL7!/2*V{3">
                                                  <field name="BOOL">TRUE</field>
                                                </block>
                                              </value>
                                            </block>
                                          </value>
                                          <statement name="DO0">
                                            <block type="debug" id="TS!Ch:jL1vk/u-_P^86s">
                                              <field name="Severity">log</field>
                                              <value name="TEXT">
                                                <shadow type="text" id="9GS[,%s1rsq1C(1[W$is">
                                                  <field name="TEXT">Fernseher aus</field>
                                                </shadow>
                                              </value>
                                              <next>
                                                <block type="control" id="xG-OY0=_ht?|pc]sCWRi">
                                                  <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                                                  <field name="OID">alexa2.0.Echo-Devices.G2A1A603142401EC.Player.volume</field>
                                                  <field name="WITH_DELAY">TRUE</field>
                                                  <field name="DELAY_MS">1000</field>
                                                  <field name="UNIT">ms</field>
                                                  <field name="CLEAR_RUNNING">FALSE</field>
                                                  <value name="VALUE">
                                                    <block type="math_number" id="kyM4IJwdVIF~[),L_Tkh">
                                                      <field name="NUM">70</field>
                                                    </block>
                                                  </value>
                                                  <next>
                                                    <block type="control" id="jzr2HXZyRz2Ttr#.-]`4">
                                                      <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                                                      <field name="OID">alexa2.0.Echo-Devices.G2A1A603142401EC.Commands.ssml</field>
                                                      <field name="WITH_DELAY">TRUE</field>
                                                      <field name="DELAY_MS">500</field>
                                                      <field name="UNIT">ms</field>
                                                      <field name="CLEAR_RUNNING">TRUE</field>
                                                      <value name="VALUE">
                                                        <block type="text" id="mu96DP;qKETm^}gW].vf">
                                                          <field name="TEXT">&lt;speak&gt;&lt;voice name="Hans"&gt;Fernseher wird gleich ausgeschaltet&lt;/voice&gt;&lt;/speak&gt;</field>
                                                        </block>
                                                      </value>
                                                      <next>
                                                        <block type="control" id="wVybb^e$UNTYv!$zcZ#{">
                                                          <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                                                          <field name="OID">alexa2.0.Echo-Devices.G2A1A603142401EC.Player.volume</field>
                                                          <field name="WITH_DELAY">TRUE</field>
                                                          <field name="DELAY_MS">1000</field>
                                                          <field name="UNIT">ms</field>
                                                          <field name="CLEAR_RUNNING">FALSE</field>
                                                          <value name="VALUE">
                                                            <block type="math_number" id="*$sIagAP/AcnY($ycUBF">
                                                              <field name="NUM">40</field>
                                                            </block>
                                                          </value>
                                                        </block>
                                                      </next>
                                                    </block>
                                                  </next>
                                                </block>
                                              </next>
                                            </block>
                                          </statement>
                                        </block>
                                      </next>
                                    </block>
                                  </next>
                                </block>
                              </next>
                            </block>
                          </next>
                        </block>
                      </next>
                    </block>
                  </next>
                </block>
              </statement>
              <next>
                <block type="debug" id="Y)9Gm$ANlJed{ib;ebzD">
                  <field name="Severity">log</field>
                  <value name="TEXT">
                    <shadow type="text" id="8dO-g6Fs2=Y5_y1WgyNF">
                      <field name="TEXT">Ende</field>
                    </shadow>
                  </value>
                </block>
              </next>
            </block>
          </statement>
        </block>
      </xml>
      <xml xmlns="https://developers.google.com/blockly/xml">
        <block type="on_ext" id="QAjUk{ctD;8:E3G~-+AC" x="87" y="-387">
          <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
          <field name="CONDITION">true</field>
          <field name="ACK_CONDITION"></field>
          <value name="OID0">
            <shadow type="field_oid" id="`efFw?QgQ[ckI/,6Fv]9">
              <field name="oid">deconz.0.Sensors.6.open</field>
            </shadow>
          </value>
          <statement name="STATEMENT">
            <block type="controls_if" id="GXpRkJ`12/PQ9E+^9qR,">
              <value name="IF0">
                <block type="logic_compare" id="=n:0(=zo8gURrRqLS44Q">
                  <field name="OP">EQ</field>
                  <value name="A">
                    <block type="get_value" id="4qrGG3Bf~S*-f~v$y^jJ">
                      <field name="ATTR">val</field>
                      <field name="OID">deconz.0.Sensors.6.open</field>
                    </block>
                  </value>
                  <value name="B">
                    <block type="logic_boolean" id="udIz(+eA{8{ImPvz!i[#">
                      <field name="BOOL">TRUE</field>
                    </block>
                  </value>
                </block>
              </value>
              <statement name="DO0">
                <block type="debug" id="r4]Dk(;r{cf%WFt/F$T|">
                  <field name="Severity">log</field>
                  <value name="TEXT">
                    <shadow type="text" id="BsDZ[@SJ3NTme,OvBE!#">
                      <field name="TEXT">Türe steht auf</field>
                    </shadow>
                  </value>
                  <next>
                    <block type="timeouts_wait" id="$AUq%b751Tw/wsaBrLhn">
                      <field name="DELAY">10</field>
                      <field name="UNIT">sec</field>
                      <next>
                        <block type="controls_if" id="~^?=49Q~Xfb@2Ja3A#%[">
                          <value name="IF0">
                            <block type="logic_compare" id="cCeWOiTud601$1[_g{M9">
                              <field name="OP">EQ</field>
                              <value name="A">
                                <block type="get_value" id="6h)m}H/i}N[|,Q++G2ol">
                                  <field name="ATTR">val</field>
                                  <field name="OID">deconz.0.Sensors.6.open</field>
                                </block>
                              </value>
                              <value name="B">
                                <block type="logic_boolean" id="+XslM;0H#]Vv$-Gen7d,">
                                  <field name="BOOL">TRUE</field>
                                </block>
                              </value>
                            </block>
                          </value>
                          <statement name="DO0">
                            <block type="debug" id="v=/I#%r8^P-B|`gj8Hb$">
                              <field name="Severity">log</field>
                              <value name="TEXT">
                                <shadow type="text" id="ruF*^eoL~zmJSfo0-8)1">
                                  <field name="TEXT">Bitte Wohnzimmertüre schließen</field>
                                </shadow>
                              </value>
                              <next>
                                <block type="control" id="`[2)[_Dq5Ckb*H~bOVq-">
                                  <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                                  <field name="OID">alexa2.0.Echo-Devices.G2A1A603142401EC.Player.volume</field>
                                  <field name="WITH_DELAY">TRUE</field>
                                  <field name="DELAY_MS">1000</field>
                                  <field name="UNIT">ms</field>
                                  <field name="CLEAR_RUNNING">FALSE</field>
                                  <value name="VALUE">
                                    <block type="math_number" id="hqwJWY$GB+3t$m)j]Gv9">
                                      <field name="NUM">30</field>
                                    </block>
                                  </value>
                                  <next>
                                    <block type="control" id="V^),v/Eovu*S2ZE=H%e@">
                                      <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                                      <field name="OID">alexa2.0.Echo-Devices.G2A1A603142401EC.Commands.speak</field>
                                      <field name="WITH_DELAY">TRUE</field>
                                      <field name="DELAY_MS">500</field>
                                      <field name="UNIT">ms</field>
                                      <field name="CLEAR_RUNNING">TRUE</field>
                                      <value name="VALUE">
                                        <block type="text" id=":BZN+L%v@~_;2X23tpqr">
                                          <field name="TEXT">&lt;speak&gt;&lt;voice name="Hans"&gt;Bitte Wohnzimmertüre schließen&lt;/voice&gt;&lt;/speak&gt;</field>
                                        </block>
                                      </value>
                                    </block>
                                  </next>
                                </block>
                              </next>
                            </block>
                          </statement>
                          <next>
                            <block type="timeouts_wait" id="=K%-2!wwhBhW2?}xcX`h">
                              <field name="DELAY">10</field>
                              <field name="UNIT">sec</field>
                              <next>
                                <block type="controls_if" id="nI/F#V?Q`DCgSr78?7VK">
                                  <value name="IF0">
                                    <block type="logic_compare" id="LK8bQSG)ru~9gA_Y;fku">
                                      <field name="OP">EQ</field>
                                      <value name="A">
                                        <block type="get_value" id="HnUDIm*H7Vh%?-7,Q(/1">
                                          <field name="ATTR">val</field>
                                          <field name="OID">deconz.0.Sensors.6.open</field>
                                        </block>
                                      </value>
                                      <value name="B">
                                        <block type="logic_boolean" id="!*k(4jr685em*Q:IB.Ma">
                                          <field name="BOOL">TRUE</field>
                                        </block>
                                      </value>
                                    </block>
                                  </value>
                                  <statement name="DO0">
                                    <block type="debug" id="[FfI.l]YjnxpZ[v(ljIt">
                                      <field name="Severity">log</field>
                                      <value name="TEXT">
                                        <shadow type="text" id="=2W1R!gLP6L9CjO!$JMP">
                                          <field name="TEXT">Nochmal, bitte Wohnzimmertüre schließen</field>
                                        </shadow>
                                      </value>
                                      <next>
                                        <block type="control" id="xMDk1xMsqX~}%;93`qN)">
                                          <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                                          <field name="OID">alexa2.0.Echo-Devices.G2A1A603142401EC.Player.volume</field>
                                          <field name="WITH_DELAY">TRUE</field>
                                          <field name="DELAY_MS">1000</field>
                                          <field name="UNIT">ms</field>
                                          <field name="CLEAR_RUNNING">FALSE</field>
                                          <value name="VALUE">
                                            <block type="math_number" id="L}Z?9+(_tWPhh:c!/**4">
                                              <field name="NUM">70</field>
                                            </block>
                                          </value>
                                          <next>
                                            <block type="control" id="M,+]z+Q||67efs`4P(qM">
                                              <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                                              <field name="OID">alexa2.0.Echo-Devices.G2A1A603142401EC.Commands.ssml</field>
                                              <field name="WITH_DELAY">TRUE</field>
                                              <field name="DELAY_MS">500</field>
                                              <field name="UNIT">ms</field>
                                              <field name="CLEAR_RUNNING">TRUE</field>
                                              <value name="VALUE">
                                                <block type="text" id="B!2rp_FLs97FqG:]Ot}i">
                                                  <field name="TEXT">&lt;speak&gt;&lt;voice name="Hans"&gt;Bitte Wohnzimmertüre schließen&lt;/voice&gt;&lt;/speak&gt;</field>
                                                </block>
                                              </value>
                                              <next>
                                                <block type="control" id="Lc3bwLQ[Qf3=AF^`vp+c">
                                                  <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                                                  <field name="OID">alexa2.0.Echo-Devices.G2A1A603142401EC.Player.volume</field>
                                                  <field name="WITH_DELAY">TRUE</field>
                                                  <field name="DELAY_MS">1000</field>
                                                  <field name="UNIT">ms</field>
                                                  <field name="CLEAR_RUNNING">FALSE</field>
                                                  <value name="VALUE">
                                                    <block type="math_number" id="`In#_5()1Y.;{+x?8z3_">
                                                      <field name="NUM">40</field>
                                                    </block>
                                                  </value>
                                                </block>
                                              </next>
                                            </block>
                                          </next>
                                        </block>
                                      </next>
                                    </block>
                                  </statement>
                                  <next>
                                    <block type="timeouts_wait" id="2=HlE}W#eABOI7l$bcPH">
                                      <field name="DELAY">10</field>
                                      <field name="UNIT">sec</field>
                                      <next>
                                        <block type="controls_if" id="!);IimU,eoTViXPH08Is">
                                          <value name="IF0">
                                            <block type="logic_compare" id=",N/.p)~`avB8YL7_}9~I">
                                              <field name="OP">EQ</field>
                                              <value name="A">
                                                <block type="get_value" id="dvUA_ePa*aS80EQO}j,W">
                                                  <field name="ATTR">val</field>
                                                  <field name="OID">deconz.0.Sensors.6.open</field>
                                                </block>
                                              </value>
                                              <value name="B">
                                                <block type="logic_boolean" id="M-Bl`DSiJ)SL7!/2*V{3">
                                                  <field name="BOOL">TRUE</field>
                                                </block>
                                              </value>
                                            </block>
                                          </value>
                                          <statement name="DO0">
                                            <block type="debug" id="TS!Ch:jL1vk/u-_P^86s">
                                              <field name="Severity">log</field>
                                              <value name="TEXT">
                                                <shadow type="text" id="9GS[,%s1rsq1C(1[W$is">
                                                  <field name="TEXT">Fernseher aus</field>
                                                </shadow>
                                              </value>
                                              <next>
                                                <block type="control" id="xG-OY0=_ht?|pc]sCWRi">
                                                  <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                                                  <field name="OID">alexa2.0.Echo-Devices.G2A1A603142401EC.Player.volume</field>
                                                  <field name="WITH_DELAY">TRUE</field>
                                                  <field name="DELAY_MS">1000</field>
                                                  <field name="UNIT">ms</field>
                                                  <field name="CLEAR_RUNNING">FALSE</field>
                                                  <value name="VALUE">
                                                    <block type="math_number" id="kyM4IJwdVIF~[),L_Tkh">
                                                      <field name="NUM">70</field>
                                                    </block>
                                                  </value>
                                                  <next>
                                                    <block type="control" id="jzr2HXZyRz2Ttr#.-]`4">
                                                      <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                                                      <field name="OID">alexa2.0.Echo-Devices.G2A1A603142401EC.Commands.ssml</field>
                                                      <field name="WITH_DELAY">TRUE</field>
                                                      <field name="DELAY_MS">500</field>
                                                      <field name="UNIT">ms</field>
                                                      <field name="CLEAR_RUNNING">TRUE</field>
                                                      <value name="VALUE">
                                                        <block type="text" id="mu96DP;qKETm^}gW].vf">
                                                          <field name="TEXT">&lt;speak&gt;&lt;voice name="Hans"&gt;Fernseher wird gleich ausgeschaltet&lt;/voice&gt;&lt;/speak&gt;</field>
                                                        </block>
                                                      </value>
                                                      <next>
                                                        <block type="control" id="wVybb^e$UNTYv!$zcZ#{">
                                                          <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                                                          <field name="OID">alexa2.0.Echo-Devices.G2A1A603142401EC.Player.volume</field>
                                                          <field name="WITH_DELAY">TRUE</field>
                                                          <field name="DELAY_MS">1000</field>
                                                          <field name="UNIT">ms</field>
                                                          <field name="CLEAR_RUNNING">FALSE</field>
                                                          <value name="VALUE">
                                                            <block type="math_number" id="*$sIagAP/AcnY($ycUBF">
                                                              <field name="NUM">40</field>
                                                            </block>
                                                          </value>
                                                        </block>
                                                      </next>
                                                    </block>
                                                  </next>
                                                </block>
                                              </next>
                                            </block>
                                          </statement>
                                        </block>
                                      </next>
                                    </block>
                                  </next>
                                </block>
                              </next>
                            </block>
                          </next>
                        </block>
                      </next>
                    </block>
                  </next>
                </block>
              </statement>
              <next>
                <block type="debug" id="Y)9Gm$ANlJed{ib;ebzD">
                  <field name="Severity">log</field>
                  <value name="TEXT">
                    <shadow type="text" id="8dO-g6Fs2=Y5_y1WgyNF">
                      <field name="TEXT">Ende</field>
                    </shadow>
                  </value>
                </block>
              </next>
            </block>
          </statement>
        </block>
      </xml>
      
      
      CinimodC Offline
      CinimodC Offline
      Cinimod
      Most Active
      schrieb am zuletzt editiert von Cinimod
      #2

      @daniel-bohn

      Moin Daniel, nimm statt "Pause" "Timeout", und stoppe alle Timeouts direkt nach jedem Triggern.

      Dazu müssteste du noch den Trigger auf "geändert" stellen und vor der ausführen noch den trigger auf "Wahr" prüfen.

      Etwa so :

      Bildschirmfoto 2022-01-07 um 16.45.52.png

      Dann brauchst du auch nicht noch mal erneut abfragen ob Tür noch offen ist, denn wenn zu werden alle timer gestoppt.

      Synology DS918+, Fritzbox 6690 Cable, #Docker #Blockly #Vis2 #Deconz #Tasmota

      1 Antwort Letzte Antwort
      0
      • Daniel BohnD Daniel Bohn

        Moin zusammen,

        ich versuche nun seit bestimmt zwei Wochen ein Problem zu lösen.

        Szenarion:
        Meine Familie lässt permanent die Wohnzimmertüre aufstehen - Und ich bin es leid immer zu rufen "Macht die Tür zu!".
        Also soll das Alexa für mich erledigen :D

        Ich habe schon diverse Scripts in Blockly gebastelt, jeweils mit 3x Exkalationsstufen:

        1. Türe wird geöffnet --> Türsensor setzt Wert auf "true"
        2. 10s Pause
        3. Wenn Türe immer noch offen, dann Alex Ansage: "Bitte Wohnzimmertüre schließen"
        4. 10s Pause
        5. Wenn TÜre immer noch offen, dann Alexa Ansage: "Jetzt aber bitte wirklich schließen"
        6. 10s Pause
        7. Wenn Türe immer noch offen "TV aus".

        Das funktioniert soweit, jedoch, wenn jemand die Türe mehrfach auf und zu macht, dann werden meine Scripte immer mehrfach gestartet und laufen immer noch parallel ohne abzubrechen, da der Wert "Tür offen" ja meisten auf "true" steht.

        Am liebsten würde ich gerne das gesamte Script sofort abbrechen, wenn die Türe auch nur kurz geschlossen wird. Ich habe aber leide keine Ahnung, wie ich das sinnvoll umsetzen kann.

        Hat jemand eine Idee?? Danke :)

        1.JPG

        
        BlocklyJavascriptTypeScriptRules
        16:01:16.203	info	javascript.0 (1602) Stop script script.js.Skript_1
        16:01:58.855	info	javascript.0 (1602) Stop script script.js.Skript_1
        16:14:24.143	info	javascript.0 (1602) Stop script script.js.Skript_1
        16:16:03.220	info	javascript.0 (1602) Stop script script.js.Skript_1
        16:16:21.814	info	javascript.0 (1602) Start javascript script.js.Skript_1
        16:16:21.824	info	javascript.0 (1602) script.js.Skript_1: registered 1 subscription and 0 schedules
        16:16:27.181	info	javascript.0 (1602) script.js.Skript_1: Türe steht auf
        16:16:37.183	info	javascript.0 (1602) script.js.Skript_1: Bitte Wohnzimmertüre schließen
        16:16:47.186	info	javascript.0 (1602) script.js.Skript_1: Nochmal, bitte Wohnzimmertüre schließen
        16:16:57.188	info	javascript.0 (1602) script.js.Skript_1: Fernseher aus
        16:16:57.189	info	javascript.0 (1602) script.js.Skript_1: Ende
        16:22:15.395	info	javascript.0 (1602) script.js.Skript_1: Türe steht auf
        16:22:25.395	info	javascript.0 (1602) script.js.Skript_1: Bitte Wohnzimmertüre schließen
        16:22:45.397	info	javascript.0 (1602) script.js.Skript_1: Ende
        16:23:34.413	info	javascript.0 (1602) script.js.Skript_1: Türe steht auf
        16:24:04.416	info	javascript.0 (1602) script.js.Skript_1: Ende
        16:24:36.893	info	javascript.0 (1602) script.js.Skript_1: Türe steht auf
        16:24:46.894	info	javascript.0 (1602) script.js.Skript_1: Bitte Wohnzimmertüre schließen
        16:28:50.434	info	javascript.0 (1602) script.js.Skript_1: Ende
        Ausgewählte Blöcke exportieren
        <xml xmlns="https://developers.google.com/blockly/xml">
          <block type="on_ext" id="QAjUk{ctD;8:E3G~-+AC" x="87" y="-387">
            <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
            <field name="CONDITION">true</field>
            <field name="ACK_CONDITION"></field>
            <value name="OID0">
              <shadow type="field_oid" id="`efFw?QgQ[ckI/,6Fv]9">
                <field name="oid">deconz.0.Sensors.6.open</field>
              </shadow>
            </value>
            <statement name="STATEMENT">
              <block type="controls_if" id="GXpRkJ`12/PQ9E+^9qR,">
                <value name="IF0">
                  <block type="logic_compare" id="=n:0(=zo8gURrRqLS44Q">
                    <field name="OP">EQ</field>
                    <value name="A">
                      <block type="get_value" id="4qrGG3Bf~S*-f~v$y^jJ">
                        <field name="ATTR">val</field>
                        <field name="OID">deconz.0.Sensors.6.open</field>
                      </block>
                    </value>
                    <value name="B">
                      <block type="logic_boolean" id="udIz(+eA{8{ImPvz!i[#">
                        <field name="BOOL">TRUE</field>
                      </block>
                    </value>
                  </block>
                </value>
                <statement name="DO0">
                  <block type="debug" id="r4]Dk(;r{cf%WFt/F$T|">
                    <field name="Severity">log</field>
                    <value name="TEXT">
                      <shadow type="text" id="BsDZ[@SJ3NTme,OvBE!#">
                        <field name="TEXT">Türe steht auf</field>
                      </shadow>
                    </value>
                    <next>
                      <block type="timeouts_wait" id="$AUq%b751Tw/wsaBrLhn">
                        <field name="DELAY">10</field>
                        <field name="UNIT">sec</field>
                        <next>
                          <block type="controls_if" id="~^?=49Q~Xfb@2Ja3A#%[">
                            <value name="IF0">
                              <block type="logic_compare" id="cCeWOiTud601$1[_g{M9">
                                <field name="OP">EQ</field>
                                <value name="A">
                                  <block type="get_value" id="6h)m}H/i}N[|,Q++G2ol">
                                    <field name="ATTR">val</field>
                                    <field name="OID">deconz.0.Sensors.6.open</field>
                                  </block>
                                </value>
                                <value name="B">
                                  <block type="logic_boolean" id="+XslM;0H#]Vv$-Gen7d,">
                                    <field name="BOOL">TRUE</field>
                                  </block>
                                </value>
                              </block>
                            </value>
                            <statement name="DO0">
                              <block type="debug" id="v=/I#%r8^P-B|`gj8Hb$">
                                <field name="Severity">log</field>
                                <value name="TEXT">
                                  <shadow type="text" id="ruF*^eoL~zmJSfo0-8)1">
                                    <field name="TEXT">Bitte Wohnzimmertüre schließen</field>
                                  </shadow>
                                </value>
                                <next>
                                  <block type="control" id="`[2)[_Dq5Ckb*H~bOVq-">
                                    <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                                    <field name="OID">alexa2.0.Echo-Devices.G2A1A603142401EC.Player.volume</field>
                                    <field name="WITH_DELAY">TRUE</field>
                                    <field name="DELAY_MS">1000</field>
                                    <field name="UNIT">ms</field>
                                    <field name="CLEAR_RUNNING">FALSE</field>
                                    <value name="VALUE">
                                      <block type="math_number" id="hqwJWY$GB+3t$m)j]Gv9">
                                        <field name="NUM">30</field>
                                      </block>
                                    </value>
                                    <next>
                                      <block type="control" id="V^),v/Eovu*S2ZE=H%e@">
                                        <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                                        <field name="OID">alexa2.0.Echo-Devices.G2A1A603142401EC.Commands.speak</field>
                                        <field name="WITH_DELAY">TRUE</field>
                                        <field name="DELAY_MS">500</field>
                                        <field name="UNIT">ms</field>
                                        <field name="CLEAR_RUNNING">TRUE</field>
                                        <value name="VALUE">
                                          <block type="text" id=":BZN+L%v@~_;2X23tpqr">
                                            <field name="TEXT">&lt;speak&gt;&lt;voice name="Hans"&gt;Bitte Wohnzimmertüre schließen&lt;/voice&gt;&lt;/speak&gt;</field>
                                          </block>
                                        </value>
                                      </block>
                                    </next>
                                  </block>
                                </next>
                              </block>
                            </statement>
                            <next>
                              <block type="timeouts_wait" id="=K%-2!wwhBhW2?}xcX`h">
                                <field name="DELAY">10</field>
                                <field name="UNIT">sec</field>
                                <next>
                                  <block type="controls_if" id="nI/F#V?Q`DCgSr78?7VK">
                                    <value name="IF0">
                                      <block type="logic_compare" id="LK8bQSG)ru~9gA_Y;fku">
                                        <field name="OP">EQ</field>
                                        <value name="A">
                                          <block type="get_value" id="HnUDIm*H7Vh%?-7,Q(/1">
                                            <field name="ATTR">val</field>
                                            <field name="OID">deconz.0.Sensors.6.open</field>
                                          </block>
                                        </value>
                                        <value name="B">
                                          <block type="logic_boolean" id="!*k(4jr685em*Q:IB.Ma">
                                            <field name="BOOL">TRUE</field>
                                          </block>
                                        </value>
                                      </block>
                                    </value>
                                    <statement name="DO0">
                                      <block type="debug" id="[FfI.l]YjnxpZ[v(ljIt">
                                        <field name="Severity">log</field>
                                        <value name="TEXT">
                                          <shadow type="text" id="=2W1R!gLP6L9CjO!$JMP">
                                            <field name="TEXT">Nochmal, bitte Wohnzimmertüre schließen</field>
                                          </shadow>
                                        </value>
                                        <next>
                                          <block type="control" id="xMDk1xMsqX~}%;93`qN)">
                                            <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                                            <field name="OID">alexa2.0.Echo-Devices.G2A1A603142401EC.Player.volume</field>
                                            <field name="WITH_DELAY">TRUE</field>
                                            <field name="DELAY_MS">1000</field>
                                            <field name="UNIT">ms</field>
                                            <field name="CLEAR_RUNNING">FALSE</field>
                                            <value name="VALUE">
                                              <block type="math_number" id="L}Z?9+(_tWPhh:c!/**4">
                                                <field name="NUM">70</field>
                                              </block>
                                            </value>
                                            <next>
                                              <block type="control" id="M,+]z+Q||67efs`4P(qM">
                                                <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                                                <field name="OID">alexa2.0.Echo-Devices.G2A1A603142401EC.Commands.ssml</field>
                                                <field name="WITH_DELAY">TRUE</field>
                                                <field name="DELAY_MS">500</field>
                                                <field name="UNIT">ms</field>
                                                <field name="CLEAR_RUNNING">TRUE</field>
                                                <value name="VALUE">
                                                  <block type="text" id="B!2rp_FLs97FqG:]Ot}i">
                                                    <field name="TEXT">&lt;speak&gt;&lt;voice name="Hans"&gt;Bitte Wohnzimmertüre schließen&lt;/voice&gt;&lt;/speak&gt;</field>
                                                  </block>
                                                </value>
                                                <next>
                                                  <block type="control" id="Lc3bwLQ[Qf3=AF^`vp+c">
                                                    <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                                                    <field name="OID">alexa2.0.Echo-Devices.G2A1A603142401EC.Player.volume</field>
                                                    <field name="WITH_DELAY">TRUE</field>
                                                    <field name="DELAY_MS">1000</field>
                                                    <field name="UNIT">ms</field>
                                                    <field name="CLEAR_RUNNING">FALSE</field>
                                                    <value name="VALUE">
                                                      <block type="math_number" id="`In#_5()1Y.;{+x?8z3_">
                                                        <field name="NUM">40</field>
                                                      </block>
                                                    </value>
                                                  </block>
                                                </next>
                                              </block>
                                            </next>
                                          </block>
                                        </next>
                                      </block>
                                    </statement>
                                    <next>
                                      <block type="timeouts_wait" id="2=HlE}W#eABOI7l$bcPH">
                                        <field name="DELAY">10</field>
                                        <field name="UNIT">sec</field>
                                        <next>
                                          <block type="controls_if" id="!);IimU,eoTViXPH08Is">
                                            <value name="IF0">
                                              <block type="logic_compare" id=",N/.p)~`avB8YL7_}9~I">
                                                <field name="OP">EQ</field>
                                                <value name="A">
                                                  <block type="get_value" id="dvUA_ePa*aS80EQO}j,W">
                                                    <field name="ATTR">val</field>
                                                    <field name="OID">deconz.0.Sensors.6.open</field>
                                                  </block>
                                                </value>
                                                <value name="B">
                                                  <block type="logic_boolean" id="M-Bl`DSiJ)SL7!/2*V{3">
                                                    <field name="BOOL">TRUE</field>
                                                  </block>
                                                </value>
                                              </block>
                                            </value>
                                            <statement name="DO0">
                                              <block type="debug" id="TS!Ch:jL1vk/u-_P^86s">
                                                <field name="Severity">log</field>
                                                <value name="TEXT">
                                                  <shadow type="text" id="9GS[,%s1rsq1C(1[W$is">
                                                    <field name="TEXT">Fernseher aus</field>
                                                  </shadow>
                                                </value>
                                                <next>
                                                  <block type="control" id="xG-OY0=_ht?|pc]sCWRi">
                                                    <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                                                    <field name="OID">alexa2.0.Echo-Devices.G2A1A603142401EC.Player.volume</field>
                                                    <field name="WITH_DELAY">TRUE</field>
                                                    <field name="DELAY_MS">1000</field>
                                                    <field name="UNIT">ms</field>
                                                    <field name="CLEAR_RUNNING">FALSE</field>
                                                    <value name="VALUE">
                                                      <block type="math_number" id="kyM4IJwdVIF~[),L_Tkh">
                                                        <field name="NUM">70</field>
                                                      </block>
                                                    </value>
                                                    <next>
                                                      <block type="control" id="jzr2HXZyRz2Ttr#.-]`4">
                                                        <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                                                        <field name="OID">alexa2.0.Echo-Devices.G2A1A603142401EC.Commands.ssml</field>
                                                        <field name="WITH_DELAY">TRUE</field>
                                                        <field name="DELAY_MS">500</field>
                                                        <field name="UNIT">ms</field>
                                                        <field name="CLEAR_RUNNING">TRUE</field>
                                                        <value name="VALUE">
                                                          <block type="text" id="mu96DP;qKETm^}gW].vf">
                                                            <field name="TEXT">&lt;speak&gt;&lt;voice name="Hans"&gt;Fernseher wird gleich ausgeschaltet&lt;/voice&gt;&lt;/speak&gt;</field>
                                                          </block>
                                                        </value>
                                                        <next>
                                                          <block type="control" id="wVybb^e$UNTYv!$zcZ#{">
                                                            <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                                                            <field name="OID">alexa2.0.Echo-Devices.G2A1A603142401EC.Player.volume</field>
                                                            <field name="WITH_DELAY">TRUE</field>
                                                            <field name="DELAY_MS">1000</field>
                                                            <field name="UNIT">ms</field>
                                                            <field name="CLEAR_RUNNING">FALSE</field>
                                                            <value name="VALUE">
                                                              <block type="math_number" id="*$sIagAP/AcnY($ycUBF">
                                                                <field name="NUM">40</field>
                                                              </block>
                                                            </value>
                                                          </block>
                                                        </next>
                                                      </block>
                                                    </next>
                                                  </block>
                                                </next>
                                              </block>
                                            </statement>
                                          </block>
                                        </next>
                                      </block>
                                    </next>
                                  </block>
                                </next>
                              </block>
                            </next>
                          </block>
                        </next>
                      </block>
                    </next>
                  </block>
                </statement>
                <next>
                  <block type="debug" id="Y)9Gm$ANlJed{ib;ebzD">
                    <field name="Severity">log</field>
                    <value name="TEXT">
                      <shadow type="text" id="8dO-g6Fs2=Y5_y1WgyNF">
                        <field name="TEXT">Ende</field>
                      </shadow>
                    </value>
                  </block>
                </next>
              </block>
            </statement>
          </block>
        </xml>
        <xml xmlns="https://developers.google.com/blockly/xml">
          <block type="on_ext" id="QAjUk{ctD;8:E3G~-+AC" x="87" y="-387">
            <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
            <field name="CONDITION">true</field>
            <field name="ACK_CONDITION"></field>
            <value name="OID0">
              <shadow type="field_oid" id="`efFw?QgQ[ckI/,6Fv]9">
                <field name="oid">deconz.0.Sensors.6.open</field>
              </shadow>
            </value>
            <statement name="STATEMENT">
              <block type="controls_if" id="GXpRkJ`12/PQ9E+^9qR,">
                <value name="IF0">
                  <block type="logic_compare" id="=n:0(=zo8gURrRqLS44Q">
                    <field name="OP">EQ</field>
                    <value name="A">
                      <block type="get_value" id="4qrGG3Bf~S*-f~v$y^jJ">
                        <field name="ATTR">val</field>
                        <field name="OID">deconz.0.Sensors.6.open</field>
                      </block>
                    </value>
                    <value name="B">
                      <block type="logic_boolean" id="udIz(+eA{8{ImPvz!i[#">
                        <field name="BOOL">TRUE</field>
                      </block>
                    </value>
                  </block>
                </value>
                <statement name="DO0">
                  <block type="debug" id="r4]Dk(;r{cf%WFt/F$T|">
                    <field name="Severity">log</field>
                    <value name="TEXT">
                      <shadow type="text" id="BsDZ[@SJ3NTme,OvBE!#">
                        <field name="TEXT">Türe steht auf</field>
                      </shadow>
                    </value>
                    <next>
                      <block type="timeouts_wait" id="$AUq%b751Tw/wsaBrLhn">
                        <field name="DELAY">10</field>
                        <field name="UNIT">sec</field>
                        <next>
                          <block type="controls_if" id="~^?=49Q~Xfb@2Ja3A#%[">
                            <value name="IF0">
                              <block type="logic_compare" id="cCeWOiTud601$1[_g{M9">
                                <field name="OP">EQ</field>
                                <value name="A">
                                  <block type="get_value" id="6h)m}H/i}N[|,Q++G2ol">
                                    <field name="ATTR">val</field>
                                    <field name="OID">deconz.0.Sensors.6.open</field>
                                  </block>
                                </value>
                                <value name="B">
                                  <block type="logic_boolean" id="+XslM;0H#]Vv$-Gen7d,">
                                    <field name="BOOL">TRUE</field>
                                  </block>
                                </value>
                              </block>
                            </value>
                            <statement name="DO0">
                              <block type="debug" id="v=/I#%r8^P-B|`gj8Hb$">
                                <field name="Severity">log</field>
                                <value name="TEXT">
                                  <shadow type="text" id="ruF*^eoL~zmJSfo0-8)1">
                                    <field name="TEXT">Bitte Wohnzimmertüre schließen</field>
                                  </shadow>
                                </value>
                                <next>
                                  <block type="control" id="`[2)[_Dq5Ckb*H~bOVq-">
                                    <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                                    <field name="OID">alexa2.0.Echo-Devices.G2A1A603142401EC.Player.volume</field>
                                    <field name="WITH_DELAY">TRUE</field>
                                    <field name="DELAY_MS">1000</field>
                                    <field name="UNIT">ms</field>
                                    <field name="CLEAR_RUNNING">FALSE</field>
                                    <value name="VALUE">
                                      <block type="math_number" id="hqwJWY$GB+3t$m)j]Gv9">
                                        <field name="NUM">30</field>
                                      </block>
                                    </value>
                                    <next>
                                      <block type="control" id="V^),v/Eovu*S2ZE=H%e@">
                                        <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                                        <field name="OID">alexa2.0.Echo-Devices.G2A1A603142401EC.Commands.speak</field>
                                        <field name="WITH_DELAY">TRUE</field>
                                        <field name="DELAY_MS">500</field>
                                        <field name="UNIT">ms</field>
                                        <field name="CLEAR_RUNNING">TRUE</field>
                                        <value name="VALUE">
                                          <block type="text" id=":BZN+L%v@~_;2X23tpqr">
                                            <field name="TEXT">&lt;speak&gt;&lt;voice name="Hans"&gt;Bitte Wohnzimmertüre schließen&lt;/voice&gt;&lt;/speak&gt;</field>
                                          </block>
                                        </value>
                                      </block>
                                    </next>
                                  </block>
                                </next>
                              </block>
                            </statement>
                            <next>
                              <block type="timeouts_wait" id="=K%-2!wwhBhW2?}xcX`h">
                                <field name="DELAY">10</field>
                                <field name="UNIT">sec</field>
                                <next>
                                  <block type="controls_if" id="nI/F#V?Q`DCgSr78?7VK">
                                    <value name="IF0">
                                      <block type="logic_compare" id="LK8bQSG)ru~9gA_Y;fku">
                                        <field name="OP">EQ</field>
                                        <value name="A">
                                          <block type="get_value" id="HnUDIm*H7Vh%?-7,Q(/1">
                                            <field name="ATTR">val</field>
                                            <field name="OID">deconz.0.Sensors.6.open</field>
                                          </block>
                                        </value>
                                        <value name="B">
                                          <block type="logic_boolean" id="!*k(4jr685em*Q:IB.Ma">
                                            <field name="BOOL">TRUE</field>
                                          </block>
                                        </value>
                                      </block>
                                    </value>
                                    <statement name="DO0">
                                      <block type="debug" id="[FfI.l]YjnxpZ[v(ljIt">
                                        <field name="Severity">log</field>
                                        <value name="TEXT">
                                          <shadow type="text" id="=2W1R!gLP6L9CjO!$JMP">
                                            <field name="TEXT">Nochmal, bitte Wohnzimmertüre schließen</field>
                                          </shadow>
                                        </value>
                                        <next>
                                          <block type="control" id="xMDk1xMsqX~}%;93`qN)">
                                            <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                                            <field name="OID">alexa2.0.Echo-Devices.G2A1A603142401EC.Player.volume</field>
                                            <field name="WITH_DELAY">TRUE</field>
                                            <field name="DELAY_MS">1000</field>
                                            <field name="UNIT">ms</field>
                                            <field name="CLEAR_RUNNING">FALSE</field>
                                            <value name="VALUE">
                                              <block type="math_number" id="L}Z?9+(_tWPhh:c!/**4">
                                                <field name="NUM">70</field>
                                              </block>
                                            </value>
                                            <next>
                                              <block type="control" id="M,+]z+Q||67efs`4P(qM">
                                                <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                                                <field name="OID">alexa2.0.Echo-Devices.G2A1A603142401EC.Commands.ssml</field>
                                                <field name="WITH_DELAY">TRUE</field>
                                                <field name="DELAY_MS">500</field>
                                                <field name="UNIT">ms</field>
                                                <field name="CLEAR_RUNNING">TRUE</field>
                                                <value name="VALUE">
                                                  <block type="text" id="B!2rp_FLs97FqG:]Ot}i">
                                                    <field name="TEXT">&lt;speak&gt;&lt;voice name="Hans"&gt;Bitte Wohnzimmertüre schließen&lt;/voice&gt;&lt;/speak&gt;</field>
                                                  </block>
                                                </value>
                                                <next>
                                                  <block type="control" id="Lc3bwLQ[Qf3=AF^`vp+c">
                                                    <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                                                    <field name="OID">alexa2.0.Echo-Devices.G2A1A603142401EC.Player.volume</field>
                                                    <field name="WITH_DELAY">TRUE</field>
                                                    <field name="DELAY_MS">1000</field>
                                                    <field name="UNIT">ms</field>
                                                    <field name="CLEAR_RUNNING">FALSE</field>
                                                    <value name="VALUE">
                                                      <block type="math_number" id="`In#_5()1Y.;{+x?8z3_">
                                                        <field name="NUM">40</field>
                                                      </block>
                                                    </value>
                                                  </block>
                                                </next>
                                              </block>
                                            </next>
                                          </block>
                                        </next>
                                      </block>
                                    </statement>
                                    <next>
                                      <block type="timeouts_wait" id="2=HlE}W#eABOI7l$bcPH">
                                        <field name="DELAY">10</field>
                                        <field name="UNIT">sec</field>
                                        <next>
                                          <block type="controls_if" id="!);IimU,eoTViXPH08Is">
                                            <value name="IF0">
                                              <block type="logic_compare" id=",N/.p)~`avB8YL7_}9~I">
                                                <field name="OP">EQ</field>
                                                <value name="A">
                                                  <block type="get_value" id="dvUA_ePa*aS80EQO}j,W">
                                                    <field name="ATTR">val</field>
                                                    <field name="OID">deconz.0.Sensors.6.open</field>
                                                  </block>
                                                </value>
                                                <value name="B">
                                                  <block type="logic_boolean" id="M-Bl`DSiJ)SL7!/2*V{3">
                                                    <field name="BOOL">TRUE</field>
                                                  </block>
                                                </value>
                                              </block>
                                            </value>
                                            <statement name="DO0">
                                              <block type="debug" id="TS!Ch:jL1vk/u-_P^86s">
                                                <field name="Severity">log</field>
                                                <value name="TEXT">
                                                  <shadow type="text" id="9GS[,%s1rsq1C(1[W$is">
                                                    <field name="TEXT">Fernseher aus</field>
                                                  </shadow>
                                                </value>
                                                <next>
                                                  <block type="control" id="xG-OY0=_ht?|pc]sCWRi">
                                                    <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                                                    <field name="OID">alexa2.0.Echo-Devices.G2A1A603142401EC.Player.volume</field>
                                                    <field name="WITH_DELAY">TRUE</field>
                                                    <field name="DELAY_MS">1000</field>
                                                    <field name="UNIT">ms</field>
                                                    <field name="CLEAR_RUNNING">FALSE</field>
                                                    <value name="VALUE">
                                                      <block type="math_number" id="kyM4IJwdVIF~[),L_Tkh">
                                                        <field name="NUM">70</field>
                                                      </block>
                                                    </value>
                                                    <next>
                                                      <block type="control" id="jzr2HXZyRz2Ttr#.-]`4">
                                                        <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                                                        <field name="OID">alexa2.0.Echo-Devices.G2A1A603142401EC.Commands.ssml</field>
                                                        <field name="WITH_DELAY">TRUE</field>
                                                        <field name="DELAY_MS">500</field>
                                                        <field name="UNIT">ms</field>
                                                        <field name="CLEAR_RUNNING">TRUE</field>
                                                        <value name="VALUE">
                                                          <block type="text" id="mu96DP;qKETm^}gW].vf">
                                                            <field name="TEXT">&lt;speak&gt;&lt;voice name="Hans"&gt;Fernseher wird gleich ausgeschaltet&lt;/voice&gt;&lt;/speak&gt;</field>
                                                          </block>
                                                        </value>
                                                        <next>
                                                          <block type="control" id="wVybb^e$UNTYv!$zcZ#{">
                                                            <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                                                            <field name="OID">alexa2.0.Echo-Devices.G2A1A603142401EC.Player.volume</field>
                                                            <field name="WITH_DELAY">TRUE</field>
                                                            <field name="DELAY_MS">1000</field>
                                                            <field name="UNIT">ms</field>
                                                            <field name="CLEAR_RUNNING">FALSE</field>
                                                            <value name="VALUE">
                                                              <block type="math_number" id="*$sIagAP/AcnY($ycUBF">
                                                                <field name="NUM">40</field>
                                                              </block>
                                                            </value>
                                                          </block>
                                                        </next>
                                                      </block>
                                                    </next>
                                                  </block>
                                                </next>
                                              </block>
                                            </statement>
                                          </block>
                                        </next>
                                      </block>
                                    </next>
                                  </block>
                                </next>
                              </block>
                            </next>
                          </block>
                        </next>
                      </block>
                    </next>
                  </block>
                </statement>
                <next>
                  <block type="debug" id="Y)9Gm$ANlJed{ib;ebzD">
                    <field name="Severity">log</field>
                    <value name="TEXT">
                      <shadow type="text" id="8dO-g6Fs2=Y5_y1WgyNF">
                        <field name="TEXT">Ende</field>
                      </shadow>
                    </value>
                  </block>
                </next>
              </block>
            </statement>
          </block>
        </xml>
        
        
        paul53P Offline
        paul53P Offline
        paul53
        schrieb am zuletzt editiert von paul53
        #3

        @daniel-bohn sagte: mit 3x Exkalationsstufen:

        Da die Zeitabstände gleich sind, geht das am einfachsten mit einem Intervall, das beim Türschließen gestoppt wird.

        Bild_2022-01-07_171204.png

        Bitte verzichtet auf Chat-Nachrichten, denn die Handhabung ist grauenhaft !
        Produktiv: RPi 2 mit S.USV, HM-MOD-RPI und SLC-USB-Stick mit root fs

        Daniel BohnD 1 Antwort Letzte Antwort
        0
        • Daniel BohnD Offline
          Daniel BohnD Offline
          Daniel Bohn
          schrieb am zuletzt editiert von
          #4

          @cinimod perfekt, funktioniert einwandfrei :)

          1 Antwort Letzte Antwort
          0
          • paul53P paul53

            @daniel-bohn sagte: mit 3x Exkalationsstufen:

            Da die Zeitabstände gleich sind, geht das am einfachsten mit einem Intervall, das beim Türschließen gestoppt wird.

            Bild_2022-01-07_171204.png

            Daniel BohnD Offline
            Daniel BohnD Offline
            Daniel Bohn
            schrieb am zuletzt editiert von
            #5

            @paul53 und deins auch :)))

            1 Antwort Letzte Antwort
            0

            Hey! Du scheinst an dieser Unterhaltung interessiert zu sein, hast aber noch kein Konto.

            Hast du es satt, bei jedem Besuch durch die gleichen Beiträge zu scrollen? Wenn du dich für ein Konto anmeldest, kommst du immer genau dorthin zurück, wo du zuvor warst, und kannst dich über neue Antworten benachrichtigen lassen (entweder per E-Mail oder Push-Benachrichtigung). Du kannst auch Lesezeichen speichern und Beiträge positiv bewerten, um anderen Community-Mitgliedern deine Wertschätzung zu zeigen.

            Mit deinem Input könnte dieser Beitrag noch besser werden 💗

            Registrieren Anmelden
            Antworten
            • In einem neuen Thema antworten
            Anmelden zum Antworten
            • Älteste zuerst
            • Neuste zuerst
            • Meiste Stimmen


            Support us

            ioBroker
            Community Adapters
            Donate

            563

            Online

            32.8k

            Benutzer

            82.8k

            Themen

            1.3m

            Beiträge
            Community
            Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen | Einwilligungseinstellungen
            ioBroker Community 2014-2025
            logo
            • Anmelden

            • Du hast noch kein Konto? Registrieren

            • Anmelden oder registrieren, um zu suchen
            • Erster Beitrag
              Letzter Beitrag
            0
            • Home
            • Aktuell
            • Tags
            • Ungelesen 0
            • Kategorien
            • Unreplied
            • Beliebt
            • GitHub
            • Docu
            • Hilfe