Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Blockly
    5. Dimmbare Lampe mit mehren Tastern schalten Blockly/Szene

    NEWS

    • Monatsrückblick – September 2025

    • Neues Video "KI im Smart Home" - ioBroker plus n8n

    • Neues Video über Aliase, virtuelle Geräte und Kategorien

    Dimmbare Lampe mit mehren Tastern schalten Blockly/Szene

    This topic has been deleted. Only users with topic management privileges can see it.
    • K
      Kusi @Grace13 last edited by

      @grace13 sagte in Dimmbare Lampe mit mehren Tastern schalten Blockly/Szene:

      Evenet Counter

      Was macht der Datenpunkt "Event Counter" genau? Ändert der sich bei jedem Tastendruck??

      G 1 Reply Last reply Reply Quote 0
      • G
        Grace13 @Kusi last edited by

        @kusi genau, der Event Counter vom Shelly i3 erhöht sich bei jedem Tasten druck egal ob S, SS oder L um eins.

        K 1 Reply Last reply Reply Quote 0
        • K
          Kusi @Grace13 last edited by

          @grace13 sagte in Dimmbare Lampe mit mehren Tastern schalten Blockly/Szene:

          erhöht sich bei jedem Tasten druck

          Zu meinem Verständnis:
          Wenn du mehrmals die gleiche Taste (z.B. S) drücksz, dann erhöht sich der Counter.
          Wenn du dann eine andere Taste drückst, dann geht dieser wieder auf 1.

          Stimmt diese Annahme??

          G 1 Reply Last reply Reply Quote 0
          • G
            Grace13 @Kusi last edited by

            @kusi Nein, der Counter erhört sich bei jedem Tasten druck egal ob S, SS oder L.

            Die Spots in der Küche werden bsp. so gesteuert. ( wahrscheinlich verbesserungswürdig)

            2ed458a9-9247-4018-a7b7-987840cfdfc3-image.png

            K 2 Replies Last reply Reply Quote 0
            • K
              Kusi @Grace13 last edited by

              @grace13 sagte in Dimmbare Lampe mit mehren Tastern schalten Blockly/Szene:

              Counter erhört sich bei jedem Tasten

              Bis zur Unendlichkeit??

              Cinimod 1 Reply Last reply Reply Quote 0
              • Cinimod
                Cinimod Most Active @Kusi last edited by

                @Grace13

                Ich finde es auch etwas seltsam das sich die Datenpunkte nicht Aktualisieren, das ist mir rätselhaft.
                Dann trigger doch auf die Counter der Schalter und mach "größer als letztes".
                Ich glaube du hattest es auch anfangs schon so gell.

                1 Reply Last reply Reply Quote 0
                • G
                  Grace13 last edited by

                  @kusi so lange habe ich die Geräte noch nicht 😄 aber glaube schon zumindest bis es zu einem reset des Gerätes kommt.

                  @Cinimod wäre wahrscheinlich die beste Option.

                  1 Reply Last reply Reply Quote 0
                  • K
                    Kusi @Grace13 last edited by

                    @grace13 sagte in Dimmbare Lampe mit mehren Tastern schalten Blockly/Szene:

                    Die Spots in der Küche werden bsp. so gesteuert

                    Wenn es so klappt, dann wäre das ja gut so...

                    G 1 Reply Last reply Reply Quote 0
                    • G
                      Grace13 @Kusi last edited by

                      @kusi ja, immerhin etwas 🦆 nur stell ich mich etwas schwer bei dem anpassen des bisherigen Skriptes.. werde mich heute Abend mal dran setzen.

                      K 1 Reply Last reply Reply Quote 0
                      • K
                        Kusi @Grace13 last edited by

                        @grace13
                        Sofern sich die Lampen mit dem Dimmwert 0 ausschalten, dann könnte es so gelöst werden.

                        397ed99c-1c55-48de-bc45-327f96ec1331-image.png

                        <xml xmlns="https://developers.google.com/blockly/xml">
                          <variables>
                            <variable id="w$,5eohj54+sLUicSMBm">Lampe 1</variable>
                            <variable id=",UwtB-e~WJ7)BJ$W@:}*">Lampe 2</variable>
                            <variable id="Szs/v50CXOqEe@/69%l6">Taste</variable>
                          </variables>
                          <block type="comment" id="oju=07HwUA6b8lwV25[O" x="12" y="-87">
                            <field name="COMMENT">Counter Taste 1</field>
                            <next>
                              <block type="on_ext" id="-At(yzVr53|/*DG@C$t8">
                                <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="oolYED60n8[dt*-J/cvH">
                                    <field name="oid">default</field>
                                  </shadow>
                                </value>
                                <statement name="STATEMENT">
                                  <block type="procedures_callnoreturn" id="XA#uI7bJ3d-*iaWiE)Vk">
                                    <mutation name="Taste gedrückt">
                                      <arg name="Taste"></arg>
                                    </mutation>
                                    <value name="ARG0">
                                      <block type="get_value" id="SRz4_1mmfv7)!jFhdl/y">
                                        <field name="ATTR">val</field>
                                        <field name="OID">0_userdata.0.aa_-_Licht.T1_-_Event</field>
                                      </block>
                                    </value>
                                  </block>
                                </statement>
                              </block>
                            </next>
                          </block>
                          <block type="procedures_defnoreturn" id="z3tkIeTxS*fx:Pr=5Tl)" x="537" y="-62">
                            <mutation>
                              <arg name="Taste" varid="Szs/v50CXOqEe@/69%l6"></arg>
                            </mutation>
                            <field name="NAME">Taste gedrückt</field>
                            <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
                            <statement name="STACK">
                              <block type="logic_switch_case" id="SDzJ6fh`#o}_i4x2-5,^">
                                <mutation xmlns="http://www.w3.org/1999/xhtml" case="2"></mutation>
                                <value name="CONDITION">
                                  <block type="variables_get" id="v:@+;cYH$C!lmuW~.M(B">
                                    <field name="VAR" id="Szs/v50CXOqEe@/69%l6">Taste</field>
                                  </block>
                                </value>
                                <value name="CASECONDITION0">
                                  <block type="text" id="wof%+tLmyn^6|HYJNuUe">
                                    <field name="TEXT">S</field>
                                  </block>
                                </value>
                                <statement name="CASE0">
                                  <block type="controls_if" id=".CGRHUKjat!i2pOmtKG.">
                                    <mutation else="1"></mutation>
                                    <value name="IF0">
                                      <block type="logic_operation" id="7:;F?rI+jqA3Z:=S3lKd" inline="false">
                                        <field name="OP">OR</field>
                                        <value name="A">
                                          <block type="get_value" id="wa3WmVaFa.wJ$kntpQ!.">
                                            <field name="ATTR">val</field>
                                            <field name="OID">0_userdata.0.aa_-_Licht.L1_Switch</field>
                                          </block>
                                        </value>
                                        <value name="B">
                                          <block type="get_value" id="yT_Xc_@(Y=/Y,q-,6jeh">
                                            <field name="ATTR">val</field>
                                            <field name="OID">0_userdata.0.aa_-_Licht.L2_Switch</field>
                                          </block>
                                        </value>
                                      </block>
                                    </value>
                                    <statement name="DO0">
                                      <block type="comment" id="wEuma7]u]Ie)7ihOp+@)">
                                        <field name="COMMENT">ausschalten wenn mind. 1 Lampe eingeschaltet</field>
                                        <next>
                                          <block type="procedures_callnoreturn" id="!Mzez+)K^@^`A()e25jr">
                                            <mutation name="Licht steuern">
                                              <arg name="Lampe 1"></arg>
                                              <arg name="Lampe 2"></arg>
                                            </mutation>
                                            <value name="ARG0">
                                              <block type="math_number" id="`t;N2JJFZH__-/P$XiHN">
                                                <field name="NUM">0</field>
                                              </block>
                                            </value>
                                            <value name="ARG1">
                                              <block type="math_number" id="pBAe/UHe01K$My7;Ol_I">
                                                <field name="NUM">0</field>
                                              </block>
                                            </value>
                                          </block>
                                        </next>
                                      </block>
                                    </statement>
                                    <statement name="ELSE">
                                      <block type="comment" id="%kj!::$LaPd!q^W`=Xh8">
                                        <field name="COMMENT">ansonsten Lampe 1 einschalten</field>
                                        <next>
                                          <block type="procedures_callnoreturn" id="Ua@+]P3K7HRw;(NH[YtM">
                                            <mutation name="Licht steuern">
                                              <arg name="Lampe 1"></arg>
                                              <arg name="Lampe 2"></arg>
                                            </mutation>
                                            <value name="ARG0">
                                              <block type="math_number" id="+[[_]%AS}RLQ2y{*KN|(">
                                                <field name="NUM">100</field>
                                              </block>
                                            </value>
                                            <value name="ARG1">
                                              <block type="math_number" id="6.?L8ImF@@lo|Cuv6;|W">
                                                <field name="NUM">0</field>
                                              </block>
                                            </value>
                                          </block>
                                        </next>
                                      </block>
                                    </statement>
                                  </block>
                                </statement>
                                <value name="CASECONDITION1">
                                  <block type="text" id="=?Vr)TF^f5PO8[.l,:uS">
                                    <field name="TEXT">SS</field>
                                  </block>
                                </value>
                                <statement name="CASE1">
                                  <block type="procedures_callnoreturn" id="hfp$%TybxDO5jpi7wsj:">
                                    <mutation name="Licht steuern">
                                      <arg name="Lampe 1"></arg>
                                      <arg name="Lampe 2"></arg>
                                    </mutation>
                                    <value name="ARG0">
                                      <block type="math_number" id="dGTH~*ezQfvT(W!V`e5H">
                                        <field name="NUM">0</field>
                                      </block>
                                    </value>
                                    <value name="ARG1">
                                      <block type="math_number" id="~H([Oj~+TNF68,K`tMlv">
                                        <field name="NUM">100</field>
                                      </block>
                                    </value>
                                  </block>
                                </statement>
                                <value name="CASECONDITION2">
                                  <block type="text" id="+J4b.u^=Je^}/wF{sPH*">
                                    <field name="TEXT">L</field>
                                  </block>
                                </value>
                                <statement name="CASE2">
                                  <block type="procedures_callnoreturn" id="9kp,/F9MN|F]gC;DT/]?">
                                    <mutation name="Licht steuern">
                                      <arg name="Lampe 1"></arg>
                                      <arg name="Lampe 2"></arg>
                                    </mutation>
                                    <value name="ARG0">
                                      <block type="math_number" id="b5DK7vv,=}-n4Pd?6nDF">
                                        <field name="NUM">100</field>
                                      </block>
                                    </value>
                                    <value name="ARG1">
                                      <block type="math_number" id="be*sHHP=}(SUKCiK%-lE">
                                        <field name="NUM">100</field>
                                      </block>
                                    </value>
                                  </block>
                                </statement>
                              </block>
                            </statement>
                          </block>
                          <block type="comment" id="X!A:wB13iz#=^t7=8@Zy" x="12" y="113">
                            <field name="COMMENT">Counter Taste 2</field>
                            <next>
                              <block type="on_ext" id="]bS!0]ZideX|8N{16U]L">
                                <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="kodbXh:{ufHsU17(cdaf">
                                    <field name="oid">default</field>
                                  </shadow>
                                </value>
                                <statement name="STATEMENT">
                                  <block type="procedures_callnoreturn" id="!VQ2=wTwt$_i4@$BfB)^">
                                    <mutation name="Taste gedrückt">
                                      <arg name="Taste"></arg>
                                    </mutation>
                                    <value name="ARG0">
                                      <block type="get_value" id="=hfX:|]I(B3l!vb0Nzm{">
                                        <field name="ATTR">val</field>
                                        <field name="OID">0_userdata.0.aa_-_Licht.T2_-_Event</field>
                                      </block>
                                    </value>
                                  </block>
                                </statement>
                              </block>
                            </next>
                          </block>
                          <block type="comment" id="mOX~D@O+6C!G$o36bYQY" x="12" y="313">
                            <field name="COMMENT">Counter Taste 3</field>
                            <next>
                              <block type="on_ext" id="~S|QTMlBb[B5{oXLwiiD">
                                <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="KrNUw?G9FRG-aC]l7-y5">
                                    <field name="oid">default</field>
                                  </shadow>
                                </value>
                                <statement name="STATEMENT">
                                  <block type="procedures_callnoreturn" id="p7Wa8BJPw#m#t3%4Z3}Q">
                                    <mutation name="Taste gedrückt">
                                      <arg name="Taste"></arg>
                                    </mutation>
                                    <value name="ARG0">
                                      <block type="get_value" id="F@gR0!GT7ZGRs_}x[!vT">
                                        <field name="ATTR">val</field>
                                        <field name="OID">0_userdata.0.aa_-_Licht.T3_-_Event</field>
                                      </block>
                                    </value>
                                  </block>
                                </statement>
                              </block>
                            </next>
                          </block>
                          <block type="procedures_defnoreturn" id="+`$SStF:o,WtYrlV69M7" x="537" y="588">
                            <mutation>
                              <arg name="Lampe 1" varid="w$,5eohj54+sLUicSMBm"></arg>
                              <arg name="Lampe 2" varid=",UwtB-e~WJ7)BJ$W@:}*"></arg>
                            </mutation>
                            <field name="NAME">Licht steuern</field>
                            <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
                            <statement name="STACK">
                              <block type="control" id="oQ[xo3#VVYqMorYULV!v">
                                <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                <field name="OID">0_userdata.0.aa_-_Licht.L1_Brightness</field>
                                <field name="WITH_DELAY">FALSE</field>
                                <value name="VALUE">
                                  <block type="variables_get" id="M[!qW(]]Mq!6zKOL1atP">
                                    <field name="VAR" id="w$,5eohj54+sLUicSMBm">Lampe 1</field>
                                  </block>
                                </value>
                                <next>
                                  <block type="control" id="%B^mOp5hU=p,3[f1AHi#">
                                    <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                    <field name="OID">0_userdata.0.aa_-_Licht.L2_Brightness</field>
                                    <field name="WITH_DELAY">FALSE</field>
                                    <value name="VALUE">
                                      <block type="variables_get" id="n99aHxM{M*Zw`[F15+R_">
                                        <field name="VAR" id=",UwtB-e~WJ7)BJ$W@:}*">Lampe 2</field>
                                      </block>
                                    </value>
                                  </block>
                                </next>
                              </block>
                            </statement>
                          </block>
                        </xml>
                        
                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post

                        Support us

                        ioBroker
                        Community Adapters
                        Donate

                        929
                        Online

                        32.1k
                        Users

                        80.8k
                        Topics

                        1.3m
                        Posts

                        3
                        44
                        2688
                        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