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 optimieren

    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 optimieren

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

      Hallo,
      ich habe bei mir ein Rollo auf einen Shelly 2.5 im Shuttermode umgestellt. Lässt sich auch hoch- und runterfahren. Mittels Script setze ich in RaspberryMatic auf einem CuxD-Gerät die Zeiten für das Hoch- und Herunterfahren der Rollläden. Für den einen Rollladen, der mit dem Shelly 2.5 läuft, habe ich nun ein Blockly gebaut, damit der Rollladen ebenfalls zur gleichen Zeit wie die anderen fährt. Hintergrund ist, dass der Homematic-Aktor ständig Kommunikationsstörungen hatte (eventuell C26 Problem). Daher teste ich jetzt den Shelly 2.5. Perspektivisch sollen dann alle Rollos umgebaut werden. Nun zu meinem Problem.
      Die Zeiten für Hoch- und Herunterfahren sind in einem Datenpunkt des CuxD-Gerätes ersichtlich:

      6ce04dac-b42b-4cd8-87ca-7772d3008944-image.png

      Das zugehörige Script habe ich jetzt wie folgt erstellt:

      fc5f83a1-090e-42c2-9896-12cd7a38441a-image.png

      Läuft also jede Minute, um täglich zwei Aktionen zu starten. Kann mir da jemand helfen, das zu optimieren oder ist das so ok? Das Script läuft ja jede Minute. Sollte ich das vielleicht auf die Zeit zwischen 06.00 Uhr und 08.30 Uhr und 16.00 Uhr bis 20.30 Uhr eingrenzen? Dann würde es nur in den genannten Intervallen alle Minute laufen. Oder ginge auch eine Übernahme der CuXD-Zeiten als Trigger? Danke für Eure Hilfe.
      Blockly-Export

      <block xmlns="https://developers.google.com/blockly/xml" type="schedule" id="CvobSK]AYMwL89#RPn?T" x="63" y="38">
       <field name="SCHEDULE">* * * * *</field>
       <statement name="STATEMENT">
         <block type="controls_if" id=".oi?L?MZ#XS3M:!Em#.m">
           <mutation elseif="1"></mutation>
           <value name="IF0">
             <block type="logic_compare" id="LN9?9BAf4rHZ+;l1R*rY">
               <field name="OP">EQ</field>
               <value name="A">
                 <block type="get_value" id="fVtlH~=td2#g5YW%gCY7">
                   <field name="ATTR">val</field>
                   <field name="OID">hm-rpc.0.CUX2800003.2.TIMER_SET</field>
                 </block>
               </value>
               <value name="B">
                 <block type="time_get" id="QAM.au~rqfM%EH.re]PP">
                   <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
                   <field name="OPTION">hh:mm:ss</field>
                 </block>
               </value>
             </block>
           </value>
           <statement name="DO0">
             <block type="control" id="+XV|=$`w!6I(/Zw5GSB@">
               <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
               <field name="OID">shelly.0.SHSW-25#8CAAB55D81E3#1.Shutter.Close</field>
               <field name="WITH_DELAY">FALSE</field>
               <value name="VALUE">
                 <block type="logic_boolean" id="U1PFWFBmCLG`=PD3q}@J">
                   <field name="BOOL">TRUE</field>
                 </block>
               </value>
               <next>
                 <block type="control" id="GwVmKcH?Yg+KVNlMKlf@">
                   <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                   <field name="OID">shelly.0.SHSW-25#8CAAB55D81E3#1.Shutter.Close</field>
                   <field name="WITH_DELAY">TRUE</field>
                   <field name="DELAY_MS">30</field>
                   <field name="UNIT">sec</field>
                   <field name="CLEAR_RUNNING">FALSE</field>
                   <value name="VALUE">
                     <block type="logic_boolean" id="}obw.2v?FCRcY$6$3TOw">
                       <field name="BOOL">FALSE</field>
                     </block>
                   </value>
                   <next>
                     <block type="debug" id="]:#/xp-aP!Lq9.FbmVy]">
                       <field name="Severity">log</field>
                       <value name="TEXT">
                         <shadow type="text" id="nQg:dkI/^(xp0]R{T/?:">
                           <field name="TEXT">Esszimmer groß heruntergefahren</field>
                         </shadow>
                       </value>
                     </block>
                   </next>
                 </block>
               </next>
             </block>
           </statement>
           <value name="IF1">
             <block type="logic_compare" id="1z%T?K;MVFd#Ig#/v@XG">
               <field name="OP">EQ</field>
               <value name="A">
                 <block type="get_value" id="kk}k7P7_kc=J]_aHu1rf">
                   <field name="ATTR">val</field>
                   <field name="OID">hm-rpc.0.CUX2800003.12.TIMER_SET</field>
                 </block>
               </value>
               <value name="B">
                 <block type="time_get" id="?3:OA}$^5hJ--xS;#KGz">
                   <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
                   <field name="OPTION">hh:mm:ss</field>
                 </block>
               </value>
             </block>
           </value>
           <statement name="DO1">
             <block type="control" id="-J$ydNEV#8h9X,2.0|tj">
               <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
               <field name="OID">shelly.0.SHSW-25#8CAAB55D81E3#1.Shutter.Open</field>
               <field name="WITH_DELAY">FALSE</field>
               <value name="VALUE">
                 <block type="logic_boolean" id="zB{t:9N/bN}kW3X#s]rV">
                   <field name="BOOL">TRUE</field>
                 </block>
               </value>
               <next>
                 <block type="control" id="lCZvEQz*`-nAl@h,F(t`">
                   <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                   <field name="OID">shelly.0.SHSW-25#8CAAB55D81E3#1.Shutter.Open</field>
                   <field name="WITH_DELAY">TRUE</field>
                   <field name="DELAY_MS">30</field>
                   <field name="UNIT">sec</field>
                   <field name="CLEAR_RUNNING">FALSE</field>
                   <value name="VALUE">
                     <block type="logic_boolean" id="PlcCosk/k$x`C~7-6xYj">
                       <field name="BOOL">FALSE</field>
                     </block>
                   </value>
                   <next>
                     <block type="debug" id="zPBrew2A*F5NSk(1v^K9">
                       <field name="Severity">log</field>
                       <value name="TEXT">
                         <shadow type="text" id="FOF?]~QH=@sLretORDn)">
                           <field name="TEXT">Esszimmer groß hochgefahren</field>
                         </shadow>
                       </value>
                     </block>
                   </next>
                 </block>
               </next>
             </block>
           </statement>
         </block>
       </statement>
      </block>
      <block xmlns="https://developers.google.com/blockly/xml" type="schedule" id="CvobSK]AYMwL89#RPn?T" x="63" y="38">
       <field name="SCHEDULE">* * * * *</field>
       <statement name="STATEMENT">
         <block type="controls_if" id=".oi?L?MZ#XS3M:!Em#.m">
           <mutation elseif="1"></mutation>
           <value name="IF0">
             <block type="logic_compare" id="LN9?9BAf4rHZ+;l1R*rY">
               <field name="OP">EQ</field>
               <value name="A">
                 <block type="get_value" id="fVtlH~=td2#g5YW%gCY7">
                   <field name="ATTR">val</field>
                   <field name="OID">hm-rpc.0.CUX2800003.2.TIMER_SET</field>
                 </block>
               </value>
               <value name="B">
                 <block type="time_get" id="QAM.au~rqfM%EH.re]PP">
                   <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
                   <field name="OPTION">hh:mm:ss</field>
                 </block>
               </value>
             </block>
           </value>
           <statement name="DO0">
             <block type="control" id="+XV|=$`w!6I(/Zw5GSB@">
               <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
               <field name="OID">shelly.0.SHSW-25#8CAAB55D81E3#1.Shutter.Close</field>
               <field name="WITH_DELAY">FALSE</field>
               <value name="VALUE">
                 <block type="logic_boolean" id="U1PFWFBmCLG`=PD3q}@J">
                   <field name="BOOL">TRUE</field>
                 </block>
               </value>
               <next>
                 <block type="control" id="GwVmKcH?Yg+KVNlMKlf@">
                   <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                   <field name="OID">shelly.0.SHSW-25#8CAAB55D81E3#1.Shutter.Close</field>
                   <field name="WITH_DELAY">TRUE</field>
                   <field name="DELAY_MS">30</field>
                   <field name="UNIT">sec</field>
                   <field name="CLEAR_RUNNING">FALSE</field>
                   <value name="VALUE">
                     <block type="logic_boolean" id="}obw.2v?FCRcY$6$3TOw">
                       <field name="BOOL">FALSE</field>
                     </block>
                   </value>
                   <next>
                     <block type="debug" id="]:#/xp-aP!Lq9.FbmVy]">
                       <field name="Severity">log</field>
                       <value name="TEXT">
                         <shadow type="text" id="nQg:dkI/^(xp0]R{T/?:">
                           <field name="TEXT">Esszimmer groß heruntergefahren</field>
                         </shadow>
                       </value>
                     </block>
                   </next>
                 </block>
               </next>
             </block>
           </statement>
           <value name="IF1">
             <block type="logic_compare" id="1z%T?K;MVFd#Ig#/v@XG">
               <field name="OP">EQ</field>
               <value name="A">
                 <block type="get_value" id="kk}k7P7_kc=J]_aHu1rf">
                   <field name="ATTR">val</field>
                   <field name="OID">hm-rpc.0.CUX2800003.12.TIMER_SET</field>
                 </block>
               </value>
               <value name="B">
                 <block type="time_get" id="?3:OA}$^5hJ--xS;#KGz">
                   <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
                   <field name="OPTION">hh:mm:ss</field>
                 </block>
               </value>
             </block>
           </value>
           <statement name="DO1">
             <block type="control" id="-J$ydNEV#8h9X,2.0|tj">
               <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
               <field name="OID">shelly.0.SHSW-25#8CAAB55D81E3#1.Shutter.Open</field>
               <field name="WITH_DELAY">FALSE</field>
               <value name="VALUE">
                 <block type="logic_boolean" id="zB{t:9N/bN}kW3X#s]rV">
                   <field name="BOOL">TRUE</field>
                 </block>
               </value>
               <next>
                 <block type="control" id="lCZvEQz*`-nAl@h,F(t`">
                   <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                   <field name="OID">shelly.0.SHSW-25#8CAAB55D81E3#1.Shutter.Open</field>
                   <field name="WITH_DELAY">TRUE</field>
                   <field name="DELAY_MS">30</field>
                   <field name="UNIT">sec</field>
                   <field name="CLEAR_RUNNING">FALSE</field>
                   <value name="VALUE">
                     <block type="logic_boolean" id="PlcCosk/k$x`C~7-6xYj">
                       <field name="BOOL">FALSE</field>
                     </block>
                   </value>
                   <next>
                     <block type="debug" id="zPBrew2A*F5NSk(1v^K9">
                       <field name="Severity">log</field>
                       <value name="TEXT">
                         <shadow type="text" id="FOF?]~QH=@sLretORDn)">
                           <field name="TEXT">Esszimmer groß hochgefahren</field>
                         </shadow>
                       </value>
                     </block>
                   </next>
                 </block>
               </next>
             </block>
           </statement>
         </block>
       </statement>
      </block>
      
      

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

        @opossum

        Kannst doch den Zeit Datenpunkt als Trigger nehmen, oder ändert der sich laufend ?

        like this:

        Screenshot 2021-10-14 000022.png

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

          Hallo, @cinimod,
          danke für Deine Hilfe. Der Zeitpunkt ändert sich täglich. Ist an Sonnenunter- und aufgang gekoppelt. Das Script an sich läuft. Ich wollte nur die minütlichen Prüfungen reduzieren.

          J Cinimod 2 Replies Last reply Reply Quote 0
          • J
            Jan1 @opossum last edited by Jan1

            @opossum
            Es gibt auch Astro Trigger 😉
            Kann die original Shelly FW keine Astro Zeiten? So bräuchtest überhaupt kein Script.

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

              @opossum

              Ja genau, kannst auch den Astro trigger nehmen, wenn das nicht genau deine Wunschzeit trifft kannst auch nen positiven oder negativen Versatz mit eintragen. Dann bist garnicht abhängig von dem Datenpunkt.

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

                Moin, @cinimod,
                den Astrotrigger schau ich mir mal an. Das könnte mein Problem tatsächlich lösen. Melde mich.

                J 1 Reply Last reply Reply Quote 0
                • J
                  JoergH @opossum last edited by

                  @opossum

                  Der Shelly kann das auch alles autonom. In der APP kann man eigene Zeitpläne erstellen inklusive Sonnenauf- und Untergang. Dann sind Kommunikationsprobleme kein Thema mehr.

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

                  Support us

                  ioBroker
                  Community Adapters
                  Donate

                  838
                  Online

                  32.0k
                  Users

                  80.5k
                  Topics

                  1.3m
                  Posts

                  blockly
                  4
                  7
                  431
                  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