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

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

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    [gelöst]Trockenlaufschutz, Problem mit Blockly

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

      @bbtown dann ändert sich dieser timeout automatisch von der eingegebenen 3 auf 5

      BBTown J 2 Replies Last reply Reply Quote 0
      • BBTown
        BBTown @nole last edited by

        @nole Du kannst die Bezeichnung des Timers ändern und die neue Bezeichnung steht danach in den Auswahllisten der Timeout Bausteine zur Verfügung

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

          @bbtown ich habe jetzt die beiden anderen auf 4 geändert, das hat geklappt.

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

            @nole dann kann ich dir nicht helfen.
            Du hast jetzt eine Vorlage an der Du dich orientieren kannst
            Entweder Du fängst ein neues Script an und versucht erneut den Import, oder aber Du legst ein neues Script manuell mit den Bausteinen gemäß Vorlage an.

            1 Reply Last reply Reply Quote 0
            • J
              Jan1 @nole last edited by

              @nole
              Das sieht ja schon ganz gut aus hier 😉

              N 2 Replies Last reply Reply Quote 0
              • N
                nole @Jan1 last edited by

                @jan1 was sieht gut aus?

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

                  @jan1 Das skript sieht bei mir jetzt so aus:

                  <xml xmlns="https://developers.google.com/blockly/xml">
                    <variables>
                      <variable type="timeout" id="timeout3">timeout3</variable>
                      <variable type="timeout" id="timeout4">timeout4</variable>
                    </variables>
                    <block type="on_ext" id="FB^,o-|.DkV*l1Zpw1ev" x="-487" y="88">
                      <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="w]B4izL8Xi6Xis[a47]}">
                          <field name="oid">sonoff.0.Sonoff-POWR2-Hauswasserpumpe.ENERGY_Power</field>
                        </shadow>
                      </value>
                      <statement name="STATEMENT">
                        <block type="controls_if" id="o9}:IIEo};jIF72b9AA.">
                          <mutation elseif="1"></mutation>
                          <value name="IF0">
                            <block type="logic_operation" id="k/5vYdt)FO5#4fIMa~m;" inline="false">
                              <field name="OP">AND</field>
                              <value name="A">
                                <block type="logic_compare" id="ViV`%UQ}k~UPs7,j-ryV">
                                  <field name="OP">GTE</field>
                                  <value name="A">
                                    <block type="on_source" id="u:72U[-3Dnb8^3xE,|!!">
                                      <field name="ATTR">state.val</field>
                                    </block>
                                  </value>
                                  <value name="B">
                                    <block type="math_number" id="!{rp568)Xa_3X^/P-X67">
                                      <field name="NUM">100</field>
                                    </block>
                                  </value>
                                </block>
                              </value>
                              <value name="B">
                                <block type="logic_compare" id="{T1t5z14z,+4|DC]gOXz">
                                  <field name="OP">LT</field>
                                  <value name="A">
                                    <block type="on_source" id="=QYK}e_eO)R!UP9V$lM^">
                                      <field name="ATTR">oldState.val</field>
                                    </block>
                                  </value>
                                  <value name="B">
                                    <block type="math_number" id="hLUSUOYJL$qWXsN7kTk8">
                                      <field name="NUM">100</field>
                                    </block>
                                  </value>
                                </block>
                              </value>
                            </block>
                          </value>
                          <statement name="DO0">
                            <block type="timeouts_cleartimeout" id="U_%ugF^L^YUcG@wP=]~Z">
                              <field name="NAME">timeout4</field>
                              <next>
                                <block type="control" id="hZTA=BSjCVV{]?(0pVgY">
                                  <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="R||h%3X{{l}e4p`%Yawz">
                                      <field name="BOOL">TRUE</field>
                                    </block>
                                  </value>
                                  <next>
                                    <block type="timeouts_settimeout" id=".o~uvJbWt^KQ`oiI!e$!">
                                      <field name="NAME">timeout4</field>
                                      <field name="DELAY">30</field>
                                      <field name="UNIT">min</field>
                                      <statement name="STATEMENT">
                                        <block type="control" id="4S}(|m-Kt)y5P9txPZ+I">
                                          <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="}wd]{cXQ@x{`KvgI26LW">
                                              <field name="BOOL">FALSE</field>
                                            </block>
                                          </value>
                                        </block>
                                      </statement>
                                    </block>
                                  </next>
                                </block>
                              </next>
                            </block>
                          </statement>
                          <value name="IF1">
                            <block type="logic_operation" id="!/F3qNm$R2Q]m/jo|f#T" inline="false">
                              <field name="OP">AND</field>
                              <value name="A">
                                <block type="logic_compare" id="iHA4@^BN{s/[}$=sq31n">
                                  <field name="OP">LTE</field>
                                  <value name="A">
                                    <block type="on_source" id="gQBF^?(7;hKwq*ro`;LK">
                                      <field name="ATTR">state.val</field>
                                    </block>
                                  </value>
                                  <value name="B">
                                    <block type="math_number" id="E1Co9VoP0Z]U].V}:dk6">
                                      <field name="NUM">50</field>
                                    </block>
                                  </value>
                                </block>
                              </value>
                              <value name="B">
                                <block type="logic_compare" id="2[[fJeqHxkcfP[F^]I-Q">
                                  <field name="OP">GT</field>
                                  <value name="A">
                                    <block type="on_source" id="f5IDFVCeLD}U6K[_XEG@">
                                      <field name="ATTR">oldState.val</field>
                                    </block>
                                  </value>
                                  <value name="B">
                                    <block type="math_number" id="2k,M4Zr}0C_#uR%MuF|Q">
                                      <field name="NUM">50</field>
                                    </block>
                                  </value>
                                </block>
                              </value>
                            </block>
                          </value>
                          <statement name="DO1">
                            <block type="timeouts_cleartimeout" id="cL@Uuw#K=7Oj=lJL/W:h">
                              <field name="NAME">timeout4</field>
                              <next>
                                <block type="control" id="dYN%$E|/?la90IKRz{*w">
                                  <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="lU?:V,sk#5e#Zs@){!|m">
                                      <field name="BOOL">FALSE</field>
                                    </block>
                                  </value>
                                </block>
                              </next>
                            </block>
                          </statement>
                          <next>
                            <block type="debug" id=",qorWlCkGFLb!+WM7/rO">
                              <field name="Severity">log</field>
                              <value name="TEXT">
                                <shadow type="text">
                                  <field name="TEXT">test</field>
                                </shadow>
                                <block type="text_join" id="8h9QE+{dve}o}{xFz4^/">
                                  <mutation items="2"></mutation>
                                  <value name="ADD0">
                                    <block type="text" id="^^vC/IAZ$YnpMiFFn.nC">
                                      <field name="TEXT">Watt:</field>
                                    </block>
                                  </value>
                                  <value name="ADD1">
                                    <block type="on_source" id="-bW!=3`GYzyDgu_1}k0G">
                                      <field name="ATTR">state.val</field>
                                    </block>
                                  </value>
                                </block>
                              </value>
                            </block>
                          </next>
                        </block>
                      </statement>
                    </block>
                    <block type="on_ext" id=")3Y6O)OSZ6,a.eId9_([" disabled="true" x="-487" y="688">
                      <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="FB}qA2j)SArn`ar=BQ8z">
                          <field name="oid">sonoff.0.Sonoff-POWR2-Hauswasserpumpe.ENERGY_Power</field>
                        </shadow>
                      </value>
                      <statement name="STATEMENT">
                        <block type="controls_if" id="nT8{B{T^As}6|P1eFdAp">
                          <value name="IF0">
                            <block type="logic_compare" id="h=ll3)j0~lH*]vID@v{h">
                              <field name="OP">GTE</field>
                              <value name="A">
                                <block type="get_value" id="prv]M@]WP)O8k`WxQv,M">
                                  <field name="ATTR">val</field>
                                  <field name="OID">sonoff.0.Sonoff-POWR2-Hauswasserpumpe.ENERGY_Power</field>
                                </block>
                              </value>
                              <value name="B">
                                <block type="math_number" id="QWMd~%R.#BvSN.-Jr7|S">
                                  <field name="NUM">100</field>
                                </block>
                              </value>
                            </block>
                          </value>
                          <statement name="DO0">
                            <block type="controls_if" id=";N~?jZO,:^+(B6c4+e.p">
                              <value name="IF0">
                                <block type="logic_compare" id="nLGp=iM$L~IydiZi8!Z?">
                                  <field name="OP">LTE</field>
                                  <value name="A">
                                    <block type="get_value" id="#X;Nd8faxS1r?ibN,9Ur">
                                      <field name="ATTR">val</field>
                                      <field name="OID">sonoff.0.Sonoff-POWR2-Hauswasserpumpe.ENERGY_Power</field>
                                    </block>
                                  </value>
                                  <value name="B">
                                    <block type="math_number" id="3L+Hx`ZZZ[6;bcStTgXv">
                                      <field name="NUM">50</field>
                                    </block>
                                  </value>
                                </block>
                              </value>
                              <statement name="DO0">
                                <block type="timeouts_cleartimeout" id="s_tu+G)JzfXKRo!,-i?j">
                                  <field name="NAME">timeout3</field>
                                </block>
                              </statement>
                              <next>
                                <block type="timeouts_settimeout" id="|y|12`S1gi{?f|+:!d87">
                                  <field name="NAME">timeout3</field>
                                  <field name="DELAY">30</field>
                                  <field name="UNIT">min</field>
                                  <statement name="STATEMENT">
                                    <block type="control" id="]:Q/hgD*3Ye$XrhiCKVK">
                                      <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="]qeVb0?p3y!^dSP8T!{!">
                                          <field name="BOOL">FALSE</field>
                                        </block>
                                      </value>
                                    </block>
                                  </statement>
                                </block>
                              </next>
                            </block>
                          </statement>
                          <next>
                            <block type="debug" id="jv2kcn+O#/wer{(+o+DW">
                              <field name="Severity">log</field>
                              <value name="TEXT">
                                <shadow type="text">
                                  <field name="TEXT">test</field>
                                </shadow>
                                <block type="text_join" id="FXin0|uc^i=Wm;0R-Jtj">
                                  <mutation items="2"></mutation>
                                  <value name="ADD0">
                                    <block type="text" id="Z##h?{^2;N/L6AAv4~..">
                                      <field name="TEXT">Watt:</field>
                                    </block>
                                  </value>
                                  <value name="ADD1">
                                    <block type="on_source" id="t@LBx#Y!8Fv5({,pHM[,">
                                      <field name="ATTR">state.val</field>
                                    </block>
                                  </value>
                                </block>
                              </value>
                            </block>
                          </next>
                        </block>
                      </statement>
                    </block>
                  </xml>
                  
                  Homoran 1 Reply Last reply Reply Quote 0
                  • J
                    Jan1 @nole last edited by

                    @nole
                    Das Blockly.
                    Wurde auch etwas optimierte und wie man timeouts verwendet siehst ja. Es sollte immer ein stopp des timeouts davor erfolgen um sicher zu stellen, dass nicht genau dieser schon läuft, sonst passt die ein gestellte Zeit nie und man wundert sich, was exakt bei Dir zu Beginn der Grund Deiner Verwirrung war 😉

                    N 2 Replies Last reply Reply Quote 0
                    • N
                      nole @Jan1 last edited by

                      @jan1 ich arbeite mich gerade gedanklich durch das Blockly, ich habe dank euch allen heute einiges wichtige dazu gelernt. Vielen Dank an euch alle. Wenn alles läuft erfahrt ihr das natürlich. Ich gehe dann jetzt in die Testphase über.

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

                        @jan1 irgendwas stimmt noch nicht, ich weiß nur noch nicht was. Schaltet immer noch ohne erkennbaren Grund aus. Ich probiere den Fehler zu finden.

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

                          @nole sagte in Trockenlaufschutz, Problem mit Blockly:

                          Das skript sieht bei mir jetzt so aus:

                          warum nie als screenshot??
                          Am Handy nutzt der xml-Export rein gar nix

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

                            @homoran Screenshot_2021-05-10 javascript - ioBroker(2).png

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

                              @nole sagte in Trockenlaufschutz, Problem mit Blockly:

                              Schaltet immer noch ohne erkennbaren Grund aus

                              und was steht dann im debug?

                              Hast du mal auf "geändert" getriggert und das Problem bleibt?
                              ich weiß nicht, ob der Sensor ggf. 2x hintereinander den selben Wert liefert
                              lass dir vielleicht zusätzlich noch den vorherigen Wert ausgeben

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

                                @homoran Die Pumpe hat wenn sie kein Wasser hat, also im Trockenlauf vor der ich die Pumpe schützen will, zwischen 150 und 200 Watt Verbrauch. Im Pumpen mit Wasser über 300 Watt und natürlich wenn der Wasserdruck im Haus ok ist 0 Watt.
                                Wenn der Druck erreicht ist und die Pumpe abschaltet zeigt die Wattanzeige vom Sonoff PowR2 kurze Zeit noch ein paar Watt an ( Zwischen 4 und 50 Watt).

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

                                  @nole ich hatte noch was editiert:

                                  @homoran sagte in Trockenlaufschutz, Problem mit Blockly:

                                  lass dir vielleicht zusätzlich noch den vorherigen Wert ausgeben

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

                                    @homoran ich werde es nochmal mit "geändert" probieren.

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

                                      @nole sagte in Trockenlaufschutz, Problem mit Blockly:

                                      Die Pumpe hat wenn sie kein Wasser hat, also im Trockenlauf vor der ich die Pumpe schützen will, zwischen 150 und 200 Watt

                                      und warum prüfst du nicht auf diesen Bereich, sondern auf >100 um die Pumpe anzuschalten?

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

                                        @homoran das ist das was ich bei dem Skript auch noch nicht verstehe

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

                                          @nole sagte in Trockenlaufschutz, Problem mit Blockly:

                                          @homoran das ist das was ich bei dem Skript auch noch nicht verstehe

                                          Aber das ist doch dein Ansatz gewesen.

                                          Was genau hast du dir denn dabei gedacht?

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

                                            @homoran eigentlich müsste es doch gehen wenn ich oben Wert größer als 100 und kleiner als 200 prüfe und danach den timeout starten lasse und nach 30 Minuten ausschalten lasse. Den Rest müsste ich doch weglassen können, oder habe ich mich da jetzt total verannt?

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            839
                                            Online

                                            31.7k
                                            Users

                                            79.8k
                                            Topics

                                            1.3m
                                            Posts

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