Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Blockly
    5. [gelöst]Trockenlaufschutz, Problem mit Blockly

    NEWS

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    [gelöst]Trockenlaufschutz, Problem mit Blockly

    This topic has been deleted. Only users with topic management privileges can see it.
    • N
      nole @Homoran last edited by

      @homoran Mache ich, aber das muß ich jetzt leider auf morgen verschieben. Ich werde mir morgen früh deinen Vorschlag ansehen und deine Fragen beantworten. Heute sehe ich glaube ich vor lauter Bäumen den Wald nicht mehr. Bis morgen und schonmal vielen herzlichen Dank

      Homoran 2 Replies Last reply Reply Quote 0
      • Homoran
        Homoran Global Moderator Administrators @nole last edited by

        @nole
        noch mal das wichtigste:
        Trockenlauf01.png

        Da ist aber noch einiges weiteres offen!

        1 Reply Last reply Reply Quote 0
        • Homoran
          Homoran Global Moderator Administrators @nole last edited by Homoran

          @nole letzter Versuch ohne vollständige Informationen:
          Trockenlauf02.png

          alles in meinen Augen nicht notwendige deaktiviert und den timeout auf 3 Min gekürzt

          <xml xmlns="https://developers.google.com/blockly/xml">
           <variables>
             <variable type="timeout" id="timeout5">timeout5</variable>
           </variables>
           <block type="on_ext" id="s@2OLG^WQ0Uz${3=]rcu" x="-612" y="988">
             <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="Ai;g1E]yx1YU@CvQU0_?">
                 <field name="oid">sonoff.0.Sonoff-POWR2-Hauswasserpumpe.ENERGY_Power</field>
               </shadow>
             </value>
             <statement name="STATEMENT">
               <block type="controls_if" id="BFG#q9C:Ry7e,fB1,ReS">
                 <mutation elseif="1"></mutation>
                 <value name="IF0">
                   <block type="logic_operation" id="}0|Ibdz}[$u!,s@1umt+" inline="false">
                     <field name="OP">AND</field>
                     <value name="A">
                       <block type="logic_operation" id="HcLYlw110lcoa+[bJiic" inline="false">
                         <field name="OP">AND</field>
                         <value name="A">
                           <block type="logic_compare" id=";:iZxAnV(DUx83Z-My`t">
                             <field name="OP">GT</field>
                             <value name="A">
                               <block type="on_source" id="!jv^imrvv}mH3o0|yq4|">
                                 <field name="ATTR">state.val</field>
                               </block>
                             </value>
                             <value name="B">
                               <block type="math_number" id="+B,edY]WEOI62yLx%)zy">
                                 <field name="NUM">51</field>
                               </block>
                             </value>
                           </block>
                         </value>
                         <value name="B">
                           <block type="logic_compare" id="dh1?~QNf=KH})wRkSXkF">
                             <field name="OP">LT</field>
                             <value name="A">
                               <block type="on_source" id="-a^c~1OF?C8i`hb%/s:?">
                                 <field name="ATTR">state.val</field>
                               </block>
                             </value>
                             <value name="B">
                               <block type="math_number" id="XOJDy:Kc3|Qt/(Ca{g#w">
                                 <field name="NUM">191</field>
                               </block>
                             </value>
                           </block>
                         </value>
                       </block>
                     </value>
                     <value name="B">
                       <block type="logic_operation" id="HPTJU.`{@EsF[kNU8FJa" inline="false">
                         <field name="OP">OR</field>
                         <value name="A">
                           <block type="logic_compare" id="rP:D]GlY.!b+*YH+yKGB">
                             <field name="OP">LTE</field>
                             <value name="A">
                               <block type="on_source" id="v/2uJg+d3`wLl!~G*m!R">
                                 <field name="ATTR">oldState.val</field>
                               </block>
                             </value>
                             <value name="B">
                               <block type="math_number" id="[XFgC?0]Uk+4ioWy$bh2">
                                 <field name="NUM">51</field>
                               </block>
                             </value>
                           </block>
                         </value>
                         <value name="B">
                           <block type="logic_compare" id=",5unido@lECrS#!RN*g8">
                             <field name="OP">GTE</field>
                             <value name="A">
                               <block type="on_source" id="4bUx+6~)2-ts(MLwf[`d">
                                 <field name="ATTR">oldState.val</field>
                               </block>
                             </value>
                             <value name="B">
                               <block type="math_number" id=":ekgh}?XC]^!)v[@C6Pp">
                                 <field name="NUM">191</field>
                               </block>
                             </value>
                           </block>
                         </value>
                       </block>
                     </value>
                   </block>
                 </value>
                 <statement name="DO0">
                   <block type="timeouts_cleartimeout" id="NkHbFSo4*d9Q*`.:YX{(">
                     <field name="NAME">timeout5</field>
                     <next>
                       <block type="control" id="]Dno,P3;6dYZ:5Xp4;E`" disabled="true">
                         <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                         <field name="OID">sonoff.0.Sonoff-POWR2-Hauswasserpumpe.POWER</field>
                         <field name="WITH_DELAY">FALSE</field>
                         <value name="VALUE">
                           <block type="logic_boolean" id="%`XG|!/aW/;C[bnZj%8f">
                             <field name="BOOL">TRUE</field>
                           </block>
                         </value>
                         <next>
                           <block type="timeouts_settimeout" id=",XnI}PNQCo`}8_M}Wh{8">
                             <field name="NAME">timeout5</field>
                             <field name="DELAY">3</field>
                             <field name="UNIT">min</field>
                             <statement name="STATEMENT">
                               <block type="control" id="KRlV$DRq[]=@3e6wW~^Y">
                                 <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                 <field name="OID">sonoff.0.Sonoff-POWR2-Hauswasserpumpe.POWER</field>
                                 <field name="WITH_DELAY">FALSE</field>
                                 <value name="VALUE">
                                   <block type="logic_boolean" id="1?u+p!PCnX{mK*+Fc.oY">
                                     <field name="BOOL">FALSE</field>
                                   </block>
                                 </value>
                               </block>
                             </statement>
                           </block>
                         </next>
                       </block>
                     </next>
                   </block>
                 </statement>
                 <value name="IF1">
                   <block type="logic_operation" id="@w,+i@%MeuH{lT)|XxBH" inline="false">
                     <field name="OP">OR</field>
                     <value name="A">
                       <block type="logic_compare" id="Lc64TT##]i[Mj0XMkJH(">
                         <field name="OP">LT</field>
                         <value name="A">
                           <block type="on_source" id="GYWZfP!GgQH)]K@e[h)6">
                             <field name="ATTR">state.val</field>
                           </block>
                         </value>
                         <value name="B">
                           <block type="math_number" id="EnF1k6FG|l{~tOj-bmV;">
                             <field name="NUM">50</field>
                           </block>
                         </value>
                       </block>
                     </value>
                     <value name="B">
                       <block type="logic_compare" id="O]kgyw2#SRIiy|f9Unv.">
                         <field name="OP">GT</field>
                         <value name="A">
                           <block type="on_source" id="lG/{Z`298OF.VUq~Hhzr">
                             <field name="ATTR">state.val</field>
                           </block>
                         </value>
                         <value name="B">
                           <block type="math_number" id="h1;v$D/G!wHNBhYqBq;j">
                             <field name="NUM">191</field>
                           </block>
                         </value>
                       </block>
                     </value>
                   </block>
                 </value>
                 <statement name="DO1">
                   <block type="timeouts_cleartimeout" id="a4*9:he[uuWGBNB9E:#t">
                     <field name="NAME">timeout5</field>
                     <next>
                       <block type="control" id=")jNRwK{Uik_:R$lzdORT" disabled="true">
                         <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                         <field name="OID">sonoff.0.Sonoff-POWR2-Hauswasserpumpe.POWER</field>
                         <field name="WITH_DELAY">FALSE</field>
                         <value name="VALUE">
                           <block type="logic_boolean" id="vq-KULo#Tk?qM!WE^c[+">
                             <field name="BOOL">TRUE</field>
                           </block>
                         </value>
                       </block>
                     </next>
                   </block>
                 </statement>
                 <next>
                   <block type="debug" id="hR+`P5qaHhOUzOb2oFF#">
                     <field name="Severity">log</field>
                     <value name="TEXT">
                       <shadow type="text" id="U9Upn~:#r}gU|h^9`RwR">
                         <field name="TEXT">test</field>
                       </shadow>
                       <block type="text_join" id="EjlpL|_8ocdIR=pUZ:GN">
                         <mutation items="4"></mutation>
                         <value name="ADD0">
                           <block type="text" id="~W4iG)g]v[b--o;@IZE]">
                             <field name="TEXT">aktuelle Leistung: </field>
                           </block>
                         </value>
                         <value name="ADD1">
                           <block type="on_source" id="}^ELsWj}n/S7ee^X@lO1">
                             <field name="ATTR">state.val</field>
                           </block>
                         </value>
                         <value name="ADD2">
                           <block type="text" id="IN8j6{Ogxk|n.iT0%E2I">
                             <field name="TEXT">; bisherige Leistung: </field>
                           </block>
                         </value>
                         <value name="ADD3">
                           <block type="on_source" id="|$[suDq_C(nR[~^.,o+0">
                             <field name="ATTR">oldState.val</field>
                           </block>
                         </value>
                       </block>
                     </value>
                   </block>
                 </next>
               </block>
             </statement>
           </block>
          </xml>
          

          N 1 Reply Last reply Reply Quote 0
          • N
            nole @BBTown last edited by

            @bbtown Der Sonoff wird nicht ausgeschaltet, der Sonoff unterbricht den Strom zur Pumpe. Somit wird auch kein Watt verbraucht.
            ich habe jetzt folgendes Skript im Testlauf

            <xml xmlns="https://developers.google.com/blockly/xml">
              <variables>
                <variable type="timeout" id="timeout6">timeout6</variable>
              </variables>
              <block type="comment" id="*y5gM_Yt$M=}Z4MSw|$." x="-587" y="1213">
                <field name="COMMENT">Trockenlaufschutz</field>
                <next>
                  <block type="on_ext" id="~gu9.*D}mpMz~aX}kpUK">
                    <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="VQO7,Q*ctQ$M8z$0]T/R">
                        <field name="oid">sonoff.0.Sonoff-POWR2-Hauswasserpumpe.ENERGY_Power</field>
                      </shadow>
                    </value>
                    <statement name="STATEMENT">
                      <block type="controls_if" id="5G3@1QNij/L%k?9}TpbK">
                        <mutation elseif="1"></mutation>
                        <value name="IF0">
                          <block type="logic_operation" id="s?fR1Kse-kjW_QO7C3MW" inline="false">
                            <field name="OP">AND</field>
                            <value name="A">
                              <block type="logic_compare" id="[[h~7hIX=MsyQR.gLg4z">
                                <field name="OP">GT</field>
                                <value name="A">
                                  <block type="on_source" id="qZ07u5a3~-hJ_$(vJ`2X">
                                    <field name="ATTR">state.val</field>
                                  </block>
                                </value>
                                <value name="B">
                                  <block type="math_number" id=":_u[TZOf8Qj@#K|wpIM6">
                                    <field name="NUM">100</field>
                                  </block>
                                </value>
                              </block>
                            </value>
                            <value name="B">
                              <block type="logic_compare" id="COqKZpMT-,`W$Gsl6^u`">
                                <field name="OP">LT</field>
                                <value name="A">
                                  <block type="on_source" id="^@)5zf_lP=_]B*a_Vg+f">
                                    <field name="ATTR">state.val</field>
                                  </block>
                                </value>
                                <value name="B">
                                  <block type="math_number" id="j#wOLd23;j_AO(vH}$8~">
                                    <field name="NUM">190</field>
                                  </block>
                                </value>
                              </block>
                            </value>
                          </block>
                        </value>
                        <statement name="DO0">
                          <block type="timeouts_cleartimeout" id="{TkW[${#W4eJ`wu)rMS{">
                            <field name="NAME">timeout6</field>
                            <next>
                              <block type="timeouts_settimeout" id="y/cDU3$KW1l4._9Pm4rn">
                                <field name="NAME">timeout6</field>
                                <field name="DELAY">5</field>
                                <field name="UNIT">min</field>
                                <statement name="STATEMENT">
                                  <block type="control" id="$(!L(_zS|YRfYooi)((`">
                                    <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                    <field name="OID">sonoff.0.Sonoff-POWR2-Hauswasserpumpe.POWER</field>
                                    <field name="WITH_DELAY">FALSE</field>
                                    <value name="VALUE">
                                      <block type="logic_boolean" id="5oA+@|b_CmmC%@|:LJ-s">
                                        <field name="BOOL">FALSE</field>
                                      </block>
                                    </value>
                                  </block>
                                </statement>
                              </block>
                            </next>
                          </block>
                        </statement>
                        <value name="IF1">
                          <block type="logic_operation" id="1rH+I#hCIlg#9c}XAbpk" inline="false">
                            <field name="OP">OR</field>
                            <value name="A">
                              <block type="logic_compare" id="4W9.|D43T3Y1-j=OZSbm">
                                <field name="OP">LT</field>
                                <value name="A">
                                  <block type="on_source" id="O.ape@jY+`Z]d|cJU,;X">
                                    <field name="ATTR">state.val</field>
                                  </block>
                                </value>
                                <value name="B">
                                  <block type="math_number" id="K:_}E+H5Y!!m{sun3_7h">
                                    <field name="NUM">100</field>
                                  </block>
                                </value>
                              </block>
                            </value>
                            <value name="B">
                              <block type="logic_compare" id="BpQfjtJ%Qv+lA2ztdyhI">
                                <field name="OP">GT</field>
                                <value name="A">
                                  <block type="on_source" id="ZDZ8F=8@D84u[Pqzo~*(">
                                    <field name="ATTR">state.val</field>
                                  </block>
                                </value>
                                <value name="B">
                                  <block type="math_number" id="4~$Ds9H,/o3*%GK$G^#O">
                                    <field name="NUM">190</field>
                                  </block>
                                </value>
                              </block>
                            </value>
                          </block>
                        </value>
                        <statement name="DO1">
                          <block type="timeouts_cleartimeout" id="P}-=0PXSIC:|(-KyxUy(">
                            <field name="NAME">timeout6</field>
                          </block>
                        </statement>
                      </block>
                    </statement>
                  </block>
                </next>
              </block>
            </xml>
            
            1 Reply Last reply Reply Quote 0
            • N
              nole @Homoran last edited by nole

              @homoran Hallo, ich habe das Skript neu gebaut und es befindet sich im Testlauf. Bis jetzt scheint es zu funktionieren.
              Ich prüfe jetzt den Wert zwischen 100 und 190 also ">100 und <190" (Watt) für den timeout.
              Ist der Wert unter 100 oder über 190 soll der timeout gestopt werden. Somit denke ich wird die Pumpe nur ausgeschaltet wenn ich die vorgegebene Zeit zwischen 100 und 190 Watt (das ist der Stromverbrauch bei Trockenlauf) erreiche.
              Mein Ziel ist es das die Pumpe nur bei Trockenlauf vom Strom getrennt wird und ansonsten am Strom ist und somit im Standby damit wir jederzeit im Haus Wasser entnehmen können. Wenn dann der Trockenlauf eintritt und das Skript den timout startet und die Pumpe vom Strom trennt werde ich über eine StatusLED (bzw. später irgendwann mal Benachrichtigung aufs Handy) darüber informiert und kann das Wasser nachfüllen und die Stromzufuhr zur Pumpe am Sonoff wieder einschalten. Das ist mein Ziel, und ich hoffe das das mit eurer Hilfe und dem jetzt daraus entstandenen Skript klappt.
              Ihr ward gestern echt geduldig mit mir Anfänger und dafür bin ich sehr dankbar. Das war mein erster Tag in einem Forum und ich habe viel gelernt und hoffe in der nächsten Zeit besser zu werden. Dieses hier ist ein super Forum und ich fühle mich hier sehr wohl. Ich hoffe in der Zukunft auch Anfängern und Lösungssuchenden so gut helfen zu können.

              Screenshot_2021-05-11 javascript - ioBroker.png

              "SonoffPOW2-Hauswasserpumpe Energy Power" = Watt-Anzeige
              SonoffPOW2-HauswasserpumpePOWER = Switch (also Strom on/off)

              <xml xmlns="https://developers.google.com/blockly/xml">
               <variables>
                 <variable type="timeout" id="timeout6">timeout6</variable>
               </variables>
               <block type="comment" id="*y5gM_Yt$M=}Z4MSw|$." x="-587" y="1213">
                 <field name="COMMENT">Trockenlaufschutz</field>
                 <next>
                   <block type="on_ext" id="~gu9.*D}mpMz~aX}kpUK">
                     <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="VQO7,Q*ctQ$M8z$0]T/R">
                         <field name="oid">sonoff.0.Sonoff-POWR2-Hauswasserpumpe.ENERGY_Power</field>
                       </shadow>
                     </value>
                     <statement name="STATEMENT">
                       <block type="controls_if" id="5G3@1QNij/L%k?9}TpbK">
                         <mutation elseif="1"></mutation>
                         <value name="IF0">
                           <block type="logic_operation" id="s?fR1Kse-kjW_QO7C3MW" inline="false">
                             <field name="OP">AND</field>
                             <value name="A">
                               <block type="logic_compare" id="[[h~7hIX=MsyQR.gLg4z">
                                 <field name="OP">GT</field>
                                 <value name="A">
                                   <block type="on_source" id="qZ07u5a3~-hJ_$(vJ`2X">
                                     <field name="ATTR">state.val</field>
                                   </block>
                                 </value>
                                 <value name="B">
                                   <block type="math_number" id=":_u[TZOf8Qj@#K|wpIM6">
                                     <field name="NUM">100</field>
                                   </block>
                                 </value>
                               </block>
                             </value>
                             <value name="B">
                               <block type="logic_compare" id="COqKZpMT-,`W$Gsl6^u`">
                                 <field name="OP">LT</field>
                                 <value name="A">
                                   <block type="on_source" id="^@)5zf_lP=_]B*a_Vg+f">
                                     <field name="ATTR">state.val</field>
                                   </block>
                                 </value>
                                 <value name="B">
                                   <block type="math_number" id="j#wOLd23;j_AO(vH}$8~">
                                     <field name="NUM">190</field>
                                   </block>
                                 </value>
                               </block>
                             </value>
                           </block>
                         </value>
                         <statement name="DO0">
                           <block type="timeouts_cleartimeout" id="{TkW[${#W4eJ`wu)rMS{">
                             <field name="NAME">timeout6</field>
                             <next>
                               <block type="timeouts_settimeout" id="y/cDU3$KW1l4._9Pm4rn">
                                 <field name="NAME">timeout6</field>
                                 <field name="DELAY">5</field>
                                 <field name="UNIT">min</field>
                                 <statement name="STATEMENT">
                                   <block type="control" id="$(!L(_zS|YRfYooi)((`">
                                     <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                     <field name="OID">sonoff.0.Sonoff-POWR2-Hauswasserpumpe.POWER</field>
                                     <field name="WITH_DELAY">FALSE</field>
                                     <value name="VALUE">
                                       <block type="logic_boolean" id="5oA+@|b_CmmC%@|:LJ-s">
                                         <field name="BOOL">FALSE</field>
                                       </block>
                                     </value>
                                   </block>
                                 </statement>
                               </block>
                             </next>
                           </block>
                         </statement>
                         <value name="IF1">
                           <block type="logic_operation" id="1rH+I#hCIlg#9c}XAbpk" inline="false">
                             <field name="OP">OR</field>
                             <value name="A">
                               <block type="logic_compare" id="4W9.|D43T3Y1-j=OZSbm">
                                 <field name="OP">LT</field>
                                 <value name="A">
                                   <block type="on_source" id="O.ape@jY+`Z]d|cJU,;X">
                                     <field name="ATTR">state.val</field>
                                   </block>
                                 </value>
                                 <value name="B">
                                   <block type="math_number" id="K:_}E+H5Y!!m{sun3_7h">
                                     <field name="NUM">100</field>
                                   </block>
                                 </value>
                               </block>
                             </value>
                             <value name="B">
                               <block type="logic_compare" id="BpQfjtJ%Qv+lA2ztdyhI">
                                 <field name="OP">GT</field>
                                 <value name="A">
                                   <block type="on_source" id="ZDZ8F=8@D84u[Pqzo~*(">
                                     <field name="ATTR">state.val</field>
                                   </block>
                                 </value>
                                 <value name="B">
                                   <block type="math_number" id="4~$Ds9H,/o3*%GK$G^#O">
                                     <field name="NUM">190</field>
                                   </block>
                                 </value>
                               </block>
                             </value>
                           </block>
                         </value>
                         <statement name="DO1">
                           <block type="timeouts_cleartimeout" id="P}-=0PXSIC:|(-KyxUy(">
                             <field name="NAME">timeout6</field>
                           </block>
                         </statement>
                       </block>
                     </statement>
                   </block>
                 </next>
               </block>
              </xml>
              

              Homoran 1 Reply Last reply Reply Quote 0
              • Homoran
                Homoran Global Moderator Administrators @nole last edited by

                @nole sagte in Trockenlaufschutz, Problem mit Blockly:

                ich habe das Skript neu gebaut und es befindet sich im Testlauf. Bis jetzt scheint es zu funktionieren.

                so sieht es sinnvoll aus.

                Es wird zwar jetzt nicht mehr geprüft, ob sich der Druck verändert hat (also vorher noch normal gepumpt wurde), der mögliche Fehler, dass zufällig ein Druck zwischen 100 und 190 gemessen wurde, weil z.B. die Pumpe gerade anläuft, wird hoffentlich über den timeout abgefangen

                N 1 Reply Last reply Reply Quote 0
                • N
                  nole @Homoran last edited by nole

                  @homoran Bis jetzt hat das Skript den Test bestanden, die Duschorgie fängt jetzt an. Aber ich denke das klappt auch.
                  Es wird die Watt Aufnahme der Pumpe geprüft ob zwischen 100 Watt und 190 Watt. Im Normalbetrieb (also mit Wasser) geht die Aufnahme beim Start der Pumpe direkt über 300 Watt und bei erreichen des Wasserdrucks wenn die Pumpe aufhört zu pumpen pendelt die Watt-Angabe noch kurz zwischen 30 und 1 Watt bis sie dann auf 0 Watt geht. Das Skript hat das abendliche Duschen auch geschafft.
                  Vielen Dank für die Hilfe, ich hatte vor Gestern schon fast die Hoffnung verloren das noch hin zu bekommen, aber bei so einem tollen Forum........, Danke an Alle!
                  Demnächst versuche ich ein Blockly mit nachts Licht im Flur für eine bestimmte Zeit einschalten wenn eins von 2 Schlafzimmern verlassen wurde verlassen wurde um zb. zur Toilette zu gehen. Zur Zeit lässt meine Frau das Licht die ganze Nacht an. Ich warte noch auf 2 Fenster/Türkontakte.

                  1 Reply Last reply Reply Quote 0
                  • N
                    nole last edited by

                    @homoran Hallo nochmal, das Skript läuft so wie es soll. Mein Problem in diesem Fall ist also gelöst dank Eurer Hilfe.
                    Muß ich jetzt den Post auf gelöst setzen und wie würde das gehen?

                    Homoran 1 Reply Last reply Reply Quote 0
                    • Homoran
                      Homoran Global Moderator Administrators @nole last edited by

                      @nole sagte in Trockenlaufschutz, Problem mit Blockly:

                      wie würde das gehen?

                      den ersten Post editieren und vor dem Threadtitel [gelöst] einfügen

                      N 1 Reply Last reply Reply Quote 0
                      • N
                        nole @Homoran last edited by

                        @homoran Danke, habe ich jetzt gemacht.

                        1 Reply Last reply Reply Quote 0
                        • N
                          nole last edited by

                          Hallo,
                          ich muss mich berichtigen, das Skript lief doch nicht so richtig. Es hat zwar die Pumpe nicht ohne Grund ausgeschaltet aber auch mit Grund nicht. Nun habe ich endlich Zeit gehabt mich dem Problem erneut anzunehmen und habe folgendes Skript gebastelt.

                          <xml xmlns="https://developers.google.com/blockly/xml">
                           <variables>
                             <variable type="timeout" id="timeout">timeout</variable>
                           </variables>
                           <block type="on_ext" id="Ny`@xRP|-laVB|g1arG%" x="105" y="100">
                             <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="MnGQx;wM=ej9UTDE+MzF">
                                 <field name="oid">sonoff.0.Sonoff-POWR2-Hauswasserpumpe.ENERGY_Power</field>
                               </shadow>
                             </value>
                             <statement name="STATEMENT">
                               <block type="controls_if" id="2ktg:1=Rv2X/[O5~qE;Z">
                                 <mutation elseif="1"></mutation>
                                 <value name="IF0">
                                   <block type="logic_operation" id="]U4=s.+p^nfdiM7eo=rm">
                                     <field name="OP">AND</field>
                                     <value name="A">
                                       <block type="logic_compare" id="U5eP#QY-w$P[**v9Cdy5">
                                         <field name="OP">GT</field>
                                         <value name="A">
                                           <block type="on_source" id="SRKSi}p9qFw+1dtq.4!W">
                                             <field name="ATTR">state.val</field>
                                           </block>
                                         </value>
                                         <value name="B">
                                           <block type="math_number" id="X,.`f51^vT`JMV]$Kiju">
                                             <field name="NUM">100</field>
                                           </block>
                                         </value>
                                       </block>
                                     </value>
                                     <value name="B">
                                       <block type="logic_compare" id="s5ga`AA-Umj7,jB|fI1t">
                                         <field name="OP">LT</field>
                                         <value name="A">
                                           <block type="on_source" id="^`Y*yC92QiC6g_s)?0`O">
                                             <field name="ATTR">state.val</field>
                                           </block>
                                         </value>
                                         <value name="B">
                                           <block type="math_number" id="8F-bgB7+$}5xCuw+J1Di">
                                             <field name="NUM">200</field>
                                           </block>
                                         </value>
                                       </block>
                                     </value>
                                   </block>
                                 </value>
                                 <statement name="DO0">
                                   <block type="timeouts_settimeout" id=",7$LHGa.Sk4,hd40,Iks">
                                     <field name="NAME">timeout</field>
                                     <field name="DELAY">30</field>
                                     <field name="UNIT">sec</field>
                                     <statement name="STATEMENT">
                                       <block type="control" id="S*gT=QIVmL*`1@H7`]$n">
                                         <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                         <field name="OID">sonoff.0.Sonoff-POWR2-Hauswasserpumpe.POWER</field>
                                         <field name="WITH_DELAY">FALSE</field>
                                         <value name="VALUE">
                                           <block type="logic_boolean" id="%+d/Z~;9)rGIH_v~tCC8">
                                             <field name="BOOL">FALSE</field>
                                           </block>
                                         </value>
                                       </block>
                                     </statement>
                                   </block>
                                 </statement>
                                 <value name="IF1">
                                   <block type="logic_operation" id="s{fc?=s85@+I{/_F/]v5">
                                     <field name="OP">OR</field>
                                     <value name="A">
                                       <block type="logic_compare" id="Ry{K/w;LTypU8db^r_D*">
                                         <field name="OP">LT</field>
                                         <value name="A">
                                           <block type="on_source" id="cSYDe|:}BNnBAj0oPmuy">
                                             <field name="ATTR">state.val</field>
                                           </block>
                                         </value>
                                         <value name="B">
                                           <block type="math_number" id="XvumhR|C?R)BLQd?Nf~$">
                                             <field name="NUM">100</field>
                                           </block>
                                         </value>
                                       </block>
                                     </value>
                                     <value name="B">
                                       <block type="logic_compare" id="sbH?I8C1uRqaO6kmeyR*">
                                         <field name="OP">GT</field>
                                         <value name="A">
                                           <block type="on_source" id="ox*uxi|zQI8lAiyNLTg_">
                                             <field name="ATTR">state.val</field>
                                           </block>
                                         </value>
                                         <value name="B">
                                           <block type="math_number" id="H5PWh:BCK,FGOyb.$WIn">
                                             <field name="NUM">200</field>
                                           </block>
                                         </value>
                                       </block>
                                     </value>
                                   </block>
                                 </value>
                                 <statement name="DO1">
                                   <block type="timeouts_cleartimeout" id="fJE_8%c*ib~dmsQU/IOE">
                                     <field name="NAME">timeout</field>
                                   </block>
                                 </statement>
                               </block>
                             </statement>
                           </block>
                          </xml>
                          


                          Screenshot 2021-07-18 at 10-37-56 javascript - ioBroker.png

                          Es funktioniert und ich bin glücklich.

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

                          Support us

                          ioBroker
                          Community Adapters
                          Donate

                          829
                          Online

                          31.7k
                          Users

                          79.8k
                          Topics

                          1.3m
                          Posts

                          6
                          107
                          6294
                          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