Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Blockly
    5. Mit Ikea Schalter led leuchte dimmen

    NEWS

    • Wir empfehlen: Node.js 22.x

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker goes Matter ... Matter Adapter in Stable

    Mit Ikea Schalter led leuchte dimmen

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

      @paul53 Danke dass ihr euch die viele Mühe macht.

      Hier die Auswertung:

      Von unten nach oben:

      • Rollo auf gedrückt: Die ersten 2 Werte
      • Rollo zu gedrückt: Die nächsten 2 Werte
      • Rollo auf lang gedrückt und losgelassen: Die nächsten 4 Werte
      • Rollo zu lang gedrückt und losgelassen: Die letzten 4 Werte

      Screenshot 2024-07-27 162509.png

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

        @robbi12
        Es gibt "Open event" und "Open"? "Open" beim Loslassen nach langem Tastendruck?
        Was ist mit Taste "stop"?

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

          @paul53 Es gibt keinen Stop Taster. open Event ist beim Drücken. open ist wenn ich nach langem Tastendruck loslasse.

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

            @robbi12 sagte: open ist wenn ich nach langem Tastendruck loslasse.

            Dann versuche es mal so:

            Blockly_temp.JPG

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

              @paul53 Danke das funktioniert gut

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

                @robbi12 sagte: funktioniert gut

                Hat der Rollo-Aktor einen Datenpunkt, der anzeigt, ob das Rollo in Bewegung ist? Falls ja, wäre er besser für die Prüfung geeignet als die Variable move, da auch das Stoppen bei Erreichen der Endlagen berücksichtigt würde.

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

                  @paul53 Der Rollo hat den Wert position. Dieser zeigt prozentuale Werte an und müsste sich ändern.

                  Wie würde das Script dann aussehen?

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

                    @robbi12 sagte: Der Rollo hat den Wert position.

                    In dem Fall benötigt man die Variable move weiterhin. Man kann sie aber bei Erreichen einer Endposition auf falsch setzen, damit der nächste Tastendruck nicht als "stop" interpretiert wird.

                    Blockly_temp.JPG

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

                      @paul53 Hallo. Funktioniert nicht ganz. Hoch mit einfach drücken und runter geht. Hält auch an. LongPush fährt runter oder hoch, hält aber nicht mehr an.

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

                        @robbi12 sagte: hält aber nicht mehr an.

                        Bitte Blockly zeigen.

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

                          <xml xmlns="https://developers.google.com/blockly/xml">
                            <variables>
                              <variable id="TT,eIkG,j9(IFTy%.ud{">position</variable>
                              <variable id="k%2N3;oRED*`)oKP7[Pc">move</variable>
                            </variables>
                            <block type="procedures_defnoreturn" id="mCf]Lw;IqlUK=btQ9A~A" x="13" y="13">
                              <field name="NAME">stoppen</field>
                              <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
                              <statement name="STACK">
                                <block type="control" id="BytYBFroz4zRhek0}VII">
                                  <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                  <field name="OID">zigbee.0.842e14fffe746425.stop</field>
                                  <field name="WITH_DELAY">FALSE</field>
                                  <value name="VALUE">
                                    <block type="logic_boolean" id="mzfKSDxS/?1hbW2`Gnys">
                                      <field name="BOOL">TRUE</field>
                                    </block>
                                  </value>
                                  <next>
                                    <block type="variables_set" id="ZCGgGWFg!.tZfwf|I(rX">
                                      <field name="VAR" id="k%2N3;oRED*`)oKP7[Pc">move</field>
                                      <value name="VALUE">
                                        <block type="logic_boolean" id="K7qW5Zhkv{eXcZFGDZ%t">
                                          <field name="BOOL">FALSE</field>
                                        </block>
                                      </value>
                                    </block>
                                  </next>
                                </block>
                              </statement>
                            </block>
                            <block type="variables_set" id="$980h.:wcI(1XI#qfe}4" x="13" y="138">
                              <field name="VAR" id="TT,eIkG,j9(IFTy%.ud{">position</field>
                              <value name="VALUE">
                                <block type="get_value" id="f~B9?;Em=M`M@?VZEMk)">
                                  <field name="ATTR">val</field>
                                  <field name="OID">zigbee.0.842e14fffe746425.position</field>
                                </block>
                              </value>
                              <next>
                                <block type="on" id="0cRYgSwDT=vRPmLdK#Vo">
                                  <field name="OID">zigbee.0.842e14fffe746425.position</field>
                                  <field name="CONDITION">ne</field>
                                  <field name="ACK_CONDITION"></field>
                                  <statement name="STATEMENT">
                                    <block type="variables_set" id="{/VlM+.c,(~eVvJo`x+p">
                                      <field name="VAR" id="TT,eIkG,j9(IFTy%.ud{">position</field>
                                      <value name="VALUE">
                                        <block type="on_source" id="Z%*^8UU*jZrIjVr1LsPX">
                                          <field name="ATTR">state.val</field>
                                        </block>
                                      </value>
                                    </block>
                                  </statement>
                                  <next>
                                    <block type="controls_if" id="5+!kpN!_-@M}T@CQiik%">
                                      <value name="IF0">
                                        <block type="logic_operation" id="2t6cq?_Hn5hm_5XSR6Hb" inline="false">
                                          <field name="OP">OR</field>
                                          <value name="A">
                                            <block type="logic_compare" id="TtV3rXEU0~^B1sFL_a(4">
                                              <field name="OP">EQ</field>
                                              <value name="A">
                                                <block type="variables_get" id="K~*B4jQph1+G=i5Ie}{h">
                                                  <field name="VAR" id="TT,eIkG,j9(IFTy%.ud{">position</field>
                                                </block>
                                              </value>
                                              <value name="B">
                                                <block type="math_number" id="iYoP[CR4,!rPW}uDl186">
                                                  <field name="NUM">0</field>
                                                </block>
                                              </value>
                                            </block>
                                          </value>
                                          <value name="B">
                                            <block type="logic_compare" id="x?ky:Q[HKG@f8WS7=R(]">
                                              <field name="OP">EQ</field>
                                              <value name="A">
                                                <block type="variables_get" id="xGnF-ij$SCr?g!*{6]nr">
                                                  <field name="VAR" id="TT,eIkG,j9(IFTy%.ud{">position</field>
                                                </block>
                                              </value>
                                              <value name="B">
                                                <block type="math_number" id="s^g+lE~[(i4m;v}}FcYY">
                                                  <field name="NUM">100</field>
                                                </block>
                                              </value>
                                            </block>
                                          </value>
                                        </block>
                                      </value>
                                      <statement name="DO0">
                                        <block type="variables_set" id=",dD4$fxc]P!*V5g~u6h?">
                                          <field name="VAR" id="k%2N3;oRED*`)oKP7[Pc">move</field>
                                          <value name="VALUE">
                                            <block type="logic_boolean" id="`e/~`1*n@n$bVo9p8]+b">
                                              <field name="BOOL">FALSE</field>
                                            </block>
                                          </value>
                                        </block>
                                      </statement>
                                      <next>
                                        <block type="on" id="wSHgv/+Lut?SP(]a1S5g">
                                          <field name="OID">zigbee.0.842e14fffe746425.stop</field>
                                          <field name="CONDITION">gt</field>
                                          <field name="ACK_CONDITION"></field>
                                          <statement name="STATEMENT">
                                            <block type="procedures_callnoreturn" id="Yf:3QbH8]MBoic?yAhJc">
                                              <mutation name="stoppen"></mutation>
                                            </block>
                                          </statement>
                                          <next>
                                            <block type="on" id="n$NS`*]h5IC6U:*#@d%/">
                                              <field name="OID">zigbee.0.5c0272fffe7b0ff5.cover_open</field>
                                              <field name="CONDITION">gt</field>
                                              <field name="ACK_CONDITION"></field>
                                              <statement name="STATEMENT">
                                                <block type="controls_if" id="3P@q8JcJRr2%=)i@MISC">
                                                  <mutation elseif="1"></mutation>
                                                  <value name="IF0">
                                                    <block type="variables_get" id="n=Y|rd!LEK?!|E2N_}/K">
                                                      <field name="VAR" id="k%2N3;oRED*`)oKP7[Pc">move</field>
                                                    </block>
                                                  </value>
                                                  <statement name="DO0">
                                                    <block type="procedures_callnoreturn" id=":O+mR7,0o`@-3%{4#jvt">
                                                      <mutation name="stoppen"></mutation>
                                                    </block>
                                                  </statement>
                                                  <value name="IF1">
                                                    <block type="logic_compare" id="qtge`Iw+HeN^rph7g,b-">
                                                      <field name="OP">LT</field>
                                                      <value name="A">
                                                        <block type="variables_get" id="B;]e?7T:WBU/r.@|E}f]">
                                                          <field name="VAR" id="TT,eIkG,j9(IFTy%.ud{">position</field>
                                                        </block>
                                                      </value>
                                                      <value name="B">
                                                        <block type="math_number" id="qp+#w9eP}LfKvMYnM_tJ">
                                                          <field name="NUM">100</field>
                                                        </block>
                                                      </value>
                                                    </block>
                                                  </value>
                                                  <statement name="DO1">
                                                    <block type="control" id="/5.{4ybn*duY`_^+j|nJ">
                                                      <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                      <field name="OID">zigbee.0.842e14fffe746425.open</field>
                                                      <field name="WITH_DELAY">FALSE</field>
                                                      <value name="VALUE">
                                                        <block type="logic_boolean" id="s30@jwzcu9]E=tvL8{._">
                                                          <field name="BOOL">TRUE</field>
                                                        </block>
                                                      </value>
                                                      <next>
                                                        <block type="variables_set" id="8-/kSNy2{,`SHzpw^E}u">
                                                          <field name="VAR" id="k%2N3;oRED*`)oKP7[Pc">move</field>
                                                          <value name="VALUE">
                                                            <block type="logic_boolean" id="~xc|QVG=r$?ffp`H[tm(">
                                                              <field name="BOOL">TRUE</field>
                                                            </block>
                                                          </value>
                                                        </block>
                                                      </next>
                                                    </block>
                                                  </statement>
                                                </block>
                                              </statement>
                                              <next>
                                                <block type="on" id="Pp!tA9]/eMX}|FqEk2g1">
                                                  <field name="OID">zigbee.0.5c0272fffe7b0ff5.cover_close</field>
                                                  <field name="CONDITION">gt</field>
                                                  <field name="ACK_CONDITION"></field>
                                                  <statement name="STATEMENT">
                                                    <block type="controls_if" id="M|3anr%E8BNORT45o2iB">
                                                      <mutation elseif="1"></mutation>
                                                      <value name="IF0">
                                                        <block type="variables_get" id="vz${@a6Ks2vTk:=J:=M{">
                                                          <field name="VAR" id="k%2N3;oRED*`)oKP7[Pc">move</field>
                                                        </block>
                                                      </value>
                                                      <statement name="DO0">
                                                        <block type="procedures_callnoreturn" id="J4E{SUH(IP,utoKM-ZNK">
                                                          <mutation name="stoppen"></mutation>
                                                        </block>
                                                      </statement>
                                                      <value name="IF1">
                                                        <block type="logic_compare" id="k.r-52uW.ipg-5Sn=7;`">
                                                          <field name="OP">GT</field>
                                                          <value name="A">
                                                            <block type="variables_get" id="1?ty#QG0CQE2(IGmq05W">
                                                              <field name="VAR" id="TT,eIkG,j9(IFTy%.ud{">position</field>
                                                            </block>
                                                          </value>
                                                          <value name="B">
                                                            <block type="math_number" id="~G4u.~CIt8;(.ne01USV">
                                                              <field name="NUM">0</field>
                                                            </block>
                                                          </value>
                                                        </block>
                                                      </value>
                                                      <statement name="DO1">
                                                        <block type="control" id="]/jAZ3[Nkzm[CI_o0mc,">
                                                          <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                          <field name="OID">zigbee.0.842e14fffe746425.close</field>
                                                          <field name="WITH_DELAY">FALSE</field>
                                                          <value name="VALUE">
                                                            <block type="logic_boolean" id="0O3F#Odbe:M1+EIZu8ZP">
                                                              <field name="BOOL">TRUE</field>
                                                            </block>
                                                          </value>
                                                          <next>
                                                            <block type="variables_set" id="8X!s.Os!]M5@XW7]C[):">
                                                              <field name="VAR" id="k%2N3;oRED*`)oKP7[Pc">move</field>
                                                              <value name="VALUE">
                                                                <block type="logic_boolean" id="2]Ed~u{DwcK-F%q|DA$?">
                                                                  <field name="BOOL">TRUE</field>
                                                                </block>
                                                              </value>
                                                            </block>
                                                          </next>
                                                        </block>
                                                      </statement>
                                                    </block>
                                                  </statement>
                                                </block>
                                              </next>
                                            </block>
                                          </next>
                                        </block>
                                      </next>
                                    </block>
                                  </next>
                                </block>
                              </next>
                            </block>
                          </xml>
                          
                          paul53 1 Reply Last reply Reply Quote 0
                          • paul53
                            paul53 @Robbi12 last edited by paul53

                            @robbi12
                            Der Block für setzen von move bei Erreichen der Endlagen gehört in den Triggerblock:

                            Blockly_temp.JPG

                            Der Datenpunkt zum Stoppen bei Loslassen ist falsch. Es muss ein Datenpunkt ("Open") des Tasters ("zigbee.0.5c0272fffe7b0ff5") sein.

                            Blockly_temp.JPG

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

                            Support us

                            ioBroker
                            Community Adapters
                            Donate

                            395
                            Online

                            32.0k
                            Users

                            80.3k
                            Topics

                            1.3m
                            Posts

                            4
                            20
                            509
                            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