Skip to content
  • Home
  • Recent
  • Tags
  • 0 Unread 0
  • Categories
  • Unreplied
  • Popular
  • GitHub
  • Docu
  • Hilfe
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
ioBroker Logo

Community Forum

donate donate
  1. ioBroker Community Home
  2. Deutsch
  3. Skripten / Logik
  4. Licht für bestimmte Zeit einschalten, danach aus *gelöst*

NEWS

  • Monatsrückblick Januar/Februar 2026 ist online!
    BluefoxB
    Bluefox
    18
    1
    783

  • Jahresrückblick 2025 – unser neuer Blogbeitrag ist online! ✨
    BluefoxB
    Bluefox
    18
    1
    6.2k

  • Neuer Blogbeitrag: Monatsrückblick - Dezember 2025 🎄
    BluefoxB
    Bluefox
    13
    1
    1.5k

Licht für bestimmte Zeit einschalten, danach aus *gelöst*

Scheduled Pinned Locked Moved Skripten / Logik
blockly
12 Posts 5 Posters 307 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • surfer09S surfer09

    Hallo zusammen,

    ich möchte in Blockly eine Lampe für eine bestimmte Zeit ein- und nach Ablauf dieser Zeit dann wieder ausschalten. Wie wird so etwas gelöst? Mit einem Timeout?
    Das Ganze soll auch nur in einem bestimmten Zeitraum (jeden Tag zwischen 23:00 und 6:30 Uhr) passieren.
    Ich weiß nicht, ob das so korrekt ist?

    2021-08-04 08_08_56-Window.jpg

    Gruß surfer ;-)

    BBTownB Offline
    BBTownB Offline
    BBTown
    wrote on last edited by
    #3

    @surfer09
    so etwas in der Art könnte bei dir passen

    e0dc1b42-5067-4841-8ef7-ec18a127b783-image.png

    <xml xmlns="https://developers.google.com/blockly/xml">
      <variables>
        <variable type="timeout" id="timeout">timeout</variable>
      </variables>
      <block type="on_ext" id="1%U2gZWUg(;+%%Gfq7m8" x="-12" y="-162">
        <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
        <field name="CONDITION">ne</field>
        <field name="ACK_CONDITION"></field>
        <value name="OID0">
          <shadow type="field_oid" id="J@CkHbT3B2{D%I:}2k#6">
            <field name="oid">0_userdata.0.test.BWM-2</field>
          </shadow>
        </value>
        <statement name="STATEMENT">
          <block type="controls_if" id="5|GH(4Q6~0Z=(Vpvz7Q6">
            <value name="IF0">
              <block type="logic_operation" id="}UY9z]5Aei~`idvz6_uT" inline="false">
                <field name="OP">AND</field>
                <value name="A">
                  <block type="on_source" id="6L]3Ymc@dZiIlWJ!uY=h">
                    <field name="ATTR">id</field>
                  </block>
                </value>
                <value name="B">
                  <block type="time_compare_ex" id="^Ca[Wsp(LX;}r?behXFY">
                    <mutation xmlns="http://www.w3.org/1999/xhtml" end_time="true" actual_time="true"></mutation>
                    <field name="USE_ACTUAL_TIME">TRUE</field>
                    <field name="OPTION">between</field>
                    <value name="START_TIME">
                      <shadow type="text" id="^+V1v-Ck^sL9:J]i5jWm">
                        <field name="TEXT">12:00</field>
                      </shadow>
                    </value>
                    <value name="END_TIME">
                      <shadow type="text" id="3)Kz,@T-`4)mn}3A[N.3">
                        <field name="TEXT">18:00</field>
                      </shadow>
                    </value>
                  </block>
                </value>
              </block>
            </value>
            <statement name="DO0">
              <block type="timeouts_cleartimeout" id="~@g;V[pprh,wX5rlc8rf">
                <field name="NAME">timeout</field>
                <next>
                  <block type="control" id="tHl7RQx2JsF%Vev$E/lM">
                    <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                    <field name="OID">0_userdata.0.test.Lampe</field>
                    <field name="WITH_DELAY">FALSE</field>
                    <value name="VALUE">
                      <block type="logic_boolean" id=";G%QdhH6`Y|ED$~UPEDi">
                        <field name="BOOL">TRUE</field>
                      </block>
                    </value>
                    <next>
                      <block type="timeouts_settimeout" id="d81Oikn0nU}*=X[|tan]">
                        <field name="NAME">timeout</field>
                        <field name="DELAY">2</field>
                        <field name="UNIT">min</field>
                        <statement name="STATEMENT">
                          <block type="control" id="CQupwdw]kq-1+t=Ak~me">
                            <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                            <field name="OID">0_userdata.0.test.Lampe</field>
                            <field name="WITH_DELAY">FALSE</field>
                            <value name="VALUE">
                              <block type="logic_boolean" id="{763oPFwce-w8tc==6G)">
                                <field name="BOOL">FALSE</field>
                              </block>
                            </value>
                          </block>
                        </statement>
                      </block>
                    </next>
                  </block>
                </next>
              </block>
            </statement>
          </block>
        </statement>
      </block>
    </xml>
    

    ioBroker auf NUC (VM debian v13 (Trixie ), node v22.22.2 npm v10.9.4, js-controller v7.1.1 jsonl/jsonl / HomeMatic CCU-2 (Wired und Funk) / Philips HUE / echo.DOT / Broadlink RM pro / SONOS

    AsgothianA 1 Reply Last reply
    0
    • BBTownB BBTown

      @surfer09
      so etwas in der Art könnte bei dir passen

      e0dc1b42-5067-4841-8ef7-ec18a127b783-image.png

      <xml xmlns="https://developers.google.com/blockly/xml">
        <variables>
          <variable type="timeout" id="timeout">timeout</variable>
        </variables>
        <block type="on_ext" id="1%U2gZWUg(;+%%Gfq7m8" x="-12" y="-162">
          <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
          <field name="CONDITION">ne</field>
          <field name="ACK_CONDITION"></field>
          <value name="OID0">
            <shadow type="field_oid" id="J@CkHbT3B2{D%I:}2k#6">
              <field name="oid">0_userdata.0.test.BWM-2</field>
            </shadow>
          </value>
          <statement name="STATEMENT">
            <block type="controls_if" id="5|GH(4Q6~0Z=(Vpvz7Q6">
              <value name="IF0">
                <block type="logic_operation" id="}UY9z]5Aei~`idvz6_uT" inline="false">
                  <field name="OP">AND</field>
                  <value name="A">
                    <block type="on_source" id="6L]3Ymc@dZiIlWJ!uY=h">
                      <field name="ATTR">id</field>
                    </block>
                  </value>
                  <value name="B">
                    <block type="time_compare_ex" id="^Ca[Wsp(LX;}r?behXFY">
                      <mutation xmlns="http://www.w3.org/1999/xhtml" end_time="true" actual_time="true"></mutation>
                      <field name="USE_ACTUAL_TIME">TRUE</field>
                      <field name="OPTION">between</field>
                      <value name="START_TIME">
                        <shadow type="text" id="^+V1v-Ck^sL9:J]i5jWm">
                          <field name="TEXT">12:00</field>
                        </shadow>
                      </value>
                      <value name="END_TIME">
                        <shadow type="text" id="3)Kz,@T-`4)mn}3A[N.3">
                          <field name="TEXT">18:00</field>
                        </shadow>
                      </value>
                    </block>
                  </value>
                </block>
              </value>
              <statement name="DO0">
                <block type="timeouts_cleartimeout" id="~@g;V[pprh,wX5rlc8rf">
                  <field name="NAME">timeout</field>
                  <next>
                    <block type="control" id="tHl7RQx2JsF%Vev$E/lM">
                      <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                      <field name="OID">0_userdata.0.test.Lampe</field>
                      <field name="WITH_DELAY">FALSE</field>
                      <value name="VALUE">
                        <block type="logic_boolean" id=";G%QdhH6`Y|ED$~UPEDi">
                          <field name="BOOL">TRUE</field>
                        </block>
                      </value>
                      <next>
                        <block type="timeouts_settimeout" id="d81Oikn0nU}*=X[|tan]">
                          <field name="NAME">timeout</field>
                          <field name="DELAY">2</field>
                          <field name="UNIT">min</field>
                          <statement name="STATEMENT">
                            <block type="control" id="CQupwdw]kq-1+t=Ak~me">
                              <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                              <field name="OID">0_userdata.0.test.Lampe</field>
                              <field name="WITH_DELAY">FALSE</field>
                              <value name="VALUE">
                                <block type="logic_boolean" id="{763oPFwce-w8tc==6G)">
                                  <field name="BOOL">FALSE</field>
                                </block>
                              </value>
                            </block>
                          </statement>
                        </block>
                      </next>
                    </block>
                  </next>
                </block>
              </statement>
            </block>
          </statement>
        </block>
      </xml>
      

      AsgothianA Offline
      AsgothianA Offline
      Asgothian
      Developer
      wrote on last edited by
      #4

      @bbtown

      Fast :)

      Der Block Screenshot 2021-08-04 at 08.52.50.png
      muss noch auf "Wert" umgestellt werden, sonst geht es nicht.

      A.

      ioBroker auf RPi4 - Hardware soweit wie möglich via Zigbee.
      "Shit don't work" ist keine Fehlermeldung, sondern ein Fluch.

      surfer09S BBTownB 2 Replies Last reply
      0
      • AsgothianA Asgothian

        @bbtown

        Fast :)

        Der Block Screenshot 2021-08-04 at 08.52.50.png
        muss noch auf "Wert" umgestellt werden, sonst geht es nicht.

        A.

        surfer09S Offline
        surfer09S Offline
        surfer09
        wrote on last edited by
        #5

        @asgothian So funktioniert es jetzt. Habe ich den Timeout hier richtig zurückgesetzt? Ich bin mir nicht sicher, ob der hier an der richtigen Stelle steht?

        2021-08-04 08_58_21-Window.jpg

        IO-Broker Master/Slave auf Windows 11 64bit, NPM 10.9.7, Node 22.22.2 js-controller 7.0.7

        N BBTownB 2 Replies Last reply
        0
        • AsgothianA Asgothian

          @bbtown

          Fast :)

          Der Block Screenshot 2021-08-04 at 08.52.50.png
          muss noch auf "Wert" umgestellt werden, sonst geht es nicht.

          A.

          BBTownB Offline
          BBTownB Offline
          BBTown
          wrote on last edited by
          #6

          @asgothian sagte in Licht für bestimmte Zeit einschalten, danach aus:

          @bbtown

          Fast :)

          Der Block Screenshot 2021-08-04 at 08.52.50.png
          muss noch auf "Wert" umgestellt werden, sonst geht es nicht.

          A.

          erwischt 😎

          ioBroker auf NUC (VM debian v13 (Trixie ), node v22.22.2 npm v10.9.4, js-controller v7.1.1 jsonl/jsonl / HomeMatic CCU-2 (Wired und Funk) / Philips HUE / echo.DOT / Broadlink RM pro / SONOS

          1 Reply Last reply
          0
          • surfer09S surfer09

            @asgothian So funktioniert es jetzt. Habe ich den Timeout hier richtig zurückgesetzt? Ich bin mir nicht sicher, ob der hier an der richtigen Stelle steht?

            2021-08-04 08_58_21-Window.jpg

            N Offline
            N Offline
            Nordischerjung
            wrote on last edited by
            #7

            @surfer09

            Fast, du musst bei der Zeit "NICHT zwischen 6.30 und 23 Uhr" nehmen, da über MItternacht nicht funktioniert

            Gruß Nordischerjung

            sonnige Grüße von der Ostsee

            surfer09S paul53P 2 Replies Last reply
            0
            • surfer09S surfer09

              @asgothian So funktioniert es jetzt. Habe ich den Timeout hier richtig zurückgesetzt? Ich bin mir nicht sicher, ob der hier an der richtigen Stelle steht?

              2021-08-04 08_58_21-Window.jpg

              BBTownB Offline
              BBTownB Offline
              BBTown
              wrote on last edited by BBTown
              #8

              @surfer09
              48103e38-7ed8-4bce-97f0-45564233715f-image.png

              <xml xmlns="https://developers.google.com/blockly/xml">
               <variables>
                 <variable type="timeout" id="timeout">timeout</variable>
               </variables>
               <block type="on_ext" id="1%U2gZWUg(;+%%Gfq7m8" x="113" y="-87">
                 <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
                 <field name="CONDITION">ne</field>
                 <field name="ACK_CONDITION"></field>
                 <value name="OID0">
                   <shadow type="field_oid" id="J@CkHbT3B2{D%I:}2k#6">
                     <field name="oid">0_userdata.0.test.BWM-2</field>
                   </shadow>
                 </value>
                 <statement name="STATEMENT">
                   <block type="controls_if" id="5|GH(4Q6~0Z=(Vpvz7Q6">
                     <value name="IF0">
                       <block type="logic_operation" id="}UY9z]5Aei~`idvz6_uT" inline="false">
                         <field name="OP">AND</field>
                         <value name="A">
                           <block type="on_source" id="6L]3Ymc@dZiIlWJ!uY=h">
                             <field name="ATTR">state.val</field>
                           </block>
                         </value>
                         <value name="B">
                           <block type="time_compare_ex" id="^Ca[Wsp(LX;}r?behXFY">
                             <mutation xmlns="http://www.w3.org/1999/xhtml" end_time="true" actual_time="true"></mutation>
                             <field name="USE_ACTUAL_TIME">TRUE</field>
                             <field name="OPTION">not between</field>
                             <value name="START_TIME">
                               <shadow type="text" id="^+V1v-Ck^sL9:J]i5jWm">
                                 <field name="TEXT">06:31</field>
                               </shadow>
                             </value>
                             <value name="END_TIME">
                               <shadow type="text" id="3)Kz,@T-`4)mn}3A[N.3">
                                 <field name="TEXT">22:59</field>
                               </shadow>
                             </value>
                           </block>
                         </value>
                       </block>
                     </value>
                     <statement name="DO0">
                       <block type="timeouts_cleartimeout" id="~@g;V[pprh,wX5rlc8rf">
                         <field name="NAME">timeout</field>
                         <next>
                           <block type="control" id="tHl7RQx2JsF%Vev$E/lM">
                             <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                             <field name="OID">0_userdata.0.test.Lampe</field>
                             <field name="WITH_DELAY">FALSE</field>
                             <value name="VALUE">
                               <block type="logic_boolean" id=";G%QdhH6`Y|ED$~UPEDi">
                                 <field name="BOOL">TRUE</field>
                               </block>
                             </value>
                             <next>
                               <block type="timeouts_settimeout" id="d81Oikn0nU}*=X[|tan]">
                                 <field name="NAME">timeout</field>
                                 <field name="DELAY">2</field>
                                 <field name="UNIT">min</field>
                                 <statement name="STATEMENT">
                                   <block type="control" id="CQupwdw]kq-1+t=Ak~me">
                                     <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                     <field name="OID">0_userdata.0.test.Lampe</field>
                                     <field name="WITH_DELAY">FALSE</field>
                                     <value name="VALUE">
                                       <block type="logic_boolean" id="{763oPFwce-w8tc==6G)">
                                         <field name="BOOL">FALSE</field>
                                       </block>
                                     </value>
                                   </block>
                                 </statement>
                               </block>
                             </next>
                           </block>
                         </next>
                       </block>
                     </statement>
                   </block>
                 </statement>
               </block>
              </xml>
              

              ioBroker auf NUC (VM debian v13 (Trixie ), node v22.22.2 npm v10.9.4, js-controller v7.1.1 jsonl/jsonl / HomeMatic CCU-2 (Wired und Funk) / Philips HUE / echo.DOT / Broadlink RM pro / SONOS

              surfer09S 1 Reply Last reply
              0
              • BBTownB BBTown

                @surfer09
                48103e38-7ed8-4bce-97f0-45564233715f-image.png

                <xml xmlns="https://developers.google.com/blockly/xml">
                 <variables>
                   <variable type="timeout" id="timeout">timeout</variable>
                 </variables>
                 <block type="on_ext" id="1%U2gZWUg(;+%%Gfq7m8" x="113" y="-87">
                   <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
                   <field name="CONDITION">ne</field>
                   <field name="ACK_CONDITION"></field>
                   <value name="OID0">
                     <shadow type="field_oid" id="J@CkHbT3B2{D%I:}2k#6">
                       <field name="oid">0_userdata.0.test.BWM-2</field>
                     </shadow>
                   </value>
                   <statement name="STATEMENT">
                     <block type="controls_if" id="5|GH(4Q6~0Z=(Vpvz7Q6">
                       <value name="IF0">
                         <block type="logic_operation" id="}UY9z]5Aei~`idvz6_uT" inline="false">
                           <field name="OP">AND</field>
                           <value name="A">
                             <block type="on_source" id="6L]3Ymc@dZiIlWJ!uY=h">
                               <field name="ATTR">state.val</field>
                             </block>
                           </value>
                           <value name="B">
                             <block type="time_compare_ex" id="^Ca[Wsp(LX;}r?behXFY">
                               <mutation xmlns="http://www.w3.org/1999/xhtml" end_time="true" actual_time="true"></mutation>
                               <field name="USE_ACTUAL_TIME">TRUE</field>
                               <field name="OPTION">not between</field>
                               <value name="START_TIME">
                                 <shadow type="text" id="^+V1v-Ck^sL9:J]i5jWm">
                                   <field name="TEXT">06:31</field>
                                 </shadow>
                               </value>
                               <value name="END_TIME">
                                 <shadow type="text" id="3)Kz,@T-`4)mn}3A[N.3">
                                   <field name="TEXT">22:59</field>
                                 </shadow>
                               </value>
                             </block>
                           </value>
                         </block>
                       </value>
                       <statement name="DO0">
                         <block type="timeouts_cleartimeout" id="~@g;V[pprh,wX5rlc8rf">
                           <field name="NAME">timeout</field>
                           <next>
                             <block type="control" id="tHl7RQx2JsF%Vev$E/lM">
                               <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                               <field name="OID">0_userdata.0.test.Lampe</field>
                               <field name="WITH_DELAY">FALSE</field>
                               <value name="VALUE">
                                 <block type="logic_boolean" id=";G%QdhH6`Y|ED$~UPEDi">
                                   <field name="BOOL">TRUE</field>
                                 </block>
                               </value>
                               <next>
                                 <block type="timeouts_settimeout" id="d81Oikn0nU}*=X[|tan]">
                                   <field name="NAME">timeout</field>
                                   <field name="DELAY">2</field>
                                   <field name="UNIT">min</field>
                                   <statement name="STATEMENT">
                                     <block type="control" id="CQupwdw]kq-1+t=Ak~me">
                                       <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                       <field name="OID">0_userdata.0.test.Lampe</field>
                                       <field name="WITH_DELAY">FALSE</field>
                                       <value name="VALUE">
                                         <block type="logic_boolean" id="{763oPFwce-w8tc==6G)">
                                           <field name="BOOL">FALSE</field>
                                         </block>
                                       </value>
                                     </block>
                                   </statement>
                                 </block>
                               </next>
                             </block>
                           </next>
                         </block>
                       </statement>
                     </block>
                   </statement>
                 </block>
                </xml>
                

                surfer09S Offline
                surfer09S Offline
                surfer09
                wrote on last edited by
                #9

                @bbtown Danke für den Hinweis, das war mir so auch noch nicht bekannt! ;-)

                IO-Broker Master/Slave auf Windows 11 64bit, NPM 10.9.7, Node 22.22.2 js-controller 7.0.7

                BBTownB 1 Reply Last reply
                0
                • surfer09S surfer09

                  @bbtown Danke für den Hinweis, das war mir so auch noch nicht bekannt! ;-)

                  BBTownB Offline
                  BBTownB Offline
                  BBTown
                  wrote on last edited by
                  #10

                  @surfer09
                  Der Hinweis kam von @Nordischerjung ;-)

                  ioBroker auf NUC (VM debian v13 (Trixie ), node v22.22.2 npm v10.9.4, js-controller v7.1.1 jsonl/jsonl / HomeMatic CCU-2 (Wired und Funk) / Philips HUE / echo.DOT / Broadlink RM pro / SONOS

                  1 Reply Last reply
                  0
                  • N Nordischerjung

                    @surfer09

                    Fast, du musst bei der Zeit "NICHT zwischen 6.30 und 23 Uhr" nehmen, da über MItternacht nicht funktioniert

                    surfer09S Offline
                    surfer09S Offline
                    surfer09
                    wrote on last edited by
                    #11

                    @nordischerjung Danke für den Hinweis! :-)

                    IO-Broker Master/Slave auf Windows 11 64bit, NPM 10.9.7, Node 22.22.2 js-controller 7.0.7

                    1 Reply Last reply
                    0
                    • N Nordischerjung

                      @surfer09

                      Fast, du musst bei der Zeit "NICHT zwischen 6.30 und 23 Uhr" nehmen, da über MItternacht nicht funktioniert

                      paul53P Offline
                      paul53P Offline
                      paul53
                      wrote on last edited by
                      #12

                      @nordischerjung sagte: "NICHT zwischen 6.30 und 23 Uhr" nehmen, da über MItternacht nicht funktioniert

                      Über Mitternacht funktioniert nur mit Astrozeiten nicht.

                      Bitte verzichtet auf Chat-Nachrichten, denn die Handhabung ist grauenhaft !
                      Produktiv: RPi 2 mit S.USV, HM-MOD-RPI und SLC-USB-Stick mit root fs

                      1 Reply Last reply
                      0

                      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                      With your input, this post could be even better 💗

                      Register Login
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      Support us

                      ioBroker
                      Community Adapters
                      Donate

                      337

                      Online

                      32.8k

                      Users

                      82.7k

                      Topics

                      1.3m

                      Posts
                      Community
                      Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen | Einwilligungseinstellungen
                      ioBroker Community 2014-2025
                      logo
                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Home
                      • Recent
                      • Tags
                      • Unread 0
                      • Categories
                      • Unreplied
                      • Popular
                      • GitHub
                      • Docu
                      • Hilfe