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

  • Standard: (Kein Skin)
  • Kein Skin
Einklappen
ioBroker Logo

Community Forum

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

NEWS

  • Monatsrückblick Januar/Februar 2026 ist online!
    BluefoxB
    Bluefox
    16
    1
    280

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

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

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

Geplant Angeheftet Gesperrt Verschoben Skripten / Logik
blockly
12 Beiträge 5 Kommentatoren 305 Aufrufe 1 Watching
  • Älteste zuerst
  • Neuste zuerst
  • Meiste Stimmen
Antworten
  • In einem neuen Thema antworten
Anmelden zum Antworten
Dieses Thema wurde gelöscht. Nur Nutzer mit entsprechenden Rechten können es sehen.
  • 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
    schrieb am zuletzt editiert von
    #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.21.0 npm v10.9.4, js-controller v7.1.0 jsonl/jsonl / HomeMatic CCU-2 (Wired und Funk) / Philips HUE / echo.DOT / Broadlink RM pro / SONOS

    AsgothianA 1 Antwort Letzte Antwort
    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
      schrieb am zuletzt editiert von
      #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 Antworten Letzte Antwort
      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
        schrieb am zuletzt editiert von
        #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.4, Node 22.21.1 js-controller 7.0.7

        N BBTownB 2 Antworten Letzte Antwort
        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
          schrieb am zuletzt editiert von
          #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 :sunglasses:

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

          1 Antwort Letzte Antwort
          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
            schrieb am zuletzt editiert von
            #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 Antworten Letzte Antwort
            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
              schrieb am zuletzt editiert von 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.21.0 npm v10.9.4, js-controller v7.1.0 jsonl/jsonl / HomeMatic CCU-2 (Wired und Funk) / Philips HUE / echo.DOT / Broadlink RM pro / SONOS

              surfer09S 1 Antwort Letzte Antwort
              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
                schrieb am zuletzt editiert von
                #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.4, Node 22.21.1 js-controller 7.0.7

                BBTownB 1 Antwort Letzte Antwort
                0
                • surfer09S surfer09

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

                  BBTownB Offline
                  BBTownB Offline
                  BBTown
                  schrieb am zuletzt editiert von
                  #10

                  @surfer09
                  Der Hinweis kam von @Nordischerjung ;-)

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

                  1 Antwort Letzte Antwort
                  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
                    schrieb am zuletzt editiert von
                    #11

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

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

                    1 Antwort Letzte Antwort
                    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
                      schrieb am zuletzt editiert von
                      #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 Antwort Letzte Antwort
                      0
                      Antworten
                      • In einem neuen Thema antworten
                      Anmelden zum Antworten
                      • Älteste zuerst
                      • Neuste zuerst
                      • Meiste Stimmen


                      Support us

                      ioBroker
                      Community Adapters
                      Donate

                      521

                      Online

                      32.7k

                      Benutzer

                      82.5k

                      Themen

                      1.3m

                      Beiträge
                      Community
                      Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen | Einwilligungseinstellungen
                      ioBroker Community 2014-2025
                      logo
                      • Anmelden

                      • Du hast noch kein Konto? Registrieren

                      • Anmelden oder registrieren, um zu suchen
                      • Erster Beitrag
                        Letzter Beitrag
                      0
                      • Home
                      • Aktuell
                      • Tags
                      • Ungelesen 0
                      • Kategorien
                      • Unreplied
                      • Beliebt
                      • GitHub
                      • Docu
                      • Hilfe