Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Blockly
    5. Schwimmer träge machen???

    NEWS

    • Wir empfehlen: Node.js 22.x

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker goes Matter ... Matter Adapter in Stable

    Schwimmer träge machen???

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

      @paul53
      Naja er soll nur anspringen wenn der Schwimmer definitiv im true zustand ist und dann auch nur so lange bis der schwimmer auf false wechselt. Da durch Einströmendes Wasseer dieser Zustand schwer zu ermitteln ist, wäre so eine entprellung schon gut, damit der Motor nicht immer nur für ein paar millisekunden anspringt und im Enteffekt garnicht gedreht wird.
      Vlies Schwimmer Video
      Wenn die Server Qualität ausreicht ist vielleicht ein Video ganz hilfreich, damit man es sich besser vorstellen kann, was ich mit dem schwankendem Wasser meine. links der große Schwimmer ist für Vliesfilter Max und der kleine in der mitte ist der Schwimmer der den Vliesmotor betätigen soll. Der aber ständig angetippt wird durch das Wasser.

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

        @Aphofis sagte:

        wenn der Schwimmer definitiv im true zustand ist und dann auch nur so lange bis der schwimmer auf false wechselt.

        Dann würde ich erst schalten, wenn der Schwimmerschalter für eine bestimmte Zeit einen konstanten Wert hat, also so:

        Blockly_temp.JPG

        1 Reply Last reply Reply Quote 1
        • paul53
          paul53 @FredF last edited by

          @FredF
          Wenn auf "ist größer als letztes" getriggert wird, kann die Abfrage "und Wert = wahr" entfallen, denn sie ist bereits in der Triggerbedingung enthalten.

          Aphofis 1 Reply Last reply Reply Quote 2
          • Aphofis
            Aphofis @paul53 last edited by Aphofis

            @paul53
            OK ich teste mal

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

              Das ja mal sehr simpel! aufgebaut

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

                Wann wird dann der Motor eingeschaltet wenn schwimmer 2 sek. auf true steht und wann wird der Motor wieder abgeschaltet!?

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

                  @Aphofis sagte:

                  wann wird der Motor wieder abgeschaltet!?

                  Wenn der Schwimmer 2 s lang auf false stand.

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

                    @paul53 ok!

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

                      ist es vielleicht möglich diese beiden steuerungen zusammen zu führen ?
                      Damit der motor nur dreht wenn wirklich true ist und auch nicht mehr als 50 cm am Tag

                      var Restzeit, Vliesmotor_Kontrolle, Vliesmotor_Kontrolle;
                      
                      /**
                       * 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;}})();
                            }
                          }, 2000);
                          setState("sonoff.0.Aqua_Control.POWER2"/*Vliesmotor*/, true);
                        }
                      }
                      
                      
                      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();
                        }
                      });
                      
                      var timeout;
                      
                      
                      on({id: "sonoff.0.Aqua_Float.POWER3"/*Vliesfilter_Normal*/, change: "ne"}, function (obj) {
                        var value = obj.state.val;
                        var oldValue = obj.oldState.val;
                        (function () {if (timeout) {clearTimeout(timeout); timeout = null;}})();
                        timeout = setTimeout(function () {
                          setState("sonoff.0.Aqua_Control.POWER2"/*Vliesmotor*/, (obj.state ? obj.state.val : ""));
                        }, 2000);
                      });
                      
                      
                      paul53 1 Reply Last reply Reply Quote 0
                      • paul53
                        paul53 @Aphofis last edited by paul53

                        @Aphofis sagte:

                        ist es vielleicht möglich diese beiden steuerungen zusammen zu führen ?

                        Ist es.

                        const idSchwimmer = 'sonoff.0.Aqua_Float.POWER3';
                        const idMotor     = 'sonoff.0.Aqua_Control.POWER2';
                        
                        var schwimmer = getState(idSchwimmer).val;
                        var restzeit  = 25;
                        var entprell  = null;
                        var intervall = null;
                        
                        function Vliesmotor() {
                          if(schwimmer) {
                            if (!intervall && restzeit > 0) {
                              setState(idMotor, true);
                              intervall = setInterval(function () {
                                if (restzeit > 0 && schwimmer) {
                                  restzeit--;
                                } else {
                                  setState(idMotor, false);
                                  clearInterval(intervall); 
                                  intervall = null;
                                }
                              }, 2000);
                            }
                          } else if(getState(idMotor).val) setState(idMotor, false);	
                        }
                        
                        Vliesmotor(); // Skriptstart
                        
                        on(idSchwimmer, function(dp) {
                          if(entprell) clearTimeout(entprell);
                          entprell = setTimeout(function() {
                             schwimmer = dp.state.val;	
                             Vliesmotor();
                          }, 2000);
                        });
                        
                        schedule('0 0 * * *', function () {
                          restzeit = 25;
                          Vliesmotor();
                        });
                        
                        Aphofis 1 Reply Last reply Reply Quote 1
                        • Aphofis
                          Aphofis @paul53 last edited by

                          @paul53
                          Magst du das in Blockly Blöcken hier rein packen???
                          Danke

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

                            @Aphofis

                            Blockly_Vlies.JPG

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

                              @paul53
                              Dankeschön

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

                                Ist es so korrekt ???

                                var schwimmer, restzeit, Intervall, timeout, Intervall;
                                
                                /**
                                 * Beschreibe diese Funktion …
                                 */
                                function Vliesmotor() {
                                  if (schwimmer) {
                                    if (!Intervall && restzeit > 0) {
                                      setState("sonoff.0.Aqua_Control.POWER2"/*Vliesmotor*/, true);
                                      Intervall = setInterval(function () {
                                        if (restzeit > 0 && schwimmer) {
                                          Intervall = (typeof Intervall == 'number' ? Intervall : 0) - 1;
                                        } else {
                                          setState("sonoff.0.Aqua_Control.POWER2"/*Vliesmotor*/, false);
                                          (function () {if (Intervall) {clearInterval(Intervall); Intervall = null;}})();
                                        }
                                      }, 2000);
                                    }
                                  } else if (getState("sonoff.0.Aqua_Control.POWER2").val) {
                                    setState("sonoff.0.Aqua_Control.POWER2"/*Vliesmotor*/, false);
                                  }
                                }
                                
                                
                                schwimmer = getState("sonoff.0.Aqua_Float.POWER3").val;
                                restzeit = 25;
                                on({id: 'sonoff.0.Aqua_Float.POWER3', change: "ne"}, function (obj) {
                                  var value = obj.state.val;
                                  var oldValue = obj.oldState.val;
                                  (function () {if (timeout) {clearTimeout(timeout); timeout = null;}})();
                                  timeout = setTimeout(function () {
                                    schwimmer = (obj.state ? obj.state.val : "");
                                    Vliesmotor();
                                  }, 2000);
                                });
                                schedule("0 0 * * *", function () {
                                  restzeit = 25;
                                  Vliesmotor();
                                });
                                Vliesmotor();
                                
                                paul53 1 Reply Last reply Reply Quote 0
                                • paul53
                                  paul53 @Aphofis last edited by

                                  @Aphofis sagte:

                                  Ist es so korrekt ???

                                  Nicht ganz: Du hast zwei Variablen Intervall und zählst eine davon runter anstelle von restzeit (Zeile 12).

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

                                    @paul53
                                    also so ???Bildschirmfoto 2019-09-10 um 13.05.43.png

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

                                      @Aphofis sagte in Schwimmer träge machen???:

                                      also so ???

                                      Nein: erhöhe restzeit um -1

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

                                        @paul53
                                        Mann o Mann
                                        ja fehler gefunden.
                                        Sag mal würdest du mir vielleicht bei meiner PWM Steuerung mit den Strömungspumpen helfen!?
                                        Ich hatte zwar mal zwischen Pin 1 und 3 am DIN 5 Pol kabel gemessen das an dem Controller hängt wo einer aktive Pumpe gesteuert wird nur gab es da keine Volt anzeige. normal was ich im Netz gefunden habe soll der Tunze Controller über Pin 1 und 3 die 0-8 Volt PWM Steuerung haben. Sprich um die Pumpen ohne den Multi Controller zu steuern.

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

                                          @Aphofis sagte:

                                          die 0-8 Volt PWM Steuerung

                                          Entweder 0-8 V (analog) oder PWM (variables Tastverhältnis) !

                                          @Aphofis sagte:

                                          bei meiner PWM Steuerung mit den Strömungspumpen helfen!?

                                          Ja, wenn Du mir eine verständliche Aufgabenstellung lieferst.

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

                                            @paul53
                                            Es soll per PWM Steuerung laufen. Da Hersteller wie GHL etc die pumpen auch per PWM ansteuerun und im Internet habe ich dazu gefunden das Pin 1 und 3 dazu dienen sollen.
                                            vielleicht unterhalten wir und darüber in dem Thread PWM Steuerung mit Fade

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            773
                                            Online

                                            32.0k
                                            Users

                                            80.4k
                                            Topics

                                            1.3m
                                            Posts

                                            3
                                            60
                                            2834
                                            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