Skip to content
  • Home
  • Aktuell
  • Tags
  • 0 Ungelesen 0
  • Kategorien
  • Unreplied
  • Beliebt
  • GitHub
  • Docu
  • Hilfe
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

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

Community Forum

donate donate
  1. ioBroker Community Home
  2. Deutsch
  3. Skripten / Logik
  4. Blockly
  5. Bewegungsmelder

NEWS

  • Jahresrückblick 2025 – unser neuer Blogbeitrag ist online! ✨
    BluefoxB
    Bluefox
    17
    1
    4.2k

  • Neuer Blogbeitrag: Monatsrückblick - Dezember 2025 🎄
    BluefoxB
    Bluefox
    13
    1
    1.2k

  • Weihnachtsangebot 2025! 🎄
    BluefoxB
    Bluefox
    25
    1
    2.6k

Bewegungsmelder

Geplant Angeheftet Gesperrt Verschoben Blockly
24 Beiträge 6 Kommentatoren 2.7k Aufrufe 12 Watching
  • Älteste zuerst
  • Neuste zuerst
  • Meiste Stimmen
Antworten
  • In einem neuen Thema antworten
Anmelden zum Antworten
Dieses Thema wurde gelöscht. Nur Nutzer mit entsprechenden Rechten können es sehen.
  • A Offline
    A Offline
    ASMM
    schrieb am zuletzt editiert von ASMM
    #1

    Liebe Spezis,

    ich verzweifle :confounded:

    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 paul53P A 3 Antworten Letzte Antwort
    0
    • A ASMM

      Liebe Spezis,

      ich verzweifle :confounded:

      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 Offline
      D Offline
      Dragon
      schrieb am zuletzt editiert von
      #2

      @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 Antwort Letzte Antwort
      0
      • D Dragon

        @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 Offline
        A Offline
        ASMM
        schrieb am zuletzt editiert von ASMM
        #3

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

        D P 2 Antworten Letzte Antwort
        0
        • A ASMM

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

          D Offline
          D Offline
          Dragon
          schrieb am zuletzt editiert von
          #4

          @ASMM Mom baue da mal was zusammen

          1 Antwort Letzte Antwort
          0
          • A ASMM

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

            P Offline
            P Offline
            plastomer
            schrieb am zuletzt editiert von
            #5

            @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 Antwort Letzte Antwort
            0
            • D Offline
              D Offline
              Dragon
              schrieb am zuletzt editiert von Dragon
              #6

              Versuch.jpg

              Ich würd es so versuchen...

              A AsgothianA 2 Antworten Letzte Antwort
              0
              • D Dragon

                Versuch.jpg

                Ich würd es so versuchen...

                A Offline
                A Offline
                ASMM
                schrieb am zuletzt editiert von
                #7

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

                1 Antwort Letzte Antwort
                0
                • D Offline
                  D Offline
                  Dragon
                  schrieb am zuletzt editiert von
                  #8
                  <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 Antwort Letzte Antwort
                  0
                  • D Dragon
                    <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 Offline
                    A Offline
                    ASMM
                    schrieb am zuletzt editiert von
                    #9

                    @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 :grinning:

                    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 Antworten Letzte Antwort
                    1
                    • D Dragon

                      Versuch.jpg

                      Ich würd es so versuchen...

                      AsgothianA Offline
                      AsgothianA Offline
                      Asgothian
                      Developer
                      schrieb am zuletzt editiert von
                      #10

                      @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.

                      ioBroker auf RPi4 - Hardware soweit wie möglich via Zigbee.
                      "Shit don't work" ist keine Fehlermeldung, sondern ein Fluch.

                      A 2 Antworten Letzte Antwort
                      0
                      • AsgothianA Asgothian

                        @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 Offline
                        A Offline
                        ASMM
                        schrieb am zuletzt editiert von
                        #11

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

                        1 Antwort Letzte Antwort
                        0
                        • PeoplesP Offline
                          PeoplesP Offline
                          Peoples
                          schrieb am zuletzt editiert von
                          #12

                          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

                          Ich beantworte keine Fragen zu Themen via PN

                          1 Antwort Letzte Antwort
                          0
                          • A ASMM

                            @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 :grinning:

                            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 Offline
                            D Offline
                            Dragon
                            schrieb am zuletzt editiert von
                            #13

                            @ASMM klar, mom mache mir Gedanken.

                            1 Antwort Letzte Antwort
                            0
                            • A ASMM

                              @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 :grinning:

                              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 Offline
                              D Offline
                              Dragon
                              schrieb am zuletzt editiert von Dragon
                              #14

                              @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 :grinning:

                              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 Antwort Letzte Antwort
                              0
                              • A ASMM

                                Liebe Spezis,

                                ich verzweifle :confounded:

                                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

                                paul53P Offline
                                paul53P Offline
                                paul53
                                schrieb am zuletzt editiert von paul53
                                #15

                                @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

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

                                D 1 Antwort Letzte Antwort
                                0
                                • paul53P 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 Offline
                                  D Offline
                                  Dragon
                                  schrieb am zuletzt editiert von
                                  #16

                                  @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 ????

                                  paul53P 1 Antwort Letzte Antwort
                                  0
                                  • D Dragon

                                    @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 ????

                                    paul53P Offline
                                    paul53P Offline
                                    paul53
                                    schrieb am zuletzt editiert von paul53
                                    #17

                                    @David-Froebus sagte:

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

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

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

                                    1 Antwort Letzte Antwort
                                    0
                                    • A Offline
                                      A Offline
                                      ASMM
                                      schrieb am zuletzt editiert von
                                      #18

                                      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 Antwort Letzte Antwort
                                      0
                                      • D 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 :grinning:

                                        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 Offline
                                        A Offline
                                        ASMM
                                        schrieb am zuletzt editiert von ASMM
                                        #19

                                        @David-Froebus

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

                                        Herzlichen Dank, ist ne Kiste Bier Wert :+1:

                                        D 1 Antwort Letzte Antwort
                                        1
                                        • AsgothianA Asgothian

                                          @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 Offline
                                          A Offline
                                          ASMM
                                          schrieb am zuletzt editiert von
                                          #20

                                          @Asgothian

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

                                          1.) Der erste Block funktioniert einwandfrei :+1:

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

                                          Trotzdem Danke für deine Bemühungen.

                                          AsgothianA 1 Antwort Letzte Antwort
                                          0
                                          Antworten
                                          • In einem neuen Thema antworten
                                          Anmelden zum Antworten
                                          • Älteste zuerst
                                          • Neuste zuerst
                                          • Meiste Stimmen


                                          Support us

                                          ioBroker
                                          Community Adapters
                                          Donate

                                          571

                                          Online

                                          32.7k

                                          Benutzer

                                          82.4k

                                          Themen

                                          1.3m

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

                                          • Du hast noch kein Konto? Registrieren

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