Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Blockly
    5. Trigger od. Schleife wenn Tür geschlossen

    NEWS

    • Wir empfehlen: Node.js 22.x

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker goes Matter ... Matter Adapter in Stable

    Trigger od. Schleife wenn Tür geschlossen

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

      Hallo,
      benötige Hilfe zu einem blockly Script.

      Ein Rollo (Tür) fährt jeden Sonnenuntergang automtatisch herunter.

      Nun soll aber der Rolle nur herunterfahren, wenn die Terrassentür geschlossen ist (Türkontakt).

      Ist die Tür offen, soll jede Minute geprüft werden und erst wenn der Türkontakt-Sensor auf geschlossen steht, soll der Rolle herunterfahren.

      Möchte uns nicht ständig auf der Terrasse ausschliessen 🙂

      AlCalzone M 2 Replies Last reply Reply Quote 0
      • AlCalzone
        AlCalzone Developer @aldoa1 last edited by AlCalzone

        @aldoa1 Ich würde das mit zwei getrennten Triggern lösen. Jede Minute prüfen ist unnötig. Mangels Blockly hier als Text:

        Trigger: Sonnenuntergang:
        -- Wenn Türkontakt geschlossen UND Rollo nicht unten:
          -- dann Rollo runter
        
        
        Trigger: Türkontakt (wurde geschlossen):
        -- Wenn aktuelle Zeit nach Sonnenuntergang UND Rollo nicht unten:
          -- dann Rollo runter
        
        1 Reply Last reply Reply Quote 0
        • M
          Muchul @aldoa1 last edited by

          @aldoa1
          Kennste den Adapter shutter Control?

          1 Reply Last reply Reply Quote 0
          • A
            aldoa1 last edited by

            danke für die beiden Antworten.

            Den Adapter kenne ich noch nicht. Schaue ich mir heute noch mal an.

            1 Reply Last reply Reply Quote 0
            • A
              aldoa1 last edited by

              ich möchte es erst einmal mit dem blockly weiter versuchen.

              Könnte mir jemand helfen?
              Die Tür bei Sonnenuntergang soll nur schliessen, wenn der Homematic Sensor auf 0 steht (Tür zu). Falls offen, soll der Rollo sofort schliessen, wenn die Tür dann zu ist.

              <block xmlns="https://developers.google.com/blockly/xml" type="controls_if" id="d@OiGZ(75H]oEsALsW7X" x="155" y="1000">
                <value name="IF0">
                  <block type="time_compare_ex" id="xt2Cln_[bVW{m.{=%8=A">
                    <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="^?z3xwMb;H]Q}5dL(!M$">
                        <field name="TEXT">12:00</field>
                      </shadow>
                      <block type="time_astro" id="%Mt6d0]A=]Oq@lW]+9n^">
                        <field name="TYPE">sunrise</field>
                        <field name="OFFSET">-35</field>
                      </block>
                    </value>
                    <value name="END_TIME">
                      <shadow type="text" id="/)WO@y[.~[]PC9$/u.u8">
                        <field name="TEXT">18:00</field>
                      </shadow>
                      <block type="time_astro" id="(/:DuyT1U3HI`z]:LW;t">
                        <field name="TYPE">sunset</field>
                        <field name="OFFSET">0</field>
                      </block>
                    </value>
                  </block>
                </value>
                <statement name="DO0">
                  <block type="controls_if" id="xxYegC-*6y-DD@5G?@Q.">
                    <value name="IF0">
                      <block type="logic_compare" id="S2udt?l+/[2Th=Pd-Z2z">
                        <field name="OP">EQ</field>
                        <value name="A">
                          <block type="get_value" id="s%09vhG$/`LZE|(+.r4#">
                            <field name="ATTR">val</field>
                            <field name="OID">hm-rpc.1.0000DBE996E554.1.STATE</field>
                          </block>
                        </value>
                        <value name="B">
                          <block type="math_number" id="@w4i9kfglMT0Lb]m4s6w">
                            <field name="NUM">0</field>
                          </block>
                        </value>
                      </block>
                    </value>
                    <statement name="DO0">
                      <block type="control" id="SewRZCXf_FH/MMA462a=">
                        <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                        <field name="OID">javascript.0.Rollo-Tür</field>
                        <field name="WITH_DELAY">FALSE</field>
                        <value name="VALUE">
                          <block type="math_number" id="1JmHrnub7Ie@e:tb/5ew">
                            <field name="NUM">0</field>
                          </block>
                        </value>
                      </block>
                    </statement>
                  </block>
                </statement>
              </block>
              
              paul53 1 Reply Last reply Reply Quote 0
              • paul53
                paul53 @aldoa1 last edited by paul53

                @aldoa1 sagte:

                Könnte mir jemand helfen?

                <xml xmlns="https://developers.google.com/blockly/xml">
                 <block type="on_ext" id="P|eo@Kc,p^v4wpWrKz]:" x="163" y="863">
                   <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
                   <field name="CONDITION">lt</field>
                   <field name="ACK_CONDITION"></field>
                   <value name="OID0">
                     <shadow type="field_oid" id="4,@?z:.bQlC6]u*3Zxhj">
                       <field name="oid">default</field>
                     </shadow>
                     <block type="text" id="6V+~Zbm[hheHJK[f=h{u">
                       <field name="TEXT">hm-rpc.1.0000DBE996E554.1.STATE</field>
                     </block>
                   </value>
                   <statement name="STATEMENT">
                     <block type="controls_if" id="d@OiGZ(75H]oEsALsW7X">
                       <value name="IF0">
                         <block type="logic_operation" id="l^Bt%S(d!V@ml](qG(D@" inline="false">
                           <field name="OP">AND</field>
                           <value name="A">
                             <block type="time_compare_ex" id="xt2Cln_[bVW{m.{=%8=A">
                               <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="^?z3xwMb;H]Q}5dL(!M$">
                                   <field name="TEXT">12:00</field>
                                 </shadow>
                                 <block type="time_astro" id="%Mt6d0]A=]Oq@lW]+9n^">
                                   <field name="TYPE">sunrise</field>
                                   <field name="OFFSET">-35</field>
                                 </block>
                               </value>
                               <value name="END_TIME">
                                 <shadow type="text" id="/)WO@y[.~[]PC9$/u.u8">
                                   <field name="TEXT">18:00</field>
                                 </shadow>
                                 <block type="time_astro" id="(/:DuyT1U3HI`z]:LW;t">
                                   <field name="TYPE">sunset</field>
                                   <field name="OFFSET">0</field>
                                 </block>
                               </value>
                             </block>
                           </value>
                           <value name="B">
                             <block type="logic_compare" id="_[TD)QTvl+/C`+MENJq0">
                               <field name="OP">GT</field>
                               <value name="A">
                                 <block type="get_value_var" id="7(*wJF~ah@o|O;21KiC`">
                                   <field name="ATTR">val</field>
                                   <value name="OID">
                                     <shadow type="text" id="Xu,oq8qr~z^`T^$dCI;l">
                                       <field name="TEXT">javascript.0.Rollo-Tür</field>
                                     </shadow>
                                   </value>
                                 </block>
                               </value>
                               <value name="B">
                                 <block type="math_number" id="U+6t9|SS,)~f3G1#?BUh">
                                   <field name="NUM">0</field>
                                 </block>
                               </value>
                             </block>
                           </value>
                         </block>
                       </value>
                       <statement name="DO0">
                         <block type="control" id="SewRZCXf_FH/MMA462a=">
                           <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                           <field name="OID">javascript.0.Rollo-Tür</field>
                           <field name="WITH_DELAY">FALSE</field>
                           <value name="VALUE">
                             <block type="math_number" id="1JmHrnub7Ie@e:tb/5ew">
                               <field name="NUM">0</field>
                             </block>
                           </value>
                         </block>
                       </statement>
                     </block>
                   </statement>
                   <next>
                     <block type="astro" id="4!Y)8D%$][i?NiD,KQt:">
                       <field name="TYPE">sunset</field>
                       <field name="OFFSET">0</field>
                       <statement name="STATEMENT">
                         <block type="controls_if" id="xxYegC-*6y-DD@5G?@Q.">
                           <value name="IF0">
                             <block type="logic_operation" id="qw[~`oTlSVWS9GMXOadE" inline="false">
                               <field name="OP">AND</field>
                               <value name="A">
                                 <block type="logic_compare" id="S2udt?l+/[2Th=Pd-Z2z">
                                   <field name="OP">EQ</field>
                                   <value name="A">
                                     <block type="get_value" id="s%09vhG$/`LZE|(+.r4#">
                                       <field name="ATTR">val</field>
                                       <field name="OID">hm-rpc.1.0000DBE996E554.1.STATE</field>
                                     </block>
                                   </value>
                                   <value name="B">
                                     <block type="logic_boolean" id="p;t.!2kWn+i2F}H=Ox]g">
                                       <field name="BOOL">FALSE</field>
                                     </block>
                                   </value>
                                 </block>
                               </value>
                               <value name="B">
                                 <block type="logic_compare" id="8xGt2B7ffMy~k8!59L=j">
                                   <field name="OP">GT</field>
                                   <value name="A">
                                     <block type="get_value_var" id="}%vm]fExu~N{=Yc}QD3L">
                                       <field name="ATTR">val</field>
                                       <value name="OID">
                                         <shadow type="text" id="*r(#p,CYOnuW,EpJ$SX.">
                                           <field name="TEXT">javascript.0.Rollo-Tür</field>
                                         </shadow>
                                       </value>
                                     </block>
                                   </value>
                                   <value name="B">
                                     <block type="math_number" id="-].WJ!-OC_J%6=_8w*9(">
                                       <field name="NUM">0</field>
                                     </block>
                                   </value>
                                 </block>
                               </value>
                             </block>
                           </value>
                           <statement name="DO0">
                             <block type="control" id="Y-ZUIq|D!D01Sqj6^8X=">
                               <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                               <field name="OID">javascript.0.Rollo-Tür</field>
                               <field name="WITH_DELAY">FALSE</field>
                               <value name="VALUE">
                                 <block type="math_number" id="e^nUjr=22QSQ#l-?fWIq">
                                   <field name="NUM">0</field>
                                 </block>
                               </value>
                             </block>
                           </statement>
                         </block>
                       </statement>
                     </block>
                   </next>
                 </block>
                </xml>
                

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

                Support us

                ioBroker
                Community Adapters
                Donate

                436
                Online

                32.0k
                Users

                80.4k
                Topics

                1.3m
                Posts

                blockly
                4
                6
                298
                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