Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Blockly
    5. Licht im Flur länger bei Bewegung eingeschaltet lassen

    NEWS

    • Wir empfehlen: Node.js 22.x

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker goes Matter ... Matter Adapter in Stable

    Licht im Flur länger bei Bewegung eingeschaltet lassen

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

      Moin
      ich lass meine Flur Licht bei Bewegung an schalten.
      Nun schaltet das Licht so wie es sein soll nach einer gewissen Zeit auch das Licht wieder aus. Wenn nun aber länger Bewegung im Raum ist, geht as Licht trotzdem aus.

      Kann man so eine Art"wenn Bewegung vorhanden- lasse Licht eingeschaltet bis Beweung nicht mehr vorhanden" einstellen.

      B J J 3 Replies Last reply Reply Quote 0
      • B
        badsnoopy667 @Olli77 last edited by

        @olli77
        Ja, geht.
        Bei Blockly würde ich es so machen:
        Du musst das "Licht aus" in einen timeout packen, z.B. 3 Minuten.
        Bei "Licht an" musst du diesen timeout jedes mal wieder stoppen mit dem Block "stop timeout".
        Mein Blockly ist leider ziemlich vollgestopft mit zusätzlichen Bedingungen, aber vielleicht hilft es ja trotzdem zur Veranschaulichung:

        licht_BW.png

        1 Reply Last reply Reply Quote 0
        • J
          Jan1 @Olli77 last edited by

          @olli77
          Eigentlich kommt das auf den BWM an, was der so bietet. Dann macht man einfach solange Licht wie sich was bewegt und gibt da etwas Nachlauf drauf.

          O 1 Reply Last reply Reply Quote 1
          • O
            Olli77 @Jan1 last edited by Olli77

            Ich hatte vergessen mein Skript mit einzufügen
            ich habe ein Phillips hue BWM

            <xml xmlns="https://developers.google.com/blockly/xml">
              <variables>
                <variable type="timeout" id="timeout">timeout</variable>
                <variable type="timeout" id="timeout2">timeout2</variable>
              </variables>
              <block type="on" id="*f@zpkWlRVc3W1~TL95?" x="-763" y="-88">
                <field name="OID">deconz.0.Sensors.7.presence</field>
                <field name="CONDITION">ne</field>
                <field name="ACK_CONDITION"></field>
                <statement name="STATEMENT">
                  <block type="controls_if" id="G!y[q7=7[+0oq^Y#34%M">
                    <value name="IF0">
                      <block type="logic_operation" id="7i$oon:O}.E)KYeyr~Wa">
                        <field name="OP">AND</field>
                        <value name="A">
                          <block type="time_compare" id="=pZ1EftuJb1skD8F7J@;">
                            <mutation xmlns="http://www.w3.org/1999/xhtml" end_time="true"></mutation>
                            <field name="OPTION">between</field>
                            <field name="START_TIME">0:00</field>
                            <field name="END_TIME">07:00</field>
                          </block>
                        </value>
                        <value name="B">
                          <block type="logic_compare" id="yZZuaMyl?Y~N82r,/l`R">
                            <field name="OP">EQ</field>
                            <value name="A">
                              <block type="get_value" id=")A2b5~.$ydALI@/qxOT[">
                                <field name="ATTR">val</field>
                                <field name="OID">deconz.0.Sensors.7.presence</field>
                              </block>
                            </value>
                            <value name="B">
                              <block type="logic_boolean" id="v6FF~H.^Iwe9rZ$U#f`{">
                                <field name="BOOL">TRUE</field>
                              </block>
                            </value>
                          </block>
                        </value>
                      </block>
                    </value>
                    <statement name="DO0">
                      <block type="control" id=";ttv`x.WiLX^i::nC;Fl">
                        <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                        <field name="OID">deconz.0.Lights.6.level</field>
                        <field name="WITH_DELAY">FALSE</field>
                        <value name="VALUE">
                          <block type="math_number" id="n_6C@?`8[x+rI,V)5u-y">
                            <field name="NUM">5</field>
                          </block>
                        </value>
                        <next>
                          <block type="timeouts_settimeout" id="ediC;Oq-oJO*uyu[~s{c">
                            <field name="NAME">timeout</field>
                            <field name="DELAY">30</field>
                            <field name="UNIT">sec</field>
                            <statement name="STATEMENT">
                              <block type="control" id="svARj9xEcg.PC.hh!pa/">
                                <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                <field name="OID">deconz.0.Lights.6.on</field>
                                <field name="WITH_DELAY">FALSE</field>
                                <value name="VALUE">
                                  <block type="logic_boolean" id="QK~9D+mnRPBOv;-61ZUf">
                                    <field name="BOOL">FALSE</field>
                                  </block>
                                </value>
                              </block>
                            </statement>
                          </block>
                        </next>
                      </block>
                    </statement>
                  </block>
                </statement>
                <next>
                  <block type="on" id=";}#uc$x.H6$+dvpq%n7z">
                    <field name="OID">deconz.0.Sensors.7.presence</field>
                    <field name="CONDITION">ne</field>
                    <field name="ACK_CONDITION"></field>
                    <statement name="STATEMENT">
                      <block type="controls_if" id="^9~5vnS7bQw!eUb2q-[#">
                        <value name="IF0">
                          <block type="logic_operation" id="y;-Fkar7?^IGPaH1at7C">
                            <field name="OP">AND</field>
                            <value name="A">
                              <block type="time_compare" id="|Y84nV@33YLq.G@YT|[s">
                                <mutation xmlns="http://www.w3.org/1999/xhtml" end_time="true"></mutation>
                                <field name="OPTION">between</field>
                                <field name="START_TIME">06:00</field>
                                <field name="END_TIME">0:00</field>
                              </block>
                            </value>
                            <value name="B">
                              <block type="logic_operation" id="#ush@}/8OC!9x/yh@.8P">
                                <field name="OP">AND</field>
                                <value name="A">
                                  <block type="logic_compare" id="5=O|W/A`1:b*wr%I/lmM">
                                    <field name="OP">EQ</field>
                                    <value name="A">
                                      <block type="get_value" id="P(R/,jxNAKF5BKCW!~fS">
                                        <field name="ATTR">val</field>
                                        <field name="OID">deconz.0.Sensors.7.presence</field>
                                      </block>
                                    </value>
                                    <value name="B">
                                      <block type="logic_boolean" id="dU70PY;}4ay6^hSYN~f)">
                                        <field name="BOOL">TRUE</field>
                                      </block>
                                    </value>
                                  </block>
                                </value>
                                <value name="B">
                                  <block type="logic_compare" id="Yz2P0yv#rY#ou;9z2m-C">
                                    <field name="OP">LT</field>
                                    <value name="A">
                                      <block type="get_value" id="sZzI7SsN/RWoHjjSBxq$">
                                        <field name="ATTR">val</field>
                                        <field name="OID">deconz.0.Sensors.9.lux</field>
                                      </block>
                                    </value>
                                    <value name="B">
                                      <block type="math_number" id="ehFt|u9GB[``x|u7|1p~">
                                        <field name="NUM">1</field>
                                      </block>
                                    </value>
                                  </block>
                                </value>
                              </block>
                            </value>
                          </block>
                        </value>
                        <statement name="DO0">
                          <block type="control" id="_yoR/*y?gy^@jBAzJ*it">
                            <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                            <field name="OID">deconz.0.Lights.6.level</field>
                            <field name="WITH_DELAY">FALSE</field>
                            <value name="VALUE">
                              <block type="math_number" id="9Af|Wq**:Wsuwj=~,hlY">
                                <field name="NUM">30</field>
                              </block>
                            </value>
                            <next>
                              <block type="timeouts_settimeout" id=";!h`q{Z]Qnyq?y)-0!NS">
                                <field name="NAME">timeout2</field>
                                <field name="DELAY">30</field>
                                <field name="UNIT">sec</field>
                                <statement name="STATEMENT">
                                  <block type="control" id="kWo@6%}SHsl1M4%p_=e7">
                                    <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                    <field name="OID">deconz.0.Lights.6.on</field>
                                    <field name="WITH_DELAY">FALSE</field>
                                    <value name="VALUE">
                                      <block type="logic_boolean" id="2r5Lv*s%A?bGtGC=IjG/">
                                        <field name="BOOL">FALSE</field>
                                      </block>
                                    </value>
                                  </block>
                                </statement>
                              </block>
                            </next>
                          </block>
                        </statement>
                      </block>
                    </statement>
                  </block>
                </next>
              </block>
            </xml>
            
            paul53 1 Reply Last reply Reply Quote 0
            • J
              jensven @Olli77 last edited by

              @olli77 zeig doch mal dein vorhandes Blockly, dann kann man da schon besser helfen.

              O 1 Reply Last reply Reply Quote 0
              • O
                Olli77 @jensven last edited by

                @jensven said in Licht im Flur länger bei Bewegung eingeschaltet lassen:

                @olli77 zeig doch mal dein vorhandes Blockly, dann kann man da schon besser helfen.

                Screenshot 2022-03-05 204043.png

                J ? 2 Replies Last reply Reply Quote 0
                • J
                  jensven @Olli77 last edited by

                  @olli77
                  wie badsnoopy667 schon schrieb musst du ein "stop timeout" als erstes setzen.
                  Also:
                  falls "Uhrzeit zwischen...."
                  -> stop timeout
                  -> steuere Dimmable light....

                  1 Reply Last reply Reply Quote 0
                  • ?
                    A Former User @Olli77 last edited by

                    @olli77 hi,
                    Du musst die Timeouts auch stoppen. Und den zweiten Trigger Block kannst du dir sparen. Versuche es mal so:
                    Screenshot 2022-03-05 at 21.26.20.png

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

                      @olli77 sagte: Skript mit einzufügen

                      Vorschlag:

                      Blockly_temp.JPG

                      <xml xmlns="https://developers.google.com/blockly/xml">
                       <variables>
                         <variable type="timeout" id="timeout">timeout</variable>
                         <variable id="jg*JaU+..Fm`xquU]KGe">level</variable>
                       </variables>
                       <block type="on" id="*f@zpkWlRVc3W1~TL95?" x="-763" y="-88">
                         <field name="OID">deconz.0.Sensors.7.presence</field>
                         <field name="CONDITION">ne</field>
                         <field name="ACK_CONDITION"></field>
                         <statement name="STATEMENT">
                           <block type="controls_if" id="G!y[q7=7[+0oq^Y#34%M">
                             <mutation else="1"></mutation>
                             <value name="IF0">
                               <block type="on_source" id="xoGv[)]0@95z/VbI9$oK">
                                 <field name="ATTR">state.val</field>
                               </block>
                             </value>
                             <statement name="DO0">
                               <block type="timeouts_cleartimeout" id="5bF-P:;TSv4A%$Qu++Ea">
                                 <field name="NAME">timeout</field>
                                 <next>
                                   <block type="variables_set" id="--UkfJSP]uSOUJOwS7-7">
                                     <field name="VAR" id="jg*JaU+..Fm`xquU]KGe">level</field>
                                     <value name="VALUE">
                                       <block type="math_number" id="#M!7RZB||(,2BLoYOK(p">
                                         <field name="NUM">0</field>
                                       </block>
                                     </value>
                                     <next>
                                       <block type="controls_if" id="NY4dG[+c=;Z$aN!hu=f,">
                                         <mutation elseif="1"></mutation>
                                         <value name="IF0">
                                           <block type="time_compare" id="=pZ1EftuJb1skD8F7J@;">
                                             <mutation xmlns="http://www.w3.org/1999/xhtml" end_time="true"></mutation>
                                             <field name="OPTION">between</field>
                                             <field name="START_TIME">0:00</field>
                                             <field name="END_TIME">07:00</field>
                                           </block>
                                         </value>
                                         <statement name="DO0">
                                           <block type="variables_set" id=".6yYeT]ZRki=;{CpD;VX">
                                             <field name="VAR" id="jg*JaU+..Fm`xquU]KGe">level</field>
                                             <value name="VALUE">
                                               <block type="math_number" id="n_6C@?`8[x+rI,V)5u-y">
                                                 <field name="NUM">5</field>
                                               </block>
                                             </value>
                                           </block>
                                         </statement>
                                         <value name="IF1">
                                           <block type="logic_compare" id="Yz2P0yv#rY#ou;9z2m-C">
                                             <field name="OP">LT</field>
                                             <value name="A">
                                               <block type="get_value" id="sZzI7SsN/RWoHjjSBxq$">
                                                 <field name="ATTR">val</field>
                                                 <field name="OID">deconz.0.Sensors.9.lux</field>
                                               </block>
                                             </value>
                                             <value name="B">
                                               <block type="math_number" id="ehFt|u9GB[``x|u7|1p~">
                                                 <field name="NUM">1</field>
                                               </block>
                                             </value>
                                           </block>
                                         </value>
                                         <statement name="DO1">
                                           <block type="variables_set" id="6Ry(R]]gn|KfSME,*9b}">
                                             <field name="VAR" id="jg*JaU+..Fm`xquU]KGe">level</field>
                                             <value name="VALUE">
                                               <block type="math_number" id="9Af|Wq**:Wsuwj=~,hlY">
                                                 <field name="NUM">30</field>
                                               </block>
                                             </value>
                                           </block>
                                         </statement>
                                         <next>
                                           <block type="control" id=";ttv`x.WiLX^i::nC;Fl">
                                             <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                             <field name="OID">deconz.0.Lights.6.level</field>
                                             <field name="WITH_DELAY">FALSE</field>
                                             <value name="VALUE">
                                               <block type="variables_get" id="E_~M@;w^HtqzQc7!_0q9">
                                                 <field name="VAR" id="jg*JaU+..Fm`xquU]KGe">level</field>
                                               </block>
                                             </value>
                                           </block>
                                         </next>
                                       </block>
                                     </next>
                                   </block>
                                 </next>
                               </block>
                             </statement>
                             <statement name="ELSE">
                               <block type="timeouts_settimeout" id="ediC;Oq-oJO*uyu[~s{c">
                                 <field name="NAME">timeout</field>
                                 <field name="DELAY">30</field>
                                 <field name="UNIT">sec</field>
                                 <statement name="STATEMENT">
                                   <block type="control" id="svARj9xEcg.PC.hh!pa/">
                                     <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                     <field name="OID">deconz.0.Lights.6.on</field>
                                     <field name="WITH_DELAY">FALSE</field>
                                     <value name="VALUE">
                                       <block type="logic_boolean" id="QK~9D+mnRPBOv;-61ZUf">
                                         <field name="BOOL">FALSE</field>
                                       </block>
                                     </value>
                                   </block>
                                 </statement>
                               </block>
                             </statement>
                           </block>
                         </statement>
                       </block>
                      </xml>
                      

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

                      Support us

                      ioBroker
                      Community Adapters
                      Donate

                      726
                      Online

                      32.0k
                      Users

                      80.5k
                      Topics

                      1.3m
                      Posts

                      blockly template
                      6
                      9
                      476
                      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