Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Blockly
    5. Bewegungsmelder

    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

    Bewegungsmelder

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

      Liebe Spezis,

      ich verzweifle 😖

      Folgendes möchte ich realisieren:

      1.) Das Licht soll nur über einen Taster eingeschaltet werden und im Raum befindet sich zusätzlich ein Xiaomi Bewegungssensor.
      Nachdem keine Bewegung mehr erkannt wird, z.B. 2 Minuten und das Licht nicht per Taster ausgeschaltet wurde, soll das Licht automatisch ausgehen.

      2.) Wenn der Taster betätigt wird und keine Bewegung innerhalb von z.B. 70 Sek. festgetsellt wird, dann soll das Licht ebenfalls ausgehen.

      Zur Info: Der Xiaomi BWM hat unter anderem "Time from last motion", das nach 60 Sek. alle 10 Sek. aktualisiert wird bis 1810 Sekunden.

      Für ein Paar Tipps wäre ich unendlich dankbar

      D paul53 A 3 Replies Last reply Reply Quote 0
      • D
        Dragon @ASMM last edited by

        @ASMM Wenn du das mit Xiaomi BWM Machen möchtest musst du als erstes den HW Mod einbauen, damit er alle 5 sek. meldet. Dann sollte das ganze kein Problem sein mit einem Blockly zu bauen...

        A 1 Reply Last reply Reply Quote 0
        • A
          ASMM @Dragon last edited by ASMM

          @David-Froebus
          Dann korrigiere ich den Fall 2 auf 70 Sek. ☺
          Auf die eine oder andere Minute kommt es nicht an.
          Kann man dafür einen Script bauen ???

          D P 2 Replies Last reply Reply Quote 0
          • D
            Dragon @ASMM last edited by

            @ASMM Mom baue da mal was zusammen

            1 Reply Last reply Reply Quote 0
            • P
              plastomer @ASMM last edited by

              @ASMM
              Dafür gibt es einen Adapter:
              https://forum.iobroker.net/topic/36053/test-adapter-smartcontrol-0-2-x-github-ab-18-08-20

              Für den Xiaomi BWM gibt es hier auch Anleitungen, damit er schneller reagiert, einfach mal Google.

              1 Reply Last reply Reply Quote 0
              • D
                Dragon last edited by Dragon

                Versuch.jpg

                Ich würd es so versuchen...

                A Asgothian 2 Replies Last reply Reply Quote 0
                • A
                  ASMM @Dragon last edited by

                  @David-Froebus
                  Ich werde es testen und so bald es geht das Ergebnis posten.
                  Erstmal vielen Dank für deine Bemühungen 👍

                  1 Reply Last reply Reply Quote 0
                  • D
                    Dragon last edited by

                    <xml xmlns="https://developers.google.com/blockly/xml">
                      <variables>
                        <variable id=":fiQ@Ot,b8r$.QwlWq(U">Count</variable>
                        <variable type="interval" id="Intervall">Intervall</variable>
                        <variable type="interval" id="Intervall2">Intervall2</variable>
                      </variables>
                      <block type="on_ext" id="0)xVnkW`7Ij8iSU4CiE;" x="-937" y="-687">
                        <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="yod!wxpP`@b@#;3xf}`D">
                            <field name="oid">sonoff.0.Badezimmer-Deckenlampe.POWER</field>
                          </shadow>
                        </value>
                        <statement name="STATEMENT">
                          <block type="controls_if" id="C2fZ56U1t)4V-(67H4fA">
                            <mutation else="1"></mutation>
                            <value name="IF0">
                              <block type="logic_compare" id="rgpE?}H,a,v!,cXhPhi_">
                                <field name="OP">EQ</field>
                                <value name="A">
                                  <block type="on_source" id="pAyf:(p._Yk2jY6LHMWr">
                                    <field name="ATTR">state.val</field>
                                  </block>
                                </value>
                                <value name="B">
                                  <block type="logic_boolean" id="5#{AfXpijg8,KHV(.TCq">
                                    <field name="BOOL">TRUE</field>
                                  </block>
                                </value>
                              </block>
                            </value>
                            <statement name="DO0">
                              <block type="variables_set" id="-oJ[G^t[,oQ4,Uo{rC,@">
                                <field name="VAR" id=":fiQ@Ot,b8r$.QwlWq(U">Count</field>
                                <value name="VALUE">
                                  <block type="math_number" id="q%]O:=o]9h?]3-X~Iys_">
                                    <field name="NUM">70</field>
                                  </block>
                                </value>
                                <next>
                                  <block type="timeouts_setinterval" id="w6pphAidF-m9tm,zM*GB">
                                    <field name="NAME">Intervall</field>
                                    <field name="INTERVAL">1</field>
                                    <field name="UNIT">sec</field>
                                    <statement name="STATEMENT">
                                      <block type="math_change" id="5`Yp[(OXfH55CeQ[),,a">
                                        <field name="VAR" id=":fiQ@Ot,b8r$.QwlWq(U">Count</field>
                                        <value name="DELTA">
                                          <shadow type="math_number" id="WR}+IMw~|~vx5gBXG|9}">
                                            <field name="NUM">-1</field>
                                          </shadow>
                                          <block type="math_number" id="JxQ),rY0UmMWM209HN+B">
                                            <field name="NUM">-1</field>
                                          </block>
                                        </value>
                                        <next>
                                          <block type="controls_if" id="kj.l}DPTOyP96]!RtlyG">
                                            <value name="IF0">
                                              <block type="logic_compare" id="q71_W[JQIhFs(^4lROcl">
                                                <field name="OP">EQ</field>
                                                <value name="A">
                                                  <block type="variables_get" id="xUYRbail*|LD^7Ql?9ry">
                                                    <field name="VAR" id=":fiQ@Ot,b8r$.QwlWq(U">Count</field>
                                                  </block>
                                                </value>
                                                <value name="B">
                                                  <block type="math_number" id="9%|m}[WI0KV]jgS$l003">
                                                    <field name="NUM">0</field>
                                                  </block>
                                                </value>
                                              </block>
                                            </value>
                                            <statement name="DO0">
                                              <block type="control" id=":f|t92|DfJQjE_:o.r0)">
                                                <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                <field name="OID">sonoff.0.Badezimmer-Deckenlampe.POWER</field>
                                                <field name="WITH_DELAY">FALSE</field>
                                                <value name="VALUE">
                                                  <block type="logic_boolean" id="d=cQmU`3f{zipj9yO6~.">
                                                    <field name="BOOL">FALSE</field>
                                                  </block>
                                                </value>
                                                <next>
                                                  <block type="timeouts_clearinterval" id="YJO6!A:{w?8J6?dVJp=P">
                                                    <field name="NAME">Intervall</field>
                                                  </block>
                                                </next>
                                              </block>
                                            </statement>
                                          </block>
                                        </next>
                                      </block>
                                    </statement>
                                  </block>
                                </next>
                              </block>
                            </statement>
                            <statement name="ELSE">
                              <block type="timeouts_clearinterval" id="0Gtuh%ZmYST2.c{%B48V">
                                <field name="NAME">Intervall</field>
                                <next>
                                  <block type="variables_set" id="ymUIcHr|,Rzj)/Y#+..a">
                                    <field name="VAR" id=":fiQ@Ot,b8r$.QwlWq(U">Count</field>
                                    <value name="VALUE">
                                      <block type="math_number" id=";1aqLi(SVrdBqS~?eL;H">
                                        <field name="NUM">0</field>
                                      </block>
                                    </value>
                                  </block>
                                </next>
                              </block>
                            </statement>
                          </block>
                        </statement>
                        <next>
                          <block type="on_ext" id="TbYfSlx/shYS^;;0^Kho">
                            <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="4R+S/r,{35HGk#0OM=o@">
                                <field name="oid">zigbee.0.00158d0005228fc3.occupancy</field>
                              </shadow>
                            </value>
                            <statement name="STATEMENT">
                              <block type="controls_if" id="=)uK}]z^3PY$*qw^u)s}">
                                <mutation else="1"></mutation>
                                <value name="IF0">
                                  <block type="logic_compare" id="gdT_O~{8p{R1TMEEa$_{">
                                    <field name="OP">EQ</field>
                                    <value name="A">
                                      <block type="on_source" id="tY;F0F{`a9a6P?84qQ~q">
                                        <field name="ATTR">state.val</field>
                                      </block>
                                    </value>
                                    <value name="B">
                                      <block type="logic_boolean" id="!I/}]hD]SKyvTxuCSFRb">
                                        <field name="BOOL">TRUE</field>
                                      </block>
                                    </value>
                                  </block>
                                </value>
                                <statement name="DO0">
                                  <block type="timeouts_clearinterval" id="0WY9+PPk{6T5rMkKT{]U">
                                    <field name="NAME">Intervall</field>
                                    <next>
                                      <block type="timeouts_clearinterval" id="NXss`9;`#fanB=em,~jR">
                                        <field name="NAME">Intervall2</field>
                                        <next>
                                          <block type="variables_set" id="2T/aE]zz}B{:.|ykAa/n">
                                            <field name="VAR" id=":fiQ@Ot,b8r$.QwlWq(U">Count</field>
                                            <value name="VALUE">
                                              <block type="math_number" id="WjQy9!7:p9EQWq=))2!J">
                                                <field name="NUM">0</field>
                                              </block>
                                            </value>
                                          </block>
                                        </next>
                                      </block>
                                    </next>
                                  </block>
                                </statement>
                                <statement name="ELSE">
                                  <block type="variables_set" id="/-)V9X9KI97p4+h:jpp*">
                                    <field name="VAR" id=":fiQ@Ot,b8r$.QwlWq(U">Count</field>
                                    <value name="VALUE">
                                      <block type="math_number" id="n]S((OmsW81I]X{tf)sx">
                                        <field name="NUM">70</field>
                                      </block>
                                    </value>
                                    <next>
                                      <block type="timeouts_setinterval" id="D!qQ(sJH_4wt9kxq.~kE">
                                        <field name="NAME">Intervall2</field>
                                        <field name="INTERVAL">1</field>
                                        <field name="UNIT">sec</field>
                                        <statement name="STATEMENT">
                                          <block type="math_change" id="hpT3j9:kk*94/Vp.4(#J">
                                            <field name="VAR" id=":fiQ@Ot,b8r$.QwlWq(U">Count</field>
                                            <value name="DELTA">
                                              <shadow type="math_number">
                                                <field name="NUM">-1</field>
                                              </shadow>
                                              <block type="math_number" id="u9?:2giyzs5z~l^jT:jM">
                                                <field name="NUM">-1</field>
                                              </block>
                                            </value>
                                            <next>
                                              <block type="controls_if" id="pX44N^w8HoWf0KSk0/Z9">
                                                <value name="IF0">
                                                  <block type="logic_compare" id="7VR9_*RPB_4=9-0KN9/F">
                                                    <field name="OP">EQ</field>
                                                    <value name="A">
                                                      <block type="variables_get" id="+e*(fTJ6{jn670tV2D}L">
                                                        <field name="VAR" id=":fiQ@Ot,b8r$.QwlWq(U">Count</field>
                                                      </block>
                                                    </value>
                                                    <value name="B">
                                                      <block type="math_number" id="q%UW:q#j+iW,jpJ37Mh%">
                                                        <field name="NUM">0</field>
                                                      </block>
                                                    </value>
                                                  </block>
                                                </value>
                                                <statement name="DO0">
                                                  <block type="control" id="G@uEF-8b_+v:F~(VCd^?">
                                                    <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                    <field name="OID">sonoff.0.Badezimmer-Deckenlampe.POWER</field>
                                                    <field name="WITH_DELAY">FALSE</field>
                                                    <value name="VALUE">
                                                      <block type="logic_boolean" id="Y:O$%hlTJm/y5!t.@{e%">
                                                        <field name="BOOL">FALSE</field>
                                                      </block>
                                                    </value>
                                                    <next>
                                                      <block type="timeouts_clearinterval" id="Xh*o+*3F(qRqGu*-yI@|">
                                                        <field name="NAME">Intervall2</field>
                                                      </block>
                                                    </next>
                                                  </block>
                                                </statement>
                                              </block>
                                            </next>
                                          </block>
                                        </statement>
                                      </block>
                                    </next>
                                  </block>
                                </statement>
                              </block>
                            </statement>
                          </block>
                        </next>
                      </block>
                    </xml>
                    
                    A 1 Reply Last reply Reply Quote 0
                    • A
                      ASMM @Dragon last edited by

                      @David-Froebus
                      RESPEKT !!!!
                      Wahnsinn. Es funktioniert. Tausend Dank dafür schonmal. I hätte es niemals geschafft.

                      Den Ersten Block macht er PERFEKT. Also wenn Lampe eingeschaltet wird und keine Bewegung ferstgestellt wird geht sie wieder aus. TOP !!!

                      Beim zweiten Block folgt eine Bewegung nach dem einschalten des Lichts und es dauert aber 2-3 Minuten nach der letzten Bewegung, bis das Licht wieder aus geht. Das ist jetzt nur zur Info. Für meine Zwecke absolut in Ordnung.

                      Jetzt habe ich noch eine Herausforderung für Dich 😀

                      Folgende Szene:
                      Ich komme in den Raum, der BWM geht auf "true", ich stelle fest, es ist mir doch zu dunkel und schalte jetzt das Licht ein und bewege mich in dem Raum.
                      Jetzt sollte das Licht weiter an bleiben, tut es leider nicht. Es geht nach 70 Sek. aus. Meinst du, das könntest du noch hinkriegen ????

                      D 2 Replies Last reply Reply Quote 1
                      • Asgothian
                        Asgothian Developer @Dragon last edited by

                        @David-Froebus
                        @ASMM
                        Funktional, aber kompliziert. Das gleiche macht:
                        Screenshot 2020-10-12 at 04.58.53.png

                        ohne die ganzen Zähler und so weiter.

                        So sollte es im Übrigen auch schon die "Herausforderung" lösen, denn im Original wird beim Einschalten der Lampe das "intervall2" welches nach aktivieren des BWM die Lampe abschaltet nicht gelöscht, so das auf jeden F all 70 sekunden nach BWM ein die Lampe aus geht.

                        A.

                        A 2 Replies Last reply Reply Quote 0
                        • A
                          ASMM @Asgothian last edited by

                          @Asgothian
                          Vielen Dank.
                          Ich werde es frühestens heute Abend mal testen und berichten.

                          1 Reply Last reply Reply Quote 0
                          • Peoples
                            Peoples last edited by

                            Hatte für Bewegungsmelder und Licht Mal ein kleines Script geschrieben, vielleicht hilft das ja irgendwie weiter

                            https://forum.iobroker.net/topic/21226/vorlage-automatisches-licht

                            1 Reply Last reply Reply Quote 0
                            • D
                              Dragon @ASMM last edited by

                              @ASMM klar, mom mache mir Gedanken.

                              1 Reply Last reply Reply Quote 0
                              • D
                                Dragon @ASMM last edited by Dragon

                                @ASMM sagte in Bewegungsmelder:

                                @David-Froebus
                                RESPEKT !!!!
                                Wahnsinn. Es funktioniert. Tausend Dank dafür schonmal. I hätte es niemals geschafft.

                                Den Ersten Block macht er PERFEKT. Also wenn Lampe eingeschaltet wird und keine Bewegung ferstgestellt wird geht sie wieder aus. TOP !!!

                                Beim zweiten Block folgt eine Bewegung nach dem einschalten des Lichts und es dauert aber 2-3 Minuten nach der letzten Bewegung, bis das Licht wieder aus geht. Das ist jetzt nur zur Info. Für meine Zwecke absolut in Ordnung.

                                Jetzt habe ich noch eine Herausforderung für Dich 😀

                                Folgende Szene:
                                Ich komme in den Raum, der BWM geht auf "true", ich stelle fest, es ist mir doch zu dunkel und schalte jetzt das Licht ein und bewege mich in dem Raum.
                                Jetzt sollte das Licht weiter an bleiben, tut es leider nicht. Es geht nach 70 Sek. aus. Meinst du, das könntest du noch hinkriegen ????

                                Beim zweiten Block, das liegt an dem zu langen Aktualisierungsintervall vom BWM ohne den HW Hack.

                                Habe ich die neue Aufgabe richtig verstanden, dass wenn du in den Raum gehst, das Licht doch anschaltest über den Schalter soll kein Zeitintervall sein sondern das Licht einfach an sein?

                                Versuch2.jpg

                                <xml xmlns="https://developers.google.com/blockly/xml">
                                  <variables>
                                    <variable id=":fiQ@Ot,b8r$.QwlWq(U">Count</variable>
                                    <variable type="interval" id="Intervall">Intervall</variable>
                                    <variable type="interval" id="Intervall2">Intervall2</variable>
                                  </variables>
                                  <block type="on_ext" id="0)xVnkW`7Ij8iSU4CiE;" x="-937" y="-687">
                                    <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="yod!wxpP`@b@#;3xf}`D">
                                        <field name="oid">sonoff.0.Badezimmer-Deckenlampe.POWER</field>
                                      </shadow>
                                    </value>
                                    <statement name="STATEMENT">
                                      <block type="controls_if" id="C2fZ56U1t)4V-(67H4fA">
                                        <mutation elseif="1" else="1"></mutation>
                                        <value name="IF0">
                                          <block type="logic_operation" id="QipXGIVgI1%x$3@2@aK:" inline="false">
                                            <field name="OP">AND</field>
                                            <value name="A">
                                              <block type="logic_compare" id="rgpE?}H,a,v!,cXhPhi_">
                                                <field name="OP">EQ</field>
                                                <value name="A">
                                                  <block type="on_source" id="pAyf:(p._Yk2jY6LHMWr">
                                                    <field name="ATTR">state.val</field>
                                                  </block>
                                                </value>
                                                <value name="B">
                                                  <block type="logic_boolean" id="5#{AfXpijg8,KHV(.TCq">
                                                    <field name="BOOL">TRUE</field>
                                                  </block>
                                                </value>
                                              </block>
                                            </value>
                                            <value name="B">
                                              <block type="logic_compare" id="(#oFrbq_~Qz]oFmEn+s,">
                                                <field name="OP">EQ</field>
                                                <value name="A">
                                                  <block type="get_value" id="GpIrWM.t5PX.9S[a:=NU">
                                                    <field name="ATTR">val</field>
                                                    <field name="OID">zigbee.0.00158d0005228fc3.occupancy</field>
                                                  </block>
                                                </value>
                                                <value name="B">
                                                  <block type="logic_boolean" id="IL.4v+A@n9epTZU%@npJ">
                                                    <field name="BOOL">FALSE</field>
                                                  </block>
                                                </value>
                                              </block>
                                            </value>
                                          </block>
                                        </value>
                                        <statement name="DO0">
                                          <block type="variables_set" id="-oJ[G^t[,oQ4,Uo{rC,@">
                                            <field name="VAR" id=":fiQ@Ot,b8r$.QwlWq(U">Count</field>
                                            <value name="VALUE">
                                              <block type="math_number" id="q%]O:=o]9h?]3-X~Iys_">
                                                <field name="NUM">70</field>
                                              </block>
                                            </value>
                                            <next>
                                              <block type="timeouts_setinterval" id="w6pphAidF-m9tm,zM*GB">
                                                <field name="NAME">Intervall</field>
                                                <field name="INTERVAL">1</field>
                                                <field name="UNIT">sec</field>
                                                <statement name="STATEMENT">
                                                  <block type="math_change" id="5`Yp[(OXfH55CeQ[),,a">
                                                    <field name="VAR" id=":fiQ@Ot,b8r$.QwlWq(U">Count</field>
                                                    <value name="DELTA">
                                                      <shadow type="math_number" id="WR}+IMw~|~vx5gBXG|9}">
                                                        <field name="NUM">-1</field>
                                                      </shadow>
                                                      <block type="math_number" id="JxQ),rY0UmMWM209HN+B">
                                                        <field name="NUM">-1</field>
                                                      </block>
                                                    </value>
                                                    <next>
                                                      <block type="controls_if" id="kj.l}DPTOyP96]!RtlyG">
                                                        <value name="IF0">
                                                          <block type="logic_compare" id="q71_W[JQIhFs(^4lROcl">
                                                            <field name="OP">EQ</field>
                                                            <value name="A">
                                                              <block type="variables_get" id="xUYRbail*|LD^7Ql?9ry">
                                                                <field name="VAR" id=":fiQ@Ot,b8r$.QwlWq(U">Count</field>
                                                              </block>
                                                            </value>
                                                            <value name="B">
                                                              <block type="math_number" id="9%|m}[WI0KV]jgS$l003">
                                                                <field name="NUM">0</field>
                                                              </block>
                                                            </value>
                                                          </block>
                                                        </value>
                                                        <statement name="DO0">
                                                          <block type="control" id=":f|t92|DfJQjE_:o.r0)">
                                                            <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                            <field name="OID">sonoff.0.Badezimmer-Deckenlampe.POWER</field>
                                                            <field name="WITH_DELAY">FALSE</field>
                                                            <value name="VALUE">
                                                              <block type="logic_boolean" id="d=cQmU`3f{zipj9yO6~.">
                                                                <field name="BOOL">FALSE</field>
                                                              </block>
                                                            </value>
                                                            <next>
                                                              <block type="timeouts_clearinterval" id="YJO6!A:{w?8J6?dVJp=P">
                                                                <field name="NAME">Intervall</field>
                                                              </block>
                                                            </next>
                                                          </block>
                                                        </statement>
                                                      </block>
                                                    </next>
                                                  </block>
                                                </statement>
                                              </block>
                                            </next>
                                          </block>
                                        </statement>
                                        <value name="IF1">
                                          <block type="logic_operation" id="Tk3/orljB,%A+XsRTZ|T" inline="false">
                                            <field name="OP">AND</field>
                                            <value name="A">
                                              <block type="logic_compare" id="9v*RYmqc@v2CKsX@]wPn">
                                                <field name="OP">EQ</field>
                                                <value name="A">
                                                  <block type="on_source" id="Sm8`$HM#7!9:cdFus5_0">
                                                    <field name="ATTR">state.val</field>
                                                  </block>
                                                </value>
                                                <value name="B">
                                                  <block type="logic_boolean" id="1pQHCv#0l[wuuV8*_Jp6">
                                                    <field name="BOOL">TRUE</field>
                                                  </block>
                                                </value>
                                              </block>
                                            </value>
                                            <value name="B">
                                              <block type="logic_compare" id="Iy0ZE19SsY-x()~9$3d2">
                                                <field name="OP">EQ</field>
                                                <value name="A">
                                                  <block type="get_value" id="u|F=,nF[kk-kGv@N+okg">
                                                    <field name="ATTR">val</field>
                                                    <field name="OID">zigbee.0.00158d0005228fc3.occupancy</field>
                                                  </block>
                                                </value>
                                                <value name="B">
                                                  <block type="logic_boolean" id="yl?%mWqme{`yGL3qQcW`">
                                                    <field name="BOOL">TRUE</field>
                                                  </block>
                                                </value>
                                              </block>
                                            </value>
                                          </block>
                                        </value>
                                        <statement name="DO1">
                                          <block type="control" id="sN_XHf#l6rJ+IQT~1Ko;">
                                            <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                            <field name="OID">sonoff.0.Badezimmer-Deckenlampe.POWER</field>
                                            <field name="WITH_DELAY">FALSE</field>
                                            <value name="VALUE">
                                              <block type="logic_boolean" id="^}}ggYmSyGv%$$R,H=nB">
                                                <field name="BOOL">TRUE</field>
                                              </block>
                                            </value>
                                          </block>
                                        </statement>
                                        <statement name="ELSE">
                                          <block type="timeouts_clearinterval" id="0Gtuh%ZmYST2.c{%B48V">
                                            <field name="NAME">Intervall</field>
                                            <next>
                                              <block type="variables_set" id="ymUIcHr|,Rzj)/Y#+..a">
                                                <field name="VAR" id=":fiQ@Ot,b8r$.QwlWq(U">Count</field>
                                                <value name="VALUE">
                                                  <block type="math_number" id=";1aqLi(SVrdBqS~?eL;H">
                                                    <field name="NUM">0</field>
                                                  </block>
                                                </value>
                                              </block>
                                            </next>
                                          </block>
                                        </statement>
                                      </block>
                                    </statement>
                                    <next>
                                      <block type="on_ext" id="TbYfSlx/shYS^;;0^Kho">
                                        <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="4R+S/r,{35HGk#0OM=o@">
                                            <field name="oid">zigbee.0.00158d0005228fc3.occupancy</field>
                                          </shadow>
                                        </value>
                                        <statement name="STATEMENT">
                                          <block type="controls_if" id="=)uK}]z^3PY$*qw^u)s}">
                                            <mutation else="1"></mutation>
                                            <value name="IF0">
                                              <block type="logic_compare" id="gdT_O~{8p{R1TMEEa$_{">
                                                <field name="OP">EQ</field>
                                                <value name="A">
                                                  <block type="on_source" id="tY;F0F{`a9a6P?84qQ~q">
                                                    <field name="ATTR">state.val</field>
                                                  </block>
                                                </value>
                                                <value name="B">
                                                  <block type="logic_boolean" id="!I/}]hD]SKyvTxuCSFRb">
                                                    <field name="BOOL">TRUE</field>
                                                  </block>
                                                </value>
                                              </block>
                                            </value>
                                            <statement name="DO0">
                                              <block type="timeouts_clearinterval" id="0WY9+PPk{6T5rMkKT{]U">
                                                <field name="NAME">Intervall</field>
                                                <next>
                                                  <block type="timeouts_clearinterval" id="NXss`9;`#fanB=em,~jR">
                                                    <field name="NAME">Intervall2</field>
                                                    <next>
                                                      <block type="variables_set" id="2T/aE]zz}B{:.|ykAa/n">
                                                        <field name="VAR" id=":fiQ@Ot,b8r$.QwlWq(U">Count</field>
                                                        <value name="VALUE">
                                                          <block type="math_number" id="WjQy9!7:p9EQWq=))2!J">
                                                            <field name="NUM">0</field>
                                                          </block>
                                                        </value>
                                                      </block>
                                                    </next>
                                                  </block>
                                                </next>
                                              </block>
                                            </statement>
                                            <statement name="ELSE">
                                              <block type="variables_set" id="/-)V9X9KI97p4+h:jpp*">
                                                <field name="VAR" id=":fiQ@Ot,b8r$.QwlWq(U">Count</field>
                                                <value name="VALUE">
                                                  <block type="math_number" id="n]S((OmsW81I]X{tf)sx">
                                                    <field name="NUM">70</field>
                                                  </block>
                                                </value>
                                                <next>
                                                  <block type="timeouts_setinterval" id="D!qQ(sJH_4wt9kxq.~kE">
                                                    <field name="NAME">Intervall2</field>
                                                    <field name="INTERVAL">1</field>
                                                    <field name="UNIT">sec</field>
                                                    <statement name="STATEMENT">
                                                      <block type="math_change" id="hpT3j9:kk*94/Vp.4(#J">
                                                        <field name="VAR" id=":fiQ@Ot,b8r$.QwlWq(U">Count</field>
                                                        <value name="DELTA">
                                                          <shadow type="math_number">
                                                            <field name="NUM">-1</field>
                                                          </shadow>
                                                          <block type="math_number" id="u9?:2giyzs5z~l^jT:jM">
                                                            <field name="NUM">-1</field>
                                                          </block>
                                                        </value>
                                                        <next>
                                                          <block type="controls_if" id="pX44N^w8HoWf0KSk0/Z9">
                                                            <value name="IF0">
                                                              <block type="logic_compare" id="7VR9_*RPB_4=9-0KN9/F">
                                                                <field name="OP">EQ</field>
                                                                <value name="A">
                                                                  <block type="variables_get" id="+e*(fTJ6{jn670tV2D}L">
                                                                    <field name="VAR" id=":fiQ@Ot,b8r$.QwlWq(U">Count</field>
                                                                  </block>
                                                                </value>
                                                                <value name="B">
                                                                  <block type="math_number" id="q%UW:q#j+iW,jpJ37Mh%">
                                                                    <field name="NUM">0</field>
                                                                  </block>
                                                                </value>
                                                              </block>
                                                            </value>
                                                            <statement name="DO0">
                                                              <block type="control" id="G@uEF-8b_+v:F~(VCd^?">
                                                                <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                <field name="OID">sonoff.0.Badezimmer-Deckenlampe.POWER</field>
                                                                <field name="WITH_DELAY">FALSE</field>
                                                                <value name="VALUE">
                                                                  <block type="logic_boolean" id="Y:O$%hlTJm/y5!t.@{e%">
                                                                    <field name="BOOL">FALSE</field>
                                                                  </block>
                                                                </value>
                                                                <next>
                                                                  <block type="timeouts_clearinterval" id="Xh*o+*3F(qRqGu*-yI@|">
                                                                    <field name="NAME">Intervall2</field>
                                                                  </block>
                                                                </next>
                                                              </block>
                                                            </statement>
                                                          </block>
                                                        </next>
                                                      </block>
                                                    </statement>
                                                  </block>
                                                </next>
                                              </block>
                                            </statement>
                                          </block>
                                        </statement>
                                      </block>
                                    </next>
                                  </block>
                                </xml>
                                
                                A 1 Reply Last reply Reply Quote 0
                                • paul53
                                  paul53 @ASMM last edited by paul53

                                  @ASMM sagte:

                                  Das Licht soll nur über einen Taster eingeschaltet werden... Nachdem keine Bewegung mehr erkannt wird, z.B. 2 Minuten und das Licht nicht per Taster ausgeschaltet wurde, soll das Licht automatisch ausgehen.
                                  Wenn der Taster betätigt wird und keine Bewegung innerhalb von z.B. 70 Sek. festgetsellt wird, dann soll das Licht ebenfalls ausgehen.

                                  Vorschlag:

                                  Blockly_temp.JPG

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

                                    @paul53 genau, aber genau das hat er ja in der neuen Aufgabe wieder verneint...
                                    Zitat:
                                    Folgende Szene:
                                    Ich komme in den Raum, der BWM geht auf "true", ich stelle fest, es ist mir doch zu dunkel und schalte jetzt das Licht ein und bewege mich in dem Raum.
                                    Jetzt sollte das Licht weiter an bleiben, tut es leider nicht. Es geht nach 70 Sek. aus. Meinst du, das könntest du noch hinkriegen ????

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

                                      @David-Froebus sagte:

                                      tut es leider nicht. Es geht nach 70 Sek. aus

                                      Bei Bewegung wird der 70-s-Timer (timeout2) gestoppt.

                                      1 Reply Last reply Reply Quote 0
                                      • A
                                        ASMM last edited by

                                        Ich bin leider noch nicht dazu gekommne Eure Scripts zu testen. Ich werde mich auf jeden Fall melden und berichten.

                                        @David-Froebus sagte in Bewegungsmelder:

                                        Habe ich die neue Aufgabe richtig verstanden, dass wenn du in den Raum gehst, das Licht doch anschaltest über den Schalter soll kein Zeitintervall sein sondern das Licht einfach an sein?

                                        Grundsätzlich:
                                        1.) Das Licht darf ausschließlich NUR durch den Taster eingeschaltet werden.
                                        2.) Das Licht soll IMMER automatisch ausgehen, nachdem der BWM 2 Min. keine Bewegung mehr meldet.

                                        Dein erster Script ist nahezu perfekt, bis auf eine einzige Szene.
                                        Ich komme in den Raum, dann gehe ich direkt zurück zum Schalter, um das Licht anzumachen. Dann bleibe ich 10 Minuten im Raum und so lange sollte auch das Licht anbleiben. Wenn ich wieder den Raum verlasse und keine Bewegung mehr stattfindet, dann soll das Licht wieder ausgehen.

                                        1 Reply Last reply Reply Quote 0
                                        • A
                                          ASMM @Dragon last edited by ASMM

                                          @David-Froebus

                                          Dein neuer Script läuft 100% so, wie ich es mir vorstelle !!!

                                          Herzlichen Dank, ist ne Kiste Bier Wert 👍

                                          D 1 Reply Last reply Reply Quote 1
                                          • A
                                            ASMM @Asgothian last edited by

                                            @Asgothian

                                            Deinen Script habe ich auch getestet und es sieht wie folgt aus:

                                            1.) Der erste Block funktioniert einwandfrei 👍

                                            2.) Beim zweiten Block geht die Lampe stur nach 70 Sek. Die Bewegung im Raum wird ignoriert.

                                            Trotzdem Danke für deine Bemühungen.

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            502
                                            Online

                                            31.8k
                                            Users

                                            80.0k
                                            Topics

                                            1.3m
                                            Posts

                                            6
                                            24
                                            1575
                                            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