Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Blockly
    5. Blockly für Rollladen +Sperre

    NEWS

    • Wir empfehlen: Node.js 22.x

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker goes Matter ... Matter Adapter in Stable

    Blockly für Rollladen +Sperre

    This topic has been deleted. Only users with topic management privileges can see it.
    • K
      Kuddel @Cinimod last edited by

      @cinimod bist du sicher, dass das so geht?

      Werden Status und die Position so nicht nur in die Variablen geschrieben, wenn Skript oder die Instanz gestartet werden?

      Wenn die Trigger auslösen werden Status und Position aber nicht erneut geprüft würde ich sagen

      Cinimod 2 Replies Last reply Reply Quote 0
      • Cinimod
        Cinimod Most Active @Kuddel last edited by

        @kuddel

        oh ja da hast du vollkommen recht ... muss ich noch mal überarbeiten

        1 Reply Last reply Reply Quote 0
        • Cinimod
          Cinimod Most Active @Kuddel last edited by Cinimod

          @Mono990

          hier dann noch mal überarbeietet:

          Bildschirmfoto 2021-10-16 um 09.21.44.png

          hier der Code:

          <block xmlns="https://developers.google.com/blockly/xml" type="comment" id="}2FkDn!D$!KcUI3Q|w:[" x="337.1552001953123" y="612.0615478515625">
           <field name="COMMENT">hier Tür status objekt</field>
          </block>
          

          Mir stellt sich gerade noch die frage ob das Rollo denn nur hoch gehen darf wenn die Tür zu oder gekippt ist ? das würde ich ggf. raus nehmen.

          Cinimod 1 Reply Last reply Reply Quote 0
          • Cinimod
            Cinimod Most Active @Cinimod last edited by Cinimod

            @cinimod

            hier dann noch mal: Rollo darf immer hoch gehen, unabhängig vom zustand der Tür.

            Bildschirmfoto 2021-10-16 um 09.26.22.png

            Code:

            <xml xmlns="https://developers.google.com/blockly/xml">
             <block type="schedule" id="a,a}fcfqe`*vEvi_qJ61" x="37" y="213">
               <field name="SCHEDULE">0 21 * * *</field>
               <statement name="STATEMENT">
                 <block type="controls_if" id="7vnu[;m^AdaTag:CpwUa">
                   <value name="IF0">
                     <block type="logic_operation" id="?evm+)t@K#JO8z_WmUfm" inline="false">
                       <field name="OP">AND</field>
                       <value name="A">
                         <block type="logic_compare" id="vVWJC)%xr!ZZzJUs.6_Q">
                           <field name="OP">NEQ</field>
                           <value name="A">
                             <block type="get_value" id="cX?l8j|lnl1q1)j,wXa0">
                               <field name="ATTR">val</field>
                               <field name="OID">shelly.0.SHSW-25#483FDA827F5E#1.Shutter.Position</field>
                             </block>
                           </value>
                           <value name="B">
                             <block type="math_number" id="7TeaJv1[Ecnh]1;/3p*">
                               <field name="NUM">0</field>
                             </block>
                           </value>
                         </block>
                       </value>
                       <value name="B">
                         <block type="logic_compare" id="Vo(;lUGB-QZN=58BZF!R">
                           <field name="OP">NEQ</field>
                           <value name="A">
                             <block type="get_value" id="#{wbxG1/Q:tBM502:Oel">
                               <field name="ATTR">val</field>
                               <field name="OID">0_userdata.0.Fenster.Kuche_Tur</field>
                             </block>
                           </value>
                           <value name="B">
                             <block type="math_number" id="vYS1pWDgoC!n),vnAE">
                               <field name="NUM">2</field>
                             </block>
                           </value>
                         </block>
                       </value>
                     </block>
                   </value>
                   <statement name="DO0">
                     <block type="control" id="a0WQEB$![21Wv26rxO,">
                       <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                       <field name="OID">shelly.0.SHSW-25#483FDA827F5E#1.Shutter.Position</field>
                       <field name="WITH_DELAY">FALSE</field>
                       <value name="VALUE">
                         <block type="math_number" id="JGjP}F{flmWbJV+g~^kP">
                           <field name="NUM">0</field>
                         </block>
                       </value>
                     </block>
                   </statement>
                 </block>
               </statement>
               <next>
                 <block type="schedule" id="^8M(|n|ayd4hKam|IYk|">
                   <field name="SCHEDULE">0 8 * * *</field>
                   <statement name="STATEMENT">
                     <block type="controls_if" id="Zt|Z95wmZv?/fkTFt||7">
                       <value name="IF0">
                         <block type="logic_compare" id=",}Q!hs_J_/#C1]K6VodI">
                           <field name="OP">NEQ</field>
                           <value name="A">
                             <block type="get_value" id="uZs_UpLP.:#Dp7Agq8zQ">
                               <field name="ATTR">val</field>
                               <field name="OID">shelly.0.SHSW-25#483FDA827F5E#1.Shutter.Position</field>
                             </block>
                           </value>
                           <value name="B">
                             <block type="math_number" id="MwvnB5if;Ht?y|yN@3-x">
                               <field name="NUM">100</field>
                             </block>
                           </value>
                         </block>
                       </value>
                       <statement name="DO0">
                         <block type="control" id="$O#iV.f]s{9R9KfuI0a!">
                           <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                           <field name="OID">shelly.0.SHSW-25#483FDA827F5E#1.Shutter.Position</field>
                           <field name="WITH_DELAY">FALSE</field>
                           <value name="VALUE">
                             <block type="math_number" id="t*|O3bI@hXcF|]$d@?n}">
                               <field name="NUM">100</field>
                             </block>
                           </value>
                         </block>
                       </statement>
                     </block>
                   </statement>
                   <next>
                     <block type="on_ext" id="*S-*-?Kmj=azHSy?ONjv">
                       <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="ig%Y@m34^U)S,u/a.}vJ">
                           <field name="oid">default</field>
                         </shadow>
                         <block type="field_oid" id="p2Mts=2:q|fqfG4+vV7x">
                           <field name="oid">default</field>
                         </block>
                       </value>
                       <statement name="STATEMENT">
                         <block type="controls_if" id="V=v~wkUN?0MtS8{Z}MU;">
                           <value name="IF0">
                             <block type="logic_operation" id=",57UBvJH*0n48c$2oa{@" inline="false">
                               <field name="OP">AND</field>
                               <value name="A">
                                 <block type="time_compare" id="M33;_l5@kPT.n8}H:}Mj">
                                   <mutation xmlns="http://www.w3.org/1999/xhtml" end_time="true"></mutation>
                                   <field name="OPTION">not between</field>
                                   <field name="START_TIME">08:00</field>
                                   <field name="END_TIME">21:00</field>
                                 </block>
                               </value>
                               <value name="B">
                                 <block type="logic_operation" id="%K9}*5[i%D,^nIyR!f3d" inline="false">
                                   <field name="OP">AND</field>
                                   <value name="A">
                                     <block type="logic_compare" id="!cwo7SnF%X]M:HRQgM[j">
                                       <field name="OP">NEQ</field>
                                       <value name="A">
                                         <block type="get_value" id="X3F8;D+e#Ia}vjQ?ocWd">
                                           <field name="ATTR">val</field>
                                           <field name="OID">shelly.0.SHSW-25#483FDA827F5E#1.Shutter.Position</field>
                                         </block>
                                       </value>
                                       <value name="B">
                                         <block type="math_number" id="P7yW;nmQ9C$DQ,$z5OE$">
                                           <field name="NUM">0</field>
                                         </block>
                                       </value>
                                     </block>
                                   </value>
                                   <value name="B">
                                     <block type="logic_compare" id="fL`QA]6C?5?(wJB~?AX2">
                                       <field name="OP">EQ</field>
                                       <value name="A">
                                         <block type="on_source" id="i[gNu_+^m[._+(I|)iVg">
                                           <field name="ATTR">state.val</field>
                                         </block>
                                       </value>
                                       <value name="B">
                                         <block type="math_number" id="LW[wCFC,VP?CAWio~f61">
                                           <field name="NUM">0</field>
                                         </block>
                                       </value>
                                     </block>
                                   </value>
                                 </block>
                               </value>
                             </block>
                           </value>
                           <statement name="DO0">
                             <block type="control" id="!-%XT3uBo~rwxR0sg,^@">
                               <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                               <field name="OID">shelly.0.SHSW-25#483FDA827F5E#1.Shutter.Position</field>
                               <field name="WITH_DELAY">FALSE</field>
                               <value name="VALUE">
                                 <block type="math_number" id="^WpfM,@ABGl=Wow-]1(P">
                                   <field name="NUM">0</field>
                                 </block>
                               </value>
                             </block>
                           </statement>
                         </block>
                       </statement>
                     </block>
                   </next>
                 </block>
               </next>
             </block>
             <block type="comment" id="}2FkDn!D$!KcUI3Q|w:[" x="337" y="563">
               <field name="COMMENT">hier Tür status objekt</field>
             </block>
            </xml>
            

            Mono990 1 Reply Last reply Reply Quote 0
            • Mono990
              Mono990 @Cinimod last edited by

              @cinimod
              Das sieht ja super aus👍 werde es die tage Testen und dann bescheid geben. vielen Dank schon mal

              Cinimod 1 Reply Last reply Reply Quote 0
              • Cinimod
                Cinimod Most Active @Mono990 last edited by

                @mono990

                gern, viel Erfolg. Wenn das noch nicht klappt einfach melden

                Mono990 1 Reply Last reply Reply Quote 0
                • Mono990
                  Mono990 @Cinimod last edited by

                  @cinimod

                  Das Rollo ging heute abend nicht runter obwohl die Tür zu war.
                  Die ausgewählten objekte sind die richtigen. daran kann es nicht liegen.

                  Cinimod 2 Replies Last reply Reply Quote 0
                  • Cinimod
                    Cinimod Most Active @Mono990 last edited by

                    @mono990

                    ich kann keinen Fehler sehen, magst du deins noch mal her zeigen ?

                    Mono990 1 Reply Last reply Reply Quote 0
                    • Mono990
                      Mono990 @Cinimod last edited by

                      @cinimod

                      hier das script


                      <xml xmlns="https://developers.google.com/blockly/xml">
                      <block type="schedule" id="a,a}fcfqe*vEvi_qJ61" x="37" y="213"> <field name="SCHEDULE">0 21 * * *</field> <statement name="STATEMENT"> <block type="controls_if" id="7vnu[;m^AdaTag:CpwUa"> <value name="IF0"> <block type="logic_operation" id="?evm+)t@K#JO8z_WmUfm" inline="false"> <field name="OP">AND</field> <value name="A"> <block type="logic_compare" id="vVWJC)%xr!ZZzJUs.6_Q"> <field name="OP">NEQ</field> <value name="A"> <block type="get_value" id="cX?l8j|lnl1q1)j,wXa0"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.Fenster.Kuche_Tur</field> </block> </value> <value name="B"> <block type="math_number" id="7TeaJv1[Ecnh]1;/3p*"> <field name="NUM">0</field> </block> </value> </block> </value> <value name="B"> <block type="logic_compare" id="Vo(;lUGB-QZN=58BZF!R"> <field name="OP">NEQ</field> <value name="A"> <block type="get_value" id="#{wbxG1/Q:tBM502:Oel"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.Fenster.Kuche_Tur</field> </block> </value> <value name="B"> <block type="math_number" id="vYS1pWDgoC!n),vnAE"> <field name="NUM">2</field> </block> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="control" id="a0WQEB$![21Wv26rxO,"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">shelly.0.SHSW-25#483FDA827F5E#1.Shutter.Position</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id="JGjP}F{flmWbJV+g~^kP"> <field name="NUM">0</field> </block> </value> </block> </statement> </block> </statement> <next> <block type="schedule" id="^8M(|n|ayd4hKam|IYk|"> <field name="SCHEDULE">0 8 * * *</field> <statement name="STATEMENT"> <block type="controls_if" id="Zt|Z95wmZv?/fkTFt||7"> <value name="IF0"> <block type="logic_compare" id=",}Q!hs_J_/#C1]K6VodI"> <field name="OP">NEQ</field> <value name="A"> <block type="get_value" id="uZs_UpLP.:#Dp7Agq8zQ"> <field name="ATTR">val</field> <field name="OID">shelly.0.SHSW-25#483FDA827F5E#1.Shutter.Position</field> </block> </value> <value name="B"> <block type="math_number" id="MwvnB5if;Ht?y|yN@3-x"> <field name="NUM">100</field> </block> </value> </block> </value> <statement name="DO0"> <block type="control" id="$O#iV.f]s{9R9KfuI0a!"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">shelly.0.SHSW-25#483FDA827F5E#1.Shutter.Position</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id="t*|O3bI@hXcF|]$d@?n}"> <field name="NUM">100</field> </block> </value> </block> </statement> </block> </statement> <next> <block type="on_ext" id="*S-*-?Kmj=azHSy?ONjv"> <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="ig%Y@m34^U)S,u/a.}vJ"> <field name="oid">default</field> </shadow> <block type="field_oid" id="p2Mts=2:q|fqfG4+vV7x"> <field name="oid">0_userdata.0.Fenster.Kuche_Tur</field> </block> </value> <statement name="STATEMENT"> <block type="controls_if" id="V=v~wkUN?0MtS8{Z}MU;"> <value name="IF0"> <block type="logic_operation" id=",57UBvJH*0n48c$2oa{@" inline="false"> <field name="OP">AND</field> <value name="A"> <block type="time_compare" id="M33;_l5@kPT.n8}H:}Mj"> <mutation xmlns="http://www.w3.org/1999/xhtml" end_time="true"></mutation> <field name="OPTION">not between</field> <field name="START_TIME">08:00</field> <field name="END_TIME">21:00</field> </block> </value> <value name="B"> <block type="logic_operation" id="%K9}*5[i%D,^nIyR!f3d" inline="false"> <field name="OP">AND</field> <value name="A"> <block type="logic_compare" id="!cwo7SnF%X]M:HRQgM[j"> <field name="OP">NEQ</field> <value name="A"> <block type="get_value" id="X3F8;D+e#Ia}vjQ?ocWd"> <field name="ATTR">val</field> <field name="OID">shelly.0.SHSW-25#483FDA827F5E#1.Shutter.Position</field> </block> </value> <value name="B"> <block type="math_number" id="P7yW;nmQ9C$DQ,$z5OE$"> <field name="NUM">0</field> </block> </value> </block> </value> <value name="B"> <block type="logic_compare" id="fLQA]6C?5?(wJB~?AX2">
                      <field name="OP">EQ</field>
                      <value name="A">
                      <block type="on_source" id="i[gNu_+^m[._+(I|)iVg">
                      <field name="ATTR">state.val</field>
                      </block>
                      </value>
                      <value name="B">
                      <block type="math_number" id="LW[wCFC,VP?CAWio~f61">
                      <field name="NUM">0</field>
                      </block>
                      </value>
                      </block>
                      </value>
                      </block>
                      </value>
                      </block>
                      </value>
                      <statement name="DO0">
                      <block type="control" id="!-%XT3uBo~rwxR0sg,^@">
                      <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                      <field name="OID">shelly.0.SHSW-25#483FDA827F5E#1.Shutter.Position</field>
                      <field name="WITH_DELAY">FALSE</field>
                      <value name="VALUE">
                      <block type="math_number" id="^WpfM,@ABGl=Wow-]1(P">
                      <field name="NUM">0</field>
                      </block>
                      </value>
                      </block>
                      </statement>
                      </block>
                      </statement>
                      </block>
                      </next>
                      </block>
                      </next>
                      </block>
                      <block type="comment" id="}2FkDn!D$!KcUI3Q|w:[" x="388" y="563">
                      <field name="COMMENT">hier Tür status objekt</field>
                      </block>
                      </xml>

                      1 Reply Last reply Reply Quote 0
                      • Cinimod
                        Cinimod Most Active @Mono990 last edited by Cinimod

                        @mono990 sagte in Blockly für Rollladen +Sperre:

                        @cinimod

                        Das Rollo ging heute abend nicht runter obwohl die Tür zu war.
                        Die ausgewählten objekte sind die richtigen. daran kann es nicht liegen.

                        Ganz oben muss "wert von ObjektID Shutter Position" rein

                        Screenshot 2021-10-18 085805.png

                        Cinimod 1 Reply Last reply Reply Quote 0
                        • Cinimod
                          Cinimod Most Active @Cinimod last edited by Cinimod

                          @cinimod

                          oben soll er nur einmal prüfen ob das Rollo nicht schon auf 0 ist, so wie du es hattest wollte er nur schließen wenn die Tür gekippt ist.

                          Mono990 1 Reply Last reply Reply Quote 0
                          • Mono990
                            Mono990 @Cinimod last edited by

                            @cinimod Aso ok habe ich jetzt geändert. mal sehen ob er heute runter geht 😁

                            Cinimod 1 Reply Last reply Reply Quote 0
                            • Cinimod
                              Cinimod Most Active @Mono990 last edited by

                              @mono990

                              Heute gehts ! 😉

                              Mono990 1 Reply Last reply Reply Quote 0
                              • Mono990
                                Mono990 @Cinimod last edited by

                                @cinimod ist leider nicht runtergegangen. Brauche ich noch ein Adapter oder so der die aktuelle zeit angibt wonach sich der Zeitplan trigger richten kann?

                                Cinimod 1 Reply Last reply Reply Quote 0
                                • Cinimod
                                  Cinimod Most Active @Mono990 last edited by Cinimod

                                  @mono990

                                  Vielleicht stimmt deine Systemzeit nicht 🤔
                                  Hast du die Koordinaten richtig ?

                                  Ist das Rollo denn bei 0 unten und bei 100 oben?

                                  Teste doch mal ein neues Script mit dem Zeitplan trigger und nem debug baustein … oder lass dir ne Nachricht schicken zum testen …

                                  Mono990 1 Reply Last reply Reply Quote 0
                                  • Mono990
                                    Mono990 @Cinimod last edited by

                                    @cinimod die Zeit im iobroker hatte die richtige Zeit angezeigt aber die systemzeit des Raspian hat eine ganz andere zeit angezeigt. ich lasse die systemzeit jetzt mit einem NTP server syncronisieren.
                                    Die ersten Tests waren gut, habe mir nachrichten auf mein Handy schicken lassen über Blockly und Zeitplan.

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

                                    Support us

                                    ioBroker
                                    Community Adapters
                                    Donate

                                    724
                                    Online

                                    32.0k
                                    Users

                                    80.5k
                                    Topics

                                    1.3m
                                    Posts

                                    3
                                    20
                                    614
                                    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