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.
    • 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
                                • Asgothian
                                  Asgothian Developer @Aphofis last edited by Asgothian

                                  @Aphofis
                                  Du hast da 2 bis 3 Probleme die sich vermischen:

                                  1. Wenn du das Intervall auf 2 Sekunden setzt, dann muss der Motor MINDESTENS 2 Sekunden laufen. Bei 1 Sekunde halt 1 Sekunde.
                                  2. Anscheindend gibt es eine Verzögerung von ca. 300 ms bei der Ansteuerung und dem Auslesen der Sonoff Objekte, deswegen werden aus 2 Sekunden 2.3 Sekunden
                                  3. Es scheint so das der Motor eine Gewisse Zeit benötigt bis er wirklich losgelaufen ist. Wird er zu früh wieder abgeschaltet dreht sich nichts.

                                  A.

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

                                    @Asgothian
                                    komischerweise läuft das Vlies jetzt.
                                    Nur sollen ja max am Tag 50 cm laufen. sprich 50 sek. also laut steuerung 2x25 sek.
                                    Ich hatte alle Klinkenstecker und Buchsen ausgetauscht gegen verschraubbare Mikrofon Stecker.
                                    Ich denke es kam auch zu Latenz Zeiten durch wackelkontakten bei den Klinkensteckern.
                                    Gestern liefen angeblich 180 cm.
                                    Laut dem Vlies waren es definitiv viel viel weniger.
                                    Die Schmutzvliesrolle ist nicht nennenswert Dicker geworden.

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

                                      @Aphofis

                                      Ein paar Fragen:

                                      • Hast du Log-Einträge die dir sagen wann du das Vlies ein und ausschaltest ?
                                      • Hast du Log-Einträge an denen du erkennen kannst ob der Shelly geschaltet hat (die Hardware) ?
                                      • Wie genau ist der Zusammenhang zwischen Laufzeit und Laufweg ? Bist du da sicher das es immer 1 cm pro Sekunde ist ?

                                      So wie ich das sehe liegt das Problem in der Hardware, nicht in der Software.

                                      A.

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

                                        @paul53
                                        Ich verstehe es leider nicht!
                                        Der Osmose Schwimmer steht auf true und das Magnet Ventil schweigt still.
                                        Schlimmer kam es dann aber auch noch.
                                        Gestern hat die Osmose 28 Liter fröhlich in die Technik gepumpt. War nicht ganz so lustig.
                                        Magnetventil wurde nicht abgeschaltet. Trotz das der ESP8266 per MQTT Verbunden ist und im Iobroker alive ist.
                                        Konnte das Magnet ventil nur noch per abziehen des steckers stoppen.
                                        Steuerung ausgeschaltet Wasser raus geholt Salzgehalt angepasst Stecker wieder eingesteckt Osmose Steuerung wieder eingeschaltet und was passiert.
                                        Osmose pumpt weiterhin Fröhlich los obgleich der Osmose Schwimmer auf false stand.
                                        DIe Steuerung:

                                        var Restzeit, Magnetventil_Kontrolle;
                                        
                                        /**
                                         * Beschreibe diese Funktion …
                                         */
                                        function Magnetventil_Ein() {
                                          if (!Magnetventil_Kontrolle && Restzeit > 0) {
                                            Magnetventil_Kontrolle = setInterval(function () {
                                              if (Restzeit > 0 && getState("sonoff.0.Aqua_Float.POWER1").val) {
                                                Restzeit = (typeof Restzeit == 'number' ? Restzeit : 0) + -1;
                                              } else {
                                                setState("sonoff.0.Aqua_Control.POWER1"/*Osmose_Magnetventil*/, false);
                                                (function () {if (Magnetventil_Kontrolle) {clearInterval(Magnetventil_Kontrolle); Magnetventil_Kontrolle = null;}})();
                                              }
                                            }, 2000);
                                            setState("sonoff.0.Aqua_Control.POWER1"/*Osmose_Magnetventil*/, true);
                                          }
                                        }
                                        
                                        
                                        Restzeit = 150;
                                        Magnetventil_Kontrolle = null;
                                        
                                        on({id: 'sonoff.0.Aqua_Float.POWER1', change: "gt"}, function (obj) {
                                          var value = obj.state.val;
                                          var oldValue = obj.oldState.val;
                                          Magnetventil_Ein();
                                        });
                                        schedule("0 0 * * *", function () {
                                          Restzeit = 150;
                                          if (getState("sonoff.0.Aqua_Float.POWER1").val) {
                                            Magnetventil_Ein();
                                          }
                                        });
                                        

                                        In Zusammenarbeit mit:
                                        Filter Max dem Schwimmer der ca 1 cm über dem Osmose Schwimmer sitzt vom Auslöser her.

                                        var timeout_aus, timeout_ein, timeout;
                                        
                                        
                                        on({id: 'sonoff.0.Aqua_Float.POWER4', val: true}, function (obj) {
                                          var value = obj.state.val;
                                          var oldValue = obj.oldState.val;
                                          if ((obj.state ? obj.state.val : "")) {
                                            timeout_aus = setTimeout(function () {
                                              setState("sonoff.0.Aqua_Power.POWER3"/*Aqua_Power_Skimmer*/, false);
                                              setState("javascript.0.scriptEnabled.Technik_Steuerung.Osmose_Niveau"/*scriptEnabled.Technik_Steuerung.Osmose_Niveau*/, false);
                                              setState("sonoff.0.Aqua_Control.POWER1"/*Osmose_Magnetventil*/, false);
                                              sendTo("telegram.0", "send", {
                                                  text: (['Filter Max erreicht, Skimmer & Osmose','\n','wurden abgeschaltet'].join(''))
                                              });
                                              console.log((['Filter Max erreicht, Skimmer & Osmose','\n','wurden abgeschaltet'].join('')));
                                            }, 5000);
                                            (function () {if (timeout_ein) {clearTimeout(timeout_ein); timeout_ein = null;}})();
                                          } else {
                                            timeout_ein = setTimeout(function () {
                                              setStateDelayed("sonoff.0.Aqua_Power.POWER3"/*Aqua_Power_Skimmer*/, true, 20000, true);
                                              setStateDelayed("javascript.0.scriptEnabled.Technik_Steuerung.Osmose_Niveau"/*scriptEnabled.Technik_Steuerung.Osmose_Niveau*/, true, 10000, false);
                                              timeout = setTimeout(function () {
                                                sendTo("telegram.0", "send", {
                                                    text: (['Filter Max unterschritten, Skimmer & Osmose','\n','wurden wieder eingeschaltet'].join(''))
                                                });
                                                console.log((['Filter Max unterschritten, Vliesfilter, Skimmer & Osmose','\n','wurden wieder eingeschsaltet'].join('')));
                                              }, 30000);
                                            }, 2000);
                                            (function () {if (timeout_aus) {clearTimeout(timeout_aus); timeout_aus = null;}})();
                                          }
                                        });
                                        

                                        Irgend etwas scheint da überhaupt nicht zu harmonieren.
                                        Ich brauche dringend Hilfe.......

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

                                          @paul53
                                          Irgendwie schaltet der Vlies Filter bei 50 cm Verbrauch nicht ab!? Woran könnte es liegen?
                                          Sollte ich einfach die einschalt Zeit Verkürzen ?

                                          1 Reply Last reply Reply Quote 0
                                          • Jey Cee
                                            Jey Cee Developer last edited by Jey Cee

                                            Geht es hier noch um das Eingangsthema oder schon um was ganz anderes? Im Titel steht ja gelöst.
                                            Wenn das Eingangsthema wirklich gelöst ist dann bitte zum Ende kommen, danach schließe ich das Thema.

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            444
                                            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