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. Dimmen mit einem Xiaomi/Aqara Button

NEWS

  • Neuer Blogbeitrag: Monatsrückblick - Dezember 2025 🎄
    BluefoxB
    Bluefox
    11
    1
    327

  • Weihnachtsangebot 2025! 🎄
    BluefoxB
    Bluefox
    24
    1
    1.5k

  • UPDATE 31.10.: Amazon Alexa - ioBroker Skill läuft aus ?
    apollon77A
    apollon77
    48
    3
    9.5k

Dimmen mit einem Xiaomi/Aqara Button

Geplant Angeheftet Gesperrt Verschoben Blockly
blockly
8 Beiträge 4 Kommentatoren 2.1k Aufrufe 4 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.
  • RalfThR Offline
    RalfThR Offline
    RalfTh
    schrieb am zuletzt editiert von RalfTh
    #1

    Hallo zusammen.

    Ich bin Neuling beim Thema ioBroker und SmartHome. In Unwissenheit habe ich mir einige Smart-Geräte gekauft und stand jetzt vor einigen Herausforderungen, wie z.B. das Dimmen einer Osram Smart+ LED über den Aqara Button. Nach langer Recherche hatte ich keine zufriedenstellende Lösung finden können und mich deshalb selbst um eine Lösung bemüht.
    Realisiert habe ich das mit folgenden Komponenten:

    • ConBee II USB-Stick
    • Adapter deconz ZigBee Version 1.1.2
    • Button Xiami/Aqara
    • Lampe Osram Smart+ White

    Folgende Änderung habe ich im ioBroker durchgeführt:

    Im entsprechenden deconz-Objekt habe ich meinem Button einen weiteren Datenpunkt hinzufügt. Das war zunächst nicht so einfach, weil nur ein Datenpunkt vom Typ "Channel" angelegt wurde. Der konnte in Blokly nicht angesprochen werden. Anbei die RAW-Info zum Datenpunkt:

    Gewisse Werte habe ich mit "xyz" maskiert, weil ich nicht genau weiß, ob sie sicherheitsrelevant sind.
    {
      "from": "system.adapter.admin.0",
      "user": "system.user.admin",
      "ts": xyz,
      "common": {
        "name": "DimUp",
        "type": "boolean",
        "role": "state",
        "icon": ""
      },
      "native": {},
      "acl": {
        "object": xyz,
        "owner": "system.user.admin",
        "ownerGroup": "system.group.administrator",
        "state": xyz
      },
      "_id": "deconz.0.Sensors.12.DimUp",
      "type": "state"
    }
    

    So sieht mein Blockly aus:

    Xiaomi_Dimm.png

    Bis jetzt funktioniert es einwandfrei.
    Über Rückmeldungen und Anregungen würde ich mich freuen.

    Wir haben uns verirrt, kommen aber gut voran.

    1 Antwort Letzte Antwort
    0
    • D Offline
      D Offline
      duffbeer2000
      schrieb am zuletzt editiert von duffbeer2000
      #2

      Hi @RalfTh was du mal ausprobieren könntest ist folgendes:

      • Es gibt zwei Webinterfaces bei Deconz:
      1. http://x.x.x.x:8189/pwa -->Phoscon
      2. http://x.x.x.x:8189 --> Wireless Light Control

      Das Interessante ist hier die "Wireless Light Control" Oberfläche, die ist auch über die Phoscon Oberfläche unter Hilfe zu finden "Alte WebApp Version Wireless Light Control öffnen (2016)"
      Wenn du die öffnest könntest mal schauen ob du in dieser unter Groups den Xiaomi/Aqara Button findest. Wenn ja kannst du ihm über "Edit Members" die Osram Lampe zuweisen, dann ist sie direkt Steuerbar auch wenn das Gateway offline ist und du kannst dir das Script sparen ;)

      RalfThR 1 Antwort Letzte Antwort
      0
      • D duffbeer2000

        Hi @RalfTh was du mal ausprobieren könntest ist folgendes:

        • Es gibt zwei Webinterfaces bei Deconz:
        1. http://x.x.x.x:8189/pwa -->Phoscon
        2. http://x.x.x.x:8189 --> Wireless Light Control

        Das Interessante ist hier die "Wireless Light Control" Oberfläche, die ist auch über die Phoscon Oberfläche unter Hilfe zu finden "Alte WebApp Version Wireless Light Control öffnen (2016)"
        Wenn du die öffnest könntest mal schauen ob du in dieser unter Groups den Xiaomi/Aqara Button findest. Wenn ja kannst du ihm über "Edit Members" die Osram Lampe zuweisen, dann ist sie direkt Steuerbar auch wenn das Gateway offline ist und du kannst dir das Script sparen ;)

        RalfThR Offline
        RalfThR Offline
        RalfTh
        schrieb am zuletzt editiert von
        #3

        Hi @duffbeer2000

        War ein Super Tip. Ich habe ihn natürlich gleich mal ausprobiert. Hat allerdings nicht funktioniert, weil ich den Schalter keiner Gruppe zuordnen kann. Das geht weder über die neue Oberfläche "pwa", noch über die alte Weboberfläche "
        Wireless Light Control".
        Außerdem versuche ich es zu vermeiden, die Logik auf mehrere Ebenen zu verteilen. Das erhöht, meiner Meinung nach, den Pflegeaufwand und man verliert schnell den Überblick.
        Aber dazu gelernt habe ich allemal was, danke für den Hinweis.

        Gruß
        Ralf

        Wir haben uns verirrt, kommen aber gut voran.

        1 Antwort Letzte Antwort
        0
        • X Offline
          X Offline
          xbow42
          schrieb am zuletzt editiert von xbow42
          #4

          Gute Idee hab mir den Code mal etwas angepasst und werde ihn demächst für einen LEDstreifen verwenden.
          Statt dem DP wird eine ScriptVariable benutzt. 2. Variable zum anpassen der Dimmgeschwindigkeit.
          Bereichsgrenzenüberprüfung um Bedingungen hab ich auch noch etwas angepasset.
          Würde mir wünschen, dass man zukünftig auch Konstanten definieren kann.

          Was macht deine Lampe wenn du in den negativen Bereich dimmst? Ich denke mal der ioBroker übernimmt da die "Absicherung" über die DP-Eigenschaft min=0 für dich.

          IDs für die Lampe konnte ich noch nicht setzen da die Lampe(LEDstreifen) noch nicht eingebunden ist.
          Das Dimmverhalten im unteren Bereich werde ich dann noch an die Hardware anpassen...
          ButtonDimmer.png

          Gruß Michael

          RalfThR Chris TailorC 2 Antworten Letzte Antwort
          0
          • X xbow42

            Gute Idee hab mir den Code mal etwas angepasst und werde ihn demächst für einen LEDstreifen verwenden.
            Statt dem DP wird eine ScriptVariable benutzt. 2. Variable zum anpassen der Dimmgeschwindigkeit.
            Bereichsgrenzenüberprüfung um Bedingungen hab ich auch noch etwas angepasset.
            Würde mir wünschen, dass man zukünftig auch Konstanten definieren kann.

            Was macht deine Lampe wenn du in den negativen Bereich dimmst? Ich denke mal der ioBroker übernimmt da die "Absicherung" über die DP-Eigenschaft min=0 für dich.

            IDs für die Lampe konnte ich noch nicht setzen da die Lampe(LEDstreifen) noch nicht eingebunden ist.
            Das Dimmverhalten im unteren Bereich werde ich dann noch an die Hardware anpassen...
            ButtonDimmer.png

            Gruß Michael

            RalfThR Offline
            RalfThR Offline
            RalfTh
            schrieb am zuletzt editiert von RalfTh
            #5

            @xbow42 Das mit dem Datenpunkt werde ich auch wieder rückgängig machen, da u.U. verloren gehen kann. Beim Dimm down schaltet die Lampe beim Wert 0 aus und es wird der Wert im DP auf 1 gesetzt. Egal was passiert, das ist der letzte Wert im DP. Habe das empirisch herausgefunden und mir keine Gedanken gemacht, ob der ioBroker da irgendwas übernimmt. Aber deine Frage ist interessant.

            Wir haben uns verirrt, kommen aber gut voran.

            1 Antwort Letzte Antwort
            0
            • X xbow42

              Gute Idee hab mir den Code mal etwas angepasst und werde ihn demächst für einen LEDstreifen verwenden.
              Statt dem DP wird eine ScriptVariable benutzt. 2. Variable zum anpassen der Dimmgeschwindigkeit.
              Bereichsgrenzenüberprüfung um Bedingungen hab ich auch noch etwas angepasset.
              Würde mir wünschen, dass man zukünftig auch Konstanten definieren kann.

              Was macht deine Lampe wenn du in den negativen Bereich dimmst? Ich denke mal der ioBroker übernimmt da die "Absicherung" über die DP-Eigenschaft min=0 für dich.

              IDs für die Lampe konnte ich noch nicht setzen da die Lampe(LEDstreifen) noch nicht eingebunden ist.
              Das Dimmverhalten im unteren Bereich werde ich dann noch an die Hardware anpassen...
              ButtonDimmer.png

              Gruß Michael

              Chris TailorC Offline
              Chris TailorC Offline
              Chris Tailor
              schrieb am zuletzt editiert von
              #6

              @xbow42 Dein Script sieht vielversprechend aus. Ich möchte mit meinem Aqara Taster u.a. auch Dimmen können. Kannst du mit uns den Code vom Blockly Script teilen? Besten Dank!

              X 1 Antwort Letzte Antwort
              0
              • Chris TailorC Chris Tailor

                @xbow42 Dein Script sieht vielversprechend aus. Ich möchte mit meinem Aqara Taster u.a. auch Dimmen können. Kannst du mit uns den Code vom Blockly Script teilen? Besten Dank!

                X Offline
                X Offline
                xbow42
                schrieb am zuletzt editiert von
                #7

                @Chris-Tailor

                ja gerne, hier!

                <xml xmlns="http://www.w3.org/1999/xhtml">
                  <variables>
                    <variable type="" id="$@Xd9{|qm8jQ+Mwc3U.~">boolDimUp</variable>
                    <variable type="" id="J_*D7PNVDjQBg_}AT~K(">byteDimStep</variable>
                    <variable type="undefined" id="DimUp">DimUp</variable>
                    <variable type="undefined" id="DimDown">DimDown</variable>
                  </variables>
                  <block type="variables_set" id="d_7Uh1MBz1[pcQ=sV-ul" x="263" y="38">
                    <field name="VAR" id="$@Xd9{|qm8jQ+Mwc3U.~" variabletype="">boolDimUp</field>
                    <value name="VALUE">
                      <block type="logic_boolean" id="|_x8_A-@(p!y@S.-f+2,">
                        <field name="BOOL">TRUE</field>
                      </block>
                    </value>
                    <next>
                      <block type="variables_set" id="nU(CPCL?!eQn2L4sI,.5">
                        <field name="VAR" id="J_*D7PNVDjQBg_}AT~K(" variabletype="">byteDimStep</field>
                        <value name="VALUE">
                          <block type="math_number" id="11d27pY-hGqclzZa:33;">
                            <field name="NUM">20</field>
                          </block>
                        </value>
                        <next>
                          <block type="on" id="j[0GDvTf;q)0*e6)BV0U">
                            <field name="OID">deconz.0.Sensors.9.buttonpressed</field>
                            <field name="CONDITION">ne</field>
                            <field name="ACK_CONDITION"></field>
                            <statement name="STATEMENT">
                              <block type="controls_if" id="|3yF)Lwk1aNFNlrB-9Lz">
                                <mutation elseif="2" else="1"></mutation>
                                <value name="IF0">
                                  <block type="logic_compare" id="EZl7VBP032%43/JgvNBx">
                                    <field name="OP">EQ</field>
                                    <value name="A">
                                      <block type="on_source" id="u:rkIi5X9bTHuo#N5*+E">
                                        <field name="ATTR">state.val</field>
                                      </block>
                                    </value>
                                    <value name="B">
                                      <block type="math_number" id="$*{Msx$lE9LKtyoHu=um">
                                        <field name="NUM">1002</field>
                                      </block>
                                    </value>
                                  </block>
                                </value>
                                <statement name="DO0">
                                  <block type="comment" id="g#aI+?,c,AlbGc(qu2pQ">
                                    <field name="COMMENT">Singleclick</field>
                                    <next>
                                      <block type="toggle" id="*_wqyWXf9RLt;HBb72v/">
                                        <mutation delay_input="false"></mutation>
                                        <field name="OID">Object ID</field>
                                        <field name="WITH_DELAY">FALSE</field>
                                        <next>
                                          <block type="comment" id="fBURiyyCjk4UX#j6=Yr(">
                                            <field name="COMMENT">oben DP vom power/Switch der Lampe eintragen</field>
                                          </block>
                                        </next>
                                      </block>
                                    </next>
                                  </block>
                                </statement>
                                <value name="IF1">
                                  <block type="logic_compare" id="`_Bh1G]P@E6;[Ccz/}FW">
                                    <field name="OP">EQ</field>
                                    <value name="A">
                                      <block type="on_source" id="_KEYG9=WJ#:R_qy347t$">
                                        <field name="ATTR">state.val</field>
                                      </block>
                                    </value>
                                    <value name="B">
                                      <block type="math_number" id="Zu_Hj/#jB9Sa;g+*H*om">
                                        <field name="NUM">1004</field>
                                      </block>
                                    </value>
                                  </block>
                                </value>
                                <statement name="DO1">
                                  <block type="comment" id="sgYiUo{keAxKz2;jbEuL">
                                    <field name="COMMENT">Doubleclick</field>
                                  </block>
                                </statement>
                                <value name="IF2">
                                  <block type="logic_compare" id="-I%SP{um5Yq-lVCf{xT:">
                                    <field name="OP">EQ</field>
                                    <value name="A">
                                      <block type="on_source" id="*Ra:|_.xe5kKk^r[vfhX">
                                        <field name="ATTR">state.val</field>
                                      </block>
                                    </value>
                                    <value name="B">
                                      <block type="math_number" id="osOJWSxnh$x)J7dP)uk!">
                                        <field name="NUM">1001</field>
                                      </block>
                                    </value>
                                  </block>
                                </value>
                                <statement name="DO2">
                                  <block type="comment" id="Pi{hBp(jI~M^7M]Z]qOa">
                                    <field name="COMMENT">LongClickOn</field>
                                    <next>
                                      <block type="controls_if" id="S3[q!{8M;fr+Ja$:lf,1">
                                        <mutation else="1"></mutation>
                                        <value name="IF0">
                                          <block type="logic_compare" id="C5,z{ux.g)cf@C5(%%xc">
                                            <field name="OP">EQ</field>
                                            <value name="A">
                                              <block type="variables_get" id=";04Hj/e8zFn#32.rs152">
                                                <field name="VAR" id="$@Xd9{|qm8jQ+Mwc3U.~" variabletype="">boolDimUp</field>
                                              </block>
                                            </value>
                                            <value name="B">
                                              <block type="logic_boolean" id="n^vM`7u9@0k+ws4ou|^3">
                                                <field name="BOOL">TRUE</field>
                                              </block>
                                            </value>
                                          </block>
                                        </value>
                                        <statement name="DO0">
                                          <block type="comment" id="}[8b_ny:,QOaE::AA:?D">
                                            <field name="COMMENT">hochdimmen</field>
                                            <next>
                                              <block type="controls_if" id="n3]6D3`6=Ry]TeIZg^Bf">
                                                <value name="IF0">
                                                  <block type="logic_compare" id="b@1Az`))83tf5@U$O-bv">
                                                    <field name="OP">LT</field>
                                                    <value name="A">
                                                      <block type="get_value" id="L.A?;{Y*uEViwol5mCVk">
                                                        <field name="ATTR">val</field>
                                                        <field name="OID">ID auswählen</field>
                                                      </block>
                                                    </value>
                                                    <value name="B">
                                                      <block type="math_arithmetic" id="-$Yxg=z0#}G3VQavJkod">
                                                        <field name="OP">MINUS</field>
                                                        <value name="A">
                                                          <shadow type="math_number" id="Cr8{DBYd)%)Yc#+Ulx[(">
                                                            <field name="NUM">1</field>
                                                          </shadow>
                                                          <block type="math_number" id="71gW)]B$`uiwUt:D$(Fb">
                                                            <field name="NUM">255</field>
                                                          </block>
                                                        </value>
                                                        <value name="B">
                                                          <shadow type="math_number" id="2Ct4BTnHj8pa|F-05DH9">
                                                            <field name="NUM">1</field>
                                                          </shadow>
                                                          <block type="variables_get" id="$+T%/s@Q.D4e|(0RDdJ?">
                                                            <field name="VAR" id="J_*D7PNVDjQBg_}AT~K(" variabletype="">byteDimStep</field>
                                                          </block>
                                                        </value>
                                                      </block>
                                                    </value>
                                                  </block>
                                                </value>
                                                <statement name="DO0">
                                                  <block type="comment" id="9aBnou3LWY8QKGAh,FL_">
                                                    <field name="COMMENT">oben DP der Lampe mit dem Dimmwert</field>
                                                    <next>
                                                      <block type="timeouts_settimeout" id="3~e@)k`KlP)u$.i8OsF5">
                                                        <field name="NAME">DimUp</field>
                                                        <field name="DELAY">200</field>
                                                        <field name="UNIT">ms</field>
                                                        <statement name="STATEMENT">
                                                          <block type="control" id="g)=8KSGNsReE5wh,1GN2">
                                                            <mutation delay_input="false"></mutation>
                                                            <field name="OID">Object ID</field>
                                                            <field name="WITH_DELAY">FALSE</field>
                                                            <value name="VALUE">
                                                              <block type="math_arithmetic" id="_AeuL^V7cxF;2Iyr~H9e">
                                                                <field name="OP">ADD</field>
                                                                <value name="A">
                                                                  <shadow type="math_number" id=";K_9h$DTpB*2-OX7483^">
                                                                    <field name="NUM">1</field>
                                                                  </shadow>
                                                                  <block type="get_value" id="kyf;E$+Fve-OHfdE6-@1">
                                                                    <field name="ATTR">val</field>
                                                                    <field name="OID">ID auswählen</field>
                                                                  </block>
                                                                </value>
                                                                <value name="B">
                                                                  <shadow type="math_number" id="*Q;z,cF-F1(c6JV5~[9R">
                                                                    <field name="NUM">20</field>
                                                                  </shadow>
                                                                  <block type="variables_get" id="e?o9zf={Fv8[V3YSt(Lq">
                                                                    <field name="VAR" id="J_*D7PNVDjQBg_}AT~K(" variabletype="">byteDimStep</field>
                                                                  </block>
                                                                </value>
                                                              </block>
                                                            </value>
                                                            <next>
                                                              <block type="comment" id="Nom]+,x{!apUs_)FhlfR">
                                                                <field name="COMMENT">oben jeweils DB der Lampe mit dem Dimmwert</field>
                                                                <next>
                                                                  <block type="variables_set" id=",BXqw|SCS`(1rlhh*r:B">
                                                                    <field name="VAR" id="$@Xd9{|qm8jQ+Mwc3U.~" variabletype="">boolDimUp</field>
                                                                    <value name="VALUE">
                                                                      <block type="logic_boolean" id="2*#F$cA)p1]ebce/UuZ=">
                                                                        <field name="BOOL">FALSE</field>
                                                                      </block>
                                                                    </value>
                                                                  </block>
                                                                </next>
                                                              </block>
                                                            </next>
                                                          </block>
                                                        </statement>
                                                      </block>
                                                    </next>
                                                  </block>
                                                </statement>
                                              </block>
                                            </next>
                                          </block>
                                        </statement>
                                        <statement name="ELSE">
                                          <block type="comment" id="-BZZW8}5+b6+PU0n|Gn/">
                                            <field name="COMMENT">runterdimmen</field>
                                            <next>
                                              <block type="controls_if" id="X^4p#G8%1Xu417mfexv0">
                                                <value name="IF0">
                                                  <block type="logic_compare" id="Jjk`j^uvH)x:Et7|*!N}">
                                                    <field name="OP">GTE</field>
                                                    <value name="A">
                                                      <block type="get_value" id="T=E6_)Wq$Ie4e.8pE83g">
                                                        <field name="ATTR">val</field>
                                                        <field name="OID">ID auswählen</field>
                                                      </block>
                                                    </value>
                                                    <value name="B">
                                                      <block type="variables_get" id="4[@1OYrz@uN~11077{R9">
                                                        <field name="VAR" id="J_*D7PNVDjQBg_}AT~K(" variabletype="">byteDimStep</field>
                                                      </block>
                                                    </value>
                                                  </block>
                                                </value>
                                                <statement name="DO0">
                                                  <block type="comment" id="lAs~k+XYys#5x#?gLuUJ">
                                                    <field name="COMMENT">oben DP der Lampe mit dem Dimmwert</field>
                                                    <next>
                                                      <block type="timeouts_settimeout" id="LM;w.ep*r8}?*3}epT9O">
                                                        <field name="NAME">DimDown</field>
                                                        <field name="DELAY">200</field>
                                                        <field name="UNIT">ms</field>
                                                        <statement name="STATEMENT">
                                                          <block type="control" id="3O^VgH^FlM,y)?Iw[8tR">
                                                            <mutation delay_input="false"></mutation>
                                                            <field name="OID">Object ID</field>
                                                            <field name="WITH_DELAY">FALSE</field>
                                                            <value name="VALUE">
                                                              <block type="math_arithmetic" id="D[6$nfxKB4O@nr.l5Yse">
                                                                <field name="OP">MINUS</field>
                                                                <value name="A">
                                                                  <shadow type="math_number" id=";K_9h$DTpB*2-OX7483^">
                                                                    <field name="NUM">1</field>
                                                                  </shadow>
                                                                  <block type="get_value" id="2,BB|Y,^}{,Gmkqr=d4^">
                                                                    <field name="ATTR">val</field>
                                                                    <field name="OID">ID auswählen</field>
                                                                  </block>
                                                                </value>
                                                                <value name="B">
                                                                  <shadow type="math_number" id="RxFac^8|K)6Yr7j07E1e">
                                                                    <field name="NUM">20</field>
                                                                  </shadow>
                                                                  <block type="variables_get" id="djTult6KCcO5~tCJ|P_B">
                                                                    <field name="VAR" id="J_*D7PNVDjQBg_}AT~K(" variabletype="">byteDimStep</field>
                                                                  </block>
                                                                </value>
                                                              </block>
                                                            </value>
                                                            <next>
                                                              <block type="comment" id="5F_:8b;5$VWMWu[9LUZ[">
                                                                <field name="COMMENT">oben jeweils DB der Lampe mit dem Dimmwert</field>
                                                                <next>
                                                                  <block type="variables_set" id="^Txx_OsJZN|[2fjzrCm=">
                                                                    <field name="VAR" id="$@Xd9{|qm8jQ+Mwc3U.~" variabletype="">boolDimUp</field>
                                                                    <value name="VALUE">
                                                                      <block type="logic_boolean" id="St+d?yXd)ot{hRzXcF3(">
                                                                        <field name="BOOL">TRUE</field>
                                                                      </block>
                                                                    </value>
                                                                  </block>
                                                                </next>
                                                              </block>
                                                            </next>
                                                          </block>
                                                        </statement>
                                                      </block>
                                                    </next>
                                                  </block>
                                                </statement>
                                              </block>
                                            </next>
                                          </block>
                                        </statement>
                                      </block>
                                    </next>
                                  </block>
                                </statement>
                                <statement name="ELSE">
                                  <block type="comment" id="Q?n#x8W:iXKeqeKmBVck">
                                    <field name="COMMENT">LongClickOff / Wert=1003</field>
                                    <next>
                                      <block type="timeouts_cleartimeout" id="=17cm0)UgP]JN1|$~!?L">
                                        <field name="NAME">DimUp</field>
                                        <next>
                                          <block type="timeouts_cleartimeout" id="[5B/g#Akk{#x^)Xd}^fq">
                                            <field name="NAME">DimDown</field>
                                          </block>
                                        </next>
                                      </block>
                                    </next>
                                  </block>
                                </statement>
                              </block>
                            </statement>
                          </block>
                        </next>
                      </block>
                    </next>
                  </block>
                </xml>
                

                Chris TailorC 1 Antwort Letzte Antwort
                0
                • X xbow42

                  @Chris-Tailor

                  ja gerne, hier!

                  <xml xmlns="http://www.w3.org/1999/xhtml">
                    <variables>
                      <variable type="" id="$@Xd9{|qm8jQ+Mwc3U.~">boolDimUp</variable>
                      <variable type="" id="J_*D7PNVDjQBg_}AT~K(">byteDimStep</variable>
                      <variable type="undefined" id="DimUp">DimUp</variable>
                      <variable type="undefined" id="DimDown">DimDown</variable>
                    </variables>
                    <block type="variables_set" id="d_7Uh1MBz1[pcQ=sV-ul" x="263" y="38">
                      <field name="VAR" id="$@Xd9{|qm8jQ+Mwc3U.~" variabletype="">boolDimUp</field>
                      <value name="VALUE">
                        <block type="logic_boolean" id="|_x8_A-@(p!y@S.-f+2,">
                          <field name="BOOL">TRUE</field>
                        </block>
                      </value>
                      <next>
                        <block type="variables_set" id="nU(CPCL?!eQn2L4sI,.5">
                          <field name="VAR" id="J_*D7PNVDjQBg_}AT~K(" variabletype="">byteDimStep</field>
                          <value name="VALUE">
                            <block type="math_number" id="11d27pY-hGqclzZa:33;">
                              <field name="NUM">20</field>
                            </block>
                          </value>
                          <next>
                            <block type="on" id="j[0GDvTf;q)0*e6)BV0U">
                              <field name="OID">deconz.0.Sensors.9.buttonpressed</field>
                              <field name="CONDITION">ne</field>
                              <field name="ACK_CONDITION"></field>
                              <statement name="STATEMENT">
                                <block type="controls_if" id="|3yF)Lwk1aNFNlrB-9Lz">
                                  <mutation elseif="2" else="1"></mutation>
                                  <value name="IF0">
                                    <block type="logic_compare" id="EZl7VBP032%43/JgvNBx">
                                      <field name="OP">EQ</field>
                                      <value name="A">
                                        <block type="on_source" id="u:rkIi5X9bTHuo#N5*+E">
                                          <field name="ATTR">state.val</field>
                                        </block>
                                      </value>
                                      <value name="B">
                                        <block type="math_number" id="$*{Msx$lE9LKtyoHu=um">
                                          <field name="NUM">1002</field>
                                        </block>
                                      </value>
                                    </block>
                                  </value>
                                  <statement name="DO0">
                                    <block type="comment" id="g#aI+?,c,AlbGc(qu2pQ">
                                      <field name="COMMENT">Singleclick</field>
                                      <next>
                                        <block type="toggle" id="*_wqyWXf9RLt;HBb72v/">
                                          <mutation delay_input="false"></mutation>
                                          <field name="OID">Object ID</field>
                                          <field name="WITH_DELAY">FALSE</field>
                                          <next>
                                            <block type="comment" id="fBURiyyCjk4UX#j6=Yr(">
                                              <field name="COMMENT">oben DP vom power/Switch der Lampe eintragen</field>
                                            </block>
                                          </next>
                                        </block>
                                      </next>
                                    </block>
                                  </statement>
                                  <value name="IF1">
                                    <block type="logic_compare" id="`_Bh1G]P@E6;[Ccz/}FW">
                                      <field name="OP">EQ</field>
                                      <value name="A">
                                        <block type="on_source" id="_KEYG9=WJ#:R_qy347t$">
                                          <field name="ATTR">state.val</field>
                                        </block>
                                      </value>
                                      <value name="B">
                                        <block type="math_number" id="Zu_Hj/#jB9Sa;g+*H*om">
                                          <field name="NUM">1004</field>
                                        </block>
                                      </value>
                                    </block>
                                  </value>
                                  <statement name="DO1">
                                    <block type="comment" id="sgYiUo{keAxKz2;jbEuL">
                                      <field name="COMMENT">Doubleclick</field>
                                    </block>
                                  </statement>
                                  <value name="IF2">
                                    <block type="logic_compare" id="-I%SP{um5Yq-lVCf{xT:">
                                      <field name="OP">EQ</field>
                                      <value name="A">
                                        <block type="on_source" id="*Ra:|_.xe5kKk^r[vfhX">
                                          <field name="ATTR">state.val</field>
                                        </block>
                                      </value>
                                      <value name="B">
                                        <block type="math_number" id="osOJWSxnh$x)J7dP)uk!">
                                          <field name="NUM">1001</field>
                                        </block>
                                      </value>
                                    </block>
                                  </value>
                                  <statement name="DO2">
                                    <block type="comment" id="Pi{hBp(jI~M^7M]Z]qOa">
                                      <field name="COMMENT">LongClickOn</field>
                                      <next>
                                        <block type="controls_if" id="S3[q!{8M;fr+Ja$:lf,1">
                                          <mutation else="1"></mutation>
                                          <value name="IF0">
                                            <block type="logic_compare" id="C5,z{ux.g)cf@C5(%%xc">
                                              <field name="OP">EQ</field>
                                              <value name="A">
                                                <block type="variables_get" id=";04Hj/e8zFn#32.rs152">
                                                  <field name="VAR" id="$@Xd9{|qm8jQ+Mwc3U.~" variabletype="">boolDimUp</field>
                                                </block>
                                              </value>
                                              <value name="B">
                                                <block type="logic_boolean" id="n^vM`7u9@0k+ws4ou|^3">
                                                  <field name="BOOL">TRUE</field>
                                                </block>
                                              </value>
                                            </block>
                                          </value>
                                          <statement name="DO0">
                                            <block type="comment" id="}[8b_ny:,QOaE::AA:?D">
                                              <field name="COMMENT">hochdimmen</field>
                                              <next>
                                                <block type="controls_if" id="n3]6D3`6=Ry]TeIZg^Bf">
                                                  <value name="IF0">
                                                    <block type="logic_compare" id="b@1Az`))83tf5@U$O-bv">
                                                      <field name="OP">LT</field>
                                                      <value name="A">
                                                        <block type="get_value" id="L.A?;{Y*uEViwol5mCVk">
                                                          <field name="ATTR">val</field>
                                                          <field name="OID">ID auswählen</field>
                                                        </block>
                                                      </value>
                                                      <value name="B">
                                                        <block type="math_arithmetic" id="-$Yxg=z0#}G3VQavJkod">
                                                          <field name="OP">MINUS</field>
                                                          <value name="A">
                                                            <shadow type="math_number" id="Cr8{DBYd)%)Yc#+Ulx[(">
                                                              <field name="NUM">1</field>
                                                            </shadow>
                                                            <block type="math_number" id="71gW)]B$`uiwUt:D$(Fb">
                                                              <field name="NUM">255</field>
                                                            </block>
                                                          </value>
                                                          <value name="B">
                                                            <shadow type="math_number" id="2Ct4BTnHj8pa|F-05DH9">
                                                              <field name="NUM">1</field>
                                                            </shadow>
                                                            <block type="variables_get" id="$+T%/s@Q.D4e|(0RDdJ?">
                                                              <field name="VAR" id="J_*D7PNVDjQBg_}AT~K(" variabletype="">byteDimStep</field>
                                                            </block>
                                                          </value>
                                                        </block>
                                                      </value>
                                                    </block>
                                                  </value>
                                                  <statement name="DO0">
                                                    <block type="comment" id="9aBnou3LWY8QKGAh,FL_">
                                                      <field name="COMMENT">oben DP der Lampe mit dem Dimmwert</field>
                                                      <next>
                                                        <block type="timeouts_settimeout" id="3~e@)k`KlP)u$.i8OsF5">
                                                          <field name="NAME">DimUp</field>
                                                          <field name="DELAY">200</field>
                                                          <field name="UNIT">ms</field>
                                                          <statement name="STATEMENT">
                                                            <block type="control" id="g)=8KSGNsReE5wh,1GN2">
                                                              <mutation delay_input="false"></mutation>
                                                              <field name="OID">Object ID</field>
                                                              <field name="WITH_DELAY">FALSE</field>
                                                              <value name="VALUE">
                                                                <block type="math_arithmetic" id="_AeuL^V7cxF;2Iyr~H9e">
                                                                  <field name="OP">ADD</field>
                                                                  <value name="A">
                                                                    <shadow type="math_number" id=";K_9h$DTpB*2-OX7483^">
                                                                      <field name="NUM">1</field>
                                                                    </shadow>
                                                                    <block type="get_value" id="kyf;E$+Fve-OHfdE6-@1">
                                                                      <field name="ATTR">val</field>
                                                                      <field name="OID">ID auswählen</field>
                                                                    </block>
                                                                  </value>
                                                                  <value name="B">
                                                                    <shadow type="math_number" id="*Q;z,cF-F1(c6JV5~[9R">
                                                                      <field name="NUM">20</field>
                                                                    </shadow>
                                                                    <block type="variables_get" id="e?o9zf={Fv8[V3YSt(Lq">
                                                                      <field name="VAR" id="J_*D7PNVDjQBg_}AT~K(" variabletype="">byteDimStep</field>
                                                                    </block>
                                                                  </value>
                                                                </block>
                                                              </value>
                                                              <next>
                                                                <block type="comment" id="Nom]+,x{!apUs_)FhlfR">
                                                                  <field name="COMMENT">oben jeweils DB der Lampe mit dem Dimmwert</field>
                                                                  <next>
                                                                    <block type="variables_set" id=",BXqw|SCS`(1rlhh*r:B">
                                                                      <field name="VAR" id="$@Xd9{|qm8jQ+Mwc3U.~" variabletype="">boolDimUp</field>
                                                                      <value name="VALUE">
                                                                        <block type="logic_boolean" id="2*#F$cA)p1]ebce/UuZ=">
                                                                          <field name="BOOL">FALSE</field>
                                                                        </block>
                                                                      </value>
                                                                    </block>
                                                                  </next>
                                                                </block>
                                                              </next>
                                                            </block>
                                                          </statement>
                                                        </block>
                                                      </next>
                                                    </block>
                                                  </statement>
                                                </block>
                                              </next>
                                            </block>
                                          </statement>
                                          <statement name="ELSE">
                                            <block type="comment" id="-BZZW8}5+b6+PU0n|Gn/">
                                              <field name="COMMENT">runterdimmen</field>
                                              <next>
                                                <block type="controls_if" id="X^4p#G8%1Xu417mfexv0">
                                                  <value name="IF0">
                                                    <block type="logic_compare" id="Jjk`j^uvH)x:Et7|*!N}">
                                                      <field name="OP">GTE</field>
                                                      <value name="A">
                                                        <block type="get_value" id="T=E6_)Wq$Ie4e.8pE83g">
                                                          <field name="ATTR">val</field>
                                                          <field name="OID">ID auswählen</field>
                                                        </block>
                                                      </value>
                                                      <value name="B">
                                                        <block type="variables_get" id="4[@1OYrz@uN~11077{R9">
                                                          <field name="VAR" id="J_*D7PNVDjQBg_}AT~K(" variabletype="">byteDimStep</field>
                                                        </block>
                                                      </value>
                                                    </block>
                                                  </value>
                                                  <statement name="DO0">
                                                    <block type="comment" id="lAs~k+XYys#5x#?gLuUJ">
                                                      <field name="COMMENT">oben DP der Lampe mit dem Dimmwert</field>
                                                      <next>
                                                        <block type="timeouts_settimeout" id="LM;w.ep*r8}?*3}epT9O">
                                                          <field name="NAME">DimDown</field>
                                                          <field name="DELAY">200</field>
                                                          <field name="UNIT">ms</field>
                                                          <statement name="STATEMENT">
                                                            <block type="control" id="3O^VgH^FlM,y)?Iw[8tR">
                                                              <mutation delay_input="false"></mutation>
                                                              <field name="OID">Object ID</field>
                                                              <field name="WITH_DELAY">FALSE</field>
                                                              <value name="VALUE">
                                                                <block type="math_arithmetic" id="D[6$nfxKB4O@nr.l5Yse">
                                                                  <field name="OP">MINUS</field>
                                                                  <value name="A">
                                                                    <shadow type="math_number" id=";K_9h$DTpB*2-OX7483^">
                                                                      <field name="NUM">1</field>
                                                                    </shadow>
                                                                    <block type="get_value" id="2,BB|Y,^}{,Gmkqr=d4^">
                                                                      <field name="ATTR">val</field>
                                                                      <field name="OID">ID auswählen</field>
                                                                    </block>
                                                                  </value>
                                                                  <value name="B">
                                                                    <shadow type="math_number" id="RxFac^8|K)6Yr7j07E1e">
                                                                      <field name="NUM">20</field>
                                                                    </shadow>
                                                                    <block type="variables_get" id="djTult6KCcO5~tCJ|P_B">
                                                                      <field name="VAR" id="J_*D7PNVDjQBg_}AT~K(" variabletype="">byteDimStep</field>
                                                                    </block>
                                                                  </value>
                                                                </block>
                                                              </value>
                                                              <next>
                                                                <block type="comment" id="5F_:8b;5$VWMWu[9LUZ[">
                                                                  <field name="COMMENT">oben jeweils DB der Lampe mit dem Dimmwert</field>
                                                                  <next>
                                                                    <block type="variables_set" id="^Txx_OsJZN|[2fjzrCm=">
                                                                      <field name="VAR" id="$@Xd9{|qm8jQ+Mwc3U.~" variabletype="">boolDimUp</field>
                                                                      <value name="VALUE">
                                                                        <block type="logic_boolean" id="St+d?yXd)ot{hRzXcF3(">
                                                                          <field name="BOOL">TRUE</field>
                                                                        </block>
                                                                      </value>
                                                                    </block>
                                                                  </next>
                                                                </block>
                                                              </next>
                                                            </block>
                                                          </statement>
                                                        </block>
                                                      </next>
                                                    </block>
                                                  </statement>
                                                </block>
                                              </next>
                                            </block>
                                          </statement>
                                        </block>
                                      </next>
                                    </block>
                                  </statement>
                                  <statement name="ELSE">
                                    <block type="comment" id="Q?n#x8W:iXKeqeKmBVck">
                                      <field name="COMMENT">LongClickOff / Wert=1003</field>
                                      <next>
                                        <block type="timeouts_cleartimeout" id="=17cm0)UgP]JN1|$~!?L">
                                          <field name="NAME">DimUp</field>
                                          <next>
                                            <block type="timeouts_cleartimeout" id="[5B/g#Akk{#x^)Xd}^fq">
                                              <field name="NAME">DimDown</field>
                                            </block>
                                          </next>
                                        </block>
                                      </next>
                                    </block>
                                  </statement>
                                </block>
                              </statement>
                            </block>
                          </next>
                        </block>
                      </next>
                    </block>
                  </xml>
                  

                  Chris TailorC Offline
                  Chris TailorC Offline
                  Chris Tailor
                  schrieb am zuletzt editiert von
                  #8

                  @xbow42 Besten Dank. Ich habe das Script entsprechend angepasst und ausprobiert. Leider kann ich damit nicht richtig dimmen. Langes Drücken bei meinem Aqara Button (Deconz) löst nur einmal buttonpressed 1001 bzw. 2001 aus. Wenn ich also 4 Sekunden drücke wird nur einmal um den Wert byteDimstep erhöht bzw. verringert und nicht um ein vielfaches davon (je länger man drückt).

                  Muss ich da am Taster oder Deconz etwas umstellen? Nach 10 Sekunden Drücken würde der Taster ja so oder so in der Pairing Modus wechseln, was auch nicht so schön ist.

                  Wie hast du das gelöst bzw. was habe ich falsch gemacht?

                  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

                  514

                  Online

                  32.5k

                  Benutzer

                  81.7k

                  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