Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Blockly
    5. [Gelöst] Lichtsteuerung mit Aldi-Fernbed. (Megos) - Dimmen

    NEWS

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    [Gelöst] Lichtsteuerung mit Aldi-Fernbed. (Megos) - Dimmen

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

      Erst einmal ein freundliches "Hallo" in die Runde.

      Ich versuche mich erst ein paar Wochen mit Blockly. Bisher haben mir das Forum und diverse Tutorials über Probleme hinweggeholfen. Jetzt komme ich aber gerade nicht weiter.

      Ich versuche mit dieser Fernbedienung parallel zwei Leuchten zu steuern.

      Was funktioniert:

      • Ein- und Ausschalten
      • schrittweise Dimmen (+/-)

      Es funktioniert nicht:

      • Dimmen (Move) bis zur gewünschten Helligkeit (+/-)

      Als "Starthilfe" habe ich mir ein Blockly zur Ikea Fernbedienung angeschaut und entsprechend abgeändert nachgebaut. Abweichend zum Ikea-Produkt ändern sich bei folgenden Aktionen von den Dimmtasten der Status kurz von false auf true und gleich wieder auf false:

      • kurzer Klick - brightness_step_up /_down
      • Taste halten - brightness_move_up /_down
      • Taste nach halten loslassen - brightness_stop

      Bildschirmfoto vom 2021-06-06 22-37-10.png

      Ich wollte es folgendermaßen lösen (die letzten zwei Blöcke):
      Bildschirmfoto vom 2021-06-06 21-20-58.png

      <xml xmlns="https://developers.google.com/blockly/xml">
       <variables>
         <variable type="interval" id="DimUp">DimUp</variable>
         <variable type="interval" id="DimDown">DimDown</variable>
       </variables>
       <block type="on" id="uS%~x0t%?rDRcHu%s$5*" x="-513" y="-1962">
         <field name="OID">zigbee.0.bc33acfffe731408.on</field>
         <field name="CONDITION">ne</field>
         <field name="ACK_CONDITION"></field>
         <statement name="STATEMENT">
           <block type="controls_if" id="jAdrKqOw0IR9SCudU9?:">
             <value name="IF0">
               <block type="logic_compare" id="ja}tFN,qtVO+Zp-Y;K;{">
                 <field name="OP">EQ</field>
                 <value name="A">
                   <block type="get_value_var" id="KgxJiZS6RwaHPozl#R{V">
                     <field name="ATTR">val</field>
                     <value name="OID">
                       <shadow type="text" id="J`FYi5_*OTE?co{6dS*`">
                         <field name="TEXT"></field>
                       </shadow>
                       <block type="field_oid" id="1x{z%$Q%,cZNm+p);g%S">
                         <field name="oid">zigbee.0.bc33acfffe731408.on</field>
                       </block>
                     </value>
                   </block>
                 </value>
                 <value name="B">
                   <block type="logic_boolean" id="#w(~$P%hj33+ciPC]DgZ">
                     <field name="BOOL">TRUE</field>
                   </block>
                 </value>
               </block>
             </value>
             <statement name="DO0">
               <block type="control" id="p_?Fk?akInkgdP;=%|=k">
                 <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                 <field name="OID">zigbee.0.60a423fffe536881.state</field>
                 <field name="WITH_DELAY">FALSE</field>
                 <value name="VALUE">
                   <block type="logic_boolean" id="j5fA050UDjHy/WeV4D+V">
                     <field name="BOOL">TRUE</field>
                   </block>
                 </value>
                 <next>
                   <block type="control" id="$)FaNhZ:;~SaB+Le1z?e">
                     <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                     <field name="OID">zigbee.0.60a423fffee3bbea.state</field>
                     <field name="WITH_DELAY">FALSE</field>
                     <value name="VALUE">
                       <block type="logic_boolean" id="dy!|d7r,_sQ5nt(vr08z">
                         <field name="BOOL">TRUE</field>
                       </block>
                     </value>
                   </block>
                 </next>
               </block>
             </statement>
           </block>
         </statement>
         <next>
           <block type="on" id="ao0/yyxZ$7~Jae$INdZ1">
             <field name="OID">zigbee.0.bc33acfffe731408.off</field>
             <field name="CONDITION">ne</field>
             <field name="ACK_CONDITION"></field>
             <statement name="STATEMENT">
               <block type="controls_if" id="{HEG$G}nP,C6yjIr#y)X">
                 <value name="IF0">
                   <block type="logic_compare" id="e#9%!#fYM,AJDQlp@=G/">
                     <field name="OP">EQ</field>
                     <value name="A">
                       <block type="get_value_var" id="V[,T(Xp!(n**-f-f2Sj.">
                         <field name="ATTR">val</field>
                         <value name="OID">
                           <shadow type="text">
                             <field name="TEXT"></field>
                           </shadow>
                           <block type="field_oid" id="QuTHRMXl{i}@{u|0e`C;">
                             <field name="oid">zigbee.0.bc33acfffe731408.off</field>
                           </block>
                         </value>
                       </block>
                     </value>
                     <value name="B">
                       <block type="logic_boolean" id=")m(4t`5b5D;[zskeM;0i">
                         <field name="BOOL">TRUE</field>
                       </block>
                     </value>
                   </block>
                 </value>
                 <statement name="DO0">
                   <block type="control" id="uhU.qr0M_+IFs^?iiVt}">
                     <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                     <field name="OID">zigbee.0.60a423fffe536881.state</field>
                     <field name="WITH_DELAY">FALSE</field>
                     <value name="VALUE">
                       <block type="logic_boolean" id="B.+]/*y:-_ZNYzj0;Q-d">
                         <field name="BOOL">FALSE</field>
                       </block>
                     </value>
                     <next>
                       <block type="control" id="zBNH#4,~cn[OG~W0o~e*">
                         <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                         <field name="OID">zigbee.0.60a423fffee3bbea.state</field>
                         <field name="WITH_DELAY">FALSE</field>
                         <value name="VALUE">
                           <block type="logic_boolean" id="@PjppP3,!J+4{7wd[|xC">
                             <field name="BOOL">FALSE</field>
                           </block>
                         </value>
                       </block>
                     </next>
                   </block>
                 </statement>
               </block>
             </statement>
             <next>
               <block type="on" id="bMZS^l0V?4n,-~KWl){.">
                 <field name="OID">zigbee.0.bc33acfffe731408.brightness_step_up</field>
                 <field name="CONDITION">true</field>
                 <field name="ACK_CONDITION"></field>
                 <statement name="STATEMENT">
                   <block type="control" id="!Hjm{$c@||7P7E$_2LX#">
                     <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                     <field name="OID">zigbee.0.60a423fffe536881.brightness</field>
                     <field name="WITH_DELAY">FALSE</field>
                     <value name="VALUE">
                       <block type="math_constrain" id=":sPDuL_+/,dP+=}g939e">
                         <value name="VALUE">
                           <shadow type="math_number">
                             <field name="NUM">0</field>
                           </shadow>
                           <block type="math_arithmetic" id="tf=!5oF6_^~6f2j_hC5*">
                             <field name="OP">ADD</field>
                             <value name="A">
                               <shadow type="math_number">
                                 <field name="NUM">1</field>
                               </shadow>
                               <block type="get_value" id="PM5,BOb@s]E`A4AX;i_C">
                                 <field name="ATTR">val</field>
                                 <field name="OID">zigbee.0.60a423fffe536881.brightness</field>
                               </block>
                             </value>
                             <value name="B">
                               <shadow type="math_number" id="8e]FJ8O3y!3JwR=EZvm)">
                                 <field name="NUM">5</field>
                               </shadow>
                             </value>
                           </block>
                         </value>
                         <value name="LOW">
                           <shadow type="math_number" id="yg%FEKf!0CJXCVXD7)eH">
                             <field name="NUM">5</field>
                           </shadow>
                         </value>
                         <value name="HIGH">
                           <shadow type="math_number" id="L-.uhM[,(y)ztS`6/yw:">
                             <field name="NUM">100</field>
                           </shadow>
                         </value>
                       </block>
                     </value>
                     <next>
                       <block type="control" id="cCLZVo_I*DQhZw^N9$CB">
                         <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                         <field name="OID">zigbee.0.60a423fffee3bbea.brightness</field>
                         <field name="WITH_DELAY">FALSE</field>
                         <value name="VALUE">
                           <block type="math_constrain" id="=;OlI@B{Jfu.pB[}Z}p:">
                             <value name="VALUE">
                               <shadow type="math_number">
                                 <field name="NUM">0</field>
                               </shadow>
                               <block type="math_arithmetic" id="[?rv`)L}bF,hJU7DVk=O">
                                 <field name="OP">ADD</field>
                                 <value name="A">
                                   <shadow type="math_number">
                                     <field name="NUM">1</field>
                                   </shadow>
                                   <block type="get_value" id="s@+d{?QWB^Y3H98xJH`)">
                                     <field name="ATTR">val</field>
                                     <field name="OID">zigbee.0.60a423fffee3bbea.brightness</field>
                                   </block>
                                 </value>
                                 <value name="B">
                                   <shadow type="math_number" id="$QowC~T:(,.PyQ8tPG1s">
                                     <field name="NUM">5</field>
                                   </shadow>
                                 </value>
                               </block>
                             </value>
                             <value name="LOW">
                               <shadow type="math_number" id="%ofo-sDN-M6Tt-|bn$n4">
                                 <field name="NUM">5</field>
                               </shadow>
                             </value>
                             <value name="HIGH">
                               <shadow type="math_number" id="itL]a.GlDxQTL0,58,~R">
                                 <field name="NUM">100</field>
                               </shadow>
                             </value>
                           </block>
                         </value>
                       </block>
                     </next>
                   </block>
                 </statement>
                 <next>
                   <block type="on" id="4)`iL|uhZe+N|o5W|eFa">
                     <field name="OID">zigbee.0.bc33acfffe731408.brightness_step_down</field>
                     <field name="CONDITION">true</field>
                     <field name="ACK_CONDITION"></field>
                     <statement name="STATEMENT">
                       <block type="control" id="km-ijYhUYV?7XTJ5[ajA">
                         <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                         <field name="OID">zigbee.0.60a423fffe536881.brightness</field>
                         <field name="WITH_DELAY">FALSE</field>
                         <value name="VALUE">
                           <block type="math_constrain" id="Np*{p%e12$aK@`zSJGM@">
                             <value name="VALUE">
                               <shadow type="math_number">
                                 <field name="NUM">0</field>
                               </shadow>
                               <block type="math_arithmetic" id=".N2-xD=(Jn5;[sZ=Kp`,">
                                 <field name="OP">MINUS</field>
                                 <value name="A">
                                   <shadow type="math_number">
                                     <field name="NUM">1</field>
                                   </shadow>
                                   <block type="get_value" id="Q})z[@vz6vyyxWk:Uqq?">
                                     <field name="ATTR">val</field>
                                     <field name="OID">zigbee.0.60a423fffe536881.brightness</field>
                                   </block>
                                 </value>
                                 <value name="B">
                                   <shadow type="math_number" id="xgU|O-Dub3)gzuhG#8Zb">
                                     <field name="NUM">5</field>
                                   </shadow>
                                 </value>
                               </block>
                             </value>
                             <value name="LOW">
                               <shadow type="math_number" id="N!_FzXnoPFQ~zj#s7Md!">
                                 <field name="NUM">5</field>
                               </shadow>
                             </value>
                             <value name="HIGH">
                               <shadow type="math_number" id="P;ltHEa2?{J;*=|{`6XS">
                                 <field name="NUM">100</field>
                               </shadow>
                             </value>
                           </block>
                         </value>
                         <next>
                           <block type="control" id="ly54K-_c%7B@Nf*vVEjt">
                             <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                             <field name="OID">zigbee.0.60a423fffee3bbea.brightness</field>
                             <field name="WITH_DELAY">FALSE</field>
                             <value name="VALUE">
                               <block type="math_constrain" id="B.2|(oASmfr`16F8(PJe">
                                 <value name="VALUE">
                                   <shadow type="math_number">
                                     <field name="NUM">0</field>
                                   </shadow>
                                   <block type="math_arithmetic" id="DLYS,/=X{wGY:Vi#6hOk">
                                     <field name="OP">MINUS</field>
                                     <value name="A">
                                       <shadow type="math_number">
                                         <field name="NUM">1</field>
                                       </shadow>
                                       <block type="get_value" id="Y9qWX9trGEbtSi]K/~$S">
                                         <field name="ATTR">val</field>
                                         <field name="OID">zigbee.0.60a423fffee3bbea.brightness</field>
                                       </block>
                                     </value>
                                     <value name="B">
                                       <shadow type="math_number" id="Old+9W:KLuR0_Lphzm-8">
                                         <field name="NUM">5</field>
                                       </shadow>
                                     </value>
                                   </block>
                                 </value>
                                 <value name="LOW">
                                   <shadow type="math_number" id="A71~q@VwmgfX*9]KA8fz">
                                     <field name="NUM">5</field>
                                   </shadow>
                                 </value>
                                 <value name="HIGH">
                                   <shadow type="math_number" id=",o?}1~@jZ25g`S2c|bmk">
                                     <field name="NUM">100</field>
                                   </shadow>
                                 </value>
                               </block>
                             </value>
                           </block>
                         </next>
                       </block>
                     </statement>
                     <next>
                       <block type="on_ext" id="Rf:-nd6S^?~uPLXz/g!g">
                         <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
                         <field name="CONDITION">any</field>
                         <field name="ACK_CONDITION"></field>
                         <value name="OID0">
                           <shadow type="field_oid" id="{%pU.`fz,XepowqeCcX|">
                             <field name="oid">zigbee.0.bc33acfffe731408.brightness_move_up</field>
                           </shadow>
                           <block type="logic_operation" id="$lm2:mE@.9L?bsxi;c`L">
                             <field name="OP">OR</field>
                             <value name="A">
                               <block type="get_value" id="Q%T2~q--/dkfg[Xbjs%a">
                                 <field name="ATTR">val</field>
                                 <field name="OID">zigbee.0.bc33acfffe731408.brightness_move_up</field>
                               </block>
                             </value>
                             <value name="B">
                               <block type="get_value" id="xh!M}2|iU;F:(Ruh#Uo5">
                                 <field name="ATTR">val</field>
                                 <field name="OID">zigbee.0.bc33acfffe731408.brightness_stop</field>
                               </block>
                             </value>
                           </block>
                         </value>
                         <statement name="STATEMENT">
                           <block type="controls_if" id="^y?IRgToOGRSn+LD/wE6">
                             <value name="IF0">
                               <block type="logic_compare" id="D6o6Dm=;Ai0M%U$sDHC1">
                                 <field name="OP">EQ</field>
                                 <value name="A">
                                   <block type="get_value" id="`,J?%S[K]+BEsSYf8XM7">
                                     <field name="ATTR">val</field>
                                     <field name="OID">zigbee.0.bc33acfffe731408.brightness_move_up</field>
                                   </block>
                                 </value>
                                 <value name="B">
                                   <block type="logic_boolean" id="[m!,zvKtdp#)w[9nHE?z">
                                     <field name="BOOL">TRUE</field>
                                   </block>
                                 </value>
                               </block>
                             </value>
                             <statement name="DO0">
                               <block type="timeouts_setinterval" id="jDW$?(%oeN3|{NdazxuZ">
                                 <field name="NAME">DimUp</field>
                                 <field name="INTERVAL">500</field>
                                 <field name="UNIT">ms</field>
                                 <statement name="STATEMENT">
                                   <block type="control" id="G,{i?+;w$El`$NQcFJ#Y">
                                     <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                                     <field name="OID">zigbee.0.60a423fffe536881.brightness</field>
                                     <field name="WITH_DELAY">TRUE</field>
                                     <field name="DELAY_MS">200</field>
                                     <field name="UNIT">ms</field>
                                     <field name="CLEAR_RUNNING">FALSE</field>
                                     <value name="VALUE">
                                       <block type="math_constrain" id="Sm=JdL#X^%W$R#WnA:fr">
                                         <value name="VALUE">
                                           <shadow type="math_number">
                                             <field name="NUM">0</field>
                                           </shadow>
                                           <block type="math_arithmetic" id="O{e(J)j|c`7vd:#Kp3AJ">
                                             <field name="OP">ADD</field>
                                             <value name="A">
                                               <shadow type="math_number">
                                                 <field name="NUM">1</field>
                                               </shadow>
                                               <block type="get_value" id="bF/KN/-pzYiX@y|.I2l(">
                                                 <field name="ATTR">val</field>
                                                 <field name="OID">zigbee.0.60a423fffe536881.brightness</field>
                                               </block>
                                             </value>
                                             <value name="B">
                                               <shadow type="math_number" id="lB%L:SY7BbJx}VvS^mdi">
                                                 <field name="NUM">5</field>
                                               </shadow>
                                             </value>
                                           </block>
                                         </value>
                                         <value name="LOW">
                                           <shadow type="math_number" id="LGnQ}W+)t_Da]M,mP:i7">
                                             <field name="NUM">5</field>
                                           </shadow>
                                         </value>
                                         <value name="HIGH">
                                           <shadow type="math_number" id="kkS+#$jA9QQ@{=1T[DdA">
                                             <field name="NUM">100</field>
                                           </shadow>
                                         </value>
                                       </block>
                                     </value>
                                     <next>
                                       <block type="control" id="FUq8TT@Q.k)f5JG}o5Gi">
                                         <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                                         <field name="OID">zigbee.0.60a423fffee3bbea.brightness</field>
                                         <field name="WITH_DELAY">TRUE</field>
                                         <field name="DELAY_MS">200</field>
                                         <field name="UNIT">ms</field>
                                         <field name="CLEAR_RUNNING">FALSE</field>
                                         <value name="VALUE">
                                           <block type="math_constrain" id="83iq0J$=p2IHMr1]lF@p">
                                             <value name="VALUE">
                                               <shadow type="math_number">
                                                 <field name="NUM">0</field>
                                               </shadow>
                                               <block type="math_arithmetic" id="n{t~W=#djs7!$yi@r$#+">
                                                 <field name="OP">ADD</field>
                                                 <value name="A">
                                                   <shadow type="math_number">
                                                     <field name="NUM">1</field>
                                                   </shadow>
                                                   <block type="get_value" id="z*gckGYP:}Pzp`w$UwbG">
                                                     <field name="ATTR">val</field>
                                                     <field name="OID">zigbee.0.60a423fffee3bbea.brightness</field>
                                                   </block>
                                                 </value>
                                                 <value name="B">
                                                   <shadow type="math_number" id="zs!5{NP?8y6m61YAv]yH">
                                                     <field name="NUM">5</field>
                                                   </shadow>
                                                 </value>
                                               </block>
                                             </value>
                                             <value name="LOW">
                                               <shadow type="math_number" id="y|[BkGcxuXM%n]SqjV@y">
                                                 <field name="NUM">5</field>
                                               </shadow>
                                             </value>
                                             <value name="HIGH">
                                               <shadow type="math_number" id="n2w@9V%PFYkCEF6$5Jbr">
                                                 <field name="NUM">100</field>
                                               </shadow>
                                             </value>
                                           </block>
                                         </value>
                                       </block>
                                     </next>
                                   </block>
                                 </statement>
                               </block>
                             </statement>
                             <next>
                               <block type="controls_if" id="c5}V=F:6Z,o*dC}lc|i]">
                                 <value name="IF0">
                                   <block type="logic_compare" id="glHEIRb|iUGgv=ChE@WO">
                                     <field name="OP">EQ</field>
                                     <value name="A">
                                       <block type="get_value" id="LHt?1-7/cLy}$Hhluk`I">
                                         <field name="ATTR">val</field>
                                         <field name="OID">zigbee.0.bc33acfffe731408.brightness_move_up</field>
                                       </block>
                                     </value>
                                     <value name="B">
                                       <block type="logic_operation" id="OUwXm*`8~aKW!y!AB5x]">
                                         <field name="OP">AND</field>
                                         <value name="A">
                                           <block type="logic_boolean" id="rx+wmoMqZQ`zdUk8C;B1">
                                             <field name="BOOL">FALSE</field>
                                           </block>
                                         </value>
                                         <value name="B">
                                           <block type="logic_compare" id="5KdMQbYJ^F#+;9FQmfL?">
                                             <field name="OP">EQ</field>
                                             <value name="A">
                                               <block type="get_value" id="~!oNgUPKA)3~S{q~p5tb">
                                                 <field name="ATTR">val</field>
                                                 <field name="OID">zigbee.0.bc33acfffe731408.brightness_stop</field>
                                               </block>
                                             </value>
                                             <value name="B">
                                               <block type="logic_boolean" id="=Q,*z5$qTO=%)|SnXEwG">
                                                 <field name="BOOL">TRUE</field>
                                               </block>
                                             </value>
                                           </block>
                                         </value>
                                       </block>
                                     </value>
                                   </block>
                                 </value>
                                 <statement name="DO0">
                                   <block type="timeouts_clearinterval" id="51iVT`J-O,iEkX|8{ebv">
                                     <field name="NAME">DimUp</field>
                                   </block>
                                 </statement>
                               </block>
                             </next>
                           </block>
                         </statement>
                         <next>
                           <block type="on_ext" id="~f2u7931+*5lYfsOYPuE">
                             <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
                             <field name="CONDITION">any</field>
                             <field name="ACK_CONDITION"></field>
                             <value name="OID0">
                               <shadow type="field_oid" id="}.iNnEjEeA__^)+{RRaw">
                                 <field name="oid">zigbee.0.bc33acfffe731408.brightness_move_down</field>
                               </shadow>
                               <block type="logic_operation" id="#jnfU$bovTmxR48fX)bc">
                                 <field name="OP">OR</field>
                                 <value name="A">
                                   <block type="get_value" id="+A^MYRMPCBi..IAt._r~">
                                     <field name="ATTR">val</field>
                                     <field name="OID">zigbee.0.bc33acfffe731408.brightness_move_down</field>
                                   </block>
                                 </value>
                                 <value name="B">
                                   <block type="get_value" id="a-Qpp,^.y}I~-r53nt}n">
                                     <field name="ATTR">val</field>
                                     <field name="OID">zigbee.0.bc33acfffe731408.brightness_stop</field>
                                   </block>
                                 </value>
                               </block>
                             </value>
                             <statement name="STATEMENT">
                               <block type="controls_if" id="@*jS/@o:{gcR/a[7uxE5">
                                 <value name="IF0">
                                   <block type="logic_compare" id="tNC}/{,}L[t`2}]XOF5j">
                                     <field name="OP">EQ</field>
                                     <value name="A">
                                       <block type="get_value" id="`fyBOX/I)Y?%G#]ny=mF">
                                         <field name="ATTR">val</field>
                                         <field name="OID">zigbee.0.bc33acfffe731408.brightness_move_down</field>
                                       </block>
                                     </value>
                                     <value name="B">
                                       <block type="logic_boolean" id="Cg0@0ozu2aqPo2m]60Uu">
                                         <field name="BOOL">TRUE</field>
                                       </block>
                                     </value>
                                   </block>
                                 </value>
                                 <statement name="DO0">
                                   <block type="timeouts_setinterval" id="f1D7c3b:ncbfB?oEVY?o">
                                     <field name="NAME">DimDown</field>
                                     <field name="INTERVAL">500</field>
                                     <field name="UNIT">ms</field>
                                     <statement name="STATEMENT">
                                       <block type="control" id="G~aog:5TQ-@D$843vJ8e">
                                         <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                                         <field name="OID">zigbee.0.60a423fffe536881.brightness</field>
                                         <field name="WITH_DELAY">TRUE</field>
                                         <field name="DELAY_MS">200</field>
                                         <field name="UNIT">ms</field>
                                         <field name="CLEAR_RUNNING">FALSE</field>
                                         <value name="VALUE">
                                           <block type="math_constrain" id="l$0OVIX$E/{uIm*|*Kl-">
                                             <value name="VALUE">
                                               <shadow type="math_number" id="jvtU5709h{K[M4wVSUAq">
                                                 <field name="NUM">0</field>
                                               </shadow>
                                               <block type="math_arithmetic" id=",0JTv*]3gm/o3ux~XCdN">
                                                 <field name="OP">MINUS</field>
                                                 <value name="A">
                                                   <shadow type="math_number" id="Fe7;!X5`.mKe{^|Miuz@">
                                                     <field name="NUM">1</field>
                                                   </shadow>
                                                   <block type="get_value" id="m#_WhGb,~%xzH=BL~]/[">
                                                     <field name="ATTR">val</field>
                                                     <field name="OID">zigbee.0.60a423fffe536881.brightness</field>
                                                   </block>
                                                 </value>
                                                 <value name="B">
                                                   <shadow type="math_number" id="lx`,0fB8v.Q{(=|J~rIV">
                                                     <field name="NUM">5</field>
                                                   </shadow>
                                                 </value>
                                               </block>
                                             </value>
                                             <value name="LOW">
                                               <shadow type="math_number" id="UBwA|^Plh/j-H*Jc)5-x">
                                                 <field name="NUM">5</field>
                                               </shadow>
                                             </value>
                                             <value name="HIGH">
                                               <shadow type="math_number" id="(@5!I2U4-C7WB7mDIl~S">
                                                 <field name="NUM">100</field>
                                               </shadow>
                                             </value>
                                           </block>
                                         </value>
                                         <next>
                                           <block type="control" id="f@eT,/H1%FQkFGf3Q~n3">
                                             <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                                             <field name="OID">zigbee.0.60a423fffee3bbea.brightness</field>
                                             <field name="WITH_DELAY">TRUE</field>
                                             <field name="DELAY_MS">200</field>
                                             <field name="UNIT">ms</field>
                                             <field name="CLEAR_RUNNING">FALSE</field>
                                             <value name="VALUE">
                                               <block type="math_constrain" id="p|4,ks3LIPrdq}hd9,3`">
                                                 <value name="VALUE">
                                                   <shadow type="math_number">
                                                     <field name="NUM">0</field>
                                                   </shadow>
                                                   <block type="math_arithmetic" id="L?M8asOb~vm5PN,qCpJe">
                                                     <field name="OP">MINUS</field>
                                                     <value name="A">
                                                       <shadow type="math_number">
                                                         <field name="NUM">1</field>
                                                       </shadow>
                                                       <block type="get_value" id="UgY[hE{~Wk`MSlU!5#fU">
                                                         <field name="ATTR">val</field>
                                                         <field name="OID">zigbee.0.60a423fffee3bbea.brightness</field>
                                                       </block>
                                                     </value>
                                                     <value name="B">
                                                       <shadow type="math_number" id="/gnEsE!~]tx?L;w!i)b8">
                                                         <field name="NUM">5</field>
                                                       </shadow>
                                                     </value>
                                                   </block>
                                                 </value>
                                                 <value name="LOW">
                                                   <shadow type="math_number" id="E53sJ=}vypv:M*t)O!3E">
                                                     <field name="NUM">5</field>
                                                   </shadow>
                                                 </value>
                                                 <value name="HIGH">
                                                   <shadow type="math_number" id="Y?}AdZh6~uT{XZ@J|r6J">
                                                     <field name="NUM">100</field>
                                                   </shadow>
                                                 </value>
                                               </block>
                                             </value>
                                           </block>
                                         </next>
                                       </block>
                                     </statement>
                                   </block>
                                 </statement>
                                 <next>
                                   <block type="controls_if" id="k9(oTuw:83Dg^vJ?qZL_">
                                     <value name="IF0">
                                       <block type="logic_compare" id="PJ)E48;V`k9D`nJBh|9A">
                                         <field name="OP">EQ</field>
                                         <value name="A">
                                           <block type="get_value" id="rM*jCrjCc-ah2^[w9eNt">
                                             <field name="ATTR">val</field>
                                             <field name="OID">zigbee.0.bc33acfffe731408.brightness_move_down</field>
                                           </block>
                                         </value>
                                         <value name="B">
                                           <block type="logic_operation" id="So+279noY%rfTEssMhY7">
                                             <field name="OP">AND</field>
                                             <value name="A">
                                               <block type="logic_boolean" id="h1O0Sb6!TQsy[{!J3*;$">
                                                 <field name="BOOL">FALSE</field>
                                               </block>
                                             </value>
                                             <value name="B">
                                               <block type="logic_compare" id=")Yiz?QWhfx2kB[bf{xK?">
                                                 <field name="OP">EQ</field>
                                                 <value name="A">
                                                   <block type="get_value" id="Dlc4p?Y.gKcHG3v1mNab">
                                                     <field name="ATTR">val</field>
                                                     <field name="OID">zigbee.0.bc33acfffe731408.brightness_stop</field>
                                                   </block>
                                                 </value>
                                                 <value name="B">
                                                   <block type="logic_boolean" id="]asacxr}S`un%M^)w})g">
                                                     <field name="BOOL">TRUE</field>
                                                   </block>
                                                 </value>
                                               </block>
                                             </value>
                                           </block>
                                         </value>
                                       </block>
                                     </value>
                                     <statement name="DO0">
                                       <block type="timeouts_clearinterval" id="lj)vT]e]sKP/s!7;@u(]">
                                         <field name="NAME">DimDown</field>
                                       </block>
                                     </statement>
                                   </block>
                                 </next>
                               </block>
                             </statement>
                           </block>
                         </next>
                       </block>
                     </next>
                   </block>
                 </next>
               </block>
             </next>
           </block>
         </next>
       </block>
      </xml>
      

      Ich freue mich über Lösungsansätze von Euch! 👍

      Viele Grüße
      Klaus "Klarie"

      Asgothian paul53 K 3 Replies Last reply Reply Quote 0
      • M
        Muchul last edited by

        Nimm mal anstelle von wurde aktualisiert, größer als.
        Aktualisiert wird ja auch, wenn es wieder auf false geht.

        Klarie 1 Reply Last reply Reply Quote 1
        • Klarie
          Klarie @Muchul last edited by Klarie

          @muchul sagte in Lichtsteuerung mit Aldi-Fernbedienung (Megos) - Dimmen(Move):

          Nimm mal anstelle von wurde aktualisiert, größer als.
          Aktualisiert wird ja auch, wenn es wieder auf false geht.

          Danke für den Tipp, Muchul.
          Ich werde es heute Nachmittag ausprobieren!

          Aber sind wir da nicht eher bei der Optimierung? Berichtige mich bitte, wenn mein Gedankengang fasch ist, so wird das Script durch den Trigger doch nur häufiger angestoßen - oder? 🤔

          Homoran 1 Reply Last reply Reply Quote 0
          • Homoran
            Homoran Global Moderator Administrators @Klarie last edited by

            @klarie sagte in Lichtsteuerung mit Aldi-Fernbedienung (Megos) - Dimmen(Move):

            so wird das Script durch den Trigger doch nur häufiger angestoßen - oder?

            nein - halb so oft!
            größer als vorher trifft bei aus->ein aber nicht bei ein->aus zu.
            Auf Änderung treffen beide Änderungen zu

            Klarie 1 Reply Last reply Reply Quote 1
            • Asgothian
              Asgothian Developer @Klarie last edited by

              @klarie Sofern du

              • Deine Lampe auch via Zigbee angebunden hast
              • Der Zigbee Adapter mindestens die Version 1.5 hat

              kannst Du die Funktionalität am besten so realisieren:

              • Ein Trigger auf brightness_move_down, grösser als vorher, -> An der Lampe den State brightness_move auf -10
              • Ein Trigger auf brightness_move_up, grösser als vorher, -> An der Lampe den State brightness_move auf 10
              • Ein Trigger auf brightness_stop, grösser als vorher, -> An der Lampe den State brightness_move auf 0

              Wenn das heller oder dunkler werden zu schnell / zu langsam geht die 10 durch eine grössere / kleinere Zahl ersetzen. Wenn der State auf n (oder -n) gesetzt wird dann dimmt der zigbee Adapter in 255/n Sekunden von dunkel auf hell (hell auf dunkel)

              A.

              Klarie 1 Reply Last reply Reply Quote 1
              • paul53
                paul53 @Klarie last edited by paul53

                @klarie sagte: Ich wollte es folgendermaßen lösen (die letzten zwei Blöcke):

                Das funktioniert so nicht. Vorschlag:

                <xml xmlns="https://developers.google.com/blockly/xml">
                 <variables>
                   <variable type="interval" id="DimUp">DimUp</variable>
                   <variable type="interval" id="DimDown">DimDown</variable>
                 </variables>
                 <block type="on" id="uS%~x0t%?rDRcHu%s$5*" x="-384" y="-2087">
                   <field name="OID">zigbee.0.bc33acfffe731408.on</field>
                   <field name="CONDITION">gt</field>
                   <field name="ACK_CONDITION"></field>
                   <statement name="STATEMENT">
                     <block type="control" id="p_?Fk?akInkgdP;=%|=k">
                       <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                       <field name="OID">zigbee.0.60a423fffe536881.state</field>
                       <field name="WITH_DELAY">FALSE</field>
                       <value name="VALUE">
                         <block type="logic_boolean" id="j5fA050UDjHy/WeV4D+V">
                           <field name="BOOL">TRUE</field>
                         </block>
                       </value>
                       <next>
                         <block type="control" id="$)FaNhZ:;~SaB+Le1z?e">
                           <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                           <field name="OID">zigbee.0.60a423fffee3bbea.state</field>
                           <field name="WITH_DELAY">FALSE</field>
                           <value name="VALUE">
                             <block type="logic_boolean" id="dy!|d7r,_sQ5nt(vr08z">
                               <field name="BOOL">TRUE</field>
                             </block>
                           </value>
                         </block>
                       </next>
                     </block>
                   </statement>
                   <next>
                     <block type="on" id="ao0/yyxZ$7~Jae$INdZ1">
                       <field name="OID">zigbee.0.bc33acfffe731408.off</field>
                       <field name="CONDITION">gt</field>
                       <field name="ACK_CONDITION"></field>
                       <statement name="STATEMENT">
                         <block type="control" id="uhU.qr0M_+IFs^?iiVt}">
                           <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                           <field name="OID">zigbee.0.60a423fffe536881.state</field>
                           <field name="WITH_DELAY">FALSE</field>
                           <value name="VALUE">
                             <block type="logic_boolean" id="B.+]/*y:-_ZNYzj0;Q-d">
                               <field name="BOOL">FALSE</field>
                             </block>
                           </value>
                           <next>
                             <block type="control" id="zBNH#4,~cn[OG~W0o~e*">
                               <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                               <field name="OID">zigbee.0.60a423fffee3bbea.state</field>
                               <field name="WITH_DELAY">FALSE</field>
                               <value name="VALUE">
                                 <block type="logic_boolean" id="@PjppP3,!J+4{7wd[|xC">
                                   <field name="BOOL">FALSE</field>
                                 </block>
                               </value>
                             </block>
                           </next>
                         </block>
                       </statement>
                       <next>
                         <block type="on" id="bMZS^l0V?4n,-~KWl){.">
                           <field name="OID">zigbee.0.bc33acfffe731408.brightness_step_up</field>
                           <field name="CONDITION">gt</field>
                           <field name="ACK_CONDITION"></field>
                           <statement name="STATEMENT">
                             <block type="control" id="!Hjm{$c@||7P7E$_2LX#">
                               <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                               <field name="OID">zigbee.0.60a423fffe536881.brightness</field>
                               <field name="WITH_DELAY">FALSE</field>
                               <value name="VALUE">
                                 <block type="math_constrain" id=":sPDuL_+/,dP+=}g939e">
                                   <value name="VALUE">
                                     <shadow type="math_number">
                                       <field name="NUM">0</field>
                                     </shadow>
                                     <block type="math_arithmetic" id="tf=!5oF6_^~6f2j_hC5*">
                                       <field name="OP">ADD</field>
                                       <value name="A">
                                         <shadow type="math_number">
                                           <field name="NUM">1</field>
                                         </shadow>
                                         <block type="get_value" id="PM5,BOb@s]E`A4AX;i_C">
                                           <field name="ATTR">val</field>
                                           <field name="OID">zigbee.0.60a423fffe536881.brightness</field>
                                         </block>
                                       </value>
                                       <value name="B">
                                         <shadow type="math_number" id="8e]FJ8O3y!3JwR=EZvm)">
                                           <field name="NUM">5</field>
                                         </shadow>
                                       </value>
                                     </block>
                                   </value>
                                   <value name="LOW">
                                     <shadow type="math_number" id="yg%FEKf!0CJXCVXD7)eH">
                                       <field name="NUM">5</field>
                                     </shadow>
                                   </value>
                                   <value name="HIGH">
                                     <shadow type="math_number" id="L-.uhM[,(y)ztS`6/yw:">
                                       <field name="NUM">100</field>
                                     </shadow>
                                   </value>
                                 </block>
                               </value>
                               <next>
                                 <block type="control" id="cCLZVo_I*DQhZw^N9$CB">
                                   <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                   <field name="OID">zigbee.0.60a423fffee3bbea.brightness</field>
                                   <field name="WITH_DELAY">FALSE</field>
                                   <value name="VALUE">
                                     <block type="math_constrain" id="=;OlI@B{Jfu.pB[}Z}p:">
                                       <value name="VALUE">
                                         <shadow type="math_number">
                                           <field name="NUM">0</field>
                                         </shadow>
                                         <block type="math_arithmetic" id="[?rv`)L}bF,hJU7DVk=O">
                                           <field name="OP">ADD</field>
                                           <value name="A">
                                             <shadow type="math_number">
                                               <field name="NUM">1</field>
                                             </shadow>
                                             <block type="get_value" id="s@+d{?QWB^Y3H98xJH`)">
                                               <field name="ATTR">val</field>
                                               <field name="OID">zigbee.0.60a423fffee3bbea.brightness</field>
                                             </block>
                                           </value>
                                           <value name="B">
                                             <shadow type="math_number" id="$QowC~T:(,.PyQ8tPG1s">
                                               <field name="NUM">5</field>
                                             </shadow>
                                           </value>
                                         </block>
                                       </value>
                                       <value name="LOW">
                                         <shadow type="math_number" id="%ofo-sDN-M6Tt-|bn$n4">
                                           <field name="NUM">5</field>
                                         </shadow>
                                       </value>
                                       <value name="HIGH">
                                         <shadow type="math_number" id="itL]a.GlDxQTL0,58,~R">
                                           <field name="NUM">100</field>
                                         </shadow>
                                       </value>
                                     </block>
                                   </value>
                                 </block>
                               </next>
                             </block>
                           </statement>
                           <next>
                             <block type="on" id="4)`iL|uhZe+N|o5W|eFa">
                               <field name="OID">zigbee.0.bc33acfffe731408.brightness_step_down</field>
                               <field name="CONDITION">gt</field>
                               <field name="ACK_CONDITION"></field>
                               <statement name="STATEMENT">
                                 <block type="control" id="km-ijYhUYV?7XTJ5[ajA">
                                   <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                   <field name="OID">zigbee.0.60a423fffe536881.brightness</field>
                                   <field name="WITH_DELAY">FALSE</field>
                                   <value name="VALUE">
                                     <block type="math_constrain" id="Np*{p%e12$aK@`zSJGM@">
                                       <value name="VALUE">
                                         <shadow type="math_number">
                                           <field name="NUM">0</field>
                                         </shadow>
                                         <block type="math_arithmetic" id=".N2-xD=(Jn5;[sZ=Kp`,">
                                           <field name="OP">MINUS</field>
                                           <value name="A">
                                             <shadow type="math_number">
                                               <field name="NUM">1</field>
                                             </shadow>
                                             <block type="get_value" id="Q})z[@vz6vyyxWk:Uqq?">
                                               <field name="ATTR">val</field>
                                               <field name="OID">zigbee.0.60a423fffe536881.brightness</field>
                                             </block>
                                           </value>
                                           <value name="B">
                                             <shadow type="math_number" id="xgU|O-Dub3)gzuhG#8Zb">
                                               <field name="NUM">5</field>
                                             </shadow>
                                           </value>
                                         </block>
                                       </value>
                                       <value name="LOW">
                                         <shadow type="math_number" id="N!_FzXnoPFQ~zj#s7Md!">
                                           <field name="NUM">5</field>
                                         </shadow>
                                       </value>
                                       <value name="HIGH">
                                         <shadow type="math_number" id="P;ltHEa2?{J;*=|{`6XS">
                                           <field name="NUM">100</field>
                                         </shadow>
                                       </value>
                                     </block>
                                   </value>
                                   <next>
                                     <block type="control" id="ly54K-_c%7B@Nf*vVEjt">
                                       <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                       <field name="OID">zigbee.0.60a423fffee3bbea.brightness</field>
                                       <field name="WITH_DELAY">FALSE</field>
                                       <value name="VALUE">
                                         <block type="math_constrain" id="B.2|(oASmfr`16F8(PJe">
                                           <value name="VALUE">
                                             <shadow type="math_number">
                                               <field name="NUM">0</field>
                                             </shadow>
                                             <block type="math_arithmetic" id="DLYS,/=X{wGY:Vi#6hOk">
                                               <field name="OP">MINUS</field>
                                               <value name="A">
                                                 <shadow type="math_number">
                                                   <field name="NUM">1</field>
                                                 </shadow>
                                                 <block type="get_value" id="Y9qWX9trGEbtSi]K/~$S">
                                                   <field name="ATTR">val</field>
                                                   <field name="OID">zigbee.0.60a423fffee3bbea.brightness</field>
                                                 </block>
                                               </value>
                                               <value name="B">
                                                 <shadow type="math_number" id="Old+9W:KLuR0_Lphzm-8">
                                                   <field name="NUM">5</field>
                                                 </shadow>
                                               </value>
                                             </block>
                                           </value>
                                           <value name="LOW">
                                             <shadow type="math_number" id="A71~q@VwmgfX*9]KA8fz">
                                               <field name="NUM">5</field>
                                             </shadow>
                                           </value>
                                           <value name="HIGH">
                                             <shadow type="math_number" id=",o?}1~@jZ25g`S2c|bmk">
                                               <field name="NUM">100</field>
                                             </shadow>
                                           </value>
                                         </block>
                                       </value>
                                     </block>
                                   </next>
                                 </block>
                               </statement>
                               <next>
                                 <block type="on_ext" id="Rf:-nd6S^?~uPLXz/g!g">
                                   <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
                                   <field name="CONDITION">gt</field>
                                   <field name="ACK_CONDITION"></field>
                                   <value name="OID0">
                                     <shadow type="field_oid" id="{%pU.`fz,XepowqeCcX|">
                                       <field name="oid">zigbee.0.bc33acfffe731408.brightness_move_up</field>
                                     </shadow>
                                   </value>
                                   <statement name="STATEMENT">
                                     <block type="timeouts_setinterval" id="jDW$?(%oeN3|{NdazxuZ">
                                       <field name="NAME">DimUp</field>
                                       <field name="INTERVAL">500</field>
                                       <field name="UNIT">ms</field>
                                       <statement name="STATEMENT">
                                         <block type="control" id="G,{i?+;w$El`$NQcFJ#Y">
                                           <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                           <field name="OID">zigbee.0.60a423fffe536881.brightness</field>
                                           <field name="WITH_DELAY">FALSE</field>
                                           <value name="VALUE">
                                             <block type="math_constrain" id="Sm=JdL#X^%W$R#WnA:fr">
                                               <value name="VALUE">
                                                 <shadow type="math_number">
                                                   <field name="NUM">0</field>
                                                 </shadow>
                                                 <block type="math_arithmetic" id="O{e(J)j|c`7vd:#Kp3AJ">
                                                   <field name="OP">ADD</field>
                                                   <value name="A">
                                                     <shadow type="math_number">
                                                       <field name="NUM">1</field>
                                                     </shadow>
                                                     <block type="get_value" id="bF/KN/-pzYiX@y|.I2l(">
                                                       <field name="ATTR">val</field>
                                                       <field name="OID">zigbee.0.60a423fffe536881.brightness</field>
                                                     </block>
                                                   </value>
                                                   <value name="B">
                                                     <shadow type="math_number" id="lB%L:SY7BbJx}VvS^mdi">
                                                       <field name="NUM">5</field>
                                                     </shadow>
                                                   </value>
                                                 </block>
                                               </value>
                                               <value name="LOW">
                                                 <shadow type="math_number" id="LGnQ}W+)t_Da]M,mP:i7">
                                                   <field name="NUM">5</field>
                                                 </shadow>
                                               </value>
                                               <value name="HIGH">
                                                 <shadow type="math_number" id="kkS+#$jA9QQ@{=1T[DdA">
                                                   <field name="NUM">100</field>
                                                 </shadow>
                                               </value>
                                             </block>
                                           </value>
                                           <next>
                                             <block type="control" id="FUq8TT@Q.k)f5JG}o5Gi">
                                               <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                               <field name="OID">zigbee.0.60a423fffee3bbea.brightness</field>
                                               <field name="WITH_DELAY">FALSE</field>
                                               <value name="VALUE">
                                                 <block type="math_constrain" id="83iq0J$=p2IHMr1]lF@p">
                                                   <value name="VALUE">
                                                     <shadow type="math_number">
                                                       <field name="NUM">0</field>
                                                     </shadow>
                                                     <block type="math_arithmetic" id="n{t~W=#djs7!$yi@r$#+">
                                                       <field name="OP">ADD</field>
                                                       <value name="A">
                                                         <shadow type="math_number">
                                                           <field name="NUM">1</field>
                                                         </shadow>
                                                         <block type="get_value" id="z*gckGYP:}Pzp`w$UwbG">
                                                           <field name="ATTR">val</field>
                                                           <field name="OID">zigbee.0.60a423fffee3bbea.brightness</field>
                                                         </block>
                                                       </value>
                                                       <value name="B">
                                                         <shadow type="math_number" id="zs!5{NP?8y6m61YAv]yH">
                                                           <field name="NUM">5</field>
                                                         </shadow>
                                                       </value>
                                                     </block>
                                                   </value>
                                                   <value name="LOW">
                                                     <shadow type="math_number" id="y|[BkGcxuXM%n]SqjV@y">
                                                       <field name="NUM">5</field>
                                                     </shadow>
                                                   </value>
                                                   <value name="HIGH">
                                                     <shadow type="math_number" id="n2w@9V%PFYkCEF6$5Jbr">
                                                       <field name="NUM">100</field>
                                                     </shadow>
                                                   </value>
                                                 </block>
                                               </value>
                                             </block>
                                           </next>
                                         </block>
                                       </statement>
                                     </block>
                                   </statement>
                                   <next>
                                     <block type="on_ext" id="~f2u7931+*5lYfsOYPuE">
                                       <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
                                       <field name="CONDITION">gt</field>
                                       <field name="ACK_CONDITION"></field>
                                       <value name="OID0">
                                         <shadow type="field_oid" id="}.iNnEjEeA__^)+{RRaw">
                                           <field name="oid">zigbee.0.bc33acfffe731408.brightness_move_down</field>
                                         </shadow>
                                       </value>
                                       <statement name="STATEMENT">
                                         <block type="timeouts_setinterval" id="f1D7c3b:ncbfB?oEVY?o">
                                           <field name="NAME">DimDown</field>
                                           <field name="INTERVAL">500</field>
                                           <field name="UNIT">ms</field>
                                           <statement name="STATEMENT">
                                             <block type="control" id="G~aog:5TQ-@D$843vJ8e">
                                               <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                               <field name="OID">zigbee.0.60a423fffe536881.brightness</field>
                                               <field name="WITH_DELAY">FALSE</field>
                                               <value name="VALUE">
                                                 <block type="math_constrain" id="l$0OVIX$E/{uIm*|*Kl-">
                                                   <value name="VALUE">
                                                     <shadow type="math_number" id="jvtU5709h{K[M4wVSUAq">
                                                       <field name="NUM">0</field>
                                                     </shadow>
                                                     <block type="math_arithmetic" id=",0JTv*]3gm/o3ux~XCdN">
                                                       <field name="OP">MINUS</field>
                                                       <value name="A">
                                                         <shadow type="math_number" id="Fe7;!X5`.mKe{^|Miuz@">
                                                           <field name="NUM">1</field>
                                                         </shadow>
                                                         <block type="get_value" id="m#_WhGb,~%xzH=BL~]/[">
                                                           <field name="ATTR">val</field>
                                                           <field name="OID">zigbee.0.60a423fffe536881.brightness</field>
                                                         </block>
                                                       </value>
                                                       <value name="B">
                                                         <shadow type="math_number" id="lx`,0fB8v.Q{(=|J~rIV">
                                                           <field name="NUM">5</field>
                                                         </shadow>
                                                       </value>
                                                     </block>
                                                   </value>
                                                   <value name="LOW">
                                                     <shadow type="math_number" id="UBwA|^Plh/j-H*Jc)5-x">
                                                       <field name="NUM">5</field>
                                                     </shadow>
                                                   </value>
                                                   <value name="HIGH">
                                                     <shadow type="math_number" id="(@5!I2U4-C7WB7mDIl~S">
                                                       <field name="NUM">100</field>
                                                     </shadow>
                                                   </value>
                                                 </block>
                                               </value>
                                               <next>
                                                 <block type="control" id="f@eT,/H1%FQkFGf3Q~n3">
                                                   <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                   <field name="OID">zigbee.0.60a423fffee3bbea.brightness</field>
                                                   <field name="WITH_DELAY">FALSE</field>
                                                   <value name="VALUE">
                                                     <block type="math_constrain" id="p|4,ks3LIPrdq}hd9,3`">
                                                       <value name="VALUE">
                                                         <shadow type="math_number">
                                                           <field name="NUM">0</field>
                                                         </shadow>
                                                         <block type="math_arithmetic" id="L?M8asOb~vm5PN,qCpJe">
                                                           <field name="OP">MINUS</field>
                                                           <value name="A">
                                                             <shadow type="math_number">
                                                               <field name="NUM">1</field>
                                                             </shadow>
                                                             <block type="get_value" id="UgY[hE{~Wk`MSlU!5#fU">
                                                               <field name="ATTR">val</field>
                                                               <field name="OID">zigbee.0.60a423fffee3bbea.brightness</field>
                                                             </block>
                                                           </value>
                                                           <value name="B">
                                                             <shadow type="math_number" id="/gnEsE!~]tx?L;w!i)b8">
                                                               <field name="NUM">5</field>
                                                             </shadow>
                                                           </value>
                                                         </block>
                                                       </value>
                                                       <value name="LOW">
                                                         <shadow type="math_number" id="E53sJ=}vypv:M*t)O!3E">
                                                           <field name="NUM">5</field>
                                                         </shadow>
                                                       </value>
                                                       <value name="HIGH">
                                                         <shadow type="math_number" id="Y?}AdZh6~uT{XZ@J|r6J">
                                                           <field name="NUM">100</field>
                                                         </shadow>
                                                       </value>
                                                     </block>
                                                   </value>
                                                 </block>
                                               </next>
                                             </block>
                                           </statement>
                                         </block>
                                       </statement>
                                       <next>
                                         <block type="on_ext" id="CE^(EBx_T;.dFX)-sx+Q">
                                           <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
                                           <field name="CONDITION">gt</field>
                                           <field name="ACK_CONDITION"></field>
                                           <value name="OID0">
                                             <shadow type="field_oid" id=".G{w6o,fu(08Hebp.5Kl">
                                               <field name="oid">default</field>
                                             </shadow>
                                             <block type="text" id="H_/J44NqnG9?`LWbPWN`">
                                               <field name="TEXT">zigbee.0.bc33acfffe731408.brightness_stop</field>
                                             </block>
                                           </value>
                                           <statement name="STATEMENT">
                                             <block type="timeouts_clearinterval" id="Q,f}jSlYP/pXtQ?)KnjY">
                                               <field name="NAME">DimUp</field>
                                               <next>
                                                 <block type="timeouts_clearinterval" id="$X{dq%[sn,bVnfVK*e|0">
                                                   <field name="NAME">DimDown</field>
                                                 </block>
                                               </next>
                                             </block>
                                           </statement>
                                         </block>
                                       </next>
                                     </block>
                                   </next>
                                 </block>
                               </next>
                             </block>
                           </next>
                         </block>
                       </next>
                     </block>
                   </next>
                 </block>
                </xml>
                

                Blockly_temp.JPG

                Besser noch mit Variable und Funktion:

                Bild_2021-06-07_150008.png

                <xml xmlns="https://developers.google.com/blockly/xml">
                 <variables>
                   <variable id="?ojY]Sg6xuO!lo{L0h*[">level</variable>
                   <variable type="interval" id="DimUp">DimUp</variable>
                   <variable type="interval" id="DimDown">DimDown</variable>
                 </variables>
                 <block type="on" id="uS%~x0t%?rDRcHu%s$5*" x="-387" y="-1988">
                   <field name="OID">zigbee.0.bc33acfffe731408.on</field>
                   <field name="CONDITION">gt</field>
                   <field name="ACK_CONDITION"></field>
                   <statement name="STATEMENT">
                     <block type="control" id="p_?Fk?akInkgdP;=%|=k">
                       <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                       <field name="OID">zigbee.0.60a423fffe536881.state</field>
                       <field name="WITH_DELAY">FALSE</field>
                       <value name="VALUE">
                         <block type="logic_boolean" id="j5fA050UDjHy/WeV4D+V">
                           <field name="BOOL">TRUE</field>
                         </block>
                       </value>
                       <next>
                         <block type="control" id="$)FaNhZ:;~SaB+Le1z?e">
                           <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                           <field name="OID">zigbee.0.60a423fffee3bbea.state</field>
                           <field name="WITH_DELAY">FALSE</field>
                           <value name="VALUE">
                             <block type="logic_boolean" id="dy!|d7r,_sQ5nt(vr08z">
                               <field name="BOOL">TRUE</field>
                             </block>
                           </value>
                         </block>
                       </next>
                     </block>
                   </statement>
                   <next>
                     <block type="on" id="ao0/yyxZ$7~Jae$INdZ1">
                       <field name="OID">zigbee.0.bc33acfffe731408.off</field>
                       <field name="CONDITION">gt</field>
                       <field name="ACK_CONDITION"></field>
                       <statement name="STATEMENT">
                         <block type="control" id="uhU.qr0M_+IFs^?iiVt}">
                           <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                           <field name="OID">zigbee.0.60a423fffe536881.state</field>
                           <field name="WITH_DELAY">FALSE</field>
                           <value name="VALUE">
                             <block type="logic_boolean" id="B.+]/*y:-_ZNYzj0;Q-d">
                               <field name="BOOL">FALSE</field>
                             </block>
                           </value>
                           <next>
                             <block type="control" id="zBNH#4,~cn[OG~W0o~e*">
                               <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                               <field name="OID">zigbee.0.60a423fffee3bbea.state</field>
                               <field name="WITH_DELAY">FALSE</field>
                               <value name="VALUE">
                                 <block type="logic_boolean" id="@PjppP3,!J+4{7wd[|xC">
                                   <field name="BOOL">FALSE</field>
                                 </block>
                               </value>
                             </block>
                           </next>
                         </block>
                       </statement>
                       <next>
                         <block type="variables_set" id="6T!`vv!t]94Xl:`[l@WS">
                           <field name="VAR" id="?ojY]Sg6xuO!lo{L0h*[">level</field>
                           <value name="VALUE">
                             <block type="get_value_var" id="sz9#m#Jd_V3Z}Tw^n(@l">
                               <field name="ATTR">val</field>
                               <value name="OID">
                                 <shadow type="text" id="ocIg=QX]^{1=~h?lSUF,">
                                   <field name="TEXT">zigbee.0.60a423fffe536881.brightness</field>
                                 </shadow>
                               </value>
                             </block>
                           </value>
                           <next>
                             <block type="on" id="bMZS^l0V?4n,-~KWl){.">
                               <field name="OID">zigbee.0.bc33acfffe731408.brightness_step_up</field>
                               <field name="CONDITION">gt</field>
                               <field name="ACK_CONDITION"></field>
                               <statement name="STATEMENT">
                                 <block type="math_change" id="a:7U9pE{AuoUGBD~ph_*">
                                   <field name="VAR" id="?ojY]Sg6xuO!lo{L0h*[">level</field>
                                   <value name="DELTA">
                                     <shadow type="math_number" id="^^kJ^s`^e;?]K$X-ZsJ]">
                                       <field name="NUM">5</field>
                                     </shadow>
                                   </value>
                                   <next>
                                     <block type="procedures_callnoreturn" id="9DA~C$1zGQ)Sd`|2Z4=P">
                                       <mutation name="dimmen"></mutation>
                                     </block>
                                   </next>
                                 </block>
                               </statement>
                               <next>
                                 <block type="on" id="4)`iL|uhZe+N|o5W|eFa">
                                   <field name="OID">zigbee.0.bc33acfffe731408.brightness_step_down</field>
                                   <field name="CONDITION">gt</field>
                                   <field name="ACK_CONDITION"></field>
                                   <statement name="STATEMENT">
                                     <block type="math_change" id="27YtVt+%!f@MG%h]jw~J">
                                       <field name="VAR" id="?ojY]Sg6xuO!lo{L0h*[">level</field>
                                       <value name="DELTA">
                                         <shadow type="math_number" id="P0Orejeg9DD:x@bMhhkI">
                                           <field name="NUM">-5</field>
                                         </shadow>
                                       </value>
                                       <next>
                                         <block type="procedures_callnoreturn" id="Lj-+jVe._ce?}c6Q4fB{">
                                           <mutation name="dimmen"></mutation>
                                         </block>
                                       </next>
                                     </block>
                                   </statement>
                                   <next>
                                     <block type="on_ext" id="Rf:-nd6S^?~uPLXz/g!g">
                                       <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
                                       <field name="CONDITION">gt</field>
                                       <field name="ACK_CONDITION"></field>
                                       <value name="OID0">
                                         <shadow type="field_oid" id="{%pU.`fz,XepowqeCcX|">
                                           <field name="oid">zigbee.0.bc33acfffe731408.brightness_move_up</field>
                                         </shadow>
                                       </value>
                                       <statement name="STATEMENT">
                                         <block type="timeouts_setinterval" id="jDW$?(%oeN3|{NdazxuZ">
                                           <field name="NAME">DimUp</field>
                                           <field name="INTERVAL">500</field>
                                           <field name="UNIT">ms</field>
                                           <statement name="STATEMENT">
                                             <block type="math_change" id="}[qEt_-@#QH`wa/|08SH">
                                               <field name="VAR" id="?ojY]Sg6xuO!lo{L0h*[">level</field>
                                               <value name="DELTA">
                                                 <shadow type="math_number" id="2.=f=OA9cii_?bsh9}wd">
                                                   <field name="NUM">5</field>
                                                 </shadow>
                                               </value>
                                               <next>
                                                 <block type="procedures_callnoreturn" id="13y=.Xzf!xT(Zv/Dp:9w">
                                                   <mutation name="dimmen"></mutation>
                                                 </block>
                                               </next>
                                             </block>
                                           </statement>
                                         </block>
                                       </statement>
                                       <next>
                                         <block type="on_ext" id="~f2u7931+*5lYfsOYPuE">
                                           <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
                                           <field name="CONDITION">gt</field>
                                           <field name="ACK_CONDITION"></field>
                                           <value name="OID0">
                                             <shadow type="field_oid" id="}.iNnEjEeA__^)+{RRaw">
                                               <field name="oid">zigbee.0.bc33acfffe731408.brightness_move_down</field>
                                             </shadow>
                                           </value>
                                           <statement name="STATEMENT">
                                             <block type="timeouts_setinterval" id="f1D7c3b:ncbfB?oEVY?o">
                                               <field name="NAME">DimDown</field>
                                               <field name="INTERVAL">500</field>
                                               <field name="UNIT">ms</field>
                                               <statement name="STATEMENT">
                                                 <block type="math_change" id="x%/(jXg!;Q38mAw,n~Z,">
                                                   <field name="VAR" id="?ojY]Sg6xuO!lo{L0h*[">level</field>
                                                   <value name="DELTA">
                                                     <shadow type="math_number" id="`HMv?vb8m9@!nW-F4LNj">
                                                       <field name="NUM">-5</field>
                                                     </shadow>
                                                   </value>
                                                   <next>
                                                     <block type="procedures_callnoreturn" id="@`lUp!?aB,S^Xc(lK(M?">
                                                       <mutation name="dimmen"></mutation>
                                                     </block>
                                                   </next>
                                                 </block>
                                               </statement>
                                             </block>
                                           </statement>
                                           <next>
                                             <block type="on_ext" id="CE^(EBx_T;.dFX)-sx+Q">
                                               <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
                                               <field name="CONDITION">gt</field>
                                               <field name="ACK_CONDITION"></field>
                                               <value name="OID0">
                                                 <shadow type="field_oid" id=".G{w6o,fu(08Hebp.5Kl">
                                                   <field name="oid">default</field>
                                                 </shadow>
                                                 <block type="text" id="H_/J44NqnG9?`LWbPWN`">
                                                   <field name="TEXT">zigbee.0.bc33acfffe731408.brightness_stop</field>
                                                 </block>
                                               </value>
                                               <statement name="STATEMENT">
                                                 <block type="timeouts_clearinterval" id="Q,f}jSlYP/pXtQ?)KnjY">
                                                   <field name="NAME">DimUp</field>
                                                   <next>
                                                     <block type="timeouts_clearinterval" id="$X{dq%[sn,bVnfVK*e|0">
                                                       <field name="NAME">DimDown</field>
                                                     </block>
                                                   </next>
                                                 </block>
                                               </statement>
                                             </block>
                                           </next>
                                         </block>
                                       </next>
                                     </block>
                                   </next>
                                 </block>
                               </next>
                             </block>
                           </next>
                         </block>
                       </next>
                     </block>
                   </next>
                 </block>
                 <block type="procedures_defnoreturn" id="z36XbzxqX~V]/M:_qQme" x="-12" y="-1512">
                   <field name="NAME">dimmen</field>
                   <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
                   <statement name="STACK">
                     <block type="variables_set" id="hraiZmv(j3x%F,gkzzT4">
                       <field name="VAR" id="?ojY]Sg6xuO!lo{L0h*[">level</field>
                       <value name="VALUE">
                         <block type="math_constrain" id="p|4,ks3LIPrdq}hd9,3`">
                           <value name="VALUE">
                             <shadow type="math_number" id="|v++LPD~@|)A:%7Vl97m">
                               <field name="NUM">0</field>
                             </shadow>
                             <block type="variables_get" id="q^*w7Ne.g~47@2lO=HIT">
                               <field name="VAR" id="?ojY]Sg6xuO!lo{L0h*[">level</field>
                             </block>
                           </value>
                           <value name="LOW">
                             <shadow type="math_number" id="E53sJ=}vypv:M*t)O!3E">
                               <field name="NUM">5</field>
                             </shadow>
                           </value>
                           <value name="HIGH">
                             <shadow type="math_number" id="Y?}AdZh6~uT{XZ@J|r6J">
                               <field name="NUM">100</field>
                             </shadow>
                           </value>
                         </block>
                       </value>
                       <next>
                         <block type="control" id="G~aog:5TQ-@D$843vJ8e">
                           <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                           <field name="OID">zigbee.0.60a423fffe536881.brightness</field>
                           <field name="WITH_DELAY">FALSE</field>
                           <value name="VALUE">
                             <block type="variables_get" id="-9OAnw[X%z]c|rOT?C36">
                               <field name="VAR" id="?ojY]Sg6xuO!lo{L0h*[">level</field>
                             </block>
                           </value>
                           <next>
                             <block type="control" id="f@eT,/H1%FQkFGf3Q~n3">
                               <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                               <field name="OID">zigbee.0.60a423fffee3bbea.brightness</field>
                               <field name="WITH_DELAY">FALSE</field>
                               <value name="VALUE">
                                 <block type="variables_get" id="_5AC)W7hPnl57aulVSgU">
                                   <field name="VAR" id="?ojY]Sg6xuO!lo{L0h*[">level</field>
                                 </block>
                               </value>
                             </block>
                           </next>
                         </block>
                       </next>
                     </block>
                   </statement>
                 </block>
                </xml>
                

                1 Reply Last reply Reply Quote 1
                • Klarie
                  Klarie @Homoran last edited by Klarie

                  @homoran sagte in Lichtsteuerung mit Aldi-Fernbedienung (Megos) - Dimmen(Move):

                  nein - halb so oft!

                  So meinte ich das auch 😬

                  @asgothian sagte in Lichtsteuerung mit Aldi-Fernbedienung (Megos) - Dimmen(Move):

                  kannst Du die Funktionalität am besten so realisieren:

                  Danke!
                  Da lag mein Denkfehler. Also für jede Aktion ein extra Block. 👍

                  @paul53 sagte in Lichtsteuerung mit Aldi-Fernbedienung (Megos) - Dimmen(Move):

                  Das funktioniert so nicht. Vorschlag:

                  Das ist ja der umgesetzte Vorschlag von @Asgothian 😳

                  Besser noch mit Variable und Funktion:

                  @paul53, Du bist echt der Knaller!
                  Nicht nur, dass Du ein funktionierendes Script baust, Du optimierst sie auch noch gleich mal nebenbei. Danke, Du hast mir eine Menge Arbeit abgenommen. 😀
                  Als nächstes werde ich mich mit den Variablen vertraut machen, um das Blockly von Dir besser zu verstehen.

                  Es grüßt der Klaus mit einer funktionierenden Fernbedienung! 🤘
                  Danke an alle!

                  1 Reply Last reply Reply Quote 0
                  • Klarie
                    Klarie @Asgothian last edited by

                    @asgothian sagte in [Gelöst] Lichtsteuerung mit Aldi-Fernbed. (Megos) - Dimmen:

                    Wenn der State auf n (oder -n) gesetzt wird dann dimmt der zigbee Adapter in 255/n Sekunden von dunkel auf hell (hell auf dunkel)

                    Das verstehe ich nicht. Wo soll ich n/-n setzen?
                    In den Einstellungen des Leuchtmittels kann ich unter transition_time ein smoothes Ein- und Ausschalten über x Sekunden einstellen...
                    Bildschirmfoto vom 2021-06-08 01-28-20.png

                    Asgothian 1 Reply Last reply Reply Quote 0
                    • Asgothian
                      Asgothian Developer @Klarie last edited by

                      @klarie

                      Das steht doch oben:

                      @asgothian sagte in [Gelöst] Lichtsteuerung mit Aldi-Fernbed. (Megos) - Dimmen:

                      kannst Du die Funktionalität am besten so realisieren:

                      • Ein Trigger auf brightness_move_down, grösser als vorher, -> An der Lampe den State brightness_move auf -10
                      • Ein Trigger auf brightness_move_up, grösser als vorher, -> An der Lampe den State brightness_move auf 10
                      • Ein Trigger auf brightness_stop, grösser als vorher, -> An der Lampe den State brightness_move auf 0

                      Wenn das heller oder dunkler werden zu schnell / zu langsam geht die 10 durch eine grössere / kleinere Zahl ersetzen. Wenn der State auf n (oder -n) gesetzt wird dann dimmt der zigbee Adapter in 255/n Sekunden von dunkel auf hell (hell auf dunkel)

                      1623108545006-bildschirmfoto-vom-2021-06-08-01-28-20.png

                      ...

                      A.

                      1 Reply Last reply Reply Quote 1
                      • K
                        Kuehni84 @Klarie last edited by Kuehni84

                        @klarie

                        Dein Post ist zwar schon was älter. Aber mich würde mal interessieren. WIe du die Fernbedienung gekoppelt bekommen hast.

                        Ich habe den ConBee II Stick und finde auch den Schalter, er wird auch in ioBroker angezeigt als Objekt. Jedoch passiert bei Bedienung des Schalters nichs in ioBroker.

                        D.h. ich kann mit den Objekten im ioBroker nicht arbeiten.

                        Hier mal ein Screenshot:

                        MEGOS.png

                        Asgothian 1 Reply Last reply Reply Quote 0
                        • Asgothian
                          Asgothian Developer @Kuehni84 last edited by Asgothian

                          @kuehni84 sagte in [Gelöst] Lichtsteuerung mit Aldi-Fernbed. (Megos) - Dimmen:

                          ch habe den ConBee II Stick und finde auch den Schalter, er wird auch in ioBroker angezeigt als Objekt. Jedoch passiert bei Bedienung des Schalters nichs in ioBroker.
                          D.h. ich kann mit den Objekten im ioBroker nicht arbeiten.

                          Du nutzt das ganze am ConBee mit Phoscon/Deconz.
                          klarie nutz das ganze mit dem Zigbee Adapter.

                          Äpfel und Birnen. Warum du über Phoscon/Deconz keine Nachricht bekommst kann ich nicht sagen.

                          A.

                          K 1 Reply Last reply Reply Quote 0
                          • K
                            Kuehni84 @Asgothian last edited by

                            @asgothian

                            Danke erstmal für die Rückmeldung.

                            Habe gestern erfahren das dresden-elektronik zzt. nicht weiterentwickelt was Geräteunterstützung angeht. Ich kämpfe derzeit zusätzlich noch mit einem Heizthermostat. Nervt mich etwas ab, das da relativ wenig passieren wird in Zukunft.

                            Also der Conbee Stick ist für mich Geschichte. Habe mit heute den Sonoff USB Dongle Plus bestellt.

                            Asgothian 1 Reply Last reply Reply Quote 0
                            • Asgothian
                              Asgothian Developer @Kuehni84 last edited by

                              @kuehni84 sagte in [Gelöst] Lichtsteuerung mit Aldi-Fernbed. (Megos) - Dimmen:

                              Also der Conbee Stick ist für mich Geschichte. Habe mit heute den Sonoff USB Dongle Plus bestellt.

                              Du kannst den Conbee durchaus mit dem Zigbee Adapter nutzen sofern es stimmt das Dresden-elektronik die Geräteunterstützung auch über die Community aktuell eingestellt hat. Die Unterstützung des Conbee im Zigbee Adapter ist von der Unterstützung in der Phoscon software unabhängig.

                              A.

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

                              Support us

                              ioBroker
                              Community Adapters
                              Donate

                              654
                              Online

                              31.9k
                              Users

                              80.2k
                              Topics

                              1.3m
                              Posts

                              blockly
                              6
                              13
                              734
                              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