Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Blockly
    5. Nachtlampe über Sensor und Taster steuern

    NEWS

    • Wir empfehlen: Node.js 22.x

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker goes Matter ... Matter Adapter in Stable

    Nachtlampe über Sensor und Taster steuern

    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      albi_63 @UncleSam last edited by

      @unclesam
      Hy das hatte ich gemacht und der Datenpunkt schreibt kurz true und geht sofort wieder auf false. Ich habe eine Xiaomi Taster mit verschiedenen Click events.

      click	state
      Click event
      	state	button	Schlafzimmer		false
      

      Nachtlicht_DP.jpg

      paul53 crunchip 2 Replies Last reply Reply Quote 0
      • paul53
        paul53 @albi_63 last edited by

        @albi_63
        Setze eine Variable manuell_ein und werte sie aus:

        Bild_2021-01-16_194516.png

        A 1 Reply Last reply Reply Quote 0
        • crunchip
          crunchip Forum Testing Most Active @albi_63 last edited by

          @albi_63 said in Nachtlampe über Sensor und Taster steuern:

          und der Datenpunkt schreibt kurz true und geht sofort wieder auf false

          weil dein Xiaomi ein Taster ist und dein Trigger auf "wurde aktualisiert" steht,
          heisst du drückst, aktualisierung true, lässt du die Taste los, aktualisierung false, entsprechend schaltet dein selbst erstellter Datenpunkt

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

            @paul53
            Hoi Paul
            Danke für dein Ansatz:
            Lampe manuell ein aus funktioniert
            BWM schaltet ein aber nicht mehr aus
            So sieht mein script aus:
            Nachtlicht 2.jpg

            <xml xmlns="https://developers.google.com/blockly/xml">
             <variables>
               <variable id="hvwDAq^LjR-M(p:pnAqs">manuell_ein</variable>
               <variable type="timeout" id="timeout">timeout</variable>
             </variables>
             <block type="comment" id=":u.dX05IWI,be};L=IPY" x="-1312" y="-1762">
               <field name="COMMENT">Click</field>
               <next>
                 <block type="on" id="KQ*8.ox:OvD7*-L=MFM(">
                   <field name="OID">zigbee.0.00158d000407e31a.click</field>
                   <field name="CONDITION">true</field>
                   <field name="ACK_CONDITION"></field>
                   <statement name="STATEMENT">
                     <block type="timeouts_cleartimeout" id="q{jeb|uyZ[57cIZ$poJU">
                       <field name="NAME">timeout</field>
                       <next>
                         <block type="variables_set" id="1sMJi5*=g=AjtZ]DoHx$">
                           <field name="VAR" id="hvwDAq^LjR-M(p:pnAqs">manuell_ein</field>
                           <value name="VALUE">
                             <block type="logic_negate" id="k-7I8H^]YJVJFWN.,[Kf">
                               <value name="BOOL">
                                 <block type="get_value" id="rlW+ako/K{Y$GQR8oT:@">
                                   <field name="ATTR">val</field>
                                   <field name="OID">zigbee.0.00158d000407e31a.click</field>
                                 </block>
                               </value>
                             </block>
                           </value>
                           <next>
                             <block type="comment" id="c5!~7R{Ml2+gvYqHn,%)">
                               <field name="COMMENT">Nachtlicht</field>
                               <next>
                                 <block type="toggle" id="rV#O!Q1RhueZ]dZqGuX=">
                                   <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                   <field name="OID">yeelight-2.0.YeelightColorPulb-Schlafen.control.power</field>
                                   <field name="WITH_DELAY">FALSE</field>
                                   <next>
                                     <block type="control" id="fT{Q3gE(27rtV^gU6Nu0">
                                       <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                                       <field name="OID">yeelight-2.0.YeelightColorPulb-Schlafen.control.active_bright</field>
                                       <field name="WITH_DELAY">TRUE</field>
                                       <field name="DELAY_MS">100</field>
                                       <field name="UNIT">ms</field>
                                       <field name="CLEAR_RUNNING">FALSE</field>
                                       <value name="VALUE">
                                         <block type="math_number" id="_zE/JrMFpq;BZ3G[)$oH">
                                           <field name="NUM">20</field>
                                         </block>
                                       </value>
                                       <next>
                                         <block type="control" id="BuQ_]H~ElFUUlEPKM^M@">
                                           <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                                           <field name="OID">yeelight-2.0.YeelightColorPulb-Schlafen.control.rgb</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="text" id="I=e3]aC5H!ul7Jc{bmRm">
                                               <field name="TEXT">#eb8934</field>
                                             </block>
                                           </value>
                                         </block>
                                       </next>
                                     </block>
                                   </next>
                                 </block>
                               </next>
                             </block>
                           </next>
                         </block>
                       </next>
                     </block>
                   </statement>
                   <next>
                     <block type="comment" id="Pa-rB@81*`CuS!f3V0hf">
                       <field name="COMMENT">Motion</field>
                       <next>
                         <block type="on" id="lF{Oa!DmK.4-.WoKU:NE">
                           <field name="OID">zigbee.0.00158d0001e0d4fe.occupancy</field>
                           <field name="CONDITION">ne</field>
                           <field name="ACK_CONDITION"></field>
                           <statement name="STATEMENT">
                             <block type="comment" id="x#%#V_yErP_3yrY-{d+y">
                               <field name="COMMENT">Nachtlicht über motion</field>
                               <next>
                                 <block type="controls_if" id="3#^9G[-b+zkV)r8?r@?y">
                                   <mutation else="1"></mutation>
                                   <value name="IF0">
                                     <block type="logic_negate" id="99Kv0cDU.zPBt_@VV.Is">
                                       <value name="BOOL">
                                         <block type="variables_get" id="T^EHo3Ju[@-JN3nzV65a">
                                           <field name="VAR" id="hvwDAq^LjR-M(p:pnAqs">manuell_ein</field>
                                         </block>
                                       </value>
                                     </block>
                                   </value>
                                   <statement name="DO0">
                                     <block type="timeouts_cleartimeout" id="}P?BJ5G;n?90,p1M}dxo">
                                       <field name="NAME">timeout</field>
                                       <next>
                                         <block type="control" id="BA|4UT276)8u3;+KuI0,">
                                           <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                           <field name="OID">yeelight-2.0.YeelightColorPulb-Schlafen.control.power</field>
                                           <field name="WITH_DELAY">FALSE</field>
                                           <value name="VALUE">
                                             <block type="logic_boolean" id="z2h4yC`oe)))ma?k!/Ic">
                                               <field name="BOOL">TRUE</field>
                                             </block>
                                           </value>
                                           <next>
                                             <block type="control" id="9%McAKp.?{;RB-)-IaK.">
                                               <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                                               <field name="OID">yeelight-2.0.YeelightColorPulb-Schlafen.control.active_bright</field>
                                               <field name="WITH_DELAY">TRUE</field>
                                               <field name="DELAY_MS">100</field>
                                               <field name="UNIT">ms</field>
                                               <field name="CLEAR_RUNNING">FALSE</field>
                                               <value name="VALUE">
                                                 <block type="math_number" id="S^~bC8_dc:}$wdxK6*Tq">
                                                   <field name="NUM">20</field>
                                                 </block>
                                               </value>
                                               <next>
                                                 <block type="control" id="EWKKLn.}e2`!WXhYFiz!">
                                                   <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                                                   <field name="OID">yeelight-2.0.YeelightColorPulb-Schlafen.control.rgb</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="text" id="@iN}e1jA=M)u%fu=,i$:">
                                                       <field name="TEXT">#eb8934</field>
                                                     </block>
                                                   </value>
                                                 </block>
                                               </next>
                                             </block>
                                           </next>
                                         </block>
                                       </next>
                                     </block>
                                   </statement>
                                   <statement name="ELSE">
                                     <block type="timeouts_settimeout" id=".|uwn/q+L=H1rib1gaL=">
                                       <field name="NAME">timeout</field>
                                       <field name="DELAY">2</field>
                                       <field name="UNIT">min</field>
                                       <statement name="STATEMENT">
                                         <block type="control" id="?D28qe`qU~brep+{LD7P">
                                           <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                           <field name="OID">yeelight-2.0.YeelightColorPulb-Schlafen.control.power</field>
                                           <field name="WITH_DELAY">FALSE</field>
                                           <value name="VALUE">
                                             <block type="logic_boolean" id="aye^PJner)]E`fJuISf_">
                                               <field name="BOOL">FALSE</field>
                                             </block>
                                           </value>
                                         </block>
                                       </statement>
                                     </block>
                                   </statement>
                                 </block>
                               </next>
                             </block>
                           </statement>
                         </block>
                       </next>
                     </block>
                   </next>
                 </block>
               </next>
             </block>
            </xml>
            


            Wo liegt mein Fehler?

            paul53 1 Reply Last reply Reply Quote 0
            • A
              albi_63 @crunchip last edited by

              @crunchip
              Hy
              Ich hatte alle Varianten durchgespielt von wurde geändert, aktualisiert, ist wahr, ist unwahr, Ergebnis: true-false; true-false; true; false
              Wie kriege ich das hin dass der Datenpunkt auf true stehen bleibt und bei einem weiteren klick wieder auf false geht?

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

                @albi_63 said: Wo liegt mein Fehler?

                Die Variable manuell_ein muss mit dem negierten Wert von power (Licht) gesetzt werden.

                Bild_2021-01-16_222133.png

                A 2 Replies Last reply Reply Quote 0
                • A
                  albi_63 @paul53 last edited by

                  @paul53
                  es will nicht klappen......
                  Nachtlicht3.jpg

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

                    @paul53
                    die variable manuell wird mit dem wert auf true gestzt obwohl "nicht" davor steht
                    Lampe an variable true
                    Lampe aus variable false

                    22:33:18.553	warn	javascript.0 (20198) script.js.common.Xiaomi.Nachtlicht_Schlafen: true
                    22:34:44.060	warn	javascript.0 (20198) script.js.common.Xiaomi.Nachtlicht_Schlafen: false
                    

                    Der Wert wird nicht negiert

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

                      @albi_63 said: Der Wert wird nicht negiert

                      Doch der Wert wird negiert: Wenn die Lampe aus ist und der Tastendruck erfolgt, wird die Variable auf true gesetzt, anschließend wird mit "umschalten" die Lampe eingeschaltet, ist also manuell ein.
                      Der Motion-Teil ist falsch:

                      Bild_2021-01-16_225237.png

                      <xml xmlns="https://developers.google.com/blockly/xml">
                       <variables>
                         <variable id="hvwDAq^LjR-M(p:pnAqs">manuell_ein</variable>
                         <variable type="timeout" id="timeout">timeout</variable>
                       </variables>
                       <block type="comment" id=":u.dX05IWI,be};L=IPY" x="-1312" y="-1762">
                         <field name="COMMENT">Click</field>
                         <next>
                           <block type="on" id="KQ*8.ox:OvD7*-L=MFM(">
                             <field name="OID">zigbee.0.00158d000407e31a.click</field>
                             <field name="CONDITION">true</field>
                             <field name="ACK_CONDITION"></field>
                             <statement name="STATEMENT">
                               <block type="timeouts_cleartimeout" id="q{jeb|uyZ[57cIZ$poJU">
                                 <field name="NAME">timeout</field>
                                 <next>
                                   <block type="variables_set" id="1sMJi5*=g=AjtZ]DoHx$">
                                     <field name="VAR" id="hvwDAq^LjR-M(p:pnAqs">manuell_ein</field>
                                     <value name="VALUE">
                                       <block type="logic_negate" id="k-7I8H^]YJVJFWN.,[Kf">
                                         <value name="BOOL">
                                           <block type="get_value_var" id="/5nwrO$H{/j;]AN#Vk4o">
                                             <field name="ATTR">val</field>
                                             <value name="OID">
                                               <shadow type="text" id="$dH8YdEIVx,/~FI_M+~d">
                                                 <field name="TEXT">yeelight-2.0.YeelightColorPulb-Schlafen.control.power</field>
                                               </shadow>
                                             </value>
                                           </block>
                                         </value>
                                       </block>
                                     </value>
                                     <next>
                                       <block type="comment" id="c5!~7R{Ml2+gvYqHn,%)">
                                         <field name="COMMENT">Nachtlicht</field>
                                         <next>
                                           <block type="toggle" id="rV#O!Q1RhueZ]dZqGuX=">
                                             <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                             <field name="OID">yeelight-2.0.YeelightColorPulb-Schlafen.control.power</field>
                                             <field name="WITH_DELAY">FALSE</field>
                                             <next>
                                               <block type="controls_if" id="4k{mgF_!#2`fZbY5+`0|">
                                                 <value name="IF0">
                                                   <block type="variables_get" id=",;AAh|.czd2*ADKq/W[Y">
                                                     <field name="VAR" id="hvwDAq^LjR-M(p:pnAqs">manuell_ein</field>
                                                   </block>
                                                 </value>
                                                 <statement name="DO0">
                                                   <block type="control" id="fT{Q3gE(27rtV^gU6Nu0">
                                                     <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                                                     <field name="OID">yeelight-2.0.YeelightColorPulb-Schlafen.control.active_bright</field>
                                                     <field name="WITH_DELAY">TRUE</field>
                                                     <field name="DELAY_MS">100</field>
                                                     <field name="UNIT">ms</field>
                                                     <field name="CLEAR_RUNNING">FALSE</field>
                                                     <value name="VALUE">
                                                       <block type="math_number" id="_zE/JrMFpq;BZ3G[)$oH">
                                                         <field name="NUM">20</field>
                                                       </block>
                                                     </value>
                                                     <next>
                                                       <block type="control" id="BuQ_]H~ElFUUlEPKM^M@">
                                                         <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                                                         <field name="OID">yeelight-2.0.YeelightColorPulb-Schlafen.control.rgb</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="text" id="I=e3]aC5H!ul7Jc{bmRm">
                                                             <field name="TEXT">#eb8934</field>
                                                           </block>
                                                         </value>
                                                       </block>
                                                     </next>
                                                   </block>
                                                 </statement>
                                               </block>
                                             </next>
                                           </block>
                                         </next>
                                       </block>
                                     </next>
                                   </block>
                                 </next>
                               </block>
                             </statement>
                             <next>
                               <block type="comment" id="Pa-rB@81*`CuS!f3V0hf">
                                 <field name="COMMENT">Motion</field>
                                 <next>
                                   <block type="on" id="lF{Oa!DmK.4-.WoKU:NE">
                                     <field name="OID">zigbee.0.00158d0001e0d4fe.occupancy</field>
                                     <field name="CONDITION">ne</field>
                                     <field name="ACK_CONDITION"></field>
                                     <statement name="STATEMENT">
                                       <block type="controls_if" id="r;s$c|ImC2M9pxs.@OOr">
                                         <value name="IF0">
                                           <block type="logic_negate" id="99Kv0cDU.zPBt_@VV.Is">
                                             <value name="BOOL">
                                               <block type="variables_get" id="T^EHo3Ju[@-JN3nzV65a">
                                                 <field name="VAR" id="hvwDAq^LjR-M(p:pnAqs">manuell_ein</field>
                                               </block>
                                             </value>
                                           </block>
                                         </value>
                                         <statement name="DO0">
                                           <block type="comment" id="x#%#V_yErP_3yrY-{d+y">
                                             <field name="COMMENT">Nachtlicht über motion</field>
                                             <next>
                                               <block type="controls_if" id="3#^9G[-b+zkV)r8?r@?y">
                                                 <mutation else="1"></mutation>
                                                 <value name="IF0">
                                                   <block type="on_source" id="8]6][2AQ`3:RC=jLj4W!">
                                                     <field name="ATTR">state.val</field>
                                                   </block>
                                                 </value>
                                                 <statement name="DO0">
                                                   <block type="timeouts_cleartimeout" id="}P?BJ5G;n?90,p1M}dxo">
                                                     <field name="NAME">timeout</field>
                                                     <next>
                                                       <block type="control" id="BA|4UT276)8u3;+KuI0,">
                                                         <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                         <field name="OID">yeelight-2.0.YeelightColorPulb-Schlafen.control.power</field>
                                                         <field name="WITH_DELAY">FALSE</field>
                                                         <value name="VALUE">
                                                           <block type="logic_boolean" id="z2h4yC`oe)))ma?k!/Ic">
                                                             <field name="BOOL">TRUE</field>
                                                           </block>
                                                         </value>
                                                         <next>
                                                           <block type="control" id="9%McAKp.?{;RB-)-IaK.">
                                                             <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                                                             <field name="OID">yeelight-2.0.YeelightColorPulb-Schlafen.control.active_bright</field>
                                                             <field name="WITH_DELAY">TRUE</field>
                                                             <field name="DELAY_MS">100</field>
                                                             <field name="UNIT">ms</field>
                                                             <field name="CLEAR_RUNNING">FALSE</field>
                                                             <value name="VALUE">
                                                               <block type="math_number" id="S^~bC8_dc:}$wdxK6*Tq">
                                                                 <field name="NUM">20</field>
                                                               </block>
                                                             </value>
                                                             <next>
                                                               <block type="control" id="EWKKLn.}e2`!WXhYFiz!">
                                                                 <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                                                                 <field name="OID">yeelight-2.0.YeelightColorPulb-Schlafen.control.rgb</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="text" id="@iN}e1jA=M)u%fu=,i$:">
                                                                     <field name="TEXT">#eb8934</field>
                                                                   </block>
                                                                 </value>
                                                               </block>
                                                             </next>
                                                           </block>
                                                         </next>
                                                       </block>
                                                     </next>
                                                   </block>
                                                 </statement>
                                                 <statement name="ELSE">
                                                   <block type="timeouts_settimeout" id=".|uwn/q+L=H1rib1gaL=">
                                                     <field name="NAME">timeout</field>
                                                     <field name="DELAY">2</field>
                                                     <field name="UNIT">min</field>
                                                     <statement name="STATEMENT">
                                                       <block type="control" id="?D28qe`qU~brep+{LD7P">
                                                         <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                         <field name="OID">yeelight-2.0.YeelightColorPulb-Schlafen.control.power</field>
                                                         <field name="WITH_DELAY">FALSE</field>
                                                         <value name="VALUE">
                                                           <block type="logic_boolean" id="aye^PJner)]E`fJuISf_">
                                                             <field name="BOOL">FALSE</field>
                                                           </block>
                                                         </value>
                                                       </block>
                                                     </statement>
                                                   </block>
                                                 </statement>
                                               </block>
                                             </next>
                                           </block>
                                         </statement>
                                       </block>
                                     </statement>
                                   </block>
                                 </next>
                               </block>
                             </next>
                           </block>
                         </next>
                       </block>
                      </xml>
                      

                      A 3 Replies Last reply Reply Quote 0
                      • A
                        albi_63 @paul53 last edited by

                        @paul53
                        Die Lampe geht mit Sensor ein aber nicht mehr aus.
                        Mein Xiaomi Sensor hat einen fixen Nachlauf von 60 Sek. Das heisst Bewegung true nach 60 Sek. false
                        Hat das einen Einfluss, meines Erachtens nicht..

                        <xml xmlns="https://developers.google.com/blockly/xml">
                         <variables>
                           <variable id="hvwDAq^LjR-M(p:pnAqs">manuell_ein</variable>
                           <variable type="timeout" id="timeout">timeout</variable>
                         </variables>
                         <block type="comment" id=":u.dX05IWI,be};L=IPY" x="-1312" y="-1762">
                           <field name="COMMENT">Click</field>
                           <next>
                             <block type="on" id="KQ*8.ox:OvD7*-L=MFM(">
                               <field name="OID">zigbee.0.00158d000407e31a.click</field>
                               <field name="CONDITION">true</field>
                               <field name="ACK_CONDITION"></field>
                               <statement name="STATEMENT">
                                 <block type="timeouts_cleartimeout" id="q{jeb|uyZ[57cIZ$poJU">
                                   <field name="NAME">timeout</field>
                                   <next>
                                     <block type="variables_set" id="1sMJi5*=g=AjtZ]DoHx$">
                                       <field name="VAR" id="hvwDAq^LjR-M(p:pnAqs">manuell_ein</field>
                                       <value name="VALUE">
                                         <block type="logic_negate" id="3ki44jMVao7kIBGHy^F%">
                                           <value name="BOOL">
                                             <block type="get_value" id="rlW+ako/K{Y$GQR8oT:@">
                                               <field name="ATTR">val</field>
                                               <field name="OID">yeelight-2.0.YeelightColorPulb-Schlafen.control.power</field>
                                             </block>
                                           </value>
                                         </block>
                                       </value>
                                       <next>
                                         <block type="comment" id="c5!~7R{Ml2+gvYqHn,%)">
                                           <field name="COMMENT">Nachtlicht</field>
                                           <next>
                                             <block type="toggle" id="rV#O!Q1RhueZ]dZqGuX=">
                                               <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                               <field name="OID">yeelight-2.0.YeelightColorPulb-Schlafen.control.power</field>
                                               <field name="WITH_DELAY">FALSE</field>
                                               <next>
                                                 <block type="control" id="fT{Q3gE(27rtV^gU6Nu0">
                                                   <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                                                   <field name="OID">yeelight-2.0.YeelightColorPulb-Schlafen.control.active_bright</field>
                                                   <field name="WITH_DELAY">TRUE</field>
                                                   <field name="DELAY_MS">100</field>
                                                   <field name="UNIT">ms</field>
                                                   <field name="CLEAR_RUNNING">FALSE</field>
                                                   <value name="VALUE">
                                                     <block type="math_number" id="_zE/JrMFpq;BZ3G[)$oH">
                                                       <field name="NUM">20</field>
                                                     </block>
                                                   </value>
                                                   <next>
                                                     <block type="control" id="BuQ_]H~ElFUUlEPKM^M@">
                                                       <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                                                       <field name="OID">yeelight-2.0.YeelightColorPulb-Schlafen.control.rgb</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="text" id="I=e3]aC5H!ul7Jc{bmRm">
                                                           <field name="TEXT">#eb8934</field>
                                                         </block>
                                                       </value>
                                                     </block>
                                                   </next>
                                                 </block>
                                               </next>
                                             </block>
                                           </next>
                                         </block>
                                       </next>
                                     </block>
                                   </next>
                                 </block>
                               </statement>
                               <next>
                                 <block type="comment" id="Pa-rB@81*`CuS!f3V0hf">
                                   <field name="COMMENT">Motion</field>
                                   <next>
                                     <block type="on" id="lF{Oa!DmK.4-.WoKU:NE">
                                       <field name="OID">zigbee.0.00158d0001e0d4fe.occupancy</field>
                                       <field name="CONDITION">ne</field>
                                       <field name="ACK_CONDITION"></field>
                                       <statement name="STATEMENT">
                                         <block type="comment" id="x#%#V_yErP_3yrY-{d+y">
                                           <field name="COMMENT">Nachtlicht über motion</field>
                                           <next>
                                             <block type="controls_if" id="3#^9G[-b+zkV)r8?r@?y">
                                               <mutation else="1"></mutation>
                                               <value name="IF0">
                                                 <block type="logic_negate" id="99Kv0cDU.zPBt_@VV.Is">
                                                   <value name="BOOL">
                                                     <block type="variables_get" id="T^EHo3Ju[@-JN3nzV65a">
                                                       <field name="VAR" id="hvwDAq^LjR-M(p:pnAqs">manuell_ein</field>
                                                     </block>
                                                   </value>
                                                 </block>
                                               </value>
                                               <statement name="DO0">
                                                 <block type="timeouts_cleartimeout" id="}P?BJ5G;n?90,p1M}dxo">
                                                   <field name="NAME">timeout</field>
                                                   <next>
                                                     <block type="control" id="BA|4UT276)8u3;+KuI0,">
                                                       <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                       <field name="OID">yeelight-2.0.YeelightColorPulb-Schlafen.control.power</field>
                                                       <field name="WITH_DELAY">FALSE</field>
                                                       <value name="VALUE">
                                                         <block type="logic_boolean" id="z2h4yC`oe)))ma?k!/Ic">
                                                           <field name="BOOL">TRUE</field>
                                                         </block>
                                                       </value>
                                                       <next>
                                                         <block type="control" id="9%McAKp.?{;RB-)-IaK.">
                                                           <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                                                           <field name="OID">yeelight-2.0.YeelightColorPulb-Schlafen.control.active_bright</field>
                                                           <field name="WITH_DELAY">TRUE</field>
                                                           <field name="DELAY_MS">100</field>
                                                           <field name="UNIT">ms</field>
                                                           <field name="CLEAR_RUNNING">FALSE</field>
                                                           <value name="VALUE">
                                                             <block type="math_number" id="S^~bC8_dc:}$wdxK6*Tq">
                                                               <field name="NUM">20</field>
                                                             </block>
                                                           </value>
                                                           <next>
                                                             <block type="control" id="EWKKLn.}e2`!WXhYFiz!">
                                                               <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                                                               <field name="OID">yeelight-2.0.YeelightColorPulb-Schlafen.control.rgb</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="text" id="@iN}e1jA=M)u%fu=,i$:">
                                                                   <field name="TEXT">#eb8934</field>
                                                                 </block>
                                                               </value>
                                                             </block>
                                                           </next>
                                                         </block>
                                                       </next>
                                                     </block>
                                                   </next>
                                                 </block>
                                               </statement>
                                               <statement name="ELSE">
                                                 <block type="timeouts_settimeout" id=".|uwn/q+L=H1rib1gaL=">
                                                   <field name="NAME">timeout</field>
                                                   <field name="DELAY">10</field>
                                                   <field name="UNIT">sec</field>
                                                   <statement name="STATEMENT">
                                                     <block type="control" id="?D28qe`qU~brep+{LD7P">
                                                       <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                       <field name="OID">yeelight-2.0.YeelightColorPulb-Schlafen.control.power</field>
                                                       <field name="WITH_DELAY">FALSE</field>
                                                       <value name="VALUE">
                                                         <block type="logic_boolean" id="aye^PJner)]E`fJuISf_">
                                                           <field name="BOOL">FALSE</field>
                                                         </block>
                                                       </value>
                                                     </block>
                                                   </statement>
                                                 </block>
                                               </statement>
                                             </block>
                                           </next>
                                         </block>
                                       </statement>
                                     </block>
                                   </next>
                                 </block>
                               </next>
                             </block>
                           </next>
                         </block>
                        </xml>
                        
                        

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

                          @paul53
                          Habe script jetzt angepasst, teste es jetzt
                          Feedback kommt demnächst
                          Danke dir

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

                            @paul53
                            Das Script läuft, super.
                            Vielen vielen Dank dir. 😉

                            1 Reply Last reply Reply Quote 0
                            • R
                              Rushmed Most Active last edited by Rushmed

                              Sollte es nicht auch einfach reichen ins "Occupancy" "falls" ein "und wenn power=false" zu packen? Dann reagiert der BWM nur bei ausgeschlteter Lampe.

                              dc96f3e9-728d-4be8-9415-fdbe34648a55-grafik.png
                              Bild ist vom Original des TO.

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

                              Support us

                              ioBroker
                              Community Adapters
                              Donate

                              891
                              Online

                              32.0k
                              Users

                              80.4k
                              Topics

                              1.3m
                              Posts

                              blockly
                              5
                              15
                              489
                              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