Skip to content
  • Home
  • Aktuell
  • Tags
  • 0 Ungelesen 0
  • Kategorien
  • Unreplied
  • Beliebt
  • GitHub
  • Docu
  • Hilfe
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Standard: (Kein Skin)
  • Kein Skin
Einklappen
ioBroker Logo

Community Forum

donate donate
  1. ioBroker Community Home
  2. Deutsch
  3. Skripten / Logik
  4. Blockly
  5. Schwimmer träge machen???

NEWS

  • Jahresrückblick 2025 – unser neuer Blogbeitrag ist online! ✨
    BluefoxB
    Bluefox
    16
    1
    1.1k

  • Neuer Blogbeitrag: Monatsrückblick - Dezember 2025 🎄
    BluefoxB
    Bluefox
    13
    1
    699

  • Weihnachtsangebot 2025! 🎄
    BluefoxB
    Bluefox
    25
    1
    2.0k

Schwimmer träge machen???

Geplant Angeheftet Gesperrt Verschoben Blockly
60 Beiträge 3 Kommentatoren 3.8k Aufrufe 3 Watching
  • Älteste zuerst
  • Neuste zuerst
  • Meiste Stimmen
Antworten
  • In einem neuen Thema antworten
Anmelden zum Antworten
Dieses Thema wurde gelöscht. Nur Nutzer mit entsprechenden Rechten können es sehen.
  • AphofisA Aphofis

    @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.

    paul53P Offline
    paul53P Offline
    paul53
    schrieb am zuletzt editiert von
    #24

    @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.

    Bitte verzichtet auf Chat-Nachrichten, denn die Handhabung ist grauenhaft !
    Produktiv: RPi 2 mit S.USV, HM-MOD-RPI und SLC-USB-Stick mit root fs

    AphofisA 1 Antwort Letzte Antwort
    0
    • paul53P paul53

      @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.

      AphofisA Offline
      AphofisA Offline
      Aphofis
      schrieb am zuletzt editiert von
      #25

      @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 Antwort Letzte Antwort
      0
      • AphofisA Offline
        AphofisA Offline
        Aphofis
        schrieb am zuletzt editiert von
        #26

        @paul53
        ein Problem gibt es noch!
        Wenn schwimmer vliesfilter_normal und Vliesfilter_Max true sind soll der Motor abgeschaltet sein bis
        beide schwimmer wieder false sind. dann soll der motor wieder frei gegeben werden.
        Da dadurch dann die Steuerung Vliesfilter Max weg kann. die momentan nicht greift.

        on({id: "sonoff.0.Aqua_Float.POWER5"/*Vliesfilter_Max*/, change: "ne"}, function (obj) {
          var value = obj.state.val;
          var oldValue = obj.oldState.val;
          if (getState("sonoff.0.Aqua_Float.POWER5").val == true) {
            setState("sonoff.0.Aqua_Control.POWER2"/*Vliesmotor*/, false);
            sendTo("telegram.0", "send", {
                text: 'Vliesfilter Max erreicht Motor wurde gestoppt'
            });
            console.log('Vliesfilter Max erreicht Motor wurde gestoppt');
          } else if (getState("sonoff.0.Aqua_Float.POWER5").val == false) {
            setState("sonoff.0.Aqua_Control.POWER2"/*Vliesmotor*/, false, true);
          } else if (getState("Aqua_Control.0.System.Aquarium_ausschalten").val == true) {
            setState("javascript.0.scriptEnabled.Technik_Steuerung.Vliesfilter_Niveau_Max"/*scriptEnabled.Technik_Steuerung.Vliesfilter_Niveau_Max*/, false);
          } else if (getState("javascript.0.scriptEnabled.Automatik_Steuerung.Aquarium_ausschalten").val == false) {
            setStateDelayed("javascript.0.scriptEnabled.Technik_Steuerung.Vliesfilter_Niveau_Max"/*scriptEnabled.Technik_Steuerung.Vliesfilter_Niveau_Max*/, true, 180000, false);
          }
        });
        
        1 Antwort Letzte Antwort
        0
        • AphofisA Offline
          AphofisA Offline
          Aphofis
          schrieb am zuletzt editiert von Aphofis
          #27

          Das Vlies läuft trotz der steuerung weiter irgendwas stimmt noch nicht.

          var schwimmer, restzeit, timeout, Intervall, 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) {
                    restzeit = (typeof restzeit == 'number' ? restzeit : 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();
          

          Aktuelle Steuerung
          Vielleicht kann man ja einbauen das der Vliesmotor nicht länger als 5 sek laufen darf und prüft dann erneut da der motor nie weiter gedreht hatte als 2-3 cm wo der motor noch direkt mit einem Schwimmer geschaltet wurde also ohne steuerung. Hatte den Nachteil das der Vliesmotor bei Futter Pause also steigendem Wasserstand gelaufen ist bis der Vliesfilter Max Schwimmer den Motor gestoppt hatte.

          paul53P 1 Antwort Letzte Antwort
          0
          • AphofisA Aphofis

            Das Vlies läuft trotz der steuerung weiter irgendwas stimmt noch nicht.

            var schwimmer, restzeit, timeout, Intervall, 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) {
                      restzeit = (typeof restzeit == 'number' ? restzeit : 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();
            

            Aktuelle Steuerung
            Vielleicht kann man ja einbauen das der Vliesmotor nicht länger als 5 sek laufen darf und prüft dann erneut da der motor nie weiter gedreht hatte als 2-3 cm wo der motor noch direkt mit einem Schwimmer geschaltet wurde also ohne steuerung. Hatte den Nachteil das der Vliesmotor bei Futter Pause also steigendem Wasserstand gelaufen ist bis der Vliesfilter Max Schwimmer den Motor gestoppt hatte.

            paul53P Offline
            paul53P Offline
            paul53
            schrieb am zuletzt editiert von
            #28

            @Aphofis sagte:

            irgendwas stimmt noch nicht.

            Du hast zwei Variablen Intervall. Wähle mal bei falls nicht Intervall die andere mit dem gleichen Bezeichner aus. Im Javascript-Code darf oben nur einmal Intervall auftauchen.

            Bitte verzichtet auf Chat-Nachrichten, denn die Handhabung ist grauenhaft !
            Produktiv: RPi 2 mit S.USV, HM-MOD-RPI und SLC-USB-Stick mit root fs

            AphofisA 1 Antwort Letzte Antwort
            0
            • paul53P paul53

              @Aphofis sagte:

              irgendwas stimmt noch nicht.

              Du hast zwei Variablen Intervall. Wähle mal bei falls nicht Intervall die andere mit dem gleichen Bezeichner aus. Im Javascript-Code darf oben nur einmal Intervall auftauchen.

              AphofisA Offline
              AphofisA Offline
              Aphofis
              schrieb am zuletzt editiert von Aphofis
              #29

              @paul53
              Verstehe nicht wie du das meinst da ist doch ein Timeout und ein Intervall.
              Ich meine ist es möglich den Vliesfilter Max Schwimmer mit einzubauen in die steuerung, dann kann die seperate Steuerung weg! Dann habe ich nur noch diese eine die alle zwei sekunden auf true prüft und nicht mehr als 50 cm am Tag laufen darf und der Max schwimmer muss da noch irgendwie mit rein.
              Damit falls Sagen wir mal Schwimmer Vliesfilter normal im true zustand verklemmt ist zb durch eine Schencke oder sonst was das wenn der Vlies Filter Max true ist das dann auf jeden fall der Motor so lange gestoppt ist bis beide Schwimmer false sind ob nun durch mein bereinigen oder durch eigenes abfallen auf false.
              nur dann gibt es keine Irrtümer. Da die Steuerung Vliesfilter Max völlig am durchdrehen ist, wenn der Vliesfilter Normal steuerung deaktiviert ist. Da der Max Schwimmer 8mm über dem Vliesfilter Normal Schwimmer.

              Bildschirmfoto 2019-09-10 um 22.48.56.png

              AphofisA 1 Antwort Letzte Antwort
              0
              • AphofisA Offline
                AphofisA Offline
                Aphofis
                schrieb am zuletzt editiert von Aphofis
                #30

                falsche Abteilung

                1 Antwort Letzte Antwort
                0
                • AphofisA Offline
                  AphofisA Offline
                  Aphofis
                  schrieb am zuletzt editiert von
                  #31

                  @paul53
                  ist es möglich den Vliesmotor 1-2 sek später zu schalten !? da das Vlies noch zu sauber ist.?

                  var schwimmer, restzeit, timeout, Intervall, 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) {
                            restzeit = (typeof restzeit == 'number' ? restzeit : 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();
                  
                  paul53P 1 Antwort Letzte Antwort
                  0
                  • AphofisA Aphofis

                    @paul53
                    ist es möglich den Vliesmotor 1-2 sek später zu schalten !? da das Vlies noch zu sauber ist.?

                    var schwimmer, restzeit, timeout, Intervall, 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) {
                              restzeit = (typeof restzeit == 'number' ? restzeit : 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();
                    
                    paul53P Offline
                    paul53P Offline
                    paul53
                    schrieb am zuletzt editiert von
                    #32

                    @Aphofis sagte:

                    Vliesmotor 1-2 sek später zu schalten !? da das Vlies noch zu sauber ist.?

                    ?? Es schaltet schon 2 s verzögert, oder meinst Du um Mitternacht ?

                    Bitte verzichtet auf Chat-Nachrichten, denn die Handhabung ist grauenhaft !
                    Produktiv: RPi 2 mit S.USV, HM-MOD-RPI und SLC-USB-Stick mit root fs

                    AphofisA 1 Antwort Letzte Antwort
                    0
                    • paul53P paul53

                      @Aphofis sagte:

                      Vliesmotor 1-2 sek später zu schalten !? da das Vlies noch zu sauber ist.?

                      ?? Es schaltet schon 2 s verzögert, oder meinst Du um Mitternacht ?

                      AphofisA Offline
                      AphofisA Offline
                      Aphofis
                      schrieb am zuletzt editiert von
                      #33

                      @paul53
                      ja das weiß ich nur ist das vlies noch zu sauber also muss der motor noch später schalten oder früher abschalten.
                      Den Bypass habe ich schon komplett offen da geht nichts mehr. ich kann höchstens den Überlauf weiter hoch setzten nur dann ist die Distanz zwischen dem normalen schwimmer und dem Vlies Schwimmer Max zu niedrig.
                      Der Vlies Max Schwimmer ist leider auch noch nicht mit eingebunden.
                      warum der Vliesverbrauch 180 cm am Tag zählt weiss ich auch nicht.
                      normal braucht der Motor für 1 cm 990 ms und die Verbrauchssteuerung rechnet 1ms => 0,0010101 cm x gelaufene zeit in ms. und errechnet daraus den Tages und den Gesamtverbrauch.
                      Doch sollte laut der Steuerung für den Motor nach 50 cm Schluß sein.

                      paul53P 1 Antwort Letzte Antwort
                      0
                      • AphofisA Aphofis

                        @paul53
                        ja das weiß ich nur ist das vlies noch zu sauber also muss der motor noch später schalten oder früher abschalten.
                        Den Bypass habe ich schon komplett offen da geht nichts mehr. ich kann höchstens den Überlauf weiter hoch setzten nur dann ist die Distanz zwischen dem normalen schwimmer und dem Vlies Schwimmer Max zu niedrig.
                        Der Vlies Max Schwimmer ist leider auch noch nicht mit eingebunden.
                        warum der Vliesverbrauch 180 cm am Tag zählt weiss ich auch nicht.
                        normal braucht der Motor für 1 cm 990 ms und die Verbrauchssteuerung rechnet 1ms => 0,0010101 cm x gelaufene zeit in ms. und errechnet daraus den Tages und den Gesamtverbrauch.
                        Doch sollte laut der Steuerung für den Motor nach 50 cm Schluß sein.

                        paul53P Offline
                        paul53P Offline
                        paul53
                        schrieb am zuletzt editiert von
                        #34

                        @Aphofis sagte:

                        Der Vlies Max Schwimmer ist leider auch noch nicht mit eingebunden.

                        Was soll er bewirken (Aufgabenstellung) ?

                        Bitte verzichtet auf Chat-Nachrichten, denn die Handhabung ist grauenhaft !
                        Produktiv: RPi 2 mit S.USV, HM-MOD-RPI und SLC-USB-Stick mit root fs

                        AphofisA 1 Antwort Letzte Antwort
                        0
                        • paul53P paul53

                          @Aphofis sagte:

                          Der Vlies Max Schwimmer ist leider auch noch nicht mit eingebunden.

                          Was soll er bewirken (Aufgabenstellung) ?

                          AphofisA Offline
                          AphofisA Offline
                          Aphofis
                          schrieb am zuletzt editiert von Aphofis
                          #35

                          @paul53
                          Vlies Max soll einfach verhindern, das dass Vlies immer weiter dreht im falle das die normale Steuerung versagt oder der normal schwimmer in true verklemmt ist dann soll der vlies max schwimmer den motor so lange stoppen bis beide schwimmer false sind

                          paul53P 1 Antwort Letzte Antwort
                          0
                          • AphofisA Aphofis

                            @paul53
                            Vlies Max soll einfach verhindern, das dass Vlies immer weiter dreht im falle das die normale Steuerung versagt oder der normal schwimmer in true verklemmt ist dann soll der vlies max schwimmer den motor so lange stoppen bis beide schwimmer false sind

                            paul53P Offline
                            paul53P Offline
                            paul53
                            schrieb am zuletzt editiert von
                            #36

                            @Aphofis
                            Dann setze einen weiteren Trigger und ergänze die Abfrage in der Funktion:

                            Blockly_temp.JPG

                            Bitte verzichtet auf Chat-Nachrichten, denn die Handhabung ist grauenhaft !
                            Produktiv: RPi 2 mit S.USV, HM-MOD-RPI und SLC-USB-Stick mit root fs

                            AphofisA 1 Antwort Letzte Antwort
                            1
                            • paul53P paul53

                              @Aphofis
                              Dann setze einen weiteren Trigger und ergänze die Abfrage in der Funktion:

                              Blockly_temp.JPG

                              AphofisA Offline
                              AphofisA Offline
                              Aphofis
                              schrieb am zuletzt editiert von
                              #37

                              @paul53
                              ist es so korrekt?

                              var schwimmer, restzeit, Intervall, maxSchwimmer, timeout;
                              
                              /**
                               * Beschreibe diese Funktion …
                               */
                              function Vliesmotor() {
                                if (schwimmer && !maxSchwimmer) {
                                  if (!Intervall && restzeit > 0) {
                                    setState("sonoff.0.Aqua_Control.POWER2"/*Vliesmotor*/, true);
                                    Intervall = setInterval(function () {
                                      if (restzeit > 0 && schwimmer) {
                                        restzeit = (typeof restzeit == 'number' ? restzeit : 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);
                                }
                              }
                              
                              
                              // Vlies Schwimmer normal
                              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();
                              // Vlies Schwimmer max
                              maxSchwimmer = getState("sonoff.0.Aqua_Float.POWER5").val;
                              on({id: 'sonoff.0.Aqua_Float.POWER5', change: "ne"}, function (obj) {
                                var value = obj.state.val;
                                var oldValue = obj.oldState.val;
                                maxSchwimmer = (obj.state ? obj.state.val : "");
                                if (maxSchwimmer) {
                                  setState("sonoff.0.Aqua_Control.POWER2"/*Vliesmotor*/, false);
                                }
                              });
                              
                              paul53P 1 Antwort Letzte Antwort
                              0
                              • AphofisA Aphofis

                                @paul53
                                ist es so korrekt?

                                var schwimmer, restzeit, Intervall, maxSchwimmer, timeout;
                                
                                /**
                                 * Beschreibe diese Funktion …
                                 */
                                function Vliesmotor() {
                                  if (schwimmer && !maxSchwimmer) {
                                    if (!Intervall && restzeit > 0) {
                                      setState("sonoff.0.Aqua_Control.POWER2"/*Vliesmotor*/, true);
                                      Intervall = setInterval(function () {
                                        if (restzeit > 0 && schwimmer) {
                                          restzeit = (typeof restzeit == 'number' ? restzeit : 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);
                                  }
                                }
                                
                                
                                // Vlies Schwimmer normal
                                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();
                                // Vlies Schwimmer max
                                maxSchwimmer = getState("sonoff.0.Aqua_Float.POWER5").val;
                                on({id: 'sonoff.0.Aqua_Float.POWER5', change: "ne"}, function (obj) {
                                  var value = obj.state.val;
                                  var oldValue = obj.oldState.val;
                                  maxSchwimmer = (obj.state ? obj.state.val : "");
                                  if (maxSchwimmer) {
                                    setState("sonoff.0.Aqua_Control.POWER2"/*Vliesmotor*/, false);
                                  }
                                });
                                
                                paul53P Offline
                                paul53P Offline
                                paul53
                                schrieb am zuletzt editiert von paul53
                                #38

                                @Aphofis sagte:

                                ist es so korrekt?

                                Nicht ganz: Zeilen 41 und 43 müssen getauscht werden, damit beim Skriptstart die Variable maxSchwimmer den korrekten Wert für die Auswertung in der Funktion Vliesmotor() hat.

                                Bitte verzichtet auf Chat-Nachrichten, denn die Handhabung ist grauenhaft !
                                Produktiv: RPi 2 mit S.USV, HM-MOD-RPI und SLC-USB-Stick mit root fs

                                AphofisA 1 Antwort Letzte Antwort
                                0
                                • paul53P paul53

                                  @Aphofis sagte:

                                  ist es so korrekt?

                                  Nicht ganz: Zeilen 41 und 43 müssen getauscht werden, damit beim Skriptstart die Variable maxSchwimmer den korrekten Wert für die Auswertung in der Funktion Vliesmotor() hat.

                                  AphofisA Offline
                                  AphofisA Offline
                                  Aphofis
                                  schrieb am zuletzt editiert von
                                  #39

                                  @paul53
                                  Verstehe ich nicht ganz wie meinst du mit tauschen !?

                                  var schwimmer, maxSchwimmer, restzeit, Intervall, timeout;
                                  
                                  /**
                                   * Beschreibe diese Funktion …
                                   */
                                  function Vliesmotor() {
                                    if (schwimmer && !maxSchwimmer) {
                                      if (!Intervall && restzeit > 0) {
                                        setState("sonoff.0.Aqua_Control.POWER2"/*Vliesmotor*/, true);
                                        Intervall = setInterval(function () {
                                          if (restzeit > 0 && schwimmer) {
                                            restzeit = (typeof restzeit == 'number' ? restzeit : 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);
                                    }
                                  }
                                  
                                  
                                  // Vlies Schwimmer normal
                                  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();
                                  
                                  // Vlies Schwimmer max
                                  maxSchwimmer = getState("sonoff.0.Aqua_Float.POWER5").val;
                                  on({id: 'sonoff.0.Aqua_Float.POWER5', change: "ne"}, function (obj) {
                                    var value = obj.state.val;
                                    var oldValue = obj.oldState.val;
                                    maxSchwimmer = (obj.state ? obj.state.val : "");
                                    if (maxSchwimmer) {
                                      setState("sonoff.0.Aqua_Control.POWER2"/*Vliesmotor*/, false);
                                    }
                                  });
                                  
                                  AphofisA paul53P 2 Antworten Letzte Antwort
                                  0
                                  • AphofisA Aphofis

                                    @paul53
                                    Verstehe ich nicht ganz wie meinst du mit tauschen !?

                                    var schwimmer, maxSchwimmer, restzeit, Intervall, timeout;
                                    
                                    /**
                                     * Beschreibe diese Funktion …
                                     */
                                    function Vliesmotor() {
                                      if (schwimmer && !maxSchwimmer) {
                                        if (!Intervall && restzeit > 0) {
                                          setState("sonoff.0.Aqua_Control.POWER2"/*Vliesmotor*/, true);
                                          Intervall = setInterval(function () {
                                            if (restzeit > 0 && schwimmer) {
                                              restzeit = (typeof restzeit == 'number' ? restzeit : 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);
                                      }
                                    }
                                    
                                    
                                    // Vlies Schwimmer normal
                                    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();
                                    
                                    // Vlies Schwimmer max
                                    maxSchwimmer = getState("sonoff.0.Aqua_Float.POWER5").val;
                                    on({id: 'sonoff.0.Aqua_Float.POWER5', change: "ne"}, function (obj) {
                                      var value = obj.state.val;
                                      var oldValue = obj.oldState.val;
                                      maxSchwimmer = (obj.state ? obj.state.val : "");
                                      if (maxSchwimmer) {
                                        setState("sonoff.0.Aqua_Control.POWER2"/*Vliesmotor*/, false);
                                      }
                                    });
                                    
                                    AphofisA Offline
                                    AphofisA Offline
                                    Aphofis
                                    schrieb am zuletzt editiert von
                                    #40

                                    @paul53
                                    meinst du so ?

                                    var schwimmer, restzeit, maxSchwimmer, Intervall, timeout;
                                    
                                    /**
                                     * Beschreibe diese Funktion …
                                     */
                                    function Vliesmotor() {
                                      if (schwimmer && !maxSchwimmer) {
                                        if (!Intervall && restzeit > 0) {
                                          setState("sonoff.0.Aqua_Control.POWER2"/*Vliesmotor*/, true);
                                          Intervall = setInterval(function () {
                                            if (restzeit > 0 && schwimmer) {
                                              restzeit = (typeof restzeit == 'number' ? restzeit : 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);
                                      }
                                    }
                                    
                                    
                                    // Vlies Schwimmer normal
                                    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();
                                    });
                                    maxSchwimmer = getState("sonoff.0.Aqua_Float.POWER5").val;
                                    
                                    // Vlies Schwimmer max
                                    Vliesmotor();
                                    on({id: 'sonoff.0.Aqua_Float.POWER5', change: "ne"}, function (obj) {
                                      var value = obj.state.val;
                                      var oldValue = obj.oldState.val;
                                      maxSchwimmer = (obj.state ? obj.state.val : "");
                                      if (maxSchwimmer) {
                                        setState("sonoff.0.Aqua_Control.POWER2"/*Vliesmotor*/, false);
                                      }
                                    });
                                    
                                    paul53P 1 Antwort Letzte Antwort
                                    0
                                    • AphofisA Aphofis

                                      @paul53
                                      Verstehe ich nicht ganz wie meinst du mit tauschen !?

                                      var schwimmer, maxSchwimmer, restzeit, Intervall, timeout;
                                      
                                      /**
                                       * Beschreibe diese Funktion …
                                       */
                                      function Vliesmotor() {
                                        if (schwimmer && !maxSchwimmer) {
                                          if (!Intervall && restzeit > 0) {
                                            setState("sonoff.0.Aqua_Control.POWER2"/*Vliesmotor*/, true);
                                            Intervall = setInterval(function () {
                                              if (restzeit > 0 && schwimmer) {
                                                restzeit = (typeof restzeit == 'number' ? restzeit : 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);
                                        }
                                      }
                                      
                                      
                                      // Vlies Schwimmer normal
                                      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();
                                      
                                      // Vlies Schwimmer max
                                      maxSchwimmer = getState("sonoff.0.Aqua_Float.POWER5").val;
                                      on({id: 'sonoff.0.Aqua_Float.POWER5', change: "ne"}, function (obj) {
                                        var value = obj.state.val;
                                        var oldValue = obj.oldState.val;
                                        maxSchwimmer = (obj.state ? obj.state.val : "");
                                        if (maxSchwimmer) {
                                          setState("sonoff.0.Aqua_Control.POWER2"/*Vliesmotor*/, false);
                                        }
                                      });
                                      
                                      paul53P Offline
                                      paul53P Offline
                                      paul53
                                      schrieb am zuletzt editiert von
                                      #41

                                      @Aphofis sagte:

                                      Verstehe ich nicht ganz wie meinst du mit tauschen !?

                                      Packe den Aufruf der Funktion Vliesmotor() wieder ganz nach unten, so dass der Aufruf beim Skriptstart das letzte Kommando ist.

                                      Bitte verzichtet auf Chat-Nachrichten, denn die Handhabung ist grauenhaft !
                                      Produktiv: RPi 2 mit S.USV, HM-MOD-RPI und SLC-USB-Stick mit root fs

                                      1 Antwort Letzte Antwort
                                      0
                                      • AphofisA Aphofis

                                        @paul53
                                        meinst du so ?

                                        var schwimmer, restzeit, maxSchwimmer, Intervall, timeout;
                                        
                                        /**
                                         * Beschreibe diese Funktion …
                                         */
                                        function Vliesmotor() {
                                          if (schwimmer && !maxSchwimmer) {
                                            if (!Intervall && restzeit > 0) {
                                              setState("sonoff.0.Aqua_Control.POWER2"/*Vliesmotor*/, true);
                                              Intervall = setInterval(function () {
                                                if (restzeit > 0 && schwimmer) {
                                                  restzeit = (typeof restzeit == 'number' ? restzeit : 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);
                                          }
                                        }
                                        
                                        
                                        // Vlies Schwimmer normal
                                        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();
                                        });
                                        maxSchwimmer = getState("sonoff.0.Aqua_Float.POWER5").val;
                                        
                                        // Vlies Schwimmer max
                                        Vliesmotor();
                                        on({id: 'sonoff.0.Aqua_Float.POWER5', change: "ne"}, function (obj) {
                                          var value = obj.state.val;
                                          var oldValue = obj.oldState.val;
                                          maxSchwimmer = (obj.state ? obj.state.val : "");
                                          if (maxSchwimmer) {
                                            setState("sonoff.0.Aqua_Control.POWER2"/*Vliesmotor*/, false);
                                          }
                                        });
                                        
                                        paul53P Offline
                                        paul53P Offline
                                        paul53
                                        schrieb am zuletzt editiert von
                                        #42

                                        @Aphofis sagte:

                                        meinst du so ?

                                        Ja.

                                        Bitte verzichtet auf Chat-Nachrichten, denn die Handhabung ist grauenhaft !
                                        Produktiv: RPi 2 mit S.USV, HM-MOD-RPI und SLC-USB-Stick mit root fs

                                        AphofisA 1 Antwort Letzte Antwort
                                        0
                                        • paul53P paul53

                                          @Aphofis sagte:

                                          meinst du so ?

                                          Ja.

                                          AphofisA Offline
                                          AphofisA Offline
                                          Aphofis
                                          schrieb am zuletzt editiert von
                                          #43

                                          @paul53
                                          oder so !?

                                          var schwimmer, restzeit, maxSchwimmer, Intervall, timeout;
                                          
                                          /**
                                           * Beschreibe diese Funktion …
                                           */
                                          function Vliesmotor() {
                                            if (schwimmer && !maxSchwimmer) {
                                              if (!Intervall && restzeit > 0) {
                                                setState("sonoff.0.Aqua_Control.POWER2"/*Vliesmotor*/, true);
                                                Intervall = setInterval(function () {
                                                  if (restzeit > 0 && schwimmer) {
                                                    restzeit = (typeof restzeit == 'number' ? restzeit : 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);
                                            }
                                          }
                                          
                                          
                                          // Vlies Schwimmer normal
                                          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();
                                          });
                                          maxSchwimmer = getState("sonoff.0.Aqua_Float.POWER5").val;
                                          // Vlies Schwimmer max
                                          on({id: 'sonoff.0.Aqua_Float.POWER5', change: "ne"}, function (obj) {
                                            var value = obj.state.val;
                                            var oldValue = obj.oldState.val;
                                            maxSchwimmer = (obj.state ? obj.state.val : "");
                                            if (maxSchwimmer) {
                                              setState("sonoff.0.Aqua_Control.POWER2"/*Vliesmotor*/, false);
                                            }
                                          });
                                          Vliesmotor();
                                          
                                          paul53P 1 Antwort Letzte Antwort
                                          0
                                          Antworten
                                          • In einem neuen Thema antworten
                                          Anmelden zum Antworten
                                          • Älteste zuerst
                                          • Neuste zuerst
                                          • Meiste Stimmen


                                          Support us

                                          ioBroker
                                          Community Adapters
                                          Donate

                                          804

                                          Online

                                          32.6k

                                          Benutzer

                                          82.0k

                                          Themen

                                          1.3m

                                          Beiträge
                                          Community
                                          Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen | Einwilligungseinstellungen
                                          ioBroker Community 2014-2025
                                          logo
                                          • Anmelden

                                          • Du hast noch kein Konto? Registrieren

                                          • Anmelden oder registrieren, um zu suchen
                                          • Erster Beitrag
                                            Letzter Beitrag
                                          0
                                          • Home
                                          • Aktuell
                                          • Tags
                                          • Ungelesen 0
                                          • Kategorien
                                          • Unreplied
                                          • Beliebt
                                          • GitHub
                                          • Docu
                                          • Hilfe