Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Blockly
    5. [Gelöst] HUE Motion Sensor Lampe an/aus -> Problem Haustier

    NEWS

    • Wir empfehlen: Node.js 22.x

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker goes Matter ... Matter Adapter in Stable

    [Gelöst] HUE Motion Sensor Lampe an/aus -> Problem Haustier

    This topic has been deleted. Only users with topic management privileges can see it.
    • paul53
      paul53 @Sanweb last edited by paul53

      @Sanweb
      Versuche es mal so:

      Blockly_temp.JPG

      <xml xmlns="https://developers.google.com/blockly/xml">
        <variables>
          <variable id="#?8llkQ_(?e?!}{7|0%B">duschen</variable>
          <variable type="timeout" id="timeout">timeout</variable>
        </variables>
        <block type="on_ext" id="JT^Sb~%?woKrqm#,_x?/" x="780" y="-2572">
          <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
          <field name="CONDITION">any</field>
          <field name="ACK_CONDITION"></field>
          <value name="OID0">
            <shadow type="field_oid" id="g+hFwJ/p}d6]YQ~EspD*">
              <field name="oid">default</field>
            </shadow>
            <block type="text" id="K:Nj#+xP3L91=WcyB3vk">
              <field name="TEXT">deconz.0.Sensors.15.buttonevent</field>
            </block>
          </value>
          <statement name="STATEMENT">
            <block type="controls_if" id="5t#hR+Cr;XhCLt708]?;">
              <value name="IF0">
                <block type="logic_compare" id="*0/lSkBjPe!Q0-7A]`}t">
                  <field name="OP">EQ</field>
                  <value name="A">
                    <block type="on_source" id="p;(Kh@GTK/#PhbUs|2Fk">
                      <field name="ATTR">state.val</field>
                    </block>
                  </value>
                  <value name="B">
                    <block type="math_number" id="L}L-PyHNK43~ZBR#G]Yv">
                      <field name="NUM">1002</field>
                    </block>
                  </value>
                </block>
              </value>
              <statement name="DO0">
                <block type="timeouts_cleartimeout" id="jv6hg}OB#s?,w0H*NI_d">
                  <field name="NAME">timeout</field>
                  <next>
                    <block type="variables_set" id="IQn)a22MZbX!@$BeNSbo">
                      <field name="VAR" id="#?8llkQ_(?e?!}{7|0%B">duschen</field>
                      <value name="VALUE">
                        <block type="logic_boolean" id=",=d^~(K|T,0?]S978@zB">
                          <field name="BOOL">TRUE</field>
                        </block>
                      </value>
                    </block>
                  </next>
                </block>
              </statement>
            </block>
          </statement>
          <next>
            <block type="comment" id="j^MxUgu8?7{mlu]rA:Tf">
              <field name="COMMENT">Bewegung</field>
              <next>
                <block type="on_ext" id="Vo2d_MmTq==sR.4ZWR$O">
                  <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
                  <field name="CONDITION">ne</field>
                  <field name="ACK_CONDITION"></field>
                  <value name="OID0">
                    <shadow type="field_oid" id="Czsj]a1TUk|+~h~ORP[b">
                      <field name="oid">deconz.0.Sensors.2.presence</field>
                    </shadow>
                  </value>
                  <statement name="STATEMENT">
                    <block type="timeouts_cleartimeout" id=".AnY7,uE8z6%68I_9r!J">
                      <field name="NAME">timeout</field>
                      <next>
                        <block type="controls_if" id="+RZ{~*8u`F-{891w*mat">
                          <value name="IF0">
                            <block type="logic_operation" id="WMPSk~z%).|`E/DHlrcn" inline="false">
                              <field name="OP">AND</field>
                              <value name="A">
                                <block type="logic_negate" id="C4LtUkpka$={[9/VCOva">
                                  <value name="BOOL">
                                    <block type="on_source" id="+d+_sgAE*[8U#u/8-`=!">
                                      <field name="ATTR">state.val</field>
                                    </block>
                                  </value>
                                </block>
                              </value>
                              <value name="B">
                                <block type="logic_negate" id="W1{FG$?i1lP8NHMpEzzu">
                                  <value name="BOOL">
                                    <block type="variables_get" id="B^v6/7~q9mb|4}(2Qk$c">
                                      <field name="VAR" id="#?8llkQ_(?e?!}{7|0%B">duschen</field>
                                    </block>
                                  </value>
                                </block>
                              </value>
                            </block>
                          </value>
                          <statement name="DO0">
                            <block type="timeouts_settimeout" id="b8c{g!jXe$]dFOh^QXP[">
                              <field name="NAME">timeout</field>
                              <field name="DELAY">30</field>
                              <field name="UNIT">sec</field>
                              <statement name="STATEMENT">
                                <block type="comment" id="vvNPR8V{Zt(;|2~TmxfO">
                                  <field name="COMMENT">Licht ein?</field>
                                  <next>
                                    <block type="controls_if" id="ub/zHL/V?|rXYe|9Al6y">
                                      <value name="IF0">
                                        <block type="get_value" id="FrcZZNPN%#R(^G6NN|LM">
                                          <field name="ATTR">val</field>
                                          <field name="OID">sonoff.0.Badezimmerlicht.POWER</field>
                                        </block>
                                      </value>
                                      <statement name="DO0">
                                        <block type="control" id="$86HuP~`N{LaY4I7md,3">
                                          <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                          <field name="OID">sonoff.0.Badezimmerlicht.POWER</field>
                                          <field name="WITH_DELAY">FALSE</field>
                                          <value name="VALUE">
                                            <block type="logic_boolean" id="1UP*Me:;gW3cC?+vbh94">
                                              <field name="BOOL">FALSE</field>
                                            </block>
                                          </value>
                                        </block>
                                      </statement>
                                    </block>
                                  </next>
                                </block>
                              </statement>
                            </block>
                          </statement>
                        </block>
                      </next>
                    </block>
                  </statement>
                  <next>
                    <block type="comment" id="#NX^q_VjK@F9iUWAWPA}">
                      <field name="COMMENT">Tür öffnet</field>
                      <next>
                        <block type="on_ext" id="/V]t?I@Gjkc^eMR_n#)|">
                          <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="z.rf;Ppk-,EU=pVr7wQN">
                              <field name="oid">deconz.0.Sensors.5.open</field>
                            </shadow>
                          </value>
                          <statement name="STATEMENT">
                            <block type="comment" id="S+(!XQne8~@_%_R_(8!Q">
                              <field name="COMMENT">dunkel und Licht aus?</field>
                              <next>
                                <block type="controls_if" id="!muI`Yamueo@M|l(k(*v">
                                  <value name="IF0">
                                    <block type="logic_operation" id="F[YWS@t_RdTz=1pg)U=J" inline="false">
                                      <field name="OP">AND</field>
                                      <value name="A">
                                        <block type="logic_negate" id="iUk6};go{0_ftNa[9VUb">
                                          <value name="BOOL">
                                            <block type="get_value" id="2NG.@e5:!/WW%;U$]|v`">
                                              <field name="ATTR">val</field>
                                              <field name="OID">deconz.0.Sensors.1.daylight</field>
                                            </block>
                                          </value>
                                        </block>
                                      </value>
                                      <value name="B">
                                        <block type="logic_negate" id="QzU)|^M:2SQsEF%CPjDi">
                                          <value name="BOOL">
                                            <block type="get_value" id="+gD/U?X!ZU|7OJiYPclr">
                                              <field name="ATTR">val</field>
                                              <field name="OID">sonoff.0.Badezimmerlicht.POWER</field>
                                            </block>
                                          </value>
                                        </block>
                                      </value>
                                    </block>
                                  </value>
                                  <statement name="DO0">
                                    <block type="control" id=":TjQf-tu@Q#kgie^P)@o">
                                      <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                      <field name="OID">sonoff.0.Badezimmerlicht.POWER</field>
                                      <field name="WITH_DELAY">FALSE</field>
                                      <value name="VALUE">
                                        <block type="logic_boolean" id="*ClGOYPry2taM^E+%*n#">
                                          <field name="BOOL">TRUE</field>
                                        </block>
                                      </value>
                                    </block>
                                  </statement>
                                  <next>
                                    <block type="variables_set" id="Yv+SY!mIdF7[u6`DuzRn">
                                      <field name="VAR" id="#?8llkQ_(?e?!}{7|0%B">duschen</field>
                                      <value name="VALUE">
                                        <block type="logic_boolean" id="7{xAyMA5Inv$Sj56J$Xs">
                                          <field name="BOOL">FALSE</field>
                                        </block>
                                      </value>
                                    </block>
                                  </next>
                                </block>
                              </next>
                            </block>
                          </statement>
                        </block>
                      </next>
                    </block>
                  </next>
                </block>
              </next>
            </block>
          </next>
        </block>
      </xml>
      

      padrino 1 Reply Last reply Reply Quote 0
      • padrino
        padrino Most Active @paul53 last edited by

        @paul53
        Passt meins nicht? 🤔😔

        paul53 1 Reply Last reply Reply Quote 0
        • paul53
          paul53 @padrino last edited by

          @padrino sagte:

          Passt meins nicht?

          Wenn das stimmt ?

          @padrino sagte in [Gelöst] HUE Motion Sensor Lampe an/aus -> Problem Haustier:

          Wenn Du drückst und der Wert war "1002" ist er danach immer noch "1002" - wenn auch "aktualisiert".

          , dann nicht.

          padrino 1 Reply Last reply Reply Quote 0
          • padrino
            padrino Most Active @paul53 last edited by padrino

            @paul53
            Ich war doch schon weiter. 😉
            Aber es interessiert mich, lerne gerne (aus Fehlern). 😌

            Sanweb 1 Reply Last reply Reply Quote 0
            • Sanweb
              Sanweb @padrino last edited by Sanweb

              @padrino @paul53

              Beide Scripte funktionieren leider nicht. Ich habe beide Scripte erstellt und als erstes erst einmal getestet, wenn ich die Tür auf und zu mache, ob das Licht an geht und sich nach dem Timeout wieder ausschaltet. Ergebnis war: Tür ging auf und zu, Licht ging an und nicht wieder aus ... Der Datenpunkt von "Buttonevent" stand vor öffnen der Tür auf 1002, auch wenn ich ihn händisch mal auf 0 setze, ist das Ergebnis gleich, das Licht geht nicht wieder aus bei Tür auf und zu machen ohne Nutzung des Buttons.

              Badezimmer_7.jpg

              <xml xmlns="https://developers.google.com/blockly/xml">
                <variables>
                  <variable id="#?8llkQ_(?e?!}{7|0%B">duschen</variable>
                  <variable type="timeout" id="timeout">timeout</variable>
                </variables>
                <block type="comment" id="^H8S@6|A=FINJo802%?S" x="788" y="-2612">
                  <field name="COMMENT">Button</field>
                  <next>
                    <block type="on_ext" id="JT^Sb~%?woKrqm#,_x?/">
                      <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
                      <field name="CONDITION">any</field>
                      <field name="ACK_CONDITION"></field>
                      <value name="OID0">
                        <shadow type="field_oid" id="g+hFwJ/p}d6]YQ~EspD*">
                          <field name="oid">deconz.0.Sensors.15.buttonevent</field>
                        </shadow>
                      </value>
                      <statement name="STATEMENT">
                        <block type="controls_if" id="5t#hR+Cr;XhCLt708]?;">
                          <value name="IF0">
                            <block type="logic_compare" id="*0/lSkBjPe!Q0-7A]`}t">
                              <field name="OP">EQ</field>
                              <value name="A">
                                <block type="on_source" id="p;(Kh@GTK/#PhbUs|2Fk">
                                  <field name="ATTR">state.val</field>
                                </block>
                              </value>
                              <value name="B">
                                <block type="math_number" id="L}L-PyHNK43~ZBR#G]Yv">
                                  <field name="NUM">1002</field>
                                </block>
                              </value>
                            </block>
                          </value>
                          <statement name="DO0">
                            <block type="timeouts_cleartimeout" id="jv6hg}OB#s?,w0H*NI_d">
                              <field name="NAME">timeout</field>
                              <next>
                                <block type="variables_set" id="IQn)a22MZbX!@$BeNSbo">
                                  <field name="VAR" id="#?8llkQ_(?e?!}{7|0%B">duschen</field>
                                  <value name="VALUE">
                                    <block type="logic_boolean" id=",=d^~(K|T,0?]S978@zB">
                                      <field name="BOOL">TRUE</field>
                                    </block>
                                  </value>
                                </block>
                              </next>
                            </block>
                          </statement>
                        </block>
                      </statement>
                      <next>
                        <block type="comment" id="j^MxUgu8?7{mlu]rA:Tf">
                          <field name="COMMENT">Bewegung</field>
                          <next>
                            <block type="on_ext" id="Vo2d_MmTq==sR.4ZWR$O">
                              <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
                              <field name="CONDITION">ne</field>
                              <field name="ACK_CONDITION"></field>
                              <value name="OID0">
                                <shadow type="field_oid" id="Czsj]a1TUk|+~h~ORP[b">
                                  <field name="oid">deconz.0.Sensors.2.presence</field>
                                </shadow>
                              </value>
                              <statement name="STATEMENT">
                                <block type="timeouts_cleartimeout" id=".AnY7,uE8z6%68I_9r!J">
                                  <field name="NAME">timeout</field>
                                  <next>
                                    <block type="controls_if" id="+RZ{~*8u`F-{891w*mat">
                                      <value name="IF0">
                                        <block type="logic_operation" id="WMPSk~z%).|`E/DHlrcn" inline="false">
                                          <field name="OP">AND</field>
                                          <value name="A">
                                            <block type="logic_negate" id="C4LtUkpka$={[9/VCOva">
                                              <value name="BOOL">
                                                <block type="on_source" id="+d+_sgAE*[8U#u/8-`=!">
                                                  <field name="ATTR">state.val</field>
                                                </block>
                                              </value>
                                            </block>
                                          </value>
                                          <value name="B">
                                            <block type="logic_negate" id="W1{FG$?i1lP8NHMpEzzu">
                                              <value name="BOOL">
                                                <block type="variables_get" id="B^v6/7~q9mb|4}(2Qk$c">
                                                  <field name="VAR" id="#?8llkQ_(?e?!}{7|0%B">duschen</field>
                                                </block>
                                              </value>
                                            </block>
                                          </value>
                                        </block>
                                      </value>
                                      <statement name="DO0">
                                        <block type="timeouts_settimeout" id="b8c{g!jXe$]dFOh^QXP[">
                                          <field name="NAME">timeout</field>
                                          <field name="DELAY">30</field>
                                          <field name="UNIT">sec</field>
                                          <statement name="STATEMENT">
                                            <block type="comment" id="vvNPR8V{Zt(;|2~TmxfO">
                                              <field name="COMMENT">Licht ein?</field>
                                              <next>
                                                <block type="controls_if" id="ub/zHL/V?|rXYe|9Al6y">
                                                  <value name="IF0">
                                                    <block type="get_value" id="FrcZZNPN%#R(^G6NN|LM">
                                                      <field name="ATTR">val</field>
                                                      <field name="OID">sonoff.0.Badezimmerlicht.POWER</field>
                                                    </block>
                                                  </value>
                                                  <statement name="DO0">
                                                    <block type="control" id="$86HuP~`N{LaY4I7md,3">
                                                      <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                      <field name="OID">sonoff.0.Badezimmerlicht.POWER</field>
                                                      <field name="WITH_DELAY">FALSE</field>
                                                      <value name="VALUE">
                                                        <block type="logic_boolean" id="1UP*Me:;gW3cC?+vbh94">
                                                          <field name="BOOL">FALSE</field>
                                                        </block>
                                                      </value>
                                                    </block>
                                                  </statement>
                                                </block>
                                              </next>
                                            </block>
                                          </statement>
                                        </block>
                                      </statement>
                                    </block>
                                  </next>
                                </block>
                              </statement>
                              <next>
                                <block type="comment" id="#NX^q_VjK@F9iUWAWPA}">
                                  <field name="COMMENT">Tür öffnet</field>
                                  <next>
                                    <block type="on_ext" id="/V]t?I@Gjkc^eMR_n#)|">
                                      <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="z.rf;Ppk-,EU=pVr7wQN">
                                          <field name="oid">deconz.0.Sensors.5.open</field>
                                        </shadow>
                                      </value>
                                      <statement name="STATEMENT">
                                        <block type="comment" id="S+(!XQne8~@_%_R_(8!Q">
                                          <field name="COMMENT">dunkel und Licht aus?</field>
                                          <next>
                                            <block type="controls_if" id="!muI`Yamueo@M|l(k(*v">
                                              <value name="IF0">
                                                <block type="logic_operation" id="F[YWS@t_RdTz=1pg)U=J" inline="false">
                                                  <field name="OP">AND</field>
                                                  <value name="A">
                                                    <block type="logic_negate" id="iUk6};go{0_ftNa[9VUb">
                                                      <value name="BOOL">
                                                        <block type="get_value" id="2NG.@e5:!/WW%;U$]|v`">
                                                          <field name="ATTR">val</field>
                                                          <field name="OID">deconz.0.Sensors.1.daylight</field>
                                                        </block>
                                                      </value>
                                                    </block>
                                                  </value>
                                                  <value name="B">
                                                    <block type="logic_negate" id="QzU)|^M:2SQsEF%CPjDi">
                                                      <value name="BOOL">
                                                        <block type="get_value" id="+gD/U?X!ZU|7OJiYPclr">
                                                          <field name="ATTR">val</field>
                                                          <field name="OID">sonoff.0.Badezimmerlicht.POWER</field>
                                                        </block>
                                                      </value>
                                                    </block>
                                                  </value>
                                                </block>
                                              </value>
                                              <statement name="DO0">
                                                <block type="control" id=":TjQf-tu@Q#kgie^P)@o">
                                                  <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                  <field name="OID">sonoff.0.Badezimmerlicht.POWER</field>
                                                  <field name="WITH_DELAY">FALSE</field>
                                                  <value name="VALUE">
                                                    <block type="logic_boolean" id="*ClGOYPry2taM^E+%*n#">
                                                      <field name="BOOL">TRUE</field>
                                                    </block>
                                                  </value>
                                                </block>
                                              </statement>
                                              <next>
                                                <block type="variables_set" id="Yv+SY!mIdF7[u6`DuzRn">
                                                  <field name="VAR" id="#?8llkQ_(?e?!}{7|0%B">duschen</field>
                                                  <value name="VALUE">
                                                    <block type="logic_boolean" id="7{xAyMA5Inv$Sj56J$Xs">
                                                      <field name="BOOL">FALSE</field>
                                                    </block>
                                                  </value>
                                                </block>
                                              </next>
                                            </block>
                                          </next>
                                        </block>
                                      </statement>
                                    </block>
                                  </next>
                                </block>
                              </next>
                            </block>
                          </next>
                        </block>
                      </next>
                    </block>
                  </next>
                </block>
              </xml>
              

              paul53 1 Reply Last reply Reply Quote 0
              • paul53
                paul53 @Sanweb last edited by paul53

                @Sanweb sagte:

                das Licht geht nicht wieder aus bei Tür auf und zu machen ohne Nutzung des Buttons.

                Dann logge mal das Verhalten von "buttonevent" mit einem Debug output Wert vor der Abfrage auf Wert == 1002.

                1 Reply Last reply Reply Quote 0
                • paul53
                  paul53 @Sanweb last edited by paul53

                  @Sanweb sagte:

                  Der Datenpunkt "buttonpressed" steht stets IMMER auf 0, sofern KEINE Aktion mit dem Button erfolgt. Erst wenn der Button z.B. kurz gedrückt wird, springt er von "0" auf "1002" und dann wieder automatisch zurück auf "0". Also "1002" wird von Beginn bis Ende des "Drückvorganges" gesetzt, wird zu lange gedrückt, erscheint der Wert "1003".

                  Das widerspricht der Aussage:
                  @Sanweb sagte in [Gelöst] HUE Motion Sensor Lampe an/aus -> Problem Haustier:

                  Der Datenpunkt von "Buttonevent" stand vor öffnen der Tür auf 1002,

                  Ich habe irgendwo gelesen, dass 1002 "loslassen" und 1000 "drücken" entspricht. Dann müsste mit 1000 verglichen werden.

                  EDIT: Kann man nicht Release after press verwenden ?

                  Blockly_temp.JPG

                  Sanweb 1 Reply Last reply Reply Quote 0
                  • Sanweb
                    Sanweb @paul53 last edited by Sanweb

                    @paul53
                    es Widerspricht nicht meiner Aussage, da ich in meinem Beitrag z.B. vom 18.08. z.B. den Datenpunkt "sensor 15 buttonpressed" zuerst benutzt hatte, welcher nicht stehen blieb und beim drücken den Wert "1002" gab und beim los lassen den Wert "0" widergab. Da ich mit diesem "gespringe" nicht zurecht kam, schrieb ich am 20.08., das ich auf den manipulierbaren Datenpunkt "Sensor 15 buttonevent" gewechselt bin. Diesen Datenpunkt hast Du auch in Deinem Scriptvorschlag ja auch benutzt.

                    Habe eben einmal das Script auf den alten Datenpunkt "Sensor 15 buttonpressed" abgeändert und neu gestestet. Den Datenpunkt " ... release_press" wäre sicherlich auch verwendbar, der wird aber so schnell von iobroker aktuallisiert, das ich auf Anhie nicht sagen könnte, ob er überhaupt auf "true" gestanden hat .... 😀

                    Müsste ich dennoch jetzt vergleichen, ob "1002" oder "0" steht, da nun "Objekt wurde aktuallisiert" benutzt wird? DA es funktioniert, wohl offenbar nicht ...

                    Funktioniert jetzt tadellos wie es soll. Vielen Dank für deine/eure Hilfe.

                    Lieber Paul, bei Dir bin ich mittlerweile sehr erstaunt, wie Du Dir "mal eben so" die ganzen Scripte anscheinend regelrecht aus dem "Ärmel schüttelst" ... 😆 👏

                    "

                    paul53 1 Reply Last reply Reply Quote 0
                    • paul53
                      paul53 @Sanweb last edited by

                      @Sanweb sagte:

                      Funktioniert jetzt tadellos wie es soll.

                      Mit welchem Button-Datenpunkt ?

                      Sanweb 1 Reply Last reply Reply Quote 0
                      • Sanweb
                        Sanweb @paul53 last edited by Sanweb

                        @paul53

                        Badezimmer_8.jpg

                        <xml xmlns="https://developers.google.com/blockly/xml">
                         <variables>
                           <variable id="#?8llkQ_(?e?!}{7|0%B">duschen</variable>
                           <variable type="timeout" id="timeout">timeout</variable>
                         </variables>
                         <block type="comment" id="^H8S@6|A=FINJo802%?S" x="788" y="-2612">
                           <field name="COMMENT">Button</field>
                           <next>
                             <block type="on_ext" id="JT^Sb~%?woKrqm#,_x?/">
                               <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
                               <field name="CONDITION">any</field>
                               <field name="ACK_CONDITION"></field>
                               <value name="OID0">
                                 <shadow type="field_oid" id="g+hFwJ/p}d6]YQ~EspD*">
                                   <field name="oid">deconz.0.Sensors.15.buttonpressed</field>
                                 </shadow>
                               </value>
                               <statement name="STATEMENT">
                                 <block type="controls_if" id="5t#hR+Cr;XhCLt708]?;">
                                   <value name="IF0">
                                     <block type="logic_compare" id="*0/lSkBjPe!Q0-7A]`}t">
                                       <field name="OP">EQ</field>
                                       <value name="A">
                                         <block type="on_source" id="p;(Kh@GTK/#PhbUs|2Fk">
                                           <field name="ATTR">state.val</field>
                                         </block>
                                       </value>
                                       <value name="B">
                                         <block type="math_number" id="L}L-PyHNK43~ZBR#G]Yv">
                                           <field name="NUM">1002</field>
                                         </block>
                                       </value>
                                     </block>
                                   </value>
                                   <statement name="DO0">
                                     <block type="timeouts_cleartimeout" id="jv6hg}OB#s?,w0H*NI_d">
                                       <field name="NAME">timeout</field>
                                       <next>
                                         <block type="variables_set" id="IQn)a22MZbX!@$BeNSbo">
                                           <field name="VAR" id="#?8llkQ_(?e?!}{7|0%B">duschen</field>
                                           <value name="VALUE">
                                             <block type="logic_boolean" id=",=d^~(K|T,0?]S978@zB">
                                               <field name="BOOL">TRUE</field>
                                             </block>
                                           </value>
                                         </block>
                                       </next>
                                     </block>
                                   </statement>
                                 </block>
                               </statement>
                               <next>
                                 <block type="comment" id="j^MxUgu8?7{mlu]rA:Tf">
                                   <field name="COMMENT">Bewegung</field>
                                   <next>
                                     <block type="on_ext" id="Vo2d_MmTq==sR.4ZWR$O">
                                       <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
                                       <field name="CONDITION">ne</field>
                                       <field name="ACK_CONDITION"></field>
                                       <value name="OID0">
                                         <shadow type="field_oid" id="Czsj]a1TUk|+~h~ORP[b">
                                           <field name="oid">deconz.0.Sensors.2.presence</field>
                                         </shadow>
                                       </value>
                                       <statement name="STATEMENT">
                                         <block type="timeouts_cleartimeout" id=".AnY7,uE8z6%68I_9r!J">
                                           <field name="NAME">timeout</field>
                                           <next>
                                             <block type="controls_if" id="+RZ{~*8u`F-{891w*mat">
                                               <value name="IF0">
                                                 <block type="logic_operation" id="WMPSk~z%).|`E/DHlrcn" inline="false">
                                                   <field name="OP">AND</field>
                                                   <value name="A">
                                                     <block type="logic_negate" id="C4LtUkpka$={[9/VCOva">
                                                       <value name="BOOL">
                                                         <block type="on_source" id="+d+_sgAE*[8U#u/8-`=!">
                                                           <field name="ATTR">state.val</field>
                                                         </block>
                                                       </value>
                                                     </block>
                                                   </value>
                                                   <value name="B">
                                                     <block type="logic_negate" id="W1{FG$?i1lP8NHMpEzzu">
                                                       <value name="BOOL">
                                                         <block type="variables_get" id="B^v6/7~q9mb|4}(2Qk$c">
                                                           <field name="VAR" id="#?8llkQ_(?e?!}{7|0%B">duschen</field>
                                                         </block>
                                                       </value>
                                                     </block>
                                                   </value>
                                                 </block>
                                               </value>
                                               <statement name="DO0">
                                                 <block type="timeouts_settimeout" id="b8c{g!jXe$]dFOh^QXP[">
                                                   <field name="NAME">timeout</field>
                                                   <field name="DELAY">30</field>
                                                   <field name="UNIT">sec</field>
                                                   <statement name="STATEMENT">
                                                     <block type="comment" id="vvNPR8V{Zt(;|2~TmxfO">
                                                       <field name="COMMENT">Licht ein?</field>
                                                       <next>
                                                         <block type="controls_if" id="ub/zHL/V?|rXYe|9Al6y">
                                                           <value name="IF0">
                                                             <block type="get_value" id="FrcZZNPN%#R(^G6NN|LM">
                                                               <field name="ATTR">val</field>
                                                               <field name="OID">sonoff.0.Badezimmerlicht.POWER</field>
                                                             </block>
                                                           </value>
                                                           <statement name="DO0">
                                                             <block type="control" id="$86HuP~`N{LaY4I7md,3">
                                                               <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                               <field name="OID">sonoff.0.Badezimmerlicht.POWER</field>
                                                               <field name="WITH_DELAY">FALSE</field>
                                                               <value name="VALUE">
                                                                 <block type="logic_boolean" id="1UP*Me:;gW3cC?+vbh94">
                                                                   <field name="BOOL">FALSE</field>
                                                                 </block>
                                                               </value>
                                                             </block>
                                                           </statement>
                                                         </block>
                                                       </next>
                                                     </block>
                                                   </statement>
                                                 </block>
                                               </statement>
                                             </block>
                                           </next>
                                         </block>
                                       </statement>
                                       <next>
                                         <block type="comment" id="#NX^q_VjK@F9iUWAWPA}">
                                           <field name="COMMENT">Tür öffnet</field>
                                           <next>
                                             <block type="on_ext" id="/V]t?I@Gjkc^eMR_n#)|">
                                               <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="z.rf;Ppk-,EU=pVr7wQN">
                                                   <field name="oid">deconz.0.Sensors.5.open</field>
                                                 </shadow>
                                               </value>
                                               <statement name="STATEMENT">
                                                 <block type="comment" id="S+(!XQne8~@_%_R_(8!Q">
                                                   <field name="COMMENT">dunkel und Licht aus?</field>
                                                   <next>
                                                     <block type="controls_if" id="!muI`Yamueo@M|l(k(*v">
                                                       <value name="IF0">
                                                         <block type="logic_operation" id="F[YWS@t_RdTz=1pg)U=J" inline="false">
                                                           <field name="OP">AND</field>
                                                           <value name="A">
                                                             <block type="logic_negate" id="iUk6};go{0_ftNa[9VUb">
                                                               <value name="BOOL">
                                                                 <block type="get_value" id="2NG.@e5:!/WW%;U$]|v`">
                                                                   <field name="ATTR">val</field>
                                                                   <field name="OID">deconz.0.Sensors.1.dark</field>
                                                                 </block>
                                                               </value>
                                                             </block>
                                                           </value>
                                                           <value name="B">
                                                             <block type="logic_negate" id="QzU)|^M:2SQsEF%CPjDi">
                                                               <value name="BOOL">
                                                                 <block type="get_value" id="+gD/U?X!ZU|7OJiYPclr">
                                                                   <field name="ATTR">val</field>
                                                                   <field name="OID">sonoff.0.Badezimmerlicht.POWER</field>
                                                                 </block>
                                                               </value>
                                                             </block>
                                                           </value>
                                                         </block>
                                                       </value>
                                                       <statement name="DO0">
                                                         <block type="control" id=":TjQf-tu@Q#kgie^P)@o">
                                                           <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                           <field name="OID">sonoff.0.Badezimmerlicht.POWER</field>
                                                           <field name="WITH_DELAY">FALSE</field>
                                                           <value name="VALUE">
                                                             <block type="logic_boolean" id="*ClGOYPry2taM^E+%*n#">
                                                               <field name="BOOL">TRUE</field>
                                                             </block>
                                                           </value>
                                                         </block>
                                                       </statement>
                                                       <next>
                                                         <block type="variables_set" id="Yv+SY!mIdF7[u6`DuzRn">
                                                           <field name="VAR" id="#?8llkQ_(?e?!}{7|0%B">duschen</field>
                                                           <value name="VALUE">
                                                             <block type="logic_boolean" id="7{xAyMA5Inv$Sj56J$Xs">
                                                               <field name="BOOL">FALSE</field>
                                                             </block>
                                                           </value>
                                                         </block>
                                                       </next>
                                                     </block>
                                                   </next>
                                                 </block>
                                               </statement>
                                             </block>
                                           </next>
                                         </block>
                                       </next>
                                     </block>
                                   </next>
                                 </block>
                               </next>
                             </block>
                           </next>
                         </block>
                        </xml>
                        

                        Muss da dennoch der vergleich auf "0" mit rein? Also mit "sonst setzte duschen auf falsch"?

                        paul53 padrino 2 Replies Last reply Reply Quote 0
                        • paul53
                          paul53 @Sanweb last edited by paul53

                          @Sanweb sagte:

                          Muss da dennoch der vergleich auf "0" mit rein? Also mit "sonst setzte duschen auf falsch"?

                          Nein, "setze duschen auf falsch" darf nur beim Tür öffnen erfolgen.

                          1 Reply Last reply Reply Quote 0
                          • padrino
                            padrino Most Active @Sanweb last edited by

                            @Sanweb
                            Könntest Du mein Skript mal mit dem richtigen Datenpunkt testen, da mich interessiert, ob es läuft. 😃
                            Finde auch das von Paul sind nicht soviel anders aus. 😉

                            paul53 1 Reply Last reply Reply Quote 0
                            • paul53
                              paul53 @padrino last edited by paul53

                              @padrino sagte:

                              @Sanweb Könntest Du mein Skript mal mit dem richtigen Datenpunkt testen, da mich interessiert, ob es läuft.

                              Mit dem richtigen Datenpunkt "buttonpressed" wird es funktionieren. "stop timeout" im mache-Zweig ist unnötig, da es bei jedem Trigger erfolgt.

                              Sanweb 1 Reply Last reply Reply Quote 0
                              • Sanweb
                                Sanweb @paul53 last edited by

                                @padrino
                                Habe Deines auch noch einmal ausprobiert, wie Paul schon schrieb, funktioniert Deines ebenfalls mit dem nun richtigen Datenpunkt. 👏 😁

                                1 Reply Last reply Reply Quote 0
                                • First post
                                  Last post

                                Support us

                                ioBroker
                                Community Adapters
                                Donate

                                852
                                Online

                                32.0k
                                Users

                                80.5k
                                Topics

                                1.3m
                                Posts

                                3
                                31
                                4024
                                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