Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Blockly
    5. Treppenflurlicht zwischen Sonnenuntergang und Sonnenaufgang

    NEWS

    • Wir empfehlen: Node.js 22.x

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker goes Matter ... Matter Adapter in Stable

    Treppenflurlicht zwischen Sonnenuntergang und Sonnenaufgang

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

      Hallo zusammen,

      ich scheitere gerade an meiner Steuerung für mein Treppenflurlicht. Es soll nur zwischen Sonnenuntergang und Sonnenaufgang geschaltet werden. Wo muss ich die Bedingung hierfür reinpacken und vorallem wie?
      Anbei habe ich den Code angefügt.

      <xml xmlns="https://developers.google.com/blockly/xml">
        <variables>
          <variable type="timeout" id="timeout">timeout</variable>
        </variables>
        <block type="on_ext" id="MnHpY1{DL8DD`epoCD)^" x="113" y="-12">
          <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="?whT]oQ_dW0CmY7Z`N`g">
              <field name="oid">deconz.0.Sensors.8.presence</field>
            </shadow>
          </value>
          <statement name="STATEMENT">
            <block type="controls_if" id="Ql%dwTU,1niSyhrfd8]{">
              <value name="IF0">
                <block type="logic_compare" id="2hlHMz#nOm$q6u,{yMGt">
                  <field name="OP">EQ</field>
                  <value name="A">
                    <block type="get_value" id="dn(u6sL,^pkm:hFi%5t@">
                      <field name="ATTR">val</field>
                      <field name="OID">deconz.0.Sensors.8.presence</field>
                    </block>
                  </value>
                  <value name="B">
                    <block type="logic_boolean" id="!DZ{z^%bfL/a1U-W^]6|">
                      <field name="BOOL">TRUE</field>
                    </block>
                  </value>
                </block>
              </value>
              <statement name="DO0">
                <block type="control" id="u|g{!8H5m4~2*}LL=l3m">
                  <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                  <field name="OID">hm-rpc.0.LEQ0763280.1.STATE</field>
                  <field name="WITH_DELAY">FALSE</field>
                  <value name="VALUE">
                    <block type="logic_boolean" id="_u%ai!KxK9AVP]W:A)E)">
                      <field name="BOOL">TRUE</field>
                    </block>
                  </value>
                  <next>
                    <block type="timeouts_settimeout" id="6wo@1cImD4uK:v7ToYuA">
                      <field name="NAME">timeout</field>
                      <field name="DELAY">120</field>
                      <field name="UNIT">sec</field>
                      <statement name="STATEMENT">
                        <block type="control" id="h.i*ziw=]S7-?0B+bims">
                          <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                          <field name="OID">hm-rpc.0.LEQ0763280.1.STATE</field>
                          <field name="WITH_DELAY">FALSE</field>
                          <value name="VALUE">
                            <block type="logic_boolean" id="EI{ig(L}$+6cgpCQ(Jm(">
                              <field name="BOOL">FALSE</field>
                            </block>
                          </value>
                        </block>
                      </statement>
                    </block>
                  </next>
                </block>
              </statement>
            </block>
          </statement>
        </block>
      </xml>
      
      

      Danke!
      Gruß surfer 😉

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

        @surfer09

        <xml xmlns="https://developers.google.com/blockly/xml">
         <variables>
           <variable type="timeout" id="timeout">timeout</variable>
         </variables>
         <block type="on_ext" id="MnHpY1{DL8DD`epoCD)^" x="113" y="-12">
           <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="?whT]oQ_dW0CmY7Z`N`g">
               <field name="oid">deconz.0.Sensors.8.presence</field>
             </shadow>
           </value>
           <statement name="STATEMENT">
             <block type="controls_if" id="PcKXh~(im*qgZ305OmAc">
               <value name="IF0">
                 <block type="time_compare_ex" id="$o@o_4^A?U+@Oorp:O0Z" inline="false">
                   <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="`=Yb{P+sx*n*7OUxUEuu">
                       <field name="TEXT">12:00</field>
                     </shadow>
                     <block type="time_astro" id="TDI9rMjr:e}4H8Z,t6OY">
                       <field name="TYPE">sunrise</field>
                       <field name="OFFSET">0</field>
                     </block>
                   </value>
                   <value name="END_TIME">
                     <shadow type="text" id="!Ql/o6ow*dfx+XyN+OQ}">
                       <field name="TEXT">18:00</field>
                     </shadow>
                     <block type="time_astro" id="aZ6rs45J{6CbluIeHHFV">
                       <field name="TYPE">sunset</field>
                       <field name="OFFSET">0</field>
                     </block>
                   </value>
                 </block>
               </value>
               <statement name="DO0">
                 <block type="controls_if" id="Ql%dwTU,1niSyhrfd8]{">
                   <mutation else="1"></mutation>
                   <value name="IF0">
                     <block type="on_source" id="pW0rT0*bF8+.x)smeVuI">
                       <field name="ATTR">state.val</field>
                     </block>
                   </value>
                   <statement name="DO0">
                     <block type="timeouts_cleartimeout" id="}3;J9t_!N~hFWKr|tyuo">
                       <field name="NAME">timeout</field>
                       <next>
                         <block type="control" id="u|g{!8H5m4~2*}LL=l3m">
                           <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                           <field name="OID">hm-rpc.0.LEQ0763280.1.STATE</field>
                           <field name="WITH_DELAY">FALSE</field>
                           <value name="VALUE">
                             <block type="logic_boolean" id="_u%ai!KxK9AVP]W:A)E)">
                               <field name="BOOL">TRUE</field>
                             </block>
                           </value>
                         </block>
                       </next>
                     </block>
                   </statement>
                   <statement name="ELSE">
                     <block type="timeouts_settimeout" id="6wo@1cImD4uK:v7ToYuA">
                       <field name="NAME">timeout</field>
                       <field name="DELAY">120</field>
                       <field name="UNIT">sec</field>
                       <statement name="STATEMENT">
                         <block type="control" id="h.i*ziw=]S7-?0B+bims">
                           <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                           <field name="OID">hm-rpc.0.LEQ0763280.1.STATE</field>
                           <field name="WITH_DELAY">FALSE</field>
                           <value name="VALUE">
                             <block type="logic_boolean" id="EI{ig(L}$+6cgpCQ(Jm(">
                               <field name="BOOL">FALSE</field>
                             </block>
                           </value>
                         </block>
                       </statement>
                     </block>
                   </statement>
                 </block>
               </statement>
             </block>
           </statement>
         </block>
        </xml>
        

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

          @paul53 Danke Paul für deine Bearbeitung! Du musst mir jedoch einmal den Inhalt kurz erklären, damit ich so in etwa kapiere, was dort abgeht.

          Der erste Trigger ist klar, könnte wahrscheinlich auch anders herum sein - also ist zwischen Sonnenuntergang und Sonnenaufgang - kommt ja aufs Gleiche raus.
          Warum stop "timeout" und nicht stop "timeout 2"? Wofür ist der hier überhaupt? Das Licht soll ja bei Bewegung eingeschaltet und nach 2 Minuten wieder ausgeschaltet werden.
          Wäre nett, wenn du das einmal kurz erläutern könntest. 🙂

          Blockly.jpg

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

            @surfer09 sagte:

            also ist zwischen Sonnenuntergang und Sonnenaufgang - kommt ja aufs Gleiche raus.

            Funktioniert Tag übergreifend mit den Astrozeiten leider nicht, deshalb mit "nicht zwischen".

            @surfer09 sagte in Treppenflurlicht zwischen Sonnenuntergang und Sonnenaufgang:

            Warum stop "timeout" und nicht stop "timeout 2"?

            Wie ist bei Dir ein "timeout2" rein gerutscht ? Im Export gibt es nur "timeout".

            Der "stop timeout" sorgt dafür, dass wenn innerhalb der 2 Minuten Ausschaltverzögerung wieder Bewegung erkannt wird, das Ausschalten verhindert wird, damit man nicht plötzlich im Dunkeln steht.

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

              @paul53 Alles klar, Dankeschön nochmal!

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

              Support us

              ioBroker
              Community Adapters
              Donate

              547
              Online

              32.0k
              Users

              80.4k
              Topics

              1.3m
              Posts

              2
              5
              943
              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