Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Blockly
    5. true Abfrage alle 2 Sek.

    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

    true Abfrage alle 2 Sek.

    This topic has been deleted. Only users with topic management privileges can see it.
    • Asgothian
      Asgothian Developer @Aphofis last edited by

      @Aphofis abschalten kann bis zu 5 Sekunden dauern.. sollte es zumindest

      Aphofis 1 Reply Last reply Reply Quote 0
      • Aphofis
        Aphofis @Asgothian last edited by

        @Asgothian
        Das aber nicht so toll ist es möglich das auf 2 sek zu begrenzen ???

        Asgothian 1 Reply Last reply Reply Quote 0
        • Asgothian
          Asgothian Developer @Aphofis last edited by

          @Aphofis ja.. da wo 5 Sekunden steht 2 Sekunden eintragen, da wo 60 steht 150 rein

          Aphofis 1 Reply Last reply Reply Quote 0
          • Aphofis
            Aphofis @Asgothian last edited by

            @Asgothian
            ok
            I try

            1 Reply Last reply Reply Quote 0
            • Aphofis
              Aphofis last edited by

              Was soll ich sagen!??
              Es läuft perfekt.
              10 Liter Grenze muss ich sehen.
              Leider oder auch nicht leider ist es nicht mehr so warm und der Verbrauch ist von 8-11 Liter drastisch runter auf 6-8 Liter geschrumpft. Doch man kann es bestimmt mal test in dem man 1 sek nimmt und bei 150 sek dann zb 5 sek nimmt und es dann testet. wie bekomme dann ggf den Schedule wieder resettet ?

              Asgothian 1 Reply Last reply Reply Quote 0
              • Asgothian
                Asgothian Developer @Aphofis last edited by

                @Aphofis
                Ich kann dir nicht folgen.

                Aphofis 1 Reply Last reply Reply Quote 0
                • Aphofis
                  Aphofis @Asgothian last edited by

                  @Asgothian
                  Nur zum testen die jetzt eingestellten 2 sek auf 1 sek stellen und den Tageszyklus von 150 auf 5 sek stellen wenn ich dann den schwimmer betätige länger als 5 sek müsste doch dann das magnet ventil still schweigen.?

                  Asgothian 1 Reply Last reply Reply Quote 0
                  • Asgothian
                    Asgothian Developer @Aphofis last edited by

                    @Aphofis ja.
                    du musst nach dem umstellen das script nur neu starten

                    Aphofis 1 Reply Last reply Reply Quote 0
                    • Aphofis
                      Aphofis @Asgothian last edited by

                      @Asgothian
                      OK das teste ich mal

                      1 Reply Last reply Reply Quote 0
                      • Aphofis
                        Aphofis last edited by

                        Also habe jetzt auf 1 sek und zyklus auf 3 sek gestellt nach 3 sek betätigen des schwimmers ist stop aber wenn der schwimmer dann wieder im test true ist schaltet das magnet vemtil immer für 1 sek und stoppt dann. eigntl sollte es ja garnicht mehr für den tageszyklus anspringen !?

                        Asgothian 1 Reply Last reply Reply Quote 0
                        • Asgothian
                          Asgothian Developer @Aphofis last edited by

                          @Aphofis lass dir bitte mal im debug den wert fuer Restzeit angeben.. der sollte 0 oder kleiner sein, dann darf er nicht ansspringen

                          Aphofis 1 Reply Last reply Reply Quote 0
                          • Aphofis
                            Aphofis @Asgothian last edited by

                            @Asgothian
                            Debug im zeitplan ?

                            Asgothian 1 Reply Last reply Reply Quote 0
                            • Asgothian
                              Asgothian Developer @Aphofis last edited by

                              @Aphofis nein, Fehler ist gefunden.. da wo falls "nicht Magnetventil Kontrolle" steht muss noch ein "und Restzeit > 0" rein

                              A.

                              Aphofis 1 Reply Last reply Reply Quote 1
                              • Aphofis
                                Aphofis @Asgothian last edited by

                                @Asgothian
                                setze oder erhöhe ???

                                Asgothian 1 Reply Last reply Reply Quote 0
                                • Asgothian
                                  Asgothian Developer @Aphofis last edited by

                                  @Aphofis weder noch..
                                  Screen Shot 2019-09-05 at 20.55.18 .png

                                  Aphofis 1 Reply Last reply Reply Quote 1
                                  • Aphofis
                                    Aphofis @Asgothian last edited by

                                    @Asgothian
                                    OK nächster test

                                    1 Reply Last reply Reply Quote 0
                                    • Aphofis
                                      Aphofis last edited by

                                      So es klappt
                                      Magnet ventil stoppt zwar erst nach 5 sek aber das passt nach mehrerem betätigen des schwimmers schweigt das ventil still! So wie es soll.
                                      Wie kommt das zu stande!? das es 5 sek sind !?
                                      Also es stört mich nicht so lange es am Tag nicht mehr als 10-15 Liter sind.

                                      1 Reply Last reply Reply Quote 0
                                      • Aphofis
                                        Aphofis last edited by

                                        Ich sage mal
                                        vielen vielen Dank

                                        1 Reply Last reply Reply Quote 0
                                        • Aphofis
                                          Aphofis last edited by Aphofis

                                          Hab das selbe Script für meinen Vliesfilter benutzt.
                                          Das echt toll!
                                          Vielen Dank

                                          var value, status2, Restzeit, Vliesmotor_Kontrolle, Vliesmotor_Kontrolle;
                                          
                                          /**
                                           * Function um umsetzen von true / false nach offen / geschlossen
                                           */
                                          function umsetzen(value, status2) {
                                            if (value == false) {
                                              status2 = ' aktiv';
                                            } else {
                                              status2 = 'inaktiv';
                                            }
                                            return status2;
                                          }
                                          
                                          /**
                                           * Beschreibe diese Funktion …
                                           */
                                          function Vliesmotor_Ein() {
                                            if (!Vliesmotor_Kontrolle && Restzeit > 0) {
                                              Vliesmotor_Kontrolle = setInterval(function () {
                                                if (Restzeit > 0 && getState("sonoff.0.Aqua_Float.POWER3").val) {
                                                  Restzeit = (typeof Restzeit == 'number' ? Restzeit : 0) + -1;
                                                } else {
                                                  setState("sonoff.0.Aqua_Control.POWER2"/*Vliesmotor*/, false);
                                                  (function () {if (Vliesmotor_Kontrolle) {clearInterval(Vliesmotor_Kontrolle); Vliesmotor_Kontrolle = null;}})();
                                                  sendTo("telegram.0", "send", {
                                                      text: ('Vliesfilter ist ' + String(umsetzen(getState("sonoff.0.Aqua_Control.POWER2").val, status2)))
                                                  });
                                                }
                                              }, 2000);
                                              setState("sonoff.0.Aqua_Control.POWER2"/*Vliesmotor*/, true);
                                              sendTo("telegram.0", "send", {
                                                  text: ('Vliesfilter ist' + String(umsetzen(getState("sonoff.0.Aqua_Control.POWER2").val, status2)))
                                              });
                                            }
                                          }
                                          
                                          
                                          Restzeit = 25;
                                          Vliesmotor_Kontrolle = null;
                                          
                                          on({id: 'sonoff.0.Aqua_Float.POWER3', change: "gt"}, function (obj) {
                                            var value = obj.state.val;
                                            var oldValue = obj.oldState.val;
                                            Vliesmotor_Ein();
                                          });
                                          schedule("0 0 * * *", function () {
                                            Restzeit = 25;
                                            if (getState("sonoff.0.Aqua_Float.POWER3").val) {
                                              Vliesmotor_Ein();
                                            }
                                          });
                                          
                                          <xml xmlns="http://www.w3.org/1999/xhtml">
                                            <variables>
                                              <variable type="" id="bnA0t?}_B1txfc}4@bMK">value</variable>
                                              <variable type="" id="Dx%?V=t2MgmNDXeWM{cV">status</variable>
                                              <variable type="" id="vj8Dfd-3Q5NtGr,@YQTP">Restzeit</variable>
                                              <variable type="" id="o!Xj;go4QQ{]/po;CVqY">Vliesmotor_Kontrolle</variable>
                                              <variable type="undefined" id="Vliesmotor_Kontrolle">Vliesmotor_Kontrolle</variable>
                                            </variables>
                                            <block type="procedures_defreturn" id="je(T8:oxhf7RQHB!tp+v" x="-1562" y="-1187">
                                              <mutation>
                                                <arg name="value" varid="bnA0t?}_B1txfc}4@bMK"></arg>
                                                <arg name="status" varid="Dx%?V=t2MgmNDXeWM{cV"></arg>
                                              </mutation>
                                              <field name="NAME">umsetzen</field>
                                              <comment pinned="false" h="80" w="160">Function um umsetzen von true / false nach offen / geschlossen</comment>
                                              <statement name="STACK">
                                                <block type="controls_if" id="84d}aUT8S|a*Ao(NfvK9">
                                                  <mutation else="1"></mutation>
                                                  <value name="IF0">
                                                    <block type="logic_compare" id="haiS-|8b~Ayq%n-|_Cy2">
                                                      <field name="OP">EQ</field>
                                                      <value name="A">
                                                        <block type="variables_get" id="u2*HK~wKzvrobT5,`P;%">
                                                          <field name="VAR" id="bnA0t?}_B1txfc}4@bMK" variabletype="">value</field>
                                                        </block>
                                                      </value>
                                                      <value name="B">
                                                        <block type="logic_boolean" id="t{{Db#U[KW_ti;az9),]">
                                                          <field name="BOOL">FALSE</field>
                                                        </block>
                                                      </value>
                                                    </block>
                                                  </value>
                                                  <statement name="DO0">
                                                    <block type="variables_set" id="g[/C2`_K!sI!s6fI1dHp">
                                                      <field name="VAR" id="Dx%?V=t2MgmNDXeWM{cV" variabletype="">status</field>
                                                      <value name="VALUE">
                                                        <block type="text" id="u9D=;{JU;uo@b6tL,NTm">
                                                          <field name="TEXT"> aktiv</field>
                                                        </block>
                                                      </value>
                                                    </block>
                                                  </statement>
                                                  <statement name="ELSE">
                                                    <block type="variables_set" id="og59oUkmPaO!l!.--WXa">
                                                      <field name="VAR" id="Dx%?V=t2MgmNDXeWM{cV" variabletype="">status</field>
                                                      <value name="VALUE">
                                                        <block type="text" id="EAn+MD0tyIn.s[/t2-Zd">
                                                          <field name="TEXT">inaktiv</field>
                                                        </block>
                                                      </value>
                                                    </block>
                                                  </statement>
                                                </block>
                                              </statement>
                                              <value name="RETURN">
                                                <block type="variables_get" id="iH4{FuG7X#@A4h:~vYOE">
                                                  <field name="VAR" id="Dx%?V=t2MgmNDXeWM{cV" variabletype="">status</field>
                                                </block>
                                              </value>
                                            </block>
                                            <block type="variables_set" id="80)FV;tWRxnL|%#ekz5/" x="-1562" y="-987">
                                              <field name="VAR" id="vj8Dfd-3Q5NtGr,@YQTP" variabletype="">Restzeit</field>
                                              <value name="VALUE">
                                                <block type="math_number" id="YW3vWTO,LB$99G8./7w_">
                                                  <field name="NUM">25</field>
                                                </block>
                                              </value>
                                              <next>
                                                <block type="variables_set" id="8FBu)SK}}};Ip$Q0X7Es">
                                                  <field name="VAR" id="o!Xj;go4QQ{]/po;CVqY" variabletype="">Vliesmotor_Kontrolle</field>
                                                  <value name="VALUE">
                                                    <block type="logic_null" id="7dJt5]6[OQ+eVf,KbOsM"></block>
                                                  </value>
                                                </block>
                                              </next>
                                            </block>
                                            <block type="procedures_defnoreturn" id="UZXSi;sCnTFzSdZGNPN)" x="-1562" y="-913">
                                              <field name="NAME">Vliesmotor_Ein</field>
                                              <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
                                              <statement name="STACK">
                                                <block type="controls_if" id="7glBuA%Ui%Bhf0AG8uGk">
                                                  <value name="IF0">
                                                    <block type="logic_operation" id="*oDy[3^#CyurwE2qrR1N">
                                                      <field name="OP">AND</field>
                                                      <value name="A">
                                                        <block type="logic_negate" id="Bxe]G_0e9_LOtnCyA{[+">
                                                          <value name="BOOL">
                                                            <block type="variables_get" id="1(rnSkgS3$jDQcU}*`q!">
                                                              <field name="VAR" id="o!Xj;go4QQ{]/po;CVqY" variabletype="">Vliesmotor_Kontrolle</field>
                                                            </block>
                                                          </value>
                                                        </block>
                                                      </value>
                                                      <value name="B">
                                                        <block type="logic_compare" id="Bb33V9b,~Uu2zfEa4TSt">
                                                          <field name="OP">GT</field>
                                                          <value name="A">
                                                            <block type="variables_get" id="qbWrP.L1;~^Mt^!DO.~Z">
                                                              <field name="VAR" id="vj8Dfd-3Q5NtGr,@YQTP" variabletype="">Restzeit</field>
                                                            </block>
                                                          </value>
                                                          <value name="B">
                                                            <block type="math_number" id="Hk;JGt/0=,@-5626Gb@o">
                                                              <field name="NUM">0</field>
                                                            </block>
                                                          </value>
                                                        </block>
                                                      </value>
                                                    </block>
                                                  </value>
                                                  <statement name="DO0">
                                                    <block type="timeouts_setinterval" id="So`ZOKux3,?B3h}=)^ez">
                                                      <field name="NAME">Vliesmotor_Kontrolle</field>
                                                      <field name="INTERVAL">2</field>
                                                      <field name="UNIT">sec</field>
                                                      <statement name="STATEMENT">
                                                        <block type="controls_if" id="2^GRzhH6G,.zes~S)?1n">
                                                          <mutation else="1"></mutation>
                                                          <value name="IF0">
                                                            <block type="logic_operation" id="tU!PtqOWLlJ:S,p.QaH8">
                                                              <field name="OP">AND</field>
                                                              <value name="A">
                                                                <block type="logic_compare" id="n1VB(%1vzx[:.E[]Aq9o">
                                                                  <field name="OP">GT</field>
                                                                  <value name="A">
                                                                    <block type="variables_get" id="Q5lTqT3]4$wb^eO83]VN">
                                                                      <field name="VAR" id="vj8Dfd-3Q5NtGr,@YQTP" variabletype="">Restzeit</field>
                                                                    </block>
                                                                  </value>
                                                                  <value name="B">
                                                                    <block type="math_number" id="|+b*Y[4L|YwslIKtB*P*">
                                                                      <field name="NUM">0</field>
                                                                    </block>
                                                                  </value>
                                                                </block>
                                                              </value>
                                                              <value name="B">
                                                                <block type="get_value" id="-R-Dsb{!%kRT+j^RCd:?">
                                                                  <field name="ATTR">val</field>
                                                                  <field name="OID">sonoff.0.Aqua_Float.POWER3</field>
                                                                </block>
                                                              </value>
                                                            </block>
                                                          </value>
                                                          <statement name="DO0">
                                                            <block type="math_change" id="@eBlbOp2d7ZFU{*0Of7u">
                                                              <field name="VAR" id="vj8Dfd-3Q5NtGr,@YQTP" variabletype="">Restzeit</field>
                                                              <value name="DELTA">
                                                                <shadow type="math_number" id="o.Ck{gh_@5Z4pHFm%]ph">
                                                                  <field name="NUM">-1</field>
                                                                </shadow>
                                                              </value>
                                                            </block>
                                                          </statement>
                                                          <statement name="ELSE">
                                                            <block type="control" id="qrL%Jdmd/52BQo5,P%s$">
                                                              <mutation delay_input="false"></mutation>
                                                              <field name="OID">sonoff.0.Aqua_Control.POWER2</field>
                                                              <field name="WITH_DELAY">FALSE</field>
                                                              <value name="VALUE">
                                                                <block type="logic_boolean" id="B4{}PCB3+6oQrMO!BYrd">
                                                                  <field name="BOOL">FALSE</field>
                                                                </block>
                                                              </value>
                                                              <next>
                                                                <block type="timeouts_clearinterval" id="WXO]Y+gLP8i=.w.s1Hu#">
                                                                  <field name="NAME">Vliesmotor_Kontrolle</field>
                                                                  <next>
                                                                    <block type="telegram" id="y+$:6K#it%[jPvWmT[q0">
                                                                      <field name="INSTANCE">.0</field>
                                                                      <field name="LOG"></field>
                                                                      <field name="SILENT">FALSE</field>
                                                                      <field name="PARSEMODE">default</field>
                                                                      <value name="MESSAGE">
                                                                        <shadow type="text" id="?7L9s@b~]:P.)e,z(2gS">
                                                                          <field name="TEXT"></field>
                                                                        </shadow>
                                                                        <block type="text_join" id=";G@4|pw*RT$Ps^;.#54s">
                                                                          <mutation items="2"></mutation>
                                                                          <value name="ADD0">
                                                                            <block type="text" id="yxXUilb.|DlSwLNe.IJM">
                                                                              <field name="TEXT">Vliesfilter ist </field>
                                                                            </block>
                                                                          </value>
                                                                          <value name="ADD1">
                                                                            <block type="procedures_callreturn" id="?}Vmfo]Y~xXzRtf0zWJ1">
                                                                              <mutation name="umsetzen">
                                                                                <arg name="value"></arg>
                                                                                <arg name="status"></arg>
                                                                              </mutation>
                                                                              <value name="ARG0">
                                                                                <block type="get_value" id="en9W%z*,faDiSK(d,DS,">
                                                                                  <field name="ATTR">val</field>
                                                                                  <field name="OID">sonoff.0.Aqua_Control.POWER2</field>
                                                                                </block>
                                                                              </value>
                                                                              <value name="ARG1">
                                                                                <block type="variables_get" id="SSl_iGm+w5g}@9MN(b|/">
                                                                                  <field name="VAR" id="Dx%?V=t2MgmNDXeWM{cV" variabletype="">status</field>
                                                                                </block>
                                                                              </value>
                                                                            </block>
                                                                          </value>
                                                                        </block>
                                                                      </value>
                                                                    </block>
                                                                  </next>
                                                                </block>
                                                              </next>
                                                            </block>
                                                          </statement>
                                                        </block>
                                                      </statement>
                                                      <next>
                                                        <block type="control" id="ty6[2`ev%D;9TmRx3Crk">
                                                          <mutation delay_input="false"></mutation>
                                                          <field name="OID">sonoff.0.Aqua_Control.POWER2</field>
                                                          <field name="WITH_DELAY">FALSE</field>
                                                          <value name="VALUE">
                                                            <block type="logic_boolean" id="m6156V87/{eHdKOpp2+A">
                                                              <field name="BOOL">TRUE</field>
                                                            </block>
                                                          </value>
                                                          <next>
                                                            <block type="telegram" id="QhNVR!1|ZMsxkHIE[P3G">
                                                              <field name="INSTANCE">.0</field>
                                                              <field name="LOG"></field>
                                                              <field name="SILENT">FALSE</field>
                                                              <field name="PARSEMODE">default</field>
                                                              <value name="MESSAGE">
                                                                <shadow type="text" id="?7L9s@b~]:P.)e,z(2gS">
                                                                  <field name="TEXT"></field>
                                                                </shadow>
                                                                <block type="text_join" id="a4:S{G3C*0J]zYIp}:9%">
                                                                  <mutation items="2"></mutation>
                                                                  <value name="ADD0">
                                                                    <block type="text" id="wpSnxN(}0QvES87XInux">
                                                                      <field name="TEXT">Vliesfilter ist</field>
                                                                    </block>
                                                                  </value>
                                                                  <value name="ADD1">
                                                                    <block type="procedures_callreturn" id="9Q-Zt2N8Z8X[F:tdy[Gx">
                                                                      <mutation name="umsetzen">
                                                                        <arg name="value"></arg>
                                                                        <arg name="status"></arg>
                                                                      </mutation>
                                                                      <value name="ARG0">
                                                                        <block type="get_value" id="@N6#BjZhox+5@|KQTZZm">
                                                                          <field name="ATTR">val</field>
                                                                          <field name="OID">sonoff.0.Aqua_Control.POWER2</field>
                                                                        </block>
                                                                      </value>
                                                                      <value name="ARG1">
                                                                        <block type="variables_get" id="+;%w@wI-k=ij?n1N0E[^">
                                                                          <field name="VAR" id="Dx%?V=t2MgmNDXeWM{cV" variabletype="">status</field>
                                                                        </block>
                                                                      </value>
                                                                    </block>
                                                                  </value>
                                                                </block>
                                                              </value>
                                                            </block>
                                                          </next>
                                                        </block>
                                                      </next>
                                                    </block>
                                                  </statement>
                                                </block>
                                              </statement>
                                            </block>
                                            <block type="on_ext" id="%suBEBQA1:R[RKs69VB%" x="-1562" y="163">
                                              <mutation items="1"></mutation>
                                              <field name="CONDITION">gt</field>
                                              <field name="ACK_CONDITION"></field>
                                              <value name="OID0">
                                                <shadow type="field_oid" id="R--oyS)/@@vt#@EuQ1P.">
                                                  <field name="oid">sonoff.0.Aqua_Float.POWER3</field>
                                                </shadow>
                                              </value>
                                              <statement name="STATEMENT">
                                                <block type="procedures_callnoreturn" id="OroFMW85?k0O?OVoue(9">
                                                  <mutation name="Vliesmotor_Ein"></mutation>
                                                </block>
                                              </statement>
                                              <next>
                                                <block type="schedule" id="Vbdzd}?fb9LOEh/L:)vH">
                                                  <field name="SCHEDULE">0 0 * * *</field>
                                                  <statement name="STATEMENT">
                                                    <block type="variables_set" id="wv:E9?FLWZ+x2lc?J95X">
                                                      <field name="VAR" id="vj8Dfd-3Q5NtGr,@YQTP" variabletype="">Restzeit</field>
                                                      <value name="VALUE">
                                                        <block type="math_number" id="9BH*+Fh0S2j5J}a*hp-G">
                                                          <field name="NUM">25</field>
                                                        </block>
                                                      </value>
                                                      <next>
                                                        <block type="controls_if" id="WYyH,[Qt3UWa#qGnDDv!">
                                                          <value name="IF0">
                                                            <block type="get_value" id="[N)m1onBWWt(BwnIr?B2">
                                                              <field name="ATTR">val</field>
                                                              <field name="OID">sonoff.0.Aqua_Float.POWER3</field>
                                                            </block>
                                                          </value>
                                                          <statement name="DO0">
                                                            <block type="procedures_callnoreturn" id="J20Ur92Gv[(pJ[R_B8;}">
                                                              <mutation name="Vliesmotor_Ein"></mutation>
                                                            </block>
                                                          </statement>
                                                        </block>
                                                      </next>
                                                    </block>
                                                  </statement>
                                                </block>
                                              </next>
                                            </block>
                                          </xml>
                                          
                                          1 Reply Last reply Reply Quote 0
                                          • Aphofis
                                            Aphofis last edited by

                                            Komischer weise läuft Vlies Filter jetzt immer
                                            Mit 2,3 Sek. Anstatt so lange bis Schwimmer false ist.
                                            Wenn ich die Werte auf Kontrolle 1 Sek. Stelle und Max am Tag auf 50 stelle läuft das Vlies 1,3 sek und was noch skurriler ist der Motor dreht sich kein Stück aber das Vlies soll sich laut Zähler bewegt haben.
                                            Wie kann das sein ?

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            485
                                            Online

                                            31.9k
                                            Users

                                            80.1k
                                            Topics

                                            1.3m
                                            Posts

                                            7
                                            87
                                            5303
                                            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