Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Blockly
    5. Datenpunkt manuelle Bedienung HM-Schalter?

    NEWS

    • Wir empfehlen: Node.js 22.x

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker goes Matter ... Matter Adapter in Stable

    Datenpunkt manuelle Bedienung HM-Schalter?

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

      Hallo zusammen, kann ich im Blockly die manuelle Bedienung eines Homematic-Schalters oder Dimmers auswerten? Möchte hier dann einen Bewegungsmelder für eine gewisse Zeit sperren der aktuell den Schalter bei erkannter Bewegung ansteuer. Bewegungsmelder ist der von Xiaomi. Schalter von HM derHM-LC-Sw1PBU-FM , Dimmer der HM-LC-Dim1TPBU-FM.

      Bin für jeden Tipp dankbar!

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

        @flkontakt
        Versuche es mal so.

        Blockly_temp.JPG

        <xml xmlns="http://www.w3.org/1999/xhtml">
          <variables>
            <variable type="" id="}4KP%!AHdWrdse9sPo/W">manuellEin</variable>
            <variable type="undefined" id="timeout">timeout</variable>
          </variables>
          <block type="comment" id="5YH.#Aq5NBM#y3p]B]9`" x="87" y="12">
            <field name="COMMENT">BWM</field>
            <next>
              <block type="on_ext" id="0s*TxB15V~$UD0?~_fmY">
                <mutation items="1"></mutation>
                <field name="CONDITION">ne</field>
                <field name="ACK_CONDITION"></field>
                <value name="OID0">
                  <shadow type="field_oid" id="g?,{MgY,$s#auN?[Ql*e">
                    <field name="oid">default</field>
                  </shadow>
                </value>
                <statement name="STATEMENT">
                  <block type="controls_if" id="@,szpZL|mo0A!`?C(W{,">
                    <mutation else="1"></mutation>
                    <value name="IF0">
                      <block type="on_source" id="%C(E|6LZ./=(nm(+4R9=">
                        <field name="ATTR">state.val</field>
                      </block>
                    </value>
                    <statement name="DO0">
                      <block type="controls_if" id="7I~2*;KTD%@-yxZ8`p`6">
                        <mutation else="1"></mutation>
                        <value name="IF0">
                          <block type="logic_operation" id="$V9wjEu,FS@42xUM^_:G" inline="false">
                            <field name="OP">AND</field>
                            <value name="A">
                              <block type="get_value" id="GFsE?2*(F3#LYx5n6=;]">
                                <field name="ATTR">val</field>
                                <field name="OID">ID auswählen</field>
                              </block>
                            </value>
                            <value name="B">
                              <block type="logic_negate" id="b+}(IBgLzwO!JX!i/D;e">
                                <value name="BOOL">
                                  <block type="variables_get" id="+#8iEA?,STE7)YUiY$3_">
                                    <field name="VAR" id="timeout" variabletype="undefined">timeout</field>
                                  </block>
                                </value>
                              </block>
                            </value>
                          </block>
                        </value>
                        <statement name="DO0">
                          <block type="variables_set" id="4-Lgw6F2lG@x_ae#vp#P">
                            <field name="VAR" id="}4KP%!AHdWrdse9sPo/W" variabletype="">manuellEin</field>
                            <value name="VALUE">
                              <block type="logic_boolean" id="+irdf*F$8qQ^Z~0v|ZeS">
                                <field name="BOOL">TRUE</field>
                              </block>
                            </value>
                          </block>
                        </statement>
                        <statement name="ELSE">
                          <block type="timeouts_cleartimeout" id="b[~MRiYCYDx:5cW/ONTX">
                            <field name="NAME">timeout</field>
                            <next>
                              <block type="variables_set" id="d%$%AvCpP?LhRH|ky#q[">
                                <field name="VAR" id="}4KP%!AHdWrdse9sPo/W" variabletype="">manuellEin</field>
                                <value name="VALUE">
                                  <block type="logic_boolean" id="abwuBL~PJEmUF$a;=m=Z">
                                    <field name="BOOL">FALSE</field>
                                  </block>
                                </value>
                                <next>
                                  <block type="control" id="CM2]-So{W{4K2}C[krD!">
                                    <mutation delay_input="false"></mutation>
                                    <field name="OID">Object ID</field>
                                    <field name="WITH_DELAY">FALSE</field>
                                    <value name="VALUE">
                                      <block type="logic_boolean" id="z9!/_vQ.t=GoZ*b/on?.">
                                        <field name="BOOL">TRUE</field>
                                      </block>
                                    </value>
                                  </block>
                                </next>
                              </block>
                            </next>
                          </block>
                        </statement>
                      </block>
                    </statement>
                    <statement name="ELSE">
                      <block type="controls_if" id="^+A!ndA!yek=u/Qm:KF!">
                        <value name="IF0">
                          <block type="logic_negate" id="LcK;]]5Ymqs8k*WVy=ck">
                            <value name="BOOL">
                              <block type="variables_get" id="O.M`XgQZj~(!zy*a%)Ec">
                                <field name="VAR" id="}4KP%!AHdWrdse9sPo/W" variabletype="">manuellEin</field>
                              </block>
                            </value>
                          </block>
                        </value>
                        <statement name="DO0">
                          <block type="timeouts_settimeout" id=";7PVk+v[taXr{h,|G;Km">
                            <field name="NAME">timeout</field>
                            <field name="DELAY">5</field>
                            <field name="UNIT">min</field>
                            <statement name="STATEMENT">
                              <block type="control" id="+4A=c2[t1U(i6JqH6?Fr">
                                <mutation delay_input="false"></mutation>
                                <field name="OID">Object ID</field>
                                <field name="WITH_DELAY">FALSE</field>
                                <value name="VALUE">
                                  <block type="logic_boolean" id="b_0KH)]5Rc||IRXB/~CZ">
                                    <field name="BOOL">FALSE</field>
                                  </block>
                                </value>
                                <next>
                                  <block type="variables_set" id="_c2t@JB62h^=l?9B,-4d">
                                    <field name="VAR" id="timeout" variabletype="undefined">timeout</field>
                                    <value name="VALUE">
                                      <block type="logic_null" id="3(q!MRI3WB6E?f55Lw~9"></block>
                                    </value>
                                  </block>
                                </next>
                              </block>
                            </statement>
                          </block>
                        </statement>
                      </block>
                    </statement>
                  </block>
                </statement>
              </block>
            </next>
          </block>
          <block type="comment" id="u=tR^CuqPacBuz@hF%sa" x="488" y="112">
            <field name="COMMENT">HM Schaltaktor</field>
          </block>
        </xml>
        

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

          @paul53 said in Datenpunkt manuelle Bedienung HM-Schalter?:

          @flkontakt
          Versuche es mal so.

          Blockly_temp.JPG

          <xml xmlns="http://www.w3.org/1999/xhtml">
            <variables>
              <variable type="undefined" id="timeout">timeout</variable>
              <variable type="" id="}4KP%!AHdWrdse9sPo/W">manuellEin</variable>
            </variables>
            <block type="comment" id="5YH.#Aq5NBM#y3p]B]9`" x="87" y="12">
              <field name="COMMENT">BWM</field>
              <next>
                <block type="on_ext" id="0s*TxB15V~$UD0?~_fmY">
                  <mutation items="1"></mutation>
                  <field name="CONDITION">ne</field>
                  <field name="ACK_CONDITION"></field>
                  <value name="OID0">
                    <shadow type="field_oid" id="g?,{MgY,$s#auN?[Ql*e">
                      <field name="oid">default</field>
                    </shadow>
                  </value>
                  <statement name="STATEMENT">
                    <block type="controls_if" id="@,szpZL|mo0A!`?C(W{,">
                      <mutation else="1"></mutation>
                      <value name="IF0">
                        <block type="on_source" id="%C(E|6LZ./=(nm(+4R9=">
                          <field name="ATTR">state.val</field>
                        </block>
                      </value>
                      <statement name="DO0">
                        <block type="controls_if" id="7I~2*;KTD%@-yxZ8`p`6">
                          <mutation else="1"></mutation>
                          <value name="IF0">
                            <block type="logic_operation" id="$V9wjEu,FS@42xUM^_:G" inline="false">
                              <field name="OP">AND</field>
                              <value name="A">
                                <block type="get_value" id="GFsE?2*(F3#LYx5n6=;]">
                                  <field name="ATTR">val</field>
                                  <field name="OID">ID auswählen</field>
                                </block>
                              </value>
                              <value name="B">
                                <block type="logic_negate" id="b+}(IBgLzwO!JX!i/D;e">
                                  <value name="BOOL">
                                    <block type="variables_get" id="+#8iEA?,STE7)YUiY$3_">
                                      <field name="VAR" id="timeout" variabletype="undefined">timeout</field>
                                    </block>
                                  </value>
                                </block>
                              </value>
                            </block>
                          </value>
                          <statement name="DO0">
                            <block type="variables_set" id="4-Lgw6F2lG@x_ae#vp#P">
                              <field name="VAR" id="}4KP%!AHdWrdse9sPo/W" variabletype="">manuellEin</field>
                              <value name="VALUE">
                                <block type="logic_boolean" id="+irdf*F$8qQ^Z~0v|ZeS">
                                  <field name="BOOL">TRUE</field>
                                </block>
                              </value>
                            </block>
                          </statement>
                          <statement name="ELSE">
                            <block type="timeouts_cleartimeout" id="b[~MRiYCYDx:5cW/ONTX">
                              <field name="NAME">timeout</field>
                              <next>
                                <block type="variables_set" id="d%$%AvCpP?LhRH|ky#q[">
                                  <field name="VAR" id="}4KP%!AHdWrdse9sPo/W" variabletype="">manuellEin</field>
                                  <value name="VALUE">
                                    <block type="logic_boolean" id="abwuBL~PJEmUF$a;=m=Z">
                                      <field name="BOOL">FALSE</field>
                                    </block>
                                  </value>
                                  <next>
                                    <block type="control" id="CM2]-So{W{4K2}C[krD!">
                                      <mutation delay_input="false"></mutation>
                                      <field name="OID">Object ID</field>
                                      <field name="WITH_DELAY">FALSE</field>
                                      <value name="VALUE">
                                        <block type="logic_boolean" id="z9!/_vQ.t=GoZ*b/on?.">
                                          <field name="BOOL">TRUE</field>
                                        </block>
                                      </value>
                                    </block>
                                  </next>
                                </block>
                              </next>
                            </block>
                          </statement>
                        </block>
                      </statement>
                      <statement name="ELSE">
                        <block type="controls_if" id="^+A!ndA!yek=u/Qm:KF!">
                          <value name="IF0">
                            <block type="logic_negate" id="LcK;]]5Ymqs8k*WVy=ck">
                              <value name="BOOL">
                                <block type="variables_get" id="O.M`XgQZj~(!zy*a%)Ec">
                                  <field name="VAR" id="}4KP%!AHdWrdse9sPo/W" variabletype="">manuellEin</field>
                                </block>
                              </value>
                            </block>
                          </value>
                          <statement name="DO0">
                            <block type="timeouts_settimeout" id=";7PVk+v[taXr{h,|G;Km">
                              <field name="NAME">timeout</field>
                              <field name="DELAY">5</field>
                              <field name="UNIT">min</field>
                              <statement name="STATEMENT">
                                <block type="control" id="+4A=c2[t1U(i6JqH6?Fr">
                                  <mutation delay_input="false"></mutation>
                                  <field name="OID">Object ID</field>
                                  <field name="WITH_DELAY">FALSE</field>
                                  <value name="VALUE">
                                    <block type="logic_boolean" id="b_0KH)]5Rc||IRXB/~CZ">
                                      <field name="BOOL">FALSE</field>
                                    </block>
                                  </value>
                                </block>
                              </statement>
                            </block>
                          </statement>
                        </block>
                      </statement>
                    </block>
                  </statement>
                </block>
              </next>
            </block>
            <block type="comment" id="u=tR^CuqPacBuz@hF%sa" x="488" y="112">
              <field name="COMMENT">HM Schaltaktor</field>
            </block>
          </xml>
          

          Hallo Paul53HM Aktor.JPG Xiaomi BWM.JPG , sorry das ich mich jetzt erst damit beschäftige...

          Blicke noch nicht durch die Logik, daher nochmal Fragen zum Blockly: Setze ich den State switch vom HM-Aktor und vom Xiaomi BWM den State indicator.motion? Oder hat der HM-Aktor einen Datenpunkt der bei manueller Betätigung der Wippe seinen Status ändert?

          Und warum einen Falls-Block innerhalb eines Falls-Blocks?

          Sorry für die (höchstwahrscheinlich) dummen Fragen, ich kratze bei Blockly noch an der Oberfläche.

          An dieser Stelle Link und Dank an nurChris und seinen Blockly-Tutorials, sehr gut gemacht!

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

            @flkontakt sagte in Datenpunkt manuelle Bedienung HM-Schalter?:

            Setze ich den State switch vom HM-Aktor

            Siehst Du noch einen anderen Datenpunkt als STATE ?

            @flkontakt sagte in Datenpunkt manuelle Bedienung HM-Schalter?:

            vom Xiaomi BWM den State indicator.motion?

            Das ist nur der Trigger. Alle steuere wirken auf den HM-Datenpunkt STATE.

            Zur Logik:
            Wenn Bewegung erkannt wird (falls Wert), und der Aktor bereits ein ist, aber nicht durch die Ausschaltverzögerung (nicht timeout), dann wurde das Licht manuell eingeschaltet.
            Wenn Bewegung erkannt wird und das Licht ist aus oder in der Ausschaltverzögerung, wird das Licht eingeschaltet und die Auschaltverzögerung gestoppt.
            Die Variable manuellEin verhindert bei wahr das verzögerte Ausschalten, wenn kein Bewegung mehr erkannt wird (sonst-Zweig).

            EDIT: Ergänze bitte noch um den untersten Befehl: setze timeout auf null

            Blockly_temp.JPG

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

            Support us

            ioBroker
            Community Adapters
            Donate

            712
            Online

            31.9k
            Users

            80.3k
            Topics

            1.3m
            Posts

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