Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Blockly
    5. Lichtsteuerung mit BWM und Türkontakt

    NEWS

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    UNSOLVED Lichtsteuerung mit BWM und Türkontakt

    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      jb37 last edited by

      Hallo zusammen,

      ich habe mich nun etliche Stunden an einem Blockly Skript versucht, das meine Deckenlampe mit einer Verzögerung von ca. 2 Minuten ausschaltet, nachdem ich die Tür geöffnet habe. Wenn ich innerhalb dieser 2 Minuten jedoch wieder ins Zimmer zurückkehre (überprüft durch Türkontakt) oder ich gar nicht erst rausgegangen bin(überprüft durch BWM), soll das Licht sich nicht ausschalten, das Timeout also abgebrochen werden.
      Aktuell funktioniert mein Schleifenkonstrukt zur Abfrage der BWM und des Türkontakts aber nicht, da (wie ich vermute) der Trigger, wenn ich die Tür öffne, die Schleifen wieder von vorne startet.
      So sieht es aktuell aus:

      <xml xmlns="https://developers.google.com/blockly/xml">
        <variables>
          <variable id="2C$4RAfRMC)wIv=:]mF}">türsensor_aktiv</variable>
          <variable id="moq?YSluuwUVF=IlV.^(">bewegung_erkannt</variable>
          <variable id="kJwMa]1OCO7$1^F`mz;#">timer</variable>
          <variable type="timeout" id="timeout3">timeout3</variable>
          <variable id="mH{{sUi(g@a5B*9n=*iX">anwesend</variable>
          <variable type="interval" id="Intervall3">Intervall3</variable>
          <variable type="timeout" id="anwesenheit_false">anwesenheit_false</variable>
          <variable type="interval" id="Intervall4">Intervall4</variable>
        </variables>
        <block type="on_ext" id="CxdBIx/PBa?_}#pg%rkI" x="63" y="1588">
          <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
          <field name="CONDITION">gt</field>
          <field name="ACK_CONDITION"></field>
          <value name="OID0">
            <shadow type="field_oid" id="HE;QcY],D~R5o[qcP{H.">
              <field name="oid">deconz.0.Sensors.5.open</field>
            </shadow>
          </value>
          <statement name="STATEMENT">
            <block type="controls_if" id="HHX`e=-%DHvb4:I?7#c;">
              <value name="IF0">
                <block type="logic_compare" id="w}5|g_RibBTN?}zAx|-v">
                  <field name="OP">EQ</field>
                  <value name="A">
                    <block type="time_compare_ex" id="8SSFw2#RVLq/ze_|IGN5">
                      <mutation xmlns="http://www.w3.org/1999/xhtml" end_time="false" actual_time="true"></mutation>
                      <field name="USE_ACTUAL_TIME">TRUE</field>
                      <field name="OPTION">&gt;</field>
                      <value name="START_TIME">
                        <shadow type="text" id="K.JtbBV`MK^@~iJTZs^C">
                          <field name="TEXT">15:00</field>
                        </shadow>
                      </value>
                    </block>
                  </value>
                  <value name="B">
                    <block type="logic_compare" id="nDppnhJD*./pO?F7o,A)">
                      <field name="OP">EQ</field>
                      <value name="A">
                        <block type="variables_get" id="SbfmN]D$ESlh_J_0t!f-">
                          <field name="VAR" id="2C$4RAfRMC)wIv=:]mF}">türsensor_aktiv</field>
                        </block>
                      </value>
                      <value name="B">
                        <block type="logic_boolean" id="6wnm$iHEd^ln]//8k,ql">
                          <field name="BOOL">TRUE</field>
                        </block>
                      </value>
                    </block>
                  </value>
                </block>
              </value>
              <statement name="DO0">
                <block type="debug" id="N7M./*)Yy+R6o7o?]rX(">
                  <field name="Severity">log</field>
                  <value name="TEXT">
                    <shadow type="text" id="?E(x8vulR}6Bm};qG)gn">
                      <field name="TEXT">Tür geöffnet</field>
                    </shadow>
                  </value>
                  <next>
                    <block type="controls_if" id=";^$KDuqbqv6!Oq?kCr!m">
                      <value name="IF0">
                        <block type="logic_compare" id="lS^ZUG_o^Fby)M@x)|@:">
                          <field name="OP">EQ</field>
                          <value name="A">
                            <block type="get_value" id="3{f1I@pLbFTrrjy3.3H8">
                              <field name="ATTR">val</field>
                              <field name="OID">sonoff.0.Deckenlampe.POWER</field>
                            </block>
                          </value>
                          <value name="B">
                            <block type="logic_boolean" id="ABvu,o]#EB4g8uV/2tbq">
                              <field name="BOOL">FALSE</field>
                            </block>
                          </value>
                        </block>
                      </value>
                      <statement name="DO0">
                        <block type="control" id="%2h9X|NOSs%$OzyEg9c)">
                          <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                          <field name="OID">sonoff.0.Deckenlampe.Dimmer</field>
                          <field name="WITH_DELAY">FALSE</field>
                          <value name="VALUE">
                            <block type="math_number" id="=q*~/9k!)lo/=t;!f:a]">
                              <field name="NUM">100</field>
                            </block>
                          </value>
                          <next>
                            <block type="control" id="=(P!C86=^Hy~af$lc[%d">
                              <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                              <field name="OID">sonoff.0.Deckenlampe.POWER</field>
                              <field name="WITH_DELAY">FALSE</field>
                              <value name="VALUE">
                                <block type="logic_boolean" id=":0/e:o/u=]#u8pU{2Sdv">
                                  <field name="BOOL">TRUE</field>
                                </block>
                              </value>
                            </block>
                          </next>
                        </block>
                      </statement>
                      <next>
                        <block type="controls_if" id="xr[MT/#:!d_+DDUN$l6#">
                          <value name="IF0">
                            <block type="logic_compare" id="S6ZFRMyTsn#qut-n`r`t">
                              <field name="OP">EQ</field>
                              <value name="A">
                                <block type="get_value" id=":.r9GYNaCO]NwePbrxE}">
                                  <field name="ATTR">val</field>
                                  <field name="OID">sonoff.0.Deckenlampe.POWER</field>
                                </block>
                              </value>
                              <value name="B">
                                <block type="logic_boolean" id="98b(8IS^{c40B|Unku*t">
                                  <field name="BOOL">TRUE</field>
                                </block>
                              </value>
                            </block>
                          </value>
                          <statement name="DO0">
                            <block type="variables_set" id="qJr_a4ke#bO,3G{Mr;`E">
                              <field name="VAR" id="moq?YSluuwUVF=IlV.^(">bewegung_erkannt</field>
                              <value name="VALUE">
                                <block type="math_number" id="XN:RY^9Hn3#d)0Z#*U`w">
                                  <field name="NUM">0</field>
                                </block>
                              </value>
                              <next>
                                <block type="variables_set" id="a4uj_ih[s-{CpkC/xg~W">
                                  <field name="VAR" id="kJwMa]1OCO7$1^F`mz;#">timer</field>
                                  <value name="VALUE">
                                    <block type="math_number" id="vP6NV}OoFE{7U4By{4Gl">
                                      <field name="NUM">0</field>
                                    </block>
                                  </value>
                                  <next>
                                    <block type="controls_if" id="bz^5DSd](0DJn/`Kj,g*">
                                      <value name="IF0">
                                        <block type="logic_compare" id="}l|OFHU3XtM-2_q~/cL@">
                                          <field name="OP">EQ</field>
                                          <value name="A">
                                            <block type="variables_get" id="O3#/Jc(O5Nk;OHA+W]7=">
                                              <field name="VAR" id="mH{{sUi(g@a5B*9n=*iX">anwesend</field>
                                            </block>
                                          </value>
                                          <value name="B">
                                            <block type="logic_boolean" id="#=$7$h9%QZ|cwxpF,K[D">
                                              <field name="BOOL">FALSE</field>
                                            </block>
                                          </value>
                                        </block>
                                      </value>
                                      <statement name="DO0">
                                        <block type="timeouts_settimeout" id="k@ROcG=o]V[U|PqJgb/q">
                                          <field name="NAME">timeout3</field>
                                          <field name="DELAY">130</field>
                                          <field name="UNIT">sec</field>
                                          <statement name="STATEMENT">
                                            <block type="debug" id="2q%:+w*A[gQUyG57}c7h">
                                              <field name="Severity">log</field>
                                              <value name="TEXT">
                                                <shadow type="text" id="^F/F-yBx`}ow@1|g74==">
                                                  <field name="TEXT">timeout gestartet</field>
                                                </shadow>
                                              </value>
                                              <next>
                                                <block type="control" id="JI6Jt3k7,A/8qGU*E4Sj">
                                                  <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                  <field name="OID">sonoff.0.Deckenlampe.POWER</field>
                                                  <field name="WITH_DELAY">FALSE</field>
                                                  <value name="VALUE">
                                                    <block type="logic_boolean" id="7t0AJMF?gjh$O)1`/qE#">
                                                      <field name="BOOL">FALSE</field>
                                                    </block>
                                                  </value>
                                                </block>
                                              </next>
                                            </block>
                                          </statement>
                                          <next>
                                            <block type="timeouts_setinterval" id="+n2cT;OnP(F;*N4:]y7|">
                                              <field name="NAME">Intervall3</field>
                                              <field name="INTERVAL">25</field>
                                              <field name="UNIT">sec</field>
                                              <statement name="STATEMENT">
                                                <block type="controls_if" id="Tg=P+:y4x02cf4b:282U">
                                                  <value name="IF0">
                                                    <block type="logic_operation" id="}F.ZTLJVSM1Qev3:JB4x">
                                                      <field name="OP">OR</field>
                                                      <value name="A">
                                                        <block type="logic_compare" id="ao~Cf3giY8k-ed0zhY)I">
                                                          <field name="OP">EQ</field>
                                                          <value name="A">
                                                            <block type="get_value" id="XGBJlU+*2axDa.*4L_;v">
                                                              <field name="ATTR">val</field>
                                                              <field name="OID">deconz.0.Sensors.8.presence</field>
                                                            </block>
                                                          </value>
                                                          <value name="B">
                                                            <block type="logic_boolean" id="Yf5}zYp4zIMsmQY?R8e%">
                                                              <field name="BOOL">TRUE</field>
                                                            </block>
                                                          </value>
                                                        </block>
                                                      </value>
                                                      <value name="B">
                                                        <block type="logic_compare" id="+=@;-#DI_e9[~P;5(U{x">
                                                          <field name="OP">EQ</field>
                                                          <value name="A">
                                                            <block type="get_value" id="u0{ss7D(I.{{2Q!JB#0z">
                                                              <field name="ATTR">val</field>
                                                              <field name="OID">deconz.0.Sensors.9.presence</field>
                                                            </block>
                                                          </value>
                                                          <value name="B">
                                                            <block type="logic_boolean" id="EUf+qctJyUbgbZMDLdX7">
                                                              <field name="BOOL">TRUE</field>
                                                            </block>
                                                          </value>
                                                        </block>
                                                      </value>
                                                    </block>
                                                  </value>
                                                  <statement name="DO0">
                                                    <block type="debug" id="/9-^wizwYAX!`vLiMTR7">
                                                      <field name="Severity">log</field>
                                                      <value name="TEXT">
                                                        <shadow type="text" id="@4sXh{aeU-|1mw]hyxmj">
                                                          <field name="TEXT">Bewegung erkannt</field>
                                                        </shadow>
                                                      </value>
                                                      <next>
                                                        <block type="math_change" id="EECfgOh7$R-h7!pMm^v8">
                                                          <field name="VAR" id="moq?YSluuwUVF=IlV.^(">bewegung_erkannt</field>
                                                          <value name="DELTA">
                                                            <shadow type="math_number" id="lrD7A)}o~YCxrF]y?-Nr">
                                                              <field name="NUM">1</field>
                                                            </shadow>
                                                          </value>
                                                          <next>
                                                            <block type="debug" id="Y5dF+vnRi=48H.1[r96F">
                                                              <field name="Severity">log</field>
                                                              <value name="TEXT">
                                                                <shadow type="text" id="+A3Ux_1s$@2ttF+yLbV)">
                                                                  <field name="TEXT">count</field>
                                                                </shadow>
                                                              </value>
                                                            </block>
                                                          </next>
                                                        </block>
                                                      </next>
                                                    </block>
                                                  </statement>
                                                  <next>
                                                    <block type="controls_if" id="jmdtzVT_7#tK$cq?SM=a">
                                                      <value name="IF0">
                                                        <block type="logic_compare" id="1)`}SvNKMH8.}Mw+@X#4">
                                                          <field name="OP">GTE</field>
                                                          <value name="A">
                                                            <block type="variables_get" id="AY8BZ:AlpO`{isiAqpq5">
                                                              <field name="VAR" id="moq?YSluuwUVF=IlV.^(">bewegung_erkannt</field>
                                                            </block>
                                                          </value>
                                                          <value name="B">
                                                            <block type="math_number" id="-{b%t6*{{K;Gp?d$MWWN">
                                                              <field name="NUM">3</field>
                                                            </block>
                                                          </value>
                                                        </block>
                                                      </value>
                                                      <statement name="DO0">
                                                        <block type="debug" id="gxhsxA+xN;O*VDRgTOQL">
                                                          <field name="Severity">warn</field>
                                                          <value name="TEXT">
                                                            <shadow type="text" id="Vp!A}8jtZ`onY?rgzZix">
                                                              <field name="TEXT">timeout durch Bewegung gestoppt</field>
                                                            </shadow>
                                                          </value>
                                                          <next>
                                                            <block type="variables_set" id="ca(qB-]q3^xT-|L?Dk.F">
                                                              <field name="VAR" id="mH{{sUi(g@a5B*9n=*iX">anwesend</field>
                                                              <value name="VALUE">
                                                                <block type="logic_boolean" id="-seWn3R@iwU8_A(nawt]">
                                                                  <field name="BOOL">TRUE</field>
                                                                </block>
                                                              </value>
                                                              <next>
                                                                <block type="timeouts_cleartimeout" id="5OW.Ce~Sh}rk)tl7,_`{">
                                                                  <field name="NAME">timeout3</field>
                                                                  <next>
                                                                    <block type="timeouts_clearinterval" id="_=;$:u4P`(URpIudDyUS">
                                                                      <field name="NAME">Intervall3</field>
                                                                      <next>
                                                                        <block type="timeouts_clearinterval" id="#5dB#V[nHE5;8*sJjE@T">
                                                                          <field name="NAME">Intervall3</field>
                                                                        </block>
                                                                      </next>
                                                                    </block>
                                                                  </next>
                                                                </block>
                                                              </next>
                                                            </block>
                                                          </next>
                                                        </block>
                                                      </statement>
                                                      <next>
                                                        <block type="timeouts_setinterval" id="`GNWWxA|yn@?LUir01=B">
                                                          <field name="NAME">Intervall4</field>
                                                          <field name="INTERVAL">1000</field>
                                                          <field name="UNIT">ms</field>
                                                          <statement name="STATEMENT">
                                                            <block type="controls_if" id="C=Le)IT;d@_JAfCdES1e">
                                                              <value name="IF0">
                                                                <block type="logic_compare" id="A2ab)0N?tk+]C[CNNXob">
                                                                  <field name="OP">EQ</field>
                                                                  <value name="A">
                                                                    <block type="get_value" id="!OI*=wcR1W?Oue@`yIIq">
                                                                      <field name="ATTR">val</field>
                                                                      <field name="OID">deconz.0.Sensors.5.open</field>
                                                                    </block>
                                                                  </value>
                                                                  <value name="B">
                                                                    <block type="logic_boolean" id="+h8;I!!)bIM]kwNQk{zr">
                                                                      <field name="BOOL">TRUE</field>
                                                                    </block>
                                                                  </value>
                                                                </block>
                                                              </value>
                                                              <statement name="DO0">
                                                                <block type="debug" id="-ipSuh6,o/syK9#~uvAL">
                                                                  <field name="Severity">log</field>
                                                                  <value name="TEXT">
                                                                    <shadow type="text" id="4z$~rvtqd@m%N;F~{A{M">
                                                                      <field name="TEXT">timeout durch Tür gestoppt</field>
                                                                    </shadow>
                                                                  </value>
                                                                  <next>
                                                                    <block type="variables_set" id="lHXc)F/1sa!x4,u0r|K`">
                                                                      <field name="VAR" id="mH{{sUi(g@a5B*9n=*iX">anwesend</field>
                                                                      <value name="VALUE">
                                                                        <block type="logic_boolean" id="uXcSwT@v_4{sN-]ohYc)">
                                                                          <field name="BOOL">TRUE</field>
                                                                        </block>
                                                                      </value>
                                                                      <next>
                                                                        <block type="timeouts_cleartimeout" id="3g3Jr|1G{`y*}(6Jo$xf">
                                                                          <field name="NAME">timeout3</field>
                                                                          <next>
                                                                            <block type="timeouts_clearinterval" id="Cn`$g_hs:tFZ1uE$5b~5">
                                                                              <field name="NAME">Intervall3</field>
                                                                              <next>
                                                                                <block type="timeouts_clearinterval" id="ITry4jtl9xw%vX{ctgDi">
                                                                                  <field name="NAME">Intervall4</field>
                                                                                </block>
                                                                              </next>
                                                                            </block>
                                                                          </next>
                                                                        </block>
                                                                      </next>
                                                                    </block>
                                                                  </next>
                                                                </block>
                                                              </statement>
                                                            </block>
                                                          </statement>
                                                          <next>
                                                            <block type="math_change" id="(.S`p#`REs7P=2sc!#0E">
                                                              <field name="VAR" id="kJwMa]1OCO7$1^F`mz;#">timer</field>
                                                              <value name="DELTA">
                                                                <shadow type="math_number" id="x(v9%fJKSM=j`fCsv$sq">
                                                                  <field name="NUM">1</field>
                                                                </shadow>
                                                              </value>
                                                              <next>
                                                                <block type="controls_if" id="g=p!1JwJ[n)/4@a;W$Z8">
                                                                  <value name="IF0">
                                                                    <block type="logic_compare" id="zy0^J9xiJ;Ov^X|x8keX">
                                                                      <field name="OP">GTE</field>
                                                                      <value name="A">
                                                                        <block type="variables_get" id="3p1/;WDqk,pu^`DwOyb~">
                                                                          <field name="VAR" id="kJwMa]1OCO7$1^F`mz;#">timer</field>
                                                                        </block>
                                                                      </value>
                                                                      <value name="B">
                                                                        <block type="math_number" id="IaLSi|H8?iNWg?uvvbV[">
                                                                          <field name="NUM">4</field>
                                                                        </block>
                                                                      </value>
                                                                    </block>
                                                                  </value>
                                                                  <statement name="DO0">
                                                                    <block type="variables_set" id="K}6w:{qZ[Vz2hnfZo*ej">
                                                                      <field name="VAR" id="moq?YSluuwUVF=IlV.^(">bewegung_erkannt</field>
                                                                      <value name="VALUE">
                                                                        <block type="math_number" id="HmOe,Mp:/ITg@`!an-)T">
                                                                          <field name="NUM">0</field>
                                                                        </block>
                                                                      </value>
                                                                      <next>
                                                                        <block type="variables_set" id="#cv]Nb7kj@5i3EC?U2bn">
                                                                          <field name="VAR" id="kJwMa]1OCO7$1^F`mz;#">timer</field>
                                                                          <value name="VALUE">
                                                                            <block type="math_number" id="Ss*ke#c$TK/#tj5B%9N|">
                                                                              <field name="NUM">0</field>
                                                                            </block>
                                                                          </value>
                                                                          <next>
                                                                            <block type="variables_set" id="Flq#Z1Nwpv+5M=Bl2)qL">
                                                                              <field name="VAR" id="mH{{sUi(g@a5B*9n=*iX">anwesend</field>
                                                                              <value name="VALUE">
                                                                                <block type="logic_boolean" id="2VIGEmk_uN_NoDYQ1Uza">
                                                                                  <field name="BOOL">FALSE</field>
                                                                                </block>
                                                                              </value>
                                                                              <next>
                                                                                <block type="timeouts_clearinterval" id="wmse#kizCJ|]_(+m9]*!">
                                                                                  <field name="NAME">Intervall4</field>
                                                                                  <next>
                                                                                    <block type="timeouts_clearinterval" id="8tbc/T0=4);-^$cQ9ITI">
                                                                                      <field name="NAME">Intervall3</field>
                                                                                    </block>
                                                                                  </next>
                                                                                </block>
                                                                              </next>
                                                                            </block>
                                                                          </next>
                                                                        </block>
                                                                      </next>
                                                                    </block>
                                                                  </statement>
                                                                </block>
                                                              </next>
                                                            </block>
                                                          </next>
                                                        </block>
                                                      </next>
                                                    </block>
                                                  </next>
                                                </block>
                                              </statement>
                                              <next>
                                                <block type="timeouts_settimeout" id="Bo:WX7xpGKo,f|Dfra3#">
                                                  <field name="NAME">anwesenheit_false</field>
                                                  <field name="DELAY">150</field>
                                                  <field name="UNIT">sec</field>
                                                  <statement name="STATEMENT">
                                                    <block type="variables_set" id="ye.C~;^PLa,vapHnwGZ2">
                                                      <field name="VAR" id="mH{{sUi(g@a5B*9n=*iX">anwesend</field>
                                                      <value name="VALUE">
                                                        <block type="logic_boolean" id="s6$q`1GCCQ81k70WeJtE">
                                                          <field name="BOOL">FALSE</field>
                                                        </block>
                                                      </value>
                                                    </block>
                                                  </statement>
                                                </block>
                                              </next>
                                            </block>
                                          </next>
                                        </block>
                                      </statement>
                                    </block>
                                  </next>
                                </block>
                              </next>
                            </block>
                          </statement>
                        </block>
                      </next>
                    </block>
                  </next>
                </block>
              </statement>
            </block>
          </statement>
        </block>
      </xml>
      

      Hat einer eine Idee, wo mein Fehler liegt? Bin für jede Hilfe dankbar!

      D 1 Reply Last reply Reply Quote 0
      • D
        duffbeer2000 @jb37 last edited by

        @jb37
        Was mir bei deinem Script auffällt:

        • der dritte "falls" Block da prüfst du ob die Deckenlampe an ist, dabei hast du sie im Block davor schon angeschalten. Dieser Abschnitt wird also immer ausgeführt.
        • du prüfst auf "anwesend = falsch" allerdings wurde die Variable vorher nicht vorbelegt das kann zu Fehlern führen da du in diesem Moment nicht weißt ob sie falsch oder wahr ist.
        • mehr hab ich noch nicht angeschaut.

        Hier ist mein Script vom Flur, da sind mehrere Türen die abgehen. Wenn eine Tür geöffnet wird geht das Licht an, erkennt der Bewegungsmelder was geht das Licht auch an. So lange der Bewegungsmelder was erkennt geht das Licht nicht aus.
        Das Licht geht nur an wenn die Helligkeit im Flur unter 100 Lux ist und in zwei bestimmten Zeitslots. Ansonsten geht das Licht aus wenn 2 Minuten nichts mehr erkannt wird.

        <xml xmlns="https://developers.google.com/blockly/xml">
          <variables>
            <variable type="timeout" id="timeout">timeout</variable>
          </variables>
          <block type="comment" id="24WBt~:i2zGn9:^KBRSt" x="-313" y="-138">
            <field name="COMMENT">Türen</field>
            <next>
              <block type="on_ext" id="1t?n./2g#;fDu7E%U(ju">
                <mutation xmlns="http://www.w3.org/1999/xhtml" items="5"></mutation>
                <field name="CONDITION">gt</field>
                <field name="ACK_CONDITION"></field>
                <value name="OID0">
                  <shadow type="field_oid" id="t}+0OPJU%H/kC13Eh_94">
                    <field name="oid">deconz.0.Sensors.00158d0002bff095.open</field>
                  </shadow>
                </value>
                <value name="OID1">
                  <shadow type="field_oid" id="`=)joAfpFR*bJkN,F{7o">
                    <field name="oid">deconz.0.Sensors.00158d0002ecefee.open</field>
                  </shadow>
                </value>
                <value name="OID2">
                  <shadow type="field_oid" id="tD,r#t6f?=sV-Ui|hp$@">
                    <field name="oid">deconz.0.Sensors.00158d0002e738ae.open</field>
                  </shadow>
                </value>
                <value name="OID3">
                  <shadow type="field_oid" id="eDD]7D19UzlbQwCFw~oP">
                    <field name="oid">deconz.0.Sensors.00158d000313af12.open</field>
                  </shadow>
                </value>
                <value name="OID4">
                  <shadow type="field_oid" id="1TaDX!6,q+J3tgKyN1IG">
                    <field name="oid">deconz.0.Sensors.00158d0003120d31.open</field>
                  </shadow>
                </value>
                <statement name="STATEMENT">
                  <block type="timeouts_cleartimeout" id="G}T3d5/tTCZArHquVV[k">
                    <field name="NAME">timeout</field>
                    <next>
                      <block type="procedures_callnoreturn" id="M{F9f-du:dPI{T3:m.uq">
                        <mutation name="LichtEin"></mutation>
                      </block>
                    </next>
                  </block>
                </statement>
                <next>
                  <block type="comment" id=":[3WVwf9a/GV:C)8{?g[">
                    <field name="COMMENT">Bewegungsmelder</field>
                    <next>
                      <block type="on" id="id7(?96)l,-6OwK`LwW@">
                        <field name="OID">deconz.0.Sensors.00158d0002d43d4b.presence</field>
                        <field name="CONDITION">any</field>
                        <field name="ACK_CONDITION"></field>
                        <statement name="STATEMENT">
                          <block type="timeouts_cleartimeout" id="BT=mGNUd~mWHF+kl#11U">
                            <field name="NAME">timeout</field>
                            <next>
                              <block type="controls_if" id="(Ce+%mE-HRR6O$gb~Sls">
                                <mutation elseif="1"></mutation>
                                <value name="IF0">
                                  <block type="logic_compare" id="K10cGU-t%TNXu+@J%*?M">
                                    <field name="OP">EQ</field>
                                    <value name="A">
                                      <block type="get_value" id=",yc4^XLr2U5?+^YgrR!T">
                                        <field name="ATTR">val</field>
                                        <field name="OID">deconz.0.Sensors.00158d0002d43d4b.presence</field>
                                      </block>
                                    </value>
                                    <value name="B">
                                      <block type="logic_boolean" id="~:dFe}Yb7^;/SF6Bh=+4">
                                        <field name="BOOL">TRUE</field>
                                      </block>
                                    </value>
                                  </block>
                                </value>
                                <statement name="DO0">
                                  <block type="procedures_callnoreturn" id="#fz;`L9%Yp=E3:sYSlm@">
                                    <mutation name="LichtEin"></mutation>
                                  </block>
                                </statement>
                                <value name="IF1">
                                  <block type="logic_compare" id="HSI.+K:-sG9.A4OI__=U">
                                    <field name="OP">EQ</field>
                                    <value name="A">
                                      <block type="get_value" id="WU+UP~d:ISVWl_|~hG4S">
                                        <field name="ATTR">val</field>
                                        <field name="OID">deconz.0.Sensors.00158d0002d43d4b.presence</field>
                                      </block>
                                    </value>
                                    <value name="B">
                                      <block type="logic_boolean" id="f5YF`[jqGQt8pl40N)_(">
                                        <field name="BOOL">FALSE</field>
                                      </block>
                                    </value>
                                  </block>
                                </value>
                                <statement name="DO1">
                                  <block type="procedures_callnoreturn" id="Rk$$~)GZm%whvB0e~H*1">
                                    <mutation name="LichtAus"></mutation>
                                  </block>
                                </statement>
                              </block>
                            </next>
                          </block>
                        </statement>
                      </block>
                    </next>
                  </block>
                </next>
              </block>
            </next>
          </block>
          <block type="procedures_defnoreturn" id="9T}@DOgWdP.GEALkAk9X" x="-312" y="513">
            <field name="NAME">LichtEin</field>
            <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
            <statement name="STACK">
              <block type="controls_if" id="TUiz]p4B[pD~gN|{F,7l">
                <mutation elseif="1"></mutation>
                <value name="IF0">
                  <block type="logic_operation" id="z)^!=0I4q:WWFunj9ygd" inline="false">
                    <field name="OP">AND</field>
                    <value name="A">
                      <block type="logic_operation" id="u9RjU|a}*28mOj,tG-,;" inline="false">
                        <field name="OP">OR</field>
                        <value name="A">
                          <block type="time_compare" id="EB/~V-z]tuo|2tBR1POk">
                            <mutation xmlns="http://www.w3.org/1999/xhtml" end_time="true"></mutation>
                            <field name="OPTION">between</field>
                            <field name="START_TIME">05:30</field>
                            <field name="END_TIME">08:00</field>
                          </block>
                        </value>
                        <value name="B">
                          <block type="time_compare" id="?A#F7RpvVmXm@wr2vtM#">
                            <mutation xmlns="http://www.w3.org/1999/xhtml" end_time="true"></mutation>
                            <field name="OPTION">between</field>
                            <field name="START_TIME">16:00</field>
                            <field name="END_TIME">22:00</field>
                          </block>
                        </value>
                      </block>
                    </value>
                    <value name="B">
                      <block type="logic_compare" id="/:RA=ZP,R-2e..{3,2w.">
                        <field name="OP">LT</field>
                        <value name="A">
                          <block type="convert_tonumber" id="fnaSHiPMg%;ZZ;ruJvha">
                            <value name="VALUE">
                              <block type="get_value" id="vOakpERq;jq0]}8?8cYj">
                                <field name="ATTR">val</field>
                                <field name="OID">deconz.0.Sensors.00158d0002d43d4b.lux</field>
                              </block>
                            </value>
                          </block>
                        </value>
                        <value name="B">
                          <block type="math_number" id="ZI9GGUFaWh70Ugqu$ecj">
                            <field name="NUM">100</field>
                          </block>
                        </value>
                      </block>
                    </value>
                  </block>
                </value>
                <statement name="DO0">
                  <block type="control" id="?JHRF*ODZl%XZq4mm,p.">
                    <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                    <field name="OID">deconz.0.Groups.1.on</field>
                    <field name="WITH_DELAY">FALSE</field>
                    <value name="VALUE">
                      <block type="logic_boolean" id="yIyhYREzaTVt@V,{NcX3">
                        <field name="BOOL">TRUE</field>
                      </block>
                    </value>
                    <next>
                      <block type="procedures_callnoreturn" id="Y1=H.H,.}}n{w]zW[KBU">
                        <mutation name="LichtAus"></mutation>
                      </block>
                    </next>
                  </block>
                </statement>
                <value name="IF1">
                  <block type="logic_compare" id="!r(rbS19ouJh-nd0c$5l">
                    <field name="OP">LT</field>
                    <value name="A">
                      <block type="convert_tonumber" id="]1#.1vzepNm!*~@qOnGw">
                        <value name="VALUE">
                          <block type="get_value" id="{93H-SI[.RQPdgM^z`ax">
                            <field name="ATTR">val</field>
                            <field name="OID">deconz.0.Sensors.00158d0002d43d4b.lux</field>
                          </block>
                        </value>
                      </block>
                    </value>
                    <value name="B">
                      <block type="math_number" id="/kevQ]0S22MIC|egbz*-">
                        <field name="NUM">100</field>
                      </block>
                    </value>
                  </block>
                </value>
                <statement name="DO1">
                  <block type="control" id="0|F*{PWMY]s7K;kuh)]~">
                    <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                    <field name="OID">deconz.0.Lights.00124b001d3aaae6.on</field>
                    <field name="WITH_DELAY">FALSE</field>
                    <value name="VALUE">
                      <block type="logic_boolean" id="6ddypsl^ZMfdfP,okh}=">
                        <field name="BOOL">TRUE</field>
                      </block>
                    </value>
                    <next>
                      <block type="procedures_callnoreturn" id="1gYte?9]y%7X7y]L^Fl!">
                        <mutation name="LichtAus"></mutation>
                      </block>
                    </next>
                  </block>
                </statement>
              </block>
            </statement>
          </block>
          <block type="procedures_defnoreturn" id="r(epVeh_IflZ$Y!a`,Y4" x="-312" y="863">
            <field name="NAME">LichtAus</field>
            <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
            <statement name="STACK">
              <block type="timeouts_settimeout" id="ueQ0=sPHwCIOWe%z?#59">
                <field name="NAME">timeout</field>
                <field name="DELAY">2</field>
                <field name="UNIT">min</field>
                <statement name="STATEMENT">
                  <block type="control" id="LlC{;8$bl[Xl$9+gJS!p">
                    <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                    <field name="OID">deconz.0.Groups.1.on</field>
                    <field name="WITH_DELAY">FALSE</field>
                    <value name="VALUE">
                      <block type="logic_boolean" id="O#NeHQmE;/l)(#M/ieLa">
                        <field name="BOOL">FALSE</field>
                      </block>
                    </value>
                    <next>
                      <block type="control" id="4{*V]GX:R)![Gg|dohJy">
                        <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                        <field name="OID">deconz.0.Lights.00124b001d3aaae6.on</field>
                        <field name="WITH_DELAY">FALSE</field>
                        <value name="VALUE">
                          <block type="logic_boolean" id=":sfjf-f4rWYA2F4j0Xy#">
                            <field name="BOOL">FALSE</field>
                          </block>
                        </value>
                      </block>
                    </next>
                  </block>
                </statement>
              </block>
            </statement>
          </block>
        </xml>
        
        1 Reply Last reply Reply Quote 0
        • First post
          Last post

        Support us

        ioBroker
        Community Adapters
        Donate

        573
        Online

        31.9k
        Users

        80.1k
        Topics

        1.3m
        Posts

        blockly
        2
        2
        254
        Loading More Posts
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes
        Reply
        • Reply as topic
        Log in to reply
        Community
        Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
        The ioBroker Community 2014-2023
        logo