Skip to content
  • Recent
  • Tags
  • 0 Unread 0
  • Categories
  • Unreplied
  • Popular
  • 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

  • Default (No Skin)
  • No Skin
Collapse
Logo
  1. ioBroker Community Home
  2. Deutsch
  3. Hardware
  4. Lay-Z-Spa Wifi Control

NEWS

  • UPDATE 31.10.: Amazon Alexa - ioBroker Skill läuft aus ?
    apollon77A
    apollon77
    48
    3
    8.1k

  • Monatsrückblick – September 2025
    BluefoxB
    Bluefox
    13
    1
    1.8k

  • Neues Video "KI im Smart Home" - ioBroker plus n8n
    BluefoxB
    Bluefox
    15
    1
    2.1k

Lay-Z-Spa Wifi Control

Scheduled Pinned Locked Moved Hardware
211 Posts 76 Posters 50.5k Views 72 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • tvtotalT tvtotal

    @mezzodo

    Hallo,
    habe das gleiche Problem wie @MezzoDO Model S100101 Display tot macht aber eigenartige Pieptöne.
    Webinterface aufrufbar, jedoch keine Schaltfunktion möglich.
    Firmware.png
    HardwareConfig.png 1365-1024.png
    pcb.jpg
    768-1024.jpg
    typ.jpg
    Nutze die PCB v1 Verdrahtung überprüft finde aber keinen Fehler, Bild von @Rickman überprüft.
    Hat noch jemand einen Tipp ?😞

    R Offline
    R Offline
    Rickman
    wrote on last edited by
    #89

    @tvtotal
    Das Problem hatte ich Anfangs auch mit totem Display und Pieptönen.
    Meine Verdrahtung sieht aber ein wenig anders aus - habe allerdings auch das v2- Board...
    Schau mal hier:
    1663778509202-20220921_183757.jpg

    1 Reply Last reply
    0
    • Stefan M.S Offline
      Stefan M.S Offline
      Stefan M.
      wrote on last edited by
      #90

      Hallo allerseits! 🙂 Ich bin neu hier und möchte ebenfalls meinen bestway-Whirlpool mit Wifi aufrüsten.

      Sollte noch jemand eine V2-Platine, vielleicht sogar einen Kabelsatz übrig haben, würde ich mich über PN freuen.

      VG
      Stefan

      1 Reply Last reply
      0
      • Jan MJ Offline
        Jan MJ Offline
        Jan M
        wrote on last edited by Jan M
        #91

        Hallo Leute, möchte meinen Pool auch aufrüsten. Würde auch noch eine Platine brauchen. Kannst mir bitte eine schicken. @alwo23 oder jemand anders. Danke Lg

        1 Reply Last reply
        0
        • A alwo23

          @ts_482 Hi, ich hab gestern erst 5 Bestellt mit Gehäuse wenn Du magst.

          Bernhard BruckmeierB Offline
          Bernhard BruckmeierB Offline
          Bernhard Bruckmeier
          wrote on last edited by
          #92

          @alwo23 Hey, ich hab Interesse an eine Platine, hast du noch eine?

          1 Reply Last reply
          0
          • T Offline
            T Offline
            ts_482
            wrote on last edited by
            #93

            Hallo zusammen,

            kann mir jemand verraten wofür die Kondensatoren und die Weiderstände benötigt werden beim V2 Board?

            1 Reply Last reply
            0
            • E Offline
              E Offline
              Endirecto
              wrote on last edited by
              #94

              Ich bin auf der Suche nach einem fertigen Board. Bei Kleinanzeigen habe ich bisher nur ein Angebot für 60 Euro gefunden.

              Über eine PN würde ich mich freuen.

              Viele Grüße

              U 1 Reply Last reply
              0
              • E Endirecto

                Ich bin auf der Suche nach einem fertigen Board. Bei Kleinanzeigen habe ich bisher nur ein Angebot für 60 Euro gefunden.

                Über eine PN würde ich mich freuen.

                Viele Grüße

                U Offline
                U Offline
                ucm
                wrote on last edited by
                #95

                Hallo zusammen, ich suche ebenfalls nach einer Platine. Hat jemand noch eine vorrätig? Besten Dank

                1 Reply Last reply
                0
                • E emblitz

                  @meistertr
                  Ich habe den Whirpool nur über MQTT eingebunden.
                  Darufhin wurden ja die im o.g. Bild genannten Datenpunkte automatisch erzeugt. Vermutl. sind diese Datenunkte aber für Homeassistant geschrieben worden? In IoBroker werden nur bei wenigen Objekten nutzbare Werte angezeigt. Bei den anderen Objekten im Pfad /Mqtt/homeassistant/.... werden in den Feldern für die Werte kurze "Skripte" aber keine Werte angezeigt.
                  2022-05-13 13 06 19.jpg

                  Ich habe daraufhin dein Skript eingefügt. Folgende Objekte wurden angelegt:
                  2022-05-13 12 58 49.jpg
                  Kannst du mal checken, das alle von dir im Skript geschriebenen Objekte sind?
                  Ich meine, gem. deines Skriptes sollten noch weitere Objekte angelegt werden?

                  LG
                  emblitz

                  Server PfunzS Offline
                  Server PfunzS Offline
                  Server Pfunz
                  wrote on last edited by
                  #96

                  @emblitz wie macht man das mit dem Script? Meine MQQT-Verbindung läuft auch, aber zeigt keine vernünftigen Werte an... wie bei dir...

                  D 1 Reply Last reply
                  0
                  • R Offline
                    R Offline
                    Rickman
                    wrote on last edited by Rickman
                    #97

                    Hallo zusammen,

                    da ich nun mehrfach angeschrieben und dann doch nicht auf meine Antwort reagiert wurde, hier für alle.
                    Ich habe noch eine PCBv2- Platine, einen Level-Shifter, einen Kabelsatz und zugehörige Widerstände da.

                    EDIT: Jetzt habe ich keine mehr.

                    Gruß,
                    Richy

                    1 Reply Last reply
                    0
                    • H Offline
                      H Offline
                      hlgamer
                      wrote on last edited by hlgamer
                      #98

                      Moin, ich bin auch noch auf der Suche nach einer PCBv2-Platine bzw. einem ganzen Bausatz.
                      Falls jemand etwas abzugeben hat würde ich mich über eine Nachricht freuen.
                      Gruß Tom

                      Edit: Ich habe noch Teile abzugeben.

                      PCB_V2B-Platine - 10 Euro
                      Bausatz bestehend aus: PCBv2-Platine, NodeMCU V3, Level-Shifter 8CH (rot), Widerstände und Kondensatoren, Kabelsatz 6-Adrig - 30 Euro
                      Gehäuse aus dem 3D Drucker - 10 Euro
                      Lay-Z-Spa Wifi-Controller, gelötet und geflasht einschl. 3D-Gehäuse - 55 Euro
                      zzgl. 5.49 Euro Versandkosten

                      Bei Interesse gerne melden.

                      WhatsApp Image 2023-09-08 at 11.59.05.jpeg

                      mrFenyxM 1 Reply Last reply
                      1
                      • Agria4800A Agria4800

                        @agria4800
                        Hiermit bekommt man die Zeiten ausgelesen:

                        var Souce_other, Source, RSSI, Times, Chlortime, Filtertime, Uptime, Pumptime, Heating, Airtime, Hydrojet_Time, Costs, Verbrauch;
                        
                        
                        on({id: [].concat(['mqtt.0.layzspa.other']), change: "ne"}, async function (obj) {
                         var value = obj.state.val;
                         var oldValue = obj.oldState.val;
                         Souce_other = getState("mqtt.0.layzspa.other").val;
                         await wait(100);
                         RSSI = getAttr(Souce_other, 'RSSI');
                         setState("0_userdata.0.LazySpa.RSSI-Wifi"/*RSSI-Wifi*/, parseFloat(RSSI), true);
                        });
                        on({id: [].concat(['mqtt.0.layzspa.times']), change: "ne"}, async function (obj) {
                         var value = obj.state.val;
                         var oldValue = obj.oldState.val;
                         Source = getState("mqtt.0.layzspa.times").val;
                         await wait(100);
                         Times = getAttr(Source, 'TIME');
                         setState("0_userdata.0.LazySpa.Times.Time"/*Time*/, parseFloat(Times), true);
                         Chlortime = getAttr(Source, 'CLTIME');
                         setState("0_userdata.0.LazySpa.Times.Chlor_Time"/*Chlor_Time*/, Chlortime, true);
                         Filtertime = getAttr(Source, 'FTIME');
                         setState("0_userdata.0.LazySpa.Times.Filter_Time"/*Filter_Time*/, parseFloat(Filtertime), true);
                         Uptime = getAttr(Source, 'UPTIME');
                         setState("0_userdata.0.LazySpa.Times.Up_Time"/*Up_Time*/, parseFloat(Uptime), true);
                         Pumptime = getAttr(Source, 'PUMPTIME');
                         setState("0_userdata.0.LazySpa.Times.Pump_Time"/*Pump_Time*/, parseFloat(Pumptime), true);
                         Heating = getAttr(Source, 'HEATINGTIME');
                         setState("0_userdata.0.LazySpa.Times.Heating_Time"/*Heating Time*/, parseFloat(Heating), true);
                         Airtime = getAttr(Source, 'AIRTIME');
                         setState("0_userdata.0.LazySpa.Times.Air_Time"/*Air_Time*/, parseFloat(Airtime), true);
                         Hydrojet_Time = getAttr(Source, 'JETTIME');
                         setState("0_userdata.0.LazySpa.Times.Hydrojet_Time"/*Hydrojet_Time*/, parseFloat(Hydrojet_Time), true);
                         Costs = getAttr(Source, 'COST');
                         setState("0_userdata.0.LazySpa.Times.Cost"/*Cost*/, parseFloat(Costs), true);
                         Verbrauch = getAttr(Source, 'KWH');
                         setState("0_userdata.0.LazySpa.Times.Verbrauch"/*Verbrauch*/, parseFloat(Verbrauch), true);
                        });
                        
                        
                        

                        und hiermit werden sie umgeschrieben analog !Bildschirmfoto 2022-08-12 um 21.15.48.png

                        var Dauer, tage, std, min, sec;
                        
                        
                        // https://forum.iobroker.net/topic/13488/vorlage-blockly-umrechnung-von-sekunden-in-stunden-minuten-und-sekunden/11
                        
                        on({id: "0_userdata.0.LazySpa.Times.Up_Time"/*Up_Time*/, change: "ne"}, async function (obj) {
                         var value = obj.state.val;
                         var oldValue = obj.oldState.val;
                         Dauer = getState("0_userdata.0.LazySpa.Times.Up_Time").val;
                         tage = Math.floor(parseFloat(Dauer) / 86400);
                         Dauer = parseFloat(Dauer) - parseFloat(tage) * 86400;
                         std = Math.floor(parseFloat(Dauer) / 3600);
                         Dauer = parseFloat(Dauer) - parseFloat(std) * 3600;
                         min = Math.floor(parseFloat(Dauer) / 60);
                         Dauer = parseFloat(Dauer) - parseFloat(min) * 60;
                         sec = Math.floor(parseFloat(Dauer) / 1);
                         setState("0_userdata.0.LazySpa.Times.Format-Up-Time"/*Format-Up-Time*/, ([tage,'D -  ',std,'h:',min,'min:',sec,'sec'].join('')));
                        });
                        on({id: "0_userdata.0.LazySpa.Times.Air_Time"/*Air_Time*/, change: "ne"}, async function (obj) {
                         var value = obj.state.val;
                         var oldValue = obj.oldState.val;
                         Dauer = getState("0_userdata.0.LazySpa.Times.Air_Time").val;
                         tage = Math.floor(parseFloat(Dauer) / 86400);
                         Dauer = parseFloat(Dauer) - parseFloat(tage) * 86400;
                         std = Math.floor(parseFloat(Dauer) / 3600);
                         Dauer = parseFloat(Dauer) - parseFloat(std) * 3600;
                         min = Math.floor(parseFloat(Dauer) / 60);
                         Dauer = parseFloat(Dauer) - parseFloat(min) * 60;
                         sec = Math.floor(parseFloat(Dauer) / 1);
                         setState("0_userdata.0.LazySpa.Times.Format-Air-Time"/*Format-Air-Time*/, ([tage,'D -  ',std,'h:',min,'min:',sec,'sec'].join('')));
                        });
                        on({id: "0_userdata.0.LazySpa.Times.Heating_Time"/*Heating Time*/, change: "ne"}, async function (obj) {
                         var value = obj.state.val;
                         var oldValue = obj.oldState.val;
                         Dauer = getState("0_userdata.0.LazySpa.Times.Heating_Time").val;
                         tage = Math.floor(parseFloat(Dauer) / 86400);
                         Dauer = parseFloat(Dauer) - parseFloat(tage) * 86400;
                         std = Math.floor(parseFloat(Dauer) / 3600);
                         Dauer = parseFloat(Dauer) - parseFloat(std) * 3600;
                         min = Math.floor(parseFloat(Dauer) / 60);
                         Dauer = parseFloat(Dauer) - parseFloat(min) * 60;
                         sec = Math.floor(parseFloat(Dauer) / 1);
                         setState("0_userdata.0.LazySpa.Times.Format-Heating-Time"/*Format-Heating-Time*/, ([tage,'D -  ',std,'h:',min,'min:',sec,'sec'].join('')));
                        });
                        on({id: "0_userdata.0.LazySpa.Times.Pump_Time"/*Pump_Time*/, change: "ne"}, async function (obj) {
                         var value = obj.state.val;
                         var oldValue = obj.oldState.val;
                         Dauer = getState("0_userdata.0.LazySpa.Times.Pump_Time").val;
                         tage = Math.floor(parseFloat(Dauer) / 86400);
                         Dauer = parseFloat(Dauer) - parseFloat(tage) * 86400;
                         std = Math.floor(parseFloat(Dauer) / 3600);
                         Dauer = parseFloat(Dauer) - parseFloat(std) * 3600;
                         min = Math.floor(parseFloat(Dauer) / 60);
                         Dauer = parseFloat(Dauer) - parseFloat(min) * 60;
                         sec = Math.floor(parseFloat(Dauer) / 1);
                         setState("0_userdata.0.LazySpa.Times.Format-Pump-Time"/*Format-Pump-Time*/, ([tage,'D -  ',std,'h:',min,'min:',sec,'sec'].join('')));
                        });
                        
                        on({id: "0_userdata.0.LazySpa.Times.Hydrojet_Time"/*Hydrojet_Time*/, change: "ne"}, async function (obj) {
                         var value = obj.state.val;
                         var oldValue = obj.oldState.val;
                         Dauer = getState("0_userdata.0.LazySpa.Times.Hydrojet_Time").val;
                         tage = Math.floor(parseFloat(Dauer) / 86400);
                         Dauer = parseFloat(Dauer) - parseFloat(tage) * 86400;
                         std = Math.floor(parseFloat(Dauer) / 3600);
                         Dauer = parseFloat(Dauer) - parseFloat(std) * 3600;
                         min = Math.floor(parseFloat(Dauer) / 60);
                         Dauer = parseFloat(Dauer) - parseFloat(min) * 60;
                         sec = Math.floor(parseFloat(Dauer) / 1);
                         setState("0_userdata.0.LazySpa.Times.Format-Hydrojet-Time"/*Format-Hydrojet-Time*/, ([tage,'D -  ',std,'h:',min,'min:',sec,'sec'].join('')));
                        });
                        

                        Z Offline
                        Z Offline
                        ZoXx
                        wrote on last edited by
                        #99

                        @agria4800 said in Lay-Z-Spa Wifi Control:

                        @agria4800
                        Hiermit bekommt man die Zeiten ausgelesen:

                        var Souce_other, Source, RSSI, Times, Chlortime, Filtertime, Uptime, Pumptime, Heating, Airtime, Hydrojet_Time, Costs, Verbrauch;
                        
                        
                        on({id: [].concat(['mqtt.0.layzspa.other']), change: "ne"}, async function (obj) {
                         var value = obj.state.val;
                         var oldValue = obj.oldState.val;
                         Souce_other = getState("mqtt.0.layzspa.other").val;
                         await wait(100);
                         RSSI = getAttr(Souce_other, 'RSSI');
                         setState("0_userdata.0.LazySpa.RSSI-Wifi"/*RSSI-Wifi*/, parseFloat(RSSI), true);
                        });
                        on({id: [].concat(['mqtt.0.layzspa.times']), change: "ne"}, async function (obj) {
                         var value = obj.state.val;
                         var oldValue = obj.oldState.val;
                         Source = getState("mqtt.0.layzspa.times").val;
                         await wait(100);
                         Times = getAttr(Source, 'TIME');
                         setState("0_userdata.0.LazySpa.Times.Time"/*Time*/, parseFloat(Times), true);
                         Chlortime = getAttr(Source, 'CLTIME');
                         setState("0_userdata.0.LazySpa.Times.Chlor_Time"/*Chlor_Time*/, Chlortime, true);
                         Filtertime = getAttr(Source, 'FTIME');
                         setState("0_userdata.0.LazySpa.Times.Filter_Time"/*Filter_Time*/, parseFloat(Filtertime), true);
                         Uptime = getAttr(Source, 'UPTIME');
                         setState("0_userdata.0.LazySpa.Times.Up_Time"/*Up_Time*/, parseFloat(Uptime), true);
                         Pumptime = getAttr(Source, 'PUMPTIME');
                         setState("0_userdata.0.LazySpa.Times.Pump_Time"/*Pump_Time*/, parseFloat(Pumptime), true);
                         Heating = getAttr(Source, 'HEATINGTIME');
                         setState("0_userdata.0.LazySpa.Times.Heating_Time"/*Heating Time*/, parseFloat(Heating), true);
                         Airtime = getAttr(Source, 'AIRTIME');
                         setState("0_userdata.0.LazySpa.Times.Air_Time"/*Air_Time*/, parseFloat(Airtime), true);
                         Hydrojet_Time = getAttr(Source, 'JETTIME');
                         setState("0_userdata.0.LazySpa.Times.Hydrojet_Time"/*Hydrojet_Time*/, parseFloat(Hydrojet_Time), true);
                         Costs = getAttr(Source, 'COST');
                         setState("0_userdata.0.LazySpa.Times.Cost"/*Cost*/, parseFloat(Costs), true);
                         Verbrauch = getAttr(Source, 'KWH');
                         setState("0_userdata.0.LazySpa.Times.Verbrauch"/*Verbrauch*/, parseFloat(Verbrauch), true);
                        });
                        
                        
                        

                        und hiermit werden sie umgeschrieben analog !Bildschirmfoto 2022-08-12 um 21.15.48.png

                        var Dauer, tage, std, min, sec;
                        
                        
                        // https://forum.iobroker.net/topic/13488/vorlage-blockly-umrechnung-von-sekunden-in-stunden-minuten-und-sekunden/11
                        
                        on({id: "0_userdata.0.LazySpa.Times.Up_Time"/*Up_Time*/, change: "ne"}, async function (obj) {
                         var value = obj.state.val;
                         var oldValue = obj.oldState.val;
                         Dauer = getState("0_userdata.0.LazySpa.Times.Up_Time").val;
                         tage = Math.floor(parseFloat(Dauer) / 86400);
                         Dauer = parseFloat(Dauer) - parseFloat(tage) * 86400;
                         std = Math.floor(parseFloat(Dauer) / 3600);
                         Dauer = parseFloat(Dauer) - parseFloat(std) * 3600;
                         min = Math.floor(parseFloat(Dauer) / 60);
                         Dauer = parseFloat(Dauer) - parseFloat(min) * 60;
                         sec = Math.floor(parseFloat(Dauer) / 1);
                         setState("0_userdata.0.LazySpa.Times.Format-Up-Time"/*Format-Up-Time*/, ([tage,'D -  ',std,'h:',min,'min:',sec,'sec'].join('')));
                        });
                        on({id: "0_userdata.0.LazySpa.Times.Air_Time"/*Air_Time*/, change: "ne"}, async function (obj) {
                         var value = obj.state.val;
                         var oldValue = obj.oldState.val;
                         Dauer = getState("0_userdata.0.LazySpa.Times.Air_Time").val;
                         tage = Math.floor(parseFloat(Dauer) / 86400);
                         Dauer = parseFloat(Dauer) - parseFloat(tage) * 86400;
                         std = Math.floor(parseFloat(Dauer) / 3600);
                         Dauer = parseFloat(Dauer) - parseFloat(std) * 3600;
                         min = Math.floor(parseFloat(Dauer) / 60);
                         Dauer = parseFloat(Dauer) - parseFloat(min) * 60;
                         sec = Math.floor(parseFloat(Dauer) / 1);
                         setState("0_userdata.0.LazySpa.Times.Format-Air-Time"/*Format-Air-Time*/, ([tage,'D -  ',std,'h:',min,'min:',sec,'sec'].join('')));
                        });
                        on({id: "0_userdata.0.LazySpa.Times.Heating_Time"/*Heating Time*/, change: "ne"}, async function (obj) {
                         var value = obj.state.val;
                         var oldValue = obj.oldState.val;
                         Dauer = getState("0_userdata.0.LazySpa.Times.Heating_Time").val;
                         tage = Math.floor(parseFloat(Dauer) / 86400);
                         Dauer = parseFloat(Dauer) - parseFloat(tage) * 86400;
                         std = Math.floor(parseFloat(Dauer) / 3600);
                         Dauer = parseFloat(Dauer) - parseFloat(std) * 3600;
                         min = Math.floor(parseFloat(Dauer) / 60);
                         Dauer = parseFloat(Dauer) - parseFloat(min) * 60;
                         sec = Math.floor(parseFloat(Dauer) / 1);
                         setState("0_userdata.0.LazySpa.Times.Format-Heating-Time"/*Format-Heating-Time*/, ([tage,'D -  ',std,'h:',min,'min:',sec,'sec'].join('')));
                        });
                        on({id: "0_userdata.0.LazySpa.Times.Pump_Time"/*Pump_Time*/, change: "ne"}, async function (obj) {
                         var value = obj.state.val;
                         var oldValue = obj.oldState.val;
                         Dauer = getState("0_userdata.0.LazySpa.Times.Pump_Time").val;
                         tage = Math.floor(parseFloat(Dauer) / 86400);
                         Dauer = parseFloat(Dauer) - parseFloat(tage) * 86400;
                         std = Math.floor(parseFloat(Dauer) / 3600);
                         Dauer = parseFloat(Dauer) - parseFloat(std) * 3600;
                         min = Math.floor(parseFloat(Dauer) / 60);
                         Dauer = parseFloat(Dauer) - parseFloat(min) * 60;
                         sec = Math.floor(parseFloat(Dauer) / 1);
                         setState("0_userdata.0.LazySpa.Times.Format-Pump-Time"/*Format-Pump-Time*/, ([tage,'D -  ',std,'h:',min,'min:',sec,'sec'].join('')));
                        });
                        
                        on({id: "0_userdata.0.LazySpa.Times.Hydrojet_Time"/*Hydrojet_Time*/, change: "ne"}, async function (obj) {
                         var value = obj.state.val;
                         var oldValue = obj.oldState.val;
                         Dauer = getState("0_userdata.0.LazySpa.Times.Hydrojet_Time").val;
                         tage = Math.floor(parseFloat(Dauer) / 86400);
                         Dauer = parseFloat(Dauer) - parseFloat(tage) * 86400;
                         std = Math.floor(parseFloat(Dauer) / 3600);
                         Dauer = parseFloat(Dauer) - parseFloat(std) * 3600;
                         min = Math.floor(parseFloat(Dauer) / 60);
                         Dauer = parseFloat(Dauer) - parseFloat(min) * 60;
                         sec = Math.floor(parseFloat(Dauer) / 1);
                         setState("0_userdata.0.LazySpa.Times.Format-Hydrojet-Time"/*Format-Hydrojet-Time*/, ([tage,'D -  ',std,'h:',min,'min:',sec,'sec'].join('')));
                        });
                        

                        hier kann ich nicht folgen. Kannst du mir hier unter die Arme greifen?
                        Die Skripte habe ich eingefügt, jedoch schmeißt er bei mir Fehler: javascript.0 (562) at Object.<anonymous>

                        Die Datenpunkte existieren bei mir nicht. Müssen die angelegt werden vorher? Wenn ja in welcher Form?
                        Danke!

                        1 Reply Last reply
                        0
                        • N Nobody 0

                          Hallo Zusammen,

                          nach einigen Anlaufproblemen und einer Kalten Lötstelle auf dem NodeMCU habe ich nun endlich das Programm drauf bekommen und alles Verlötet.

                          Leider habe ich nun das nächste Problem, wenn ich das Modul anschliesse und wieder Strom drauf geben hört man aus dem inneren nur ein leises Klackern, aber nichts geht.

                          Beim aufrufen der Webseite des Moduls bekomme ich folgenden Fehler:
                          404: File Not Found

                          Geht die Weboberfläche nur wenn das Modul mit der Pumpe verbunden ist?
                          Wo könnte das Klappern herkommen?
                          Ich habe einen Lay-Z.Spa AirJet Hawaii von 2020.

                          Rocco FriedrichR Offline
                          Rocco FriedrichR Offline
                          Rocco Friedrich
                          wrote on last edited by
                          #100

                          @nobody-0
                          Hast du das Problem mit dem Klackern lösen können?
                          Ich habe drum genau das gleiche Problem Lay-Z Spa Modul von Ebay lief eine Zeit lang problemlos dann fing das Modul nach einem Stromausfall an zu klackern ich denke das Geräusch kommt vom Lautsprecher der verbaut ist. Den ESP8266 und den Converter hab ich schon gewechselt aber das Problem besteht weiterhin.
                          das Web Interface ist erreichbar aber die Steuerung ist nicht möglich auch über die Tasten an der Pumpe ist mit dem Installierten Modul keine Bedienung möglich. Vielleicht kannst du mir ja helfen? Gruss Rocco

                          1 Reply Last reply
                          0
                          • R Offline
                            R Offline
                            Ronnyempire
                            wrote on last edited by
                            #101

                            Ich suche noch einen fertigen Controller, hat jemand einen abzugeben. Ich habe das 100101 Modell

                            1 Reply Last reply
                            0
                            • mrFenyxM Offline
                              mrFenyxM Offline
                              mrFenyx
                              wrote on last edited by
                              #102

                              Hi zusammen,
                              ich habe die States in ioBroker reinbekommen aber ich kann leider keine Befehle rausschicken. Ich bekomme die Fehlermeldung State "mqtt-client.0.layzspa.command" not found - der existiert tatsächlich nicht. Soll ich es per Hand erstellen oder habe ich etwas falsch gemacht? Ich benutze auch "nur" das mqtt-client, nicht das mqtt Adapter aber damit, denke ich, sollte es nicht zu tun haben, oder?
                              Danke!

                              mrFenyxM 1 Reply Last reply
                              0
                              • H hlgamer

                                Moin, ich bin auch noch auf der Suche nach einer PCBv2-Platine bzw. einem ganzen Bausatz.
                                Falls jemand etwas abzugeben hat würde ich mich über eine Nachricht freuen.
                                Gruß Tom

                                Edit: Ich habe noch Teile abzugeben.

                                PCB_V2B-Platine - 10 Euro
                                Bausatz bestehend aus: PCBv2-Platine, NodeMCU V3, Level-Shifter 8CH (rot), Widerstände und Kondensatoren, Kabelsatz 6-Adrig - 30 Euro
                                Gehäuse aus dem 3D Drucker - 10 Euro
                                Lay-Z-Spa Wifi-Controller, gelötet und geflasht einschl. 3D-Gehäuse - 55 Euro
                                zzgl. 5.49 Euro Versandkosten

                                Bei Interesse gerne melden.

                                WhatsApp Image 2023-09-08 at 11.59.05.jpeg

                                mrFenyxM Offline
                                mrFenyxM Offline
                                mrFenyx
                                wrote on last edited by
                                #103

                                @hlgamer said in Lay-Z-Spa Wifi Control:

                                Moin, ich bin auch noch auf der Suche nach einer PCBv2-Platine bzw. einem ganzen Bausatz.
                                Falls jemand etwas abzugeben hat würde ich mich über eine Nachricht freuen.
                                Gruß Tom

                                Edit: Ich habe noch Teile abzugeben.

                                PCB_V2B-Platine - 10 Euro
                                Bausatz bestehend aus: PCBv2-Platine, NodeMCU V3, Level-Shifter 8CH (rot), Wiederstände und Kondensatoren, Kabelsatz 6-Adrig - 30 Euro
                                Gehäuse aus dem 3D Drucker - 10 Euro
                                Lay-Z-Spa Wifi-Controller, gelötet und geflasht einschl. 3D-Gehäuse - 55 Euro
                                zzgl. 5.49 Euro Versandkosten

                                Bei Interesse gerne melden.

                                WhatsApp Image 2023-09-08 at 11.59.05.jpeg

                                @hlgamer vielen Dank für den Controller! hat alles super geklappt, funktioniert prima! 👏 👍

                                1 Reply Last reply
                                0
                                • mrFenyxM mrFenyx

                                  Hi zusammen,
                                  ich habe die States in ioBroker reinbekommen aber ich kann leider keine Befehle rausschicken. Ich bekomme die Fehlermeldung State "mqtt-client.0.layzspa.command" not found - der existiert tatsächlich nicht. Soll ich es per Hand erstellen oder habe ich etwas falsch gemacht? Ich benutze auch "nur" das mqtt-client, nicht das mqtt Adapter aber damit, denke ich, sollte es nicht zu tun haben, oder?
                                  Danke!

                                  mrFenyxM Offline
                                  mrFenyxM Offline
                                  mrFenyx
                                  wrote on last edited by mrFenyx
                                  #104

                                  @mrfenyx said in Lay-Z-Spa Wifi Control:

                                  Hi zusammen,
                                  ich habe die States in ioBroker reinbekommen aber ich kann leider keine Befehle rausschicken. Ich bekomme die Fehlermeldung State "mqtt-client.0.layzspa.command" not found - der existiert tatsächlich nicht. Soll ich es per Hand erstellen oder habe ich etwas falsch gemacht? Ich benutze auch "nur" das mqtt-client, nicht das mqtt Adapter aber damit, denke ich, sollte es nicht zu tun haben, oder?
                                  Danke!

                                  UPDATE:
                                  tatsächlich muss man das mqtt Adapter benutzen, dann gibt es auch /command. Das Problem dass ich nun habe ist mit das setzen von AMBC. Ich habe das folgende Szenario:

                                  • die Außentemperatur ist durch die Weboberfläche auf 25°C gesetzt
                                  • in ioBroker sehe ich diesen Wert:
                                    6887417c-1982-4b81-87e4-e703eb2c7e21-image.png
                                  • nun versuche ich diesen Wert manuell auf 30 zu setzen
                                    d104339c-71e7-4d35-be64-44d02106e113-image.png
                                  • tatsächlicher Wert was dann gesetzt wird ist -1
                                  • ich ändere es wieder auf 25°C in der Weboberfläche was in ioBroker übernommen wird.
                                  • ich versuche es dann in ioBroker auf 86 zu ändern
                                  • gesetzter Wert ist dann 25

                                  Das führt mich dazu zu glauben dass der AMBC der gesetzt wird, eigentlich der AMBF (also in Fahrenheit) ist. Weiß jemand was man ändern muss, um den Wert in °C zu setzen?

                                  Danke!

                                  UPDATE:
                                  man muss hier das CMD auf 15 setzen, nicht 14:

                                  case 'AMBC':
                                              setStateAsync('mqtt.'+ MQTTINSTANCE+'.layzspa.command','{"CMD":15,"VALUE":'+ value +',"XTIME":0,"INTERVAL":0}')
                                              log('change ambient temp. to '+ value);
                                          break;
                                  

                                  14 = °F und 15 = °C

                                  1 Reply Last reply
                                  0
                                  • J johobo

                                    So, Ich wollte mal von meiner Umsetzung berichten.

                                    Ich habe den Lay-Z-Spa Miami mit dem >2021er Pumpenmodul.

                                    Die Platinen waren nach ca. 1,5 Wochen aus China bei mir.

                                    Bei einem ersten Testaufbau auf Steckbrett hatte ich schon festgestellt, dass ich für meinen Pool die Kabelbelegung 1:1 aufbauen muss, damit es funktioniert. Bei dem Versuch war kein Low-Pass Filter vorhanden und es kam zu keinem Display-Flickern. Zur Sicherheit baute ich dann im ersten Versuch mit Platine den Filter mit ein. Dies führte aber dazu, dass das Display nicht mehr funktionierte. Also bestückte ich eine zweiter Platine ohne filter und es funktionierte einwandfrei.

                                    Bestway Wifi PCB 3.jpg Bestway Wifi PCB 2.jpg Bestway Wifi PCB 1.jpg

                                    Die Einbindung in IO broker lief soweit auch.

                                    Für den finalen Einbau musste aber noch ein Gehäuse her.
                                    Ich orientierte mich am Design von @Rickman (Vielen Dank!) und einem Case ohne Halterung von thingiverse. Heraus kam dieses Thing: https://www.thingiverse.com/thing:6061047 mit dem ich auch ziemlich zufrieden bin. Evtl. muss ich hier nochmal eine neuere Version aus ABS erstellen. PLA scheint mir hier bei den Temperaturen etwas kritisch…

                                    Bild2.jpg Bild1.jpg

                                    Alles in allem bin ich aber super zufrieden mit dem Projekt und bedanke mich bei euch allen für die Berichte die zu meinem Erfolg beigetragen haben!

                                    R Offline
                                    R Offline
                                    RoccoNaut
                                    wrote on last edited by
                                    #105

                                    @johobo Hast du noch mal den Link zu de Gehäuse? Der Link hier funktioniert nicht mehr.

                                    1 Reply Last reply
                                    0
                                    • S Smokey

                                      @agria4800 sagte in Lay-Z-Spa Wifi Control:

                                      Und so siehts dann aus...Bildschirmfoto 2022-08-12 um 21.17.52.png

                                      😞 ich hab den ganzen Threat jetzt x mal gelesen, raffe aber einfach nicht, wie ich per VIS die entsprechenden Kommandos absetzen kann, wie es oben im Bild zu sehen ist. Das sind doch keine direkten Datenpunkte, die einen Wert oder ein true/false erwarten. Ich sehe im Objekt-Baum hinter den Datenpunkten nur JASON files oder scripts. Was hab ich denn übersehen?

                                      B Offline
                                      B Offline
                                      Bomer
                                      wrote on last edited by
                                      #106

                                      @smokey said in Lay-Z-Spa Wifi Control:

                                      @agria4800 sagte in Lay-Z-Spa Wifi Control:

                                      Und so siehts dann aus...Bildschirmfoto 2022-08-12 um 21.17.52.png

                                      😞 ich hab den ganzen Threat jetzt x mal gelesen, raffe aber einfach nicht, wie ich per VIS die entsprechenden Kommandos absetzen kann, wie es oben im Bild zu sehen ist. Das sind doch keine direkten Datenpunkte, die einen Wert oder ein true/false erwarten. Ich sehe im Objekt-Baum hinter den Datenpunkten nur JASON files oder scripts. Was hab ich denn übersehen?
                                      Hi,
                                      würdest du das Vis auch zur Verfügung stellen?
                                      MfG
                                      Bomer

                                      1 Reply Last reply
                                      0
                                      • Agria4800A Agria4800

                                        @agria4800 : Anbei das Script für die Leute mit dem Layz Hawaii oder Maldives (mit den Hydrojet Düsen) 😉

                                        // https://forum.iobroker.net/topic/51603/lay-z-spa-wifi-control?_=1655490942180&lang=de
                                        
                                        /*Notes for me
                                        
                                        Last filter change was 0.00 day(s) ago.  RESET Button gedrückt!
                                        {"CMD":10,"VALUE":0,"XTIME":1658859596,"INTERVAL":0}
                                        
                                        
                                        Last chlorine add was 0.00 day(s) ago.
                                        {"CMD":9,"VALUE":0,"XTIME":1658859652,"INTERVAL":0}
                                        */
                                        
                                        const Messages =  
                                        {
                                         "CONTENT": "STATES",
                                         "LCK": 0,
                                         "PWR": 0,
                                         "UNT": 1,
                                         "AIR": 0,
                                         "GRN": 0,
                                         "RED": 0,
                                         "FLT": 0,
                                         "TGT": 22,
                                         "TMP": 13,
                                         "CH1": 32,
                                         "CH2": 49,
                                         "CH3": 51,
                                         "HJT": 0,
                                         "BRT": 7
                                        }
                                        const ID = '0_userdata.0.Layz-Hydro';
                                        const MQTTINSTANCE = 0;
                                        const debug = true;
                                        /*
                                        {
                                         "CONTENT": "TIMES",
                                         "TIME": 1650746370,
                                         "CLTIME": 1644734714,
                                         "FTIME": 1644734719,
                                         "UPTIME": 41660,
                                         "PUMPTIME": 50,
                                         "HEATINGTIME": 24,
                                         "AIRTIME": 512,
                                         "JETTIME": 4294966,
                                         "COST": 0,
                                         "FINT": 4294967295,
                                         "CLINT": 4294967295,
                                         "KWH": null,
                                         "TTTT": -74677
                                        }
                                        */
                                        const STATES=[
                                           {
                                               _id: 'LCK',
                                               type: 'state',
                                               common: {
                                                   name: 'lock',
                                                   type: 'boolean',
                                                   role: 'switch',
                                                   read: true,
                                                   write: false,
                                                   desc: 'Lazy spa lock'
                                               },
                                               native: {}
                                           },
                                           {
                                               _id: 'PWR',
                                               type: 'state',
                                               common: {
                                                   name: 'power',
                                                   type: 'boolean',
                                                   role: 'switch.power',
                                                   read: true,
                                                   write: true,
                                                   desc: 'Lazy spa power'
                                               },
                                               native: {}
                                           },
                                           {
                                           _id: 'UNT',
                                           type: 'state',
                                           common: {
                                               name: 'unit',
                                               type: 'number',
                                               role: 'value',
                                               read: true,
                                               write: true,
                                               max: 1,
                                               desc: 'Lazy spa unit',
                                               states: {
                                           			0: 'Farenheit',
                                           			1: 'Celsius'
                                           		}
                                           },
                                              native: {}
                                           },
                                           {
                                           _id: 'HJT',
                                           type: 'state',
                                           common: {
                                               name: 'Hydrojet',
                                               type: 'boolean',
                                               role: 'switch',
                                               read: true,
                                               write: true,
                                               desc: 'Lazy spa Hydrojets state'
                                           },
                                              native: {}
                                           },
                                           {
                                           _id: 'AIR',
                                           type: 'state',
                                           common: {
                                               name: 'bubbles',
                                               type: 'boolean',
                                               role: 'switch',
                                               read: true,
                                               write: true,
                                               desc: 'Lazy spa bubbles state'
                                           },
                                           native: {}
                                           },
                                           {
                                           _id: 'GRN',
                                           type: 'state',
                                           common: {
                                               name: 'Heating green',
                                               type: 'boolean',
                                               role: 'switch',
                                               read: true,
                                               write: false,
                                               desc: 'reached target temp.'
                                           },
                                           native: {}
                                           },
                                           {
                                           _id: 'RED',
                                           type: 'state',
                                           common: {
                                               name: 'Heating red',
                                               type: 'boolean',
                                               role: 'switch',
                                               read: true,
                                               write: false,
                                               desc: 'not reached target temp.'
                                           },
                                           native: {}
                                           },
                                           {
                                           _id: 'FLT',
                                           type: 'state',
                                           common: {
                                               name: 'pump',
                                               type: 'boolean',
                                               role: 'switch',
                                               read: true,
                                               write: true,
                                               desc: 'pump state'
                                           },    native: {}
                                           },
                                           {
                                           _id: 'HEATER',
                                           type: 'state',
                                           common: {
                                               name: 'heater',
                                               type: 'boolean',
                                               role: 'switch',
                                               read: true,
                                               write: true,
                                               desc: 'heater state'
                                           },
                                           native: {}
                                           },
                                           {
                                           _id: 'TGT',
                                           type: 'state',
                                           common: {
                                               name: 'target temp',
                                               type: 'number',
                                               role: 'level.temperature',
                                               min: 20,
                                               max: 40,
                                               steps: 1,
                                               read: true,
                                               write: true,
                                               desc: 'taget temp.'
                                           },
                                           native: {}
                                           },
                                           {
                                           _id: 'TMP',
                                           type: 'state',
                                           common: {
                                               name: 'temp',
                                               type: 'number',
                                               role: 'value.temperature',
                                               read: true,
                                               write: false,
                                               unit: '°C',
                                               desc: 'temp.'
                                           },
                                           native: {}
                                           },
                                        ]
                                        
                                        
                                        init();
                                        async function stateChange(obj){
                                           let id = obj.id
                                           let state = id.split('.').pop()
                                           let value = obj.state.val
                                           log('change Unit' + state)
                                           switch (state) {
                                               case 'UNT':
                                                   setStateAsync('mqtt.'+ MQTTINSTANCE+'.layzspa.command','{"CMD":1,"VALUE":'+ value +',"XTIME":0,"INTERVAL":0}')
                                                   log('change Unit')
                                               break;
                                               case 'TGT':
                                                   setStateAsync('mqtt.'+ MQTTINSTANCE+'.layzspa.command','{"CMD":0,"VALUE":'+ value +',"XTIME":0,"INTERVAL":0}')
                                                   log('change target temp. to '+ value);
                                               break;
                                               case 'AIR':
                                                   value = value ? 1: 0 ;
                                                   setStateAsync('mqtt.'+ MQTTINSTANCE+'.layzspa.command','{"CMD":2,"VALUE":'+ value +',"XTIME":0,"INTERVAL":0}')
                                                   log('set bubbles to '+ value);
                                               break;
                                                case 'HJT':
                                                   value = value ? 1: 0 ;
                                                   setStateAsync('mqtt.'+ MQTTINSTANCE+'.layzspa.command','{"CMD":11,"VALUE":'+ value +',"XTIME":0,"INTERVAL":0}')
                                                   log('set Hydrojets to '+ value);
                                               break;
                                               case 'HEATER':
                                                   value = value ? 1: 0 ;
                                                   setStateAsync('mqtt.'+ MQTTINSTANCE+'.layzspa.command','{"CMD":3,"VALUE":'+ value +',"XTIME":0,"INTERVAL":0}')
                                                   log('set Heater to '+ value);
                                               break;
                                               case 'FLT':
                                                   value = value ? 1: 0 ;
                                                   setStateAsync('mqtt.'+ MQTTINSTANCE+'.layzspa.command','{"CMD":4,"VALUE":'+ value +',"XTIME":0,"INTERVAL":0}')
                                                   log('set pump to '+ value);
                                               break;
                                            
                                        
                                        
                                         default:
                                           // Anweisungen werden ausgeführt,
                                           // falls keine der case-Klauseln mit expression übereinstimmt
                                           break;
                                        }
                                        
                                        
                                        
                                        }
                                        async function init(){
                                           await asyncForEach(STATES, async (obj, index) => {
                                               let id = ID +'.'+ obj._id
                                               if (!existsState(id)) {
                                                   log('create state '+ id)
                                                   await createStateAsync(id, obj.common)
                                               }
                                               else {
                                                   log('skip state '+ id)
                                               }
                                               //set subscription
                                               if(obj.common.write){
                                                   on({id: id, change:"any"} , function(obj) {
                                                       if(!obj.state.ack){
                                                           log('change state! '+ JSON.stringify(obj))
                                                           stateChange(obj)
                                                       }
                                                   });
                                               }       
                                           });
                                           log('init done!')
                                        }
                                        async function setLazyStates(obj){
                                           try{
                                                   let states = JSON.parse(obj)
                                                   for (const [key, value] of Object.entries(states)) {
                                                       let statevalue = value
                                                       const found = STATES.find(state => state._id === key);
                                                       if(found){                 
                                                           if (found.common.type === 'boolean'){
                                                               statevalue = value === 1
                                                           }
                                                           await setStateAsync(ID +'.'+ key,statevalue,true)
                                                       }
                                                   }
                                                   //set heater state
                                                   await setStateAsync(ID +'.HEATER',(states.GRN || states.RED) === 1,true)    
                                           }
                                           catch(e){
                                               console.log('Error in setting State '+ e)
                                           }
                                        
                                        }
                                        
                                        async function asyncForEach(array, callback) {
                                           for (let index = 0; index < array.length; index++) {
                                           	await callback(array[index], index, array);
                                           }
                                        }
                                        function log (msg){
                                           if(debug) console.log (msg)
                                        }
                                        
                                        on({id:'mqtt.'+ MQTTINSTANCE+'.layzspa.message', change:"ne"} , function(obj) {
                                           log('Lazyspa reached message! '+ JSON.stringify(obj.state))
                                           setLazyStates(obj.state.val)
                                        });
                                        
                                        

                                        Und so siehts dann aus...Bildschirmfoto 2022-08-12 um 21.17.52.png

                                        Grüße

                                        B Offline
                                        B Offline
                                        Bomer
                                        wrote on last edited by
                                        #107

                                        @agria4800

                                        Hi,
                                        würdest du das Vis auch zur Verfügung stellen?
                                        MfG
                                        Bomer

                                        1 Reply Last reply
                                        0
                                        • MeistertrM Meistertr

                                          Hallo Leute ich arbeite gerade daran meinen Lay-Z-Spa Smarthome kompatibel zu machen. bin da auf ein tolles Projekt gestoßen mit einem Esp8266 Wollte hierfür die Platinen bestellen hat noch jemand zufällig Interesse? Eine Platine alleine ist ein bisschen zu teuer... würde zwischen 6 und 11 Euro liegen die platine je nachdem wieviele es werden...

                                          Platine : https://easyeda.com/editor#id=a1b94bf9fc01407591a9e0fec6a813b3
                                          Projekt: https://github.com/visualapproach/WiFi-remote-for-Bestway-Lay-Z-SPA

                                          Wollte am Wochenende mal ein Testaufbau machen... und werde berichten...

                                          PS: ich selbst habe einen Palm-Springspcb.jpg

                                          edit: so ein kleines script habe ich auch dafür:

                                          
                                          const Messages =  
                                          {
                                            "CONTENT": "STATES",
                                            "LCK": 0,
                                            "PWR": 0,
                                            "UNT": 1,
                                            "AIR": 0,
                                            "GRN": 0,
                                            "RED": 0,
                                            "FLT": 0,
                                            "TGT": 22,
                                            "TMP": 13,
                                            "CH1": 32,
                                            "CH2": 49,
                                            "CH3": 51,
                                            "HJT": 0,
                                            "BRT": 7
                                          }
                                          const ID = '0_userdata.0.LazySpa';
                                          const MQTTINSTANCE = 0;
                                          const debug = true;
                                          /*
                                          {
                                            "CONTENT": "TIMES",
                                            "TIME": 1650746370,
                                            "CLTIME": 1644734714,
                                            "FTIME": 1644734719,
                                            "UPTIME": 41660,
                                            "PUMPTIME": 50,
                                            "HEATINGTIME": 24,
                                            "AIRTIME": 512,
                                            "JETTIME": 4294966,
                                            "COST": 0,
                                            "FINT": 4294967295,
                                            "CLINT": 4294967295,
                                            "KWH": null,
                                            "TTTT": -74677
                                          }
                                          */
                                          const STATES=[
                                              {
                                                  _id: 'LCK',
                                                  type: 'state',
                                                  common: {
                                                      name: 'lock',
                                                      type: 'boolean',
                                                      role: 'switch',
                                                      read: true,
                                                      write: false,
                                                      desc: 'Lazy spa lock'
                                                  },
                                                  native: {}
                                              },
                                              {
                                                  _id: 'PWR',
                                                  type: 'state',
                                                  common: {
                                                      name: 'power',
                                                      type: 'boolean',
                                                      role: 'switch.power',
                                                      read: true,
                                                      write: true,
                                                      desc: 'Lazy spa power'
                                                  },
                                                  native: {}
                                              },
                                              {
                                              _id: 'UNT',
                                              type: 'state',
                                              common: {
                                                  name: 'unit',
                                                  type: 'number',
                                                  role: 'value',
                                                  read: true,
                                                  write: true,
                                                  max: 1,
                                                  desc: 'Lazy spa unit',
                                                  states: {
                                          				0: 'Farenheit',
                                          				1: 'Celsius'
                                          			}
                                              },
                                              native: {}
                                              },
                                              {
                                              _id: 'AIR',
                                              type: 'state',
                                              common: {
                                                  name: 'bubbles',
                                                  type: 'boolean',
                                                  role: 'switch',
                                                  read: true,
                                                  write: true,
                                                  desc: 'Lazy spa bubbles state'
                                              },
                                              native: {}
                                              },
                                              {
                                              _id: 'GRN',
                                              type: 'state',
                                              common: {
                                                  name: 'Heating green',
                                                  type: 'boolean',
                                                  role: 'switch',
                                                  read: true,
                                                  write: false,
                                                  desc: 'reached target temp.'
                                              },
                                              native: {}
                                              },
                                              {
                                              _id: 'RED',
                                              type: 'state',
                                              common: {
                                                  name: 'Heating red',
                                                  type: 'boolean',
                                                  role: 'switch',
                                                  read: true,
                                                  write: false,
                                                  desc: 'not reached target temp.'
                                              },
                                              native: {}
                                              },
                                              {
                                              _id: 'FLT',
                                              type: 'state',
                                              common: {
                                                  name: 'pump',
                                                  type: 'boolean',
                                                  role: 'switch',
                                                  read: true,
                                                  write: true,
                                                  desc: 'pump state'
                                              },    native: {}
                                              },
                                              {
                                              _id: 'HEATER',
                                              type: 'state',
                                              common: {
                                                  name: 'heater',
                                                  type: 'boolean',
                                                  role: 'switch',
                                                  read: true,
                                                  write: true,
                                                  desc: 'heater state'
                                              },
                                              native: {}
                                              },
                                              {
                                              _id: 'TGT',
                                              type: 'state',
                                              common: {
                                                  name: 'target temp',
                                                  type: 'number',
                                                  role: 'level.temperature',
                                                  min: 20,
                                                  max: 40,
                                                  steps: 1,
                                                  read: true,
                                                  write: true,
                                                  desc: 'taget temp.'
                                              },
                                              native: {}
                                              },
                                              {
                                              _id: 'TMP',
                                              type: 'state',
                                              common: {
                                                  name: 'temp',
                                                  type: 'number',
                                                  role: 'value.temperature',
                                                  read: true,
                                                  write: false,
                                                  unit: '°C',
                                                  desc: 'temp.'
                                              },
                                              native: {}
                                              },
                                          ]
                                          
                                          
                                          init();
                                          async function stateChange(obj){
                                              let id = obj.id
                                              let state = id.split('.').pop()
                                              let value = obj.state.val
                                              log('change Unit' + state)
                                              switch (state) {
                                                  case 'UNT':
                                                      setStateAsync('mqtt.'+ MQTTINSTANCE+'.layzspa.command','{"CMD":1,"VALUE":'+ value +',"XTIME":0,"INTERVAL":0}')
                                                      log('change Unit')
                                                  break;
                                                  case 'TGT':
                                                      setStateAsync('mqtt.'+ MQTTINSTANCE+'.layzspa.command','{"CMD":0,"VALUE":'+ value +',"XTIME":0,"INTERVAL":0}')
                                                      log('change target temp. to '+ value);
                                                  break;
                                                  case 'AIR':
                                                      value = value ? 1: 0 ;
                                                      setStateAsync('mqtt.'+ MQTTINSTANCE+'.layzspa.command','{"CMD":2,"VALUE":'+ value +',"XTIME":0,"INTERVAL":0}')
                                                      log('set bubbles to '+ value);
                                                  break;
                                                  case 'HEATER':
                                                      value = value ? 1: 0 ;
                                                      setStateAsync('mqtt.'+ MQTTINSTANCE+'.layzspa.command','{"CMD":3,"VALUE":'+ value +',"XTIME":0,"INTERVAL":0}')
                                                      log('set Heater to '+ value);
                                                  break;
                                                  case 'FLT':
                                                      value = value ? 1: 0 ;
                                                      setStateAsync('mqtt.'+ MQTTINSTANCE+'.layzspa.command','{"CMD":4,"VALUE":'+ value +',"XTIME":0,"INTERVAL":0}')
                                                      log('set pump to '+ value);
                                                  break;
                                          
                                          
                                            default:
                                              // Anweisungen werden ausgeführt,
                                              // falls keine der case-Klauseln mit expression übereinstimmt
                                              break;
                                          }
                                          
                                          
                                          
                                          }
                                          async function init(){
                                              await asyncForEach(STATES, async (obj, index) => {
                                                  let id = ID +'.'+ obj._id
                                                  if (!existsState(id)) {
                                                      log('create state '+ id)
                                                      await createStateAsync(id, obj.common)
                                                  }
                                                  else {
                                                      log('skip state '+ id)
                                                  }
                                                  //set subscription
                                                  if(obj.common.write){
                                                      on({id: id, change:"any"} , function(obj) {
                                                          if(!obj.state.ack){
                                                              log('change state! '+ JSON.stringify(obj))
                                                              stateChange(obj)
                                                          }
                                                      });
                                                  }       
                                              });
                                              log('init done!')
                                          }
                                          async function setLazyStates(obj){
                                              try{
                                                      let states = JSON.parse(obj)
                                                      for (const [key, value] of Object.entries(states)) {
                                                          let statevalue = value
                                                          const found = STATES.find(state => state._id === key);
                                                          if(found){                 
                                                              if (found.common.type === 'boolean'){
                                                                  statevalue = value === 1
                                                              }
                                                              await setStateAsync(ID +'.'+ key,statevalue,true)
                                                          }
                                                      }
                                                      //set heater state
                                                      await setStateAsync(ID +'.HEATER',(states.GRN || states.RED) === 1,true)    
                                              }
                                              catch(e){
                                                  console.log('Error in setting State '+ e)
                                              }
                                          
                                          }
                                          
                                          async function asyncForEach(array, callback) {
                                          	for (let index = 0; index < array.length; index++) {
                                          		await callback(array[index], index, array);
                                          	}
                                          }
                                          function log (msg){
                                              if(debug) console.log (msg)
                                          }
                                          
                                          on({id:'mqtt.'+ MQTTINSTANCE+'.layzspa.message', change:"ne"} , function(obj) {
                                              log('Lazyspa reached message! '+ JSON.stringify(obj.state))
                                              setLazyStates(obj.state.val)
                                          });
                                          
                                          D Offline
                                          D Offline
                                          dozwin81
                                          wrote on last edited by
                                          #108

                                          @meistertr hi, und danke für die coole arbeit die du machst, kannst du mir sagen wo und wie ich dieses script einfügen muss damit ich im mqtt die werte augegeben bekomme?

                                          1 Reply Last reply
                                          1
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          Support us

                                          ioBroker
                                          Community Adapters
                                          Donate

                                          457

                                          Online

                                          32.4k

                                          Users

                                          81.4k

                                          Topics

                                          1.3m

                                          Posts
                                          Community
                                          Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
                                          ioBroker Community 2014-2025
                                          logo
                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Recent
                                          • Tags
                                          • Unread 0
                                          • Categories
                                          • Unreplied
                                          • Popular
                                          • GitHub
                                          • Docu
                                          • Hilfe