Nachdem ich nun etwas mit diversen WLED Modulen herumexperimentiert habe und inzwischen auch im Dashboard eine brauchbare Oberfläche zur Ansteuerung von Presets nutzen kann, habe ich die im Türtorial wled beschriebene Batteriestatusanzeige nachgebaut. Der flow ist implementiert, aber nun die Frage: aus welchem flow erhält der inject node mit den SOC payloads 20-100 seine Daten? im VE-direct flow werden bei mir die SOCDaten bereitgestellt, wie kriege ich diese auf die function (set color&seg)?
Da habe ich gerade einen Nagel im Kopf , oder bin schlicht übermüdet vom Nachtdienst…
Du stellst ja im Dashboard in der Config ein, woher die Main BattData kommt. Schau mal im Flow “Sensor Dashboard” nach der Function “copy data”, dort werden je nachdem was als Main BattData angegeben ist die Werte in die globalen Variablen “MainBattVolt”, “MainBattAmps” und “MainBattSoc” kopiert.
Das heißt in diesen Variablen stehen die Werte die du brauchst. Du schreibst dann in der “set color & seg” function ganz oben:
var battery = global.get(“MainBattSoc”)
und lässt den timestamp regelmäßig laufen, damit der Wert abgefragt wird.
Danke, Vincent, das habe ich ausprobiert, die function schaut nun komplett so aus:
var battery = global.get(“MainBattSoc”)
var battery = msg.payload
flow.set(“battery”, battery)
var color_combined
var color1
var color2
var color3
var stop
var len
var ledcount = 121
if (battery <= 20) {
color1 = [255, 0, 0, 0],
color2 = [0, 0, 0, 0],
color3 = [0, 0, 0, 0]
len = ledcount/5
}
else if (battery > 20 && battery <= 40) {
color1 = [255, 180, 0, 0],
color2 = [0, 0, 0, 0],
color3 = [0, 0, 0, 0]
len = (ledcount/5)*2
}
else if (battery > 40 && battery <= 60) {
color1 = [100, 200, 150, 0],
color2 = [0, 0, 0, 0],
color3 = [0, 0, 0, 0]
len = (ledcount/5)*3
}
else if (battery > 60 && battery <= 80) {
color1 = [160, 150, 100, 0],
color2 = [0, 0, 0, 0],
color3 = [0, 0, 0, 0]
len = (ledcount/5)*4
}
else if (battery > 80 && battery <= 100) {
color1 = [0, 255, 0, 0],
color2 = [0, 0, 0, 0],
color3 = [0, 0, 0, 0]
len = (ledcount/5)*5
}
color_combined=[color1,color2,color3]
flow.set(“color”, color_combined)
flow.set(“stop”, len.toFixed(0))
flow.set(“len”, len.toFixed(0))
return msg;
leider läuft da nix ein, ich hab diverse debug nodes gesetzt um zu schauen wo überhaupt was läuft und hab auch mal direkt den VE_SOC gesetzt da hier über VE-direct (USB) die Daten eingehen. Global im Debug über das Dasboard werden die Daten auch im “MainBattSoc” angezeigt und auch ein manuelles inject wird brav an den Controller geschickt, da muss noch ein Fehler stecken und ich komme nicht drauf
Hast du eine Inject Node davor und diese so eingestellt, dass in einem bestimmten Intervall ein Timestamp geschickt wird und damit die function gestartet wird?
Jo, der läuft, aber ich hatte das Intervall versehentlich zu lang eingestellt, nun kommt im debug kontinuierlich die Meldung:
“TypeError: Cannot read properties of undefined (reading ‘toFixed’)”
Du hast in deinem Code in den ersten beiden Zeilen battery zweimal definiert.
Kannst du mal prüfen ob in deiner MainBattSoc eine Zahl oder ein String steht?
ansonsten kannst du auch einfach mal math.trunc() probieren, wenn er toFixed() nicht mag. Also ganz unten im Code die zwei Zeilen ersetzen mit:
flow.set(“stop”, Math.trunc(len))
flow.set(“len”, Math.trunc(len))
toFixed() rundet eine Zahl auf die angegebene Anzahl an Nachkommastellen, Math.trunc() schneidet einfach alles hinter dem Komma ab.
moin,
die doppelte Definition habe ich entfernt,danke! Aber die math.trunc mag er nicht, weil er vermutlich einen String erwartet. Vor dem “set payload” node erhält er eine Zahl, danach gibt er einen String aus, der LED Strip pulsiert jetzt zwar hübsch in orange, aber noch ist das nicht so wie im türtorial wled…Den flow hab ich ja komplett übernommen und nur die ip des controllers angepasst…
Aber dann passt es doch so, oder? In dem Beispielflow wird der Effekt mit der ID 12 (Fade) benutzt. Siehe List of effects and palettes · Aircoookie/WLED Wiki · GitHub
Du kannst dafür in der payload die Werte für fx (Effect Id), sx (Effect Speed) und ix (Effect intensity) entsprechend anpassen (JSON API - WLED Project)
Hey,
im Grunde ja, allerdings habe ich den flow.set am Ende nun komplett entfernt, somit auch das “beschneiden” des AusgabeWertes, ich bastel noch mal etwas drin herum und schau was passiert. Gerade ist der MainSoc auf 100 Prozent, ich schau mal ob beim entladen eine Veränderung eintritt…wenn alles klappt soll wled über Wlan einen angeschlossenen weiteren Controller synchronisieren, so daß man einen mobilen LEDStatusWürfel quasi überall in Reichweite "mitnehmen"kann…
Leider steckt noch immer ein Bug in dem Konstrukt, der Strip pulst als ganzes, aber nur einfarbig ohne irgendwelche Segmente zu verändern, im Anhang habe ich noch einmal die function und einen Screenshot vom DebugNode direkt dahinter…
var battery = global.get(“MainBattSoc”)
flow.set(“battery”, battery)
var color_combined
var color1
var color2
var color3
var stop
var len
var ledcount = 150
if (battery <= 20) {
color1 = [255, 0, 0, 0],
color2 = [0, 0, 0, 0],
color3 = [0, 0, 0, 0]
len = ledcount/5
}
else if (battery > 20 && battery <= 40) {
color1 = [255, 180, 0, 0],
color2 = [0, 0, 0, 0],
color3 = [0, 0, 0, 0]
len = (ledcount/5)*2
}
else if (battery > 40 && battery <= 60) {
color1 = [100, 200, 150, 0],
color2 = [0, 0, 0, 0],
color3 = [0, 0, 0, 0]
len = (ledcount/5)*3
}
else if (battery > 60 && battery <= 80) {
color1 = [160, 150, 100, 0],
color2 = [0, 0, 0, 0],
color3 = [0, 0, 0, 0]
len = (ledcount/5)*4
}
else if (battery > 80 && battery <= 100) {
color1 = [0, 255, 0, 0],
color2 = [0, 0, 0, 0],
color3 = [0, 0, 0, 0]
len = (ledcount/5)*5
}
color_combined=[color1,color2,color3]
flow.set( “stop”, len.toFixed(0))
flow.set( “len”, len.toFixed(0))
return msg;
Kannst du mal bitte eine Debug Node hinter die set payload function hängen?
Du kannst auch jederzeit die Variablen manuell abfragen, um zu sehen welche Werte da grade drin stehen:
in WLED direkt hast du aber die Länge des Strips richtig eingestellt, oder?
Danke dir! Im Anhang hab ich die Screenshots plaziert, das mit den Variablen wusste ich nicht, tolle Sache! Nun habe ich aber darin gesehen, daß zwei SOC´s abgelegt werden, der von MainBatt und battery, was einerseits auch stimmt, da VE_direct ja sowohl Fahrzeug als auch Zusatzbatterie hinterlegt, andererseits der flow zwei zu diskriminierende Werte erhält, je nach Zustand des Trennrelais.Da der VanPi und alle von ihm verwalteten Komponenten an der Zusatzbatterie hängen und die Fahrzeugbatterie durch das Trennrelais “geschützt” wird, interessiert mich nur die Zusatzbatterie.Hat diese einen eigenen SOC den ich definieren kann? Im wled ist die Länge des LED Strips ebenfalls hinterlegt. Mit color undefined kann ich erstmal nicht so viel anfangen, wo sollen diese indiziert/definiert werden? Im wled Controller? Durch die funktion im flow?
![Bildschirmfoto 2023-06-20 um 08.07.39|690x433](upload://iFUzDTd4
5WgGz2vNLVv1nsYGI9I.png)
Die Flow Variable color wird in der “set color & msg” function definiert. Dort befinden sich ja die if-Abfragen, die je nach Wert der Batterie die Farbe ändern. Es wird nach einer Zahl gefragt, in der “battery” Variable steht aber ein String. Der muss vorher geändert werden, also z.B. beim Zuweisen
var battery = Number(global.get(“MainBattSoc”))
Damit sollte die color Variable richtig definiert werden.
die Variable ledcount in der ersten function gibt die Länge des Strips an, also die Anzahl der LEDs wie sie auch bei WLED eingetragen sind.
Du hast da jetzt noch eine Flow Variable “MainBattSoc”, wo kommt die denn her? Ist das der Weert der Zusatzbatterie? Also Flow Variablen sind nur in dem einen Flow zugänglich, globale Variablen kann man von überall aus erreichen.
moin Vincent,
nun läuft es, vielen Dank! In meinem Fall brauchte ich den VE_SOC aus dem SensorFlow und hab das entsprechend eingebaut, der MainBattSoc ist bei mir die Fahrzeugbatterie. Hier ist die fertige Funktion:
var battery = Number(global.get(“VE_SOC”))
flow.set(“battery”, battery)
var color_combined
var color1
var color2
var color3
var stop
var len
var ledcount = 121
if (battery <= 20) {
color1 = [255, 0, 0, 0],
color2 = [0, 0, 0, 0],
color3 = [0, 0, 0, 0]
len = ledcount/5
}
else if (battery > 20 && battery <= 40) {
color1 = [255, 180, 0, 0],
color2 = [0, 0, 0, 0],
color3 = [0, 0, 0, 0]
len = (ledcount/5)*2
}
else if (battery > 40 && battery <= 60) {
color1 = [100, 200, 150, 0],
color2 = [0, 0, 0, 0],
color3 = [0, 0, 0, 0]
len = (ledcount/5)*3
}
else if (battery > 60 && battery <= 80) {
color1 = [160, 150, 100, 0],
color2 = [0, 0, 0, 0],
color3 = [0, 0, 0, 0]
len = (ledcount/5)*4
}
else if (battery > 80 && battery <= 100) {
color1 = [0, 255, 0, 0],
color2 = [0, 0, 0, 0],
color3 = [0, 0, 0, 0]
len = (ledcount/5)*5
}
color_combined=[color1,color2,color3]
flow.set(“color”, color_combined)
flow.set(“stop”, len.toFixed(0))
flow.set(“len”, len.toFixed(0))
return msg;
Die Flow Outputs haben mir sehr geholfen.Auch wenn ich noch Verständnislücken innerhalb der einzelnen Funktionen habe, das wird mit der Zeit sicher klar werden…
Der komplette lauffähige Flow basierend auf dem cod.m WLED Controller und der Victron Hardware BMV 712 mit VE-Direct zu USB sieht so aus:
[{"id":"ac917812170a8e46","type":"tab","label":"WLED Battstat","disabled":false,"info":"","env":[]},{"id":"04be85805379b060","type":"debug","z":"ac917812170a8e46","name":"Effects","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1110,"y":180,"wires":[]},{"id":"ea1a3c7c1b5e6b94","type":"http request","z":"ac917812170a8e46","name":"POST to WLED","method":"POST","ret":"obj","paytoqs":"query","url":"http://192.168.1.85/json/state","tls":"","persist":false,"proxy":"","authType":"","x":1140,"y":140,"wires":[["4c95ecd0bdd53d7f"]]},{"id":"4c95ecd0bdd53d7f","type":"debug","z":"ac917812170a8e46","name":"response","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1300,"y":140,"wires":[]},{"id":"951307ec40a370c8","type":"inject","z":"ac917812170a8e46","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"20","payloadType":"num","x":90,"y":160,"wires":[["0cb5bbbefa09f1ad"]]},{"id":"0cb5bbbefa09f1ad","type":"function","z":"ac917812170a8e46","name":"set color & seg","func":"var battery = Number(global.get(\"VE_SOC\"))\nflow.set(\"battery\", battery)\nvar color_combined\nvar color1\nvar color2\nvar color3\nvar stop\nvar len\nvar ledcount = 121\n\nif (battery <= 20) {\n color1 = [255, 0, 0, 0],\n color2 = [0, 0, 0, 0],\n color3 = [0, 0, 0, 0]\n len = ledcount/5\n}\nelse if (battery > 20 && battery <= 40) {\n color1 = [255, 180, 0, 0],\n color2 = [0, 0, 0, 0],\n color3 = [0, 0, 0, 0]\n len = (ledcount/5)*2\n}\nelse if (battery > 40 && battery <= 60) {\n color1 = [100, 200, 150, 0],\n color2 = [0, 0, 0, 0],\n color3 = [0, 0, 0, 0]\n len = (ledcount/5)*3\n}\nelse if (battery > 60 && battery <= 80) {\n color1 = [160, 150, 100, 0],\n color2 = [0, 0, 0, 0],\n color3 = [0, 0, 0, 0]\n len = (ledcount/5)*4\n}\nelse if (battery > 80 && battery <= 100) {\n color1 = [0, 255, 0, 0],\n color2 = [0, 0, 0, 0],\n color3 = [0, 0, 0, 0]\n len = (ledcount/5)*5\n}\n\ncolor_combined=[color1,color2,color3]\nflow.set(\"color\", color_combined)\nflow.set(\"stop\", len.toFixed(0))\nflow.set(\"len\", len.toFixed(0))\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":320,"y":260,"wires":[["e9691de5a0316eac","7e1b8bd9c5b1da4f"]]},{"id":"8237f0f4406aead4","type":"inject","z":"ac917812170a8e46","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"40","payloadType":"num","x":90,"y":220,"wires":[["0cb5bbbefa09f1ad"]]},{"id":"5649729d88b8ba04","type":"inject","z":"ac917812170a8e46","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"60","payloadType":"num","x":90,"y":260,"wires":[["0cb5bbbefa09f1ad"]]},{"id":"5b12d0386d410c60","type":"inject","z":"ac917812170a8e46","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"80","payloadType":"num","x":90,"y":300,"wires":[["0cb5bbbefa09f1ad"]]},{"id":"9dd1a743ace60423","type":"inject","z":"ac917812170a8e46","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"100","payloadType":"num","x":90,"y":340,"wires":[["0cb5bbbefa09f1ad"]]},{"id":"e9691de5a0316eac","type":"function","z":"ac917812170a8e46","name":"set payload","func":"var color = flow.get(\"color\")\nvar stop = flow.get(\"stop\")\nvar len = flow.get(\"len\")\n\nmsg.payload = {\n \"on\":true,\n \"bri\":130,\n \"transition\":1,\n \"seg\": [{\n \"start\": 0,\n \"stop\": stop,\n \"len\": len,\n \"col\": color,\n \"fx\": 12,\n \"sx\": 20,\n \"ix\": 25,\n \"pal\": 0,\n \"sel\": true,\n \"rev\": false,\n \"cln\": -1\n }]\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":510,"y":260,"wires":[["8b0b6b9b6e60c1f6","e6c347075aa118d9"]]},{"id":"8b0b6b9b6e60c1f6","type":"http request","z":"ac917812170a8e46","name":"POST to WLED","method":"POST","ret":"obj","paytoqs":"query","url":"http://192.168.1.57/json/state","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":720,"y":320,"wires":[[]]},{"id":"e6c347075aa118d9","type":"debug","z":"ac917812170a8e46","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":710,"y":160,"wires":[]},{"id":"55f97b4f9c13f986","type":"comment","z":"ac917812170a8e46","name":"change sequence length based on battery stats","info":"","x":400,"y":40,"wires":[]},{"id":"25984c92d33ee1a6","type":"inject","z":"ac917812170a8e46","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"4","crontab":"","once":true,"onceDelay":"14","topic":"","payload":"","payloadType":"date","x":110,"y":100,"wires":[["0cb5bbbefa09f1ad"]]},{"id":"7e1b8bd9c5b1da4f","type":"debug","z":"ac917812170a8e46","name":"debug 66","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":520,"y":400,"wires":[]}]
hier muss ggf.die SOC Variable angepasst und die IP des WLED Controllers verändert werden. Über die “set payload” lassen sich unzählige z.t. sehr kreative Variationen erstellen.Der gesamte flow taugt auch als Basis um z.B. Luftdruck,Temperatur,Geschwindigkeit etc. in eine LED Ausgabe zu schicken.
Moin zusammen
WLED hat mich auch erreicht, hab auch schon ein bischen damit rumgebastelt.
Aber ich komme trotzem nicht weiter, im Beispiel wird immer nur ein Segment angesprochen.
ich würde aber gerne 6 Segmente auf das Stripe packen, und die alle gleichzeitig mit verschiedenen Efekten und Farben ansteuern. z.B Segment1LED 0-10, Farbe rot, Efekt Solit ; Segment 2 LED 11-20, Farbe grün, Efekt Android; usw.
Hat da einer eine Idee???
Gruß Arno
Hallo
Ich habs geschafft, 6 Segmente mit 13x3 insgesamt (188)
LEDs ca.1,8m. Für jedes Element, je 2 Segmente für Strom, Wasser, Abwasser.
Je 2 sind ineinander variabel verschachtelt, für voll und leer.
Wenns fertig ist sellele ich den Flow rein.
Gruß Arno
Einen guten Grundstock zum weiter basteln hab ich jetzt geschafft.
Man kann 3 Statusmeldungen anbinden mit je 13 LEDs (bei dem ws 2811 sind immer 3 LEDs in Reihe geschaltet, daher sind es 39 LEDs) die LED ändern von 0-100% gleitend die Farbe bzw. den Effekt.
Wenn der Türkontakt oder der Schalter im Display betätigt wird, geht die Statusbeleuchtung für 30 Sekunden an, zusätzlich gibt es einen Taster der über die gesamte Länge ca. 1,90m warm weißes Licht gedimmt einschaltet. Über einen Slider kann die Helligkeit beeinflußt werden.
Farbe ändern bekomme ich leider nicht hin, im unteren Bereich des Flow gibt es ein paar Ansätze, die eventuell weiter entwickelt werden könnten.
[{"id":"984bcf796bfc4df8","type":"tab","label":"W-LED","disabled":false,"info":"","env":[]},{"id":"7c41cc8bcf055d93","type":"inject","z":"984bcf796bfc4df8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"1","payload":"25","payloadType":"num","x":150,"y":660,"wires":[["6914d5adcdb542d1"]]},{"id":"f5a1a08a46515ec2","type":"inject","z":"984bcf796bfc4df8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"1","payload":"57","payloadType":"num","x":150,"y":740,"wires":[["6914d5adcdb542d1"]]},{"id":"a7624d274360eaaf","type":"inject","z":"984bcf796bfc4df8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"1","payload":"75","payloadType":"num","x":150,"y":780,"wires":[["6914d5adcdb542d1"]]},{"id":"1b6ccaa2711de9ca","type":"inject","z":"984bcf796bfc4df8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"1","payload":"100","payloadType":"num","x":150,"y":820,"wires":[["6914d5adcdb542d1"]]},{"id":"7f317e4ccfeeaa67","type":"inject","z":"984bcf796bfc4df8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"1","payload":"0","payloadType":"num","x":150,"y":620,"wires":[["6914d5adcdb542d1"]]},{"id":"801249cbc6c9849d","type":"inject","z":"984bcf796bfc4df8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"1","payload":"50","payloadType":"num","x":150,"y":700,"wires":[["6914d5adcdb542d1"]]},{"id":"6914d5adcdb542d1","type":"range","z":"984bcf796bfc4df8","minin":"0","maxin":"100","minout":"0","maxout":"100","action":"scale","round":false,"property":"payload","name":"","x":360,"y":700,"wires":[["c480264947806264"]]},{"id":"ae3346140e14f3a6","type":"function","z":"984bcf796bfc4df8","name":"global.get (\"Level1\")","func":"var level =global.get (\"Level1\")\nmsg.payload = level\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":380,"y":480,"wires":[["7833a12cbdf1f6a9"]]},{"id":"7833a12cbdf1f6a9","type":"debug","z":"984bcf796bfc4df8","name":"debug 2","active":false,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":620,"y":480,"wires":[]},{"id":"16c769202429aec2","type":"inject","z":"984bcf796bfc4df8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":150,"y":480,"wires":[["ae3346140e14f3a6"]]},{"id":"c480264947806264","type":"range","z":"984bcf796bfc4df8","minin":"0","maxin":"100","minout":"2","maxout":"13","action":"clamp","round":true,"property":"payload","name":"","x":510,"y":700,"wires":[["69bd5f2414289222","23010d7465129f21"]]},{"id":"69bd5f2414289222","type":"function","z":"984bcf796bfc4df8","name":"Ende und Länge ID0","func":"\nvar ende = msg.payload\n\nflow.set (\"stop0\",ende)\n\nflow.set(\"color6\", [0,0,0,0])\nflow.set(\"start6\", 0)\nflow.set(\"len6\", 0)\nflow.set(\"stop6\", 0)\n\nflow.set(\"bri\", 255)\n\nreturn msg","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":720,"y":680,"wires":[[]]},{"id":"23010d7465129f21","type":"function","z":"984bcf796bfc4df8","name":"set color & seg","func":"var battery = msg.payload\nflow.set(\"battery\", battery)\nvar color_combined0\nvar color_combined1\nvar color1 = [0, 100, 0, 0]\nvar color2 = [0, 0, 0, 0]\nvar color3 = [0, 0, 0, 0]\nvar stop\nvar len\n\n\nvar color11 = [255, 0, 0, 0]\nvar color12 = [0, 0, 0, 0]\nvar color13 = [0, 0, 0, 0]\n\nvar stop0 = flow.get (\"stop0\")\nvar start0 = 0\nvar len0 = (start0 + stop0)\n\nvar stop1 = 13\nvar start1 = stop0\nvar len1 = (stop1-start1)\n\n\n\n\n\n\n\n\n\n\ncolor_combined0=[color1,color2,color3]\nflow.set(\"color0\", color_combined0)\ncolor_combined1=[color11,color12,color13]\nflow.set(\"color1\", color_combined1)\n\nflow.set(\"start0\", start0)\nflow.set(\"len0\", len0)\nflow.set(\"stop0\", stop0)\n\nflow.set(\"start1\", start1)\nflow.set(\"len1\", len1)\nflow.set(\"stop1\", stop1)\n\nflow.set(\"bri\", 255)\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":720,"y":740,"wires":[["9817295514f811c1"]]},{"id":"9817295514f811c1","type":"function","z":"984bcf796bfc4df8","name":"set payload","func":"var color = flow.get(\"color0\")\nvar stop = flow.get(\"stop0\")\nvar len = flow.get(\"len0\")\nvar start = flow.get(\"start0\")\nvar color1 = flow.get(\"color1\")\nvar stop1 = flow.get(\"stop1\")\nvar len1 = flow.get(\"len1\")\nvar start1 = flow.get(\"start1\")\n\nvar color2 = flow.get(\"color2\")\nvar stop2 = flow.get(\"stop2\")\nvar len2 = flow.get(\"len2\")\nvar start2 = flow.get(\"start2\")\nvar color3 = flow.get(\"color3\")\nvar stop3 = flow.get(\"stop3\")\nvar len3 = flow.get(\"len3\")\nvar start3 = flow.get(\"start3\")\n\nvar color4 = flow.get(\"color4\")\nvar stop4 = flow.get(\"stop4\")\nvar len4 = flow.get(\"len4\")\nvar start4 = flow.get(\"start4\")\nvar color5 = flow.get(\"color5\")\nvar stop5 = flow.get(\"stop5\")\nvar len5 = flow.get(\"len5\")\nvar start5 = flow.get(\"start5\")\n\nvar color6 = flow.get(\"color6\")\nvar stop6 = flow.get(\"stop6\")\nvar len6 = flow.get(\"len6\")\nvar start6 = flow.get(\"start6\")\n\nvar bri = flow.get(\"bri\")\n\n\nmsg.payload = {\n \"on\":true,\n \"bri\": bri,\n \"transition\":1,\n \"seg\": [{\n \"ID0\":0,\n \"start\": 0,\n \"stop\": stop,\n \"len\": len,\n \"col\": color,\n \"fx\": 0,\n \"sx\": 20,\n \"ix\": 25,\n \"pal\": 0,\n \"sel\": true,\n \"rev\": false,\n \"cln\": -1,\n },\n {\n \"ID1\":1,\n \"start\": start1,\n \"stop\": stop1,\n \"len\": len1,\n \"col\": color1,\n \"fx\": 12,\n \"sx\": 20,\n \"ix\": 25,\n \"pal\": 0,\n \"sel\": true,\n \"rev\": false,\n \"cln\": -1\n },\n {\n \"ID2\": 2,\n \"start\": start2,\n \"stop\": stop2,\n \"len\": len2,\n \"col\": color2,\n \"fx\": 0,\n \"sx\": 20,\n \"ix\": 25,\n \"pal\": 0,\n \"sel\": true,\n \"rev\": false,\n \"cln\": -1,\n },\n {\n \"ID3\": 3,\n \"start\": start3,\n \"stop\": stop3,\n \"len\": len3,\n \"col\": color3,\n \"fx\": 12,\n \"sx\": 20,\n \"ix\": 25,\n \"pal\": 0,\n \"sel\": true,\n \"rev\": false,\n \"cln\": -1\n },\n {\n \"ID4\": 4,\n \"start\": start4,\n \"stop\": stop4,\n \"len\": len4,\n \"col\": color4,\n \"fx\": 12,\n \"sx\": 20,\n \"ix\": 25,\n \"pal\": 0,\n \"sel\": true,\n \"rev\": false,\n \"cln\": -1,\n },\n {\n \"ID5\": 5,\n \"start\": start5,\n \"stop\": stop5,\n \"len\": len5,\n \"col\": color5,\n \"fx\": 0,\n \"sx\": 20,\n \"ix\": 25,\n \"pal\": 0,\n \"sel\": true,\n \"rev\": false,\n \"cln\": -1\n \n },\n {\n \"ID6\": 6,\n \"start\": start6,\n \"stop\": stop6,\n \"len\": len6,\n \"col\": color6,\n \"fx\": 0,\n \"sx\": 20,\n \"ix\": 25,\n \"pal\": 0,\n \"sel\": true,\n \"rev\": false,\n \"cln\": -1\n \n }]\n \n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":930,"y":1020,"wires":[["9a2b1796e9592c6f"]]},{"id":"abca22528cecf3ac","type":"comment","z":"984bcf796bfc4df8","name":"W-LED Anzeige Strom","info":"","x":780,"y":620,"wires":[]},{"id":"9a2b1796e9592c6f","type":"http request","z":"984bcf796bfc4df8","name":"POST to WLED","method":"POST","ret":"obj","paytoqs":"query","url":"http://192.168.4.10/json/state","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":1220,"y":1020,"wires":[[]]},{"id":"498ea269467f115b","type":"inject","z":"984bcf796bfc4df8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"date","x":160,"y":160,"wires":[["98d19219ba846937","5cbe4d53a7d09811","8b6a6870dd2b4fc7","7286cfd8871b740c"]]},{"id":"98d19219ba846937","type":"http request","z":"984bcf796bfc4df8","name":"Effects","method":"GET","ret":"obj","paytoqs":"ignore","url":"http://192.168.4.10/json/eff","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":330,"y":160,"wires":[["cc52cbc721b09e54"]]},{"id":"5cbe4d53a7d09811","type":"http request","z":"984bcf796bfc4df8","name":"Palette","method":"GET","ret":"obj","paytoqs":"ignore","url":"http://192.168.4.10/json/pal","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":340,"y":200,"wires":[["fa88ad3c7a78a13f"]]},{"id":"cc52cbc721b09e54","type":"debug","z":"984bcf796bfc4df8","name":"Effects","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":470,"y":160,"wires":[]},{"id":"fa88ad3c7a78a13f","type":"debug","z":"984bcf796bfc4df8","name":"Palette","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":480,"y":200,"wires":[]},{"id":"8b6a6870dd2b4fc7","type":"http request","z":"984bcf796bfc4df8","name":"Info","method":"GET","ret":"obj","paytoqs":"ignore","url":"http://192.168.4.10/json/info","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":330,"y":240,"wires":[["5ad4d0345b882e98"]]},{"id":"7286cfd8871b740c","type":"http request","z":"984bcf796bfc4df8","name":"State","method":"GET","ret":"obj","paytoqs":"ignore","url":"http://192.168.4.10/json/state","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":330,"y":280,"wires":[["ba98b45b63681649"]]},{"id":"5ad4d0345b882e98","type":"debug","z":"984bcf796bfc4df8","name":"Info","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":470,"y":240,"wires":[]},{"id":"ba98b45b63681649","type":"debug","z":"984bcf796bfc4df8","name":"State","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":470,"y":280,"wires":[]},{"id":"202df0fd64154f7a","type":"inject","z":"984bcf796bfc4df8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"date","x":720,"y":100,"wires":[["93e586e52bf5f50c"]]},{"id":"f9b21e06c3ab2dd5","type":"inject","z":"984bcf796bfc4df8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"date","x":720,"y":140,"wires":[["1563ad15b873ed43"]]},{"id":"785335d9d7d2f5bf","type":"inject","z":"984bcf796bfc4df8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"date","x":720,"y":180,"wires":[["17788265de876ace"]]},{"id":"dbb6e32ec41f507d","type":"inject","z":"984bcf796bfc4df8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"date","x":720,"y":220,"wires":[["d80d43bc6219c6ac"]]},{"id":"93e586e52bf5f50c","type":"function","z":"984bcf796bfc4df8","name":"on:255","func":"msg.payload = {\"on\":true,\"bri\":255}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":890,"y":100,"wires":[["e09f4aefe7672897","7332a3e1e8fde049"]]},{"id":"1563ad15b873ed43","type":"function","z":"984bcf796bfc4df8","name":"off:0","func":"msg.payload = {\"on\":false}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":890,"y":140,"wires":[["e09f4aefe7672897","7332a3e1e8fde049"]]},{"id":"17788265de876ace","type":"function","z":"984bcf796bfc4df8","name":"on: orange","func":"msg.payload = {\n \"on\":true,\n \"bri\":255,\n \"seg\": [{\n \"start\": 0,\n \"stop\": 150,\n \"len\": 150,\n \"col\": [\n [255, 160, 0, 0],\n [0, 0, 0, 0],\n [0, 0, 0, 0]\n ],\n \"fx\": 0,\n \"sx\": 127,\n \"ix\": 255,\n \"pal\": 0,\n \"sel\": true,\n \"rev\": false,\n \"cln\": -1\n }]\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":910,"y":180,"wires":[["e09f4aefe7672897","7332a3e1e8fde049"]]},{"id":"d80d43bc6219c6ac","type":"function","z":"984bcf796bfc4df8","name":"on: blue","func":"msg.payload = {\n \"on\":true,\n \"bri\":255,\n \"seg\": [{\n \"start\": 0,\n \"stop\": 150,\n \"len\": 150,\n \"col\": [\n [0, 0, 255, 0],\n [0, 0, 0, 0],\n [0, 0, 0, 0]\n ],\n \"fx\": 0,\n \"sx\": 127,\n \"ix\": 255,\n \"pal\": 0,\n \"sel\": true,\n \"rev\": false,\n \"cln\": -1\n }]\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":900,"y":220,"wires":[["e09f4aefe7672897","7332a3e1e8fde049"]]},{"id":"e09f4aefe7672897","type":"debug","z":"984bcf796bfc4df8","name":"Effects","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1150,"y":180,"wires":[]},{"id":"7332a3e1e8fde049","type":"http request","z":"984bcf796bfc4df8","name":"POST to WLED","method":"POST","ret":"obj","paytoqs":"query","url":"http://192.168.4.10/json/state","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":1180,"y":140,"wires":[["3a4f075ea7d381f0"]]},{"id":"3a4f075ea7d381f0","type":"debug","z":"984bcf796bfc4df8","name":"response","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1340,"y":140,"wires":[]},{"id":"2063a356efa00f83","type":"inject","z":"984bcf796bfc4df8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"date","x":720,"y":260,"wires":[["31fc2b74308b8931"]]},{"id":"31fc2b74308b8931","type":"function","z":"984bcf796bfc4df8","name":"effect increment","func":"msg.payload = {\n \"on\":true,\n \"bri\":255,\n \"seg\": [{\n \"start\": 0,\n \"stop\": 150,\n \"len\": 150,\n \"fx\":\"~\",\n \"sx\": 127,\n \"ix\": 255,\n \"pal\": 0,\n \"sel\": true,\n \"rev\": false,\n \"cln\": -1\n }]\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":920,"y":260,"wires":[["7332a3e1e8fde049","e09f4aefe7672897"]]},{"id":"e7d844a8068225f6","type":"inject","z":"984bcf796bfc4df8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"date","x":720,"y":300,"wires":[["f7a7faad4b7ecdec"]]},{"id":"f7a7faad4b7ecdec","type":"function","z":"984bcf796bfc4df8","name":"effect increment 30","func":"msg.payload = {\n \"on\":true,\n \"bri\":255,\n \"seg\": [{\n \"start\": 0,\n \"stop\": 30,\n \"len\": 30,\n \"fx\":\"~\",\n \"sx\": 127,\n \"ix\": 255,\n \"pal\": 0,\n \"sel\": true,\n \"rev\": false,\n \"cln\": -1\n }]\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":930,"y":300,"wires":[["7332a3e1e8fde049"]]},{"id":"3a14dcea57de1e38","type":"comment","z":"984bcf796bfc4df8","name":"simple examples","info":"","x":740,"y":60,"wires":[]},{"id":"7d95dfcf03472ee1","type":"comment","z":"984bcf796bfc4df8","name":"get info from controller","info":"","x":380,"y":120,"wires":[]},{"id":"93cd5480e9159d7f","type":"inject","z":"984bcf796bfc4df8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"date","x":720,"y":340,"wires":[["1fd7e4528eeda7c7"]]},{"id":"1fd7e4528eeda7c7","type":"function","z":"984bcf796bfc4df8","name":"on: WW","func":"msg.payload = {\n \"on\":true,\n \"bri\":255,\n \"seg\": [{\n \"start\": 0,\n \"stop\": 150,\n \"len\": 150,\n \"col\": [\n [210, 150, 100,0],\n [0, 0, 0, 0],\n [0, 0, 0, 0]\n ],\n \"fx\": 0,\n \"sx\": 127,\n \"ix\": 255,\n \"pal\": 0,\n \"sel\": true,\n \"rev\": false,\n \"cln\": -1\n }]\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":900,"y":340,"wires":[["7332a3e1e8fde049","e09f4aefe7672897"]]},{"id":"ed7ade050a032154","type":"inject","z":"984bcf796bfc4df8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"1","payload":"25","payloadType":"num","x":150,"y":940,"wires":[["23e0bedb2aec19e7"]]},{"id":"1d9ed3718067f709","type":"inject","z":"984bcf796bfc4df8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"1","payload":"57","payloadType":"num","x":150,"y":1020,"wires":[["23e0bedb2aec19e7"]]},{"id":"679db549b67a4858","type":"inject","z":"984bcf796bfc4df8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"1","payload":"75","payloadType":"num","x":150,"y":1060,"wires":[["23e0bedb2aec19e7"]]},{"id":"231283c761c67d70","type":"inject","z":"984bcf796bfc4df8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"1","payload":"100","payloadType":"num","x":150,"y":1100,"wires":[["23e0bedb2aec19e7"]]},{"id":"d08d8aac4f0852eb","type":"inject","z":"984bcf796bfc4df8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"1","payload":"0","payloadType":"num","x":150,"y":900,"wires":[["23e0bedb2aec19e7"]]},{"id":"c3a264659373872a","type":"inject","z":"984bcf796bfc4df8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"1","payload":"50","payloadType":"num","x":150,"y":980,"wires":[["23e0bedb2aec19e7"]]},{"id":"23e0bedb2aec19e7","type":"range","z":"984bcf796bfc4df8","minin":"0","maxin":"100","minout":"0","maxout":"100","action":"scale","round":false,"property":"payload","name":"","x":360,"y":980,"wires":[["9af88c24f5ff15fc"]]},{"id":"9af88c24f5ff15fc","type":"range","z":"984bcf796bfc4df8","minin":"0","maxin":"100","minout":"13","maxout":"26","action":"clamp","round":true,"property":"payload","name":"","x":520,"y":980,"wires":[["fae4f7d2f45e2dac","fe92fb95b3a31610"]]},{"id":"fae4f7d2f45e2dac","type":"function","z":"984bcf796bfc4df8","name":"Ende und Länge ID0","func":"\nvar ende = msg.payload\nflow.set (\"stop2\",ende)\nreturn msg","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":720,"y":960,"wires":[[]]},{"id":"fe92fb95b3a31610","type":"function","z":"984bcf796bfc4df8","name":"set color & seg","func":"var wasser = msg.payload\nflow.set(\"wasser\", wasser)\nvar color_combined2\nvar color_combined3\nvar color1 = [100, 149, 237, 0]\nvar color2 = [0, 0, 0, 0]\nvar color3 = [0, 0, 0, 0]\nvar stop\nvar len\nvar stop2\n\nvar color11 = [255, 0, 0, 0]\nvar color12 = [0, 0, 0, 0]\nvar color13 = [0, 0, 0, 0]\n\nvar stop0 = flow.get (\"stop2\")\nvar start0 = 13\nvar len0 = (start0 + stop0)\n\nvar stop1 = 26\nvar start1 = stop0\nvar len1 = (stop1-start1)\n\ncolor_combined2=[color1,color2,color3]\nflow.set(\"color2\", color_combined2)\ncolor_combined3=[color11,color12,color13]\nflow.set(\"color3\", color_combined3)\n\nflow.set(\"start2\", start0)\nflow.set(\"len2\", len0)\nflow.set(\"stop2\", stop0)\n\nflow.set(\"start3\", start1)\nflow.set(\"len3\", len1)\nflow.set(\"stop3\", stop1)\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":720,"y":1020,"wires":[["9817295514f811c1"]]},{"id":"c3c4984024228d13","type":"comment","z":"984bcf796bfc4df8","name":"W-LED Anzeige Wasser","info":"","x":780,"y":900,"wires":[]},{"id":"ad635c6f7ca9db49","type":"inject","z":"984bcf796bfc4df8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"1","payload":"25","payloadType":"num","x":150,"y":1220,"wires":[["9d5f579d6baf19c2"]]},{"id":"8ad582f58ed7e83c","type":"inject","z":"984bcf796bfc4df8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"1","payload":"57","payloadType":"num","x":150,"y":1300,"wires":[["9d5f579d6baf19c2"]]},{"id":"d36ceb2ef4508fa2","type":"inject","z":"984bcf796bfc4df8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"1","payload":"75","payloadType":"num","x":150,"y":1340,"wires":[["9d5f579d6baf19c2"]]},{"id":"8b099f2abe40c097","type":"inject","z":"984bcf796bfc4df8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"1","payload":"100","payloadType":"num","x":150,"y":1380,"wires":[["9d5f579d6baf19c2"]]},{"id":"474932bce3db6304","type":"inject","z":"984bcf796bfc4df8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"1","payload":"0","payloadType":"num","x":150,"y":1180,"wires":[["9d5f579d6baf19c2"]]},{"id":"adc56c130bebc962","type":"inject","z":"984bcf796bfc4df8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"1","payload":"50","payloadType":"num","x":150,"y":1260,"wires":[["9d5f579d6baf19c2"]]},{"id":"9d5f579d6baf19c2","type":"range","z":"984bcf796bfc4df8","minin":"0","maxin":"100","minout":"0","maxout":"100","action":"scale","round":false,"property":"payload","name":"","x":360,"y":1260,"wires":[["e29c31cf3bb1750e"]]},{"id":"e29c31cf3bb1750e","type":"range","z":"984bcf796bfc4df8","minin":"0","maxin":"100","minout":"26","maxout":"39","action":"clamp","round":true,"property":"payload","name":"","x":520,"y":1260,"wires":[["8952a5669244c06d","0ee9ea8fd5d936d0"]]},{"id":"8952a5669244c06d","type":"function","z":"984bcf796bfc4df8","name":"Ende und Länge ID0","func":"\nvar ende = msg.payload\nflow.set (\"stop4\",ende)\nreturn msg","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":720,"y":1240,"wires":[[]]},{"id":"0ee9ea8fd5d936d0","type":"function","z":"984bcf796bfc4df8","name":"set color & seg","func":"var abwasser = msg.payload\nflow.set(\"abwasser\", abwasser)\nvar color_combined4\nvar color_combined5\nvar color1 = [139, 90, 43, 0]\nvar color2 = [0, 0, 0, 0]\nvar color3 = [0, 0, 0, 0]\nvar stop\nvar len\nvar stop4\n\nvar color11 = [0, 100, 0, 0]\nvar color12 = [0, 0, 0, 0]\nvar color13 = [0, 0, 0, 0]\n\nvar stop0 = flow.get (\"stop4\")\nvar start0 = 26\nvar len0 = (start0 + stop0)\n\nvar stop1 = 39\nvar start1 = stop0\nvar len1 = (stop1-start1)\n\ncolor_combined4=[color1,color2,color3]\nflow.set(\"color4\", color_combined4)\ncolor_combined5=[color11,color12,color13]\nflow.set(\"color5\", color_combined5)\n\nflow.set(\"start4\", start0)\nflow.set(\"len4\", len0)\nflow.set(\"stop4\", stop0)\n\nflow.set(\"start5\", start1)\nflow.set(\"len5\", len1)\nflow.set(\"stop5\", stop1)\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":720,"y":1300,"wires":[["9817295514f811c1"]]},{"id":"4cb5e771e08ba053","type":"comment","z":"984bcf796bfc4df8","name":"W-LED Anzeige Abwasser","info":"","x":790,"y":1180,"wires":[]},{"id":"4524b089cda43330","type":"inject","z":"984bcf796bfc4df8","name":"Taster Aus","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":"1","topic":"","payload":"","payloadType":"date","x":150,"y":1500,"wires":[["c620cc0ecb8e289c"]]},{"id":"0ec6eccbfdeedf27","type":"function","z":"984bcf796bfc4df8","name":"off:0","func":"msg.payload = {\"on\":false}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1030,"y":1460,"wires":[["9a2b1796e9592c6f"]]},{"id":"05ee22717c983d6d","type":"function","z":"984bcf796bfc4df8","name":"global.get Türkontakt","func":"var level =global.get (\"schalter10\")\nmsg.payload \n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":620,"y":1460,"wires":[["7a4592b2797b3c76"]]},{"id":"7a4592b2797b3c76","type":"mytimeout","z":"984bcf796bfc4df8","name":"","outtopic":"","outsafe":"","outwarning":"Warning","outunsafe":"off","warning":"5","timer":"30","debug":false,"ndebug":false,"ignoreCase":false,"repeat":false,"again":false,"x":830,"y":1460,"wires":[["0ec6eccbfdeedf27"],[]]},{"id":"2fee2bda6138d332","type":"inject","z":"984bcf796bfc4df8","name":"Taster WW","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":140,"y":1560,"wires":[["044fee55717a7b1c"]]},{"id":"694f733ce17bc901","type":"function","z":"984bcf796bfc4df8","name":"on: Farbe","func":"var bri = flow.get(\"bri\")\nvar color = flow.get(\"colordinett\")\n\n\n\nmsg.payload = {\n \"on\":true,\n \"bri\": bri ,\n \"seg\": [{\n \"start\": 0,\n \"stop\": 150,\n \"len\": 150,\n \"col\": color,\n \"fx\": 0,\n \"sx\": 127,\n \"ix\": 255,\n \"pal\": 0,\n \"sel\": true,\n \"rev\": false,\n \"cln\": -1\n }]\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":620,"y":1640,"wires":[["9a2b1796e9592c6f"]]},{"id":"a8948779ee351763","type":"ui_slider","z":"984bcf796bfc4df8","name":"Dimmer Dinett","label":"Dimmer Dinett","tooltip":"","group":"764326e280fa9577","order":2,"width":0,"height":0,"passthru":true,"outs":"end","topic":"topic","topicType":"msg","min":"10","max":"255","step":"10","x":200,"y":1640,"wires":[["2e169a8b02a2c9e0"]]},{"id":"7a2c0b3a72c3030d","type":"ui_switch","z":"984bcf796bfc4df8","name":"","label":"Ambiente Dinett","tooltip":"","group":"764326e280fa9577","order":1,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"topic","topicType":"msg","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","animate":true,"x":300,"y":1560,"wires":[["044fee55717a7b1c","2ed8f08e388f707e"]]},{"id":"e788c4a752268da1","type":"debug","z":"984bcf796bfc4df8","name":"Farbe","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":850,"y":1940,"wires":[]},{"id":"987e6f9722375d18","type":"ui_switch","z":"984bcf796bfc4df8","name":"","label":"Stausanforderung","tooltip":"","group":"764326e280fa9577","order":4,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"topic","topicType":"msg","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","animate":false,"x":350,"y":1460,"wires":[["05ee22717c983d6d","0ee9ea8fd5d936d0","fe92fb95b3a31610","23010d7465129f21"]]},{"id":"044fee55717a7b1c","type":"function","z":"984bcf796bfc4df8","name":"on: warm weiß","func":"//var bri = flow.get(\"briww\")\nvar color = flow.get(\"colorww\")\nvar color_combined\nvar color1 = [255, 170, 88, 0]\nvar color2 = [0, 0, 0, 0]\nvar color3 = [0, 0, 0, 0]\n\nmsg.payload = {\n \"on\":true,\n \"bri\":90,\n \"seg\": [{\n \"start\": 0,\n \"stop\": 150,\n \"len\": 150,\n \"col\": color, \n \"fx\": 0,\n \"sx\": 127,\n \"ix\": 255,\n \"pal\": 0,\n \"sel\": true,\n \"rev\": false,\n \"cln\": -1\n }]\n}\n\ncolor_combined = [color1, color2, color3]\nflow.set(\"color6\", color_combined)\n\n\nflow.set(\"start6\", 0)\nflow.set(\"len6\", 39)\nflow.set(\"stop6\", 39)\n\nflow.set(\"bri\", 90)\n\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":480,"y":1560,"wires":[["9817295514f811c1"]]},{"id":"2e169a8b02a2c9e0","type":"function","z":"984bcf796bfc4df8","name":"Dimmer","func":"var bri = msg.paylod\nflow.set(\"bri\",msg.payload)\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":400,"y":1640,"wires":[["694f733ce17bc901"]]},{"id":"5b11cf80c7ba8cb3","type":"inject","z":"984bcf796bfc4df8","name":"Türkontakt","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"true","payloadType":"bool","x":140,"y":1460,"wires":[["987e6f9722375d18"]]},{"id":"2ed8f08e388f707e","type":"function","z":"984bcf796bfc4df8","name":"off:0","func":"msg.payload = {false:\"on\"}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":650,"y":1560,"wires":[[]]},{"id":"c004591bcadd8a91","type":"http request","z":"984bcf796bfc4df8","d":true,"name":"POST to WLED","method":"POST","ret":"obj","paytoqs":"query","url":"http://192.168.1.85/json/state","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":1120,"y":1980,"wires":[[]]},{"id":"70fa89b975de4e79","type":"function","z":"984bcf796bfc4df8","name":"on: Farbe","func":"var bri = flow.get(\"bri\")\nvar color = flow.get(\"colorDinett\")\n\n\n\nmsg.payload = {\n \"on\":true,\n \"bri\": bri ,\n \"seg\": [{\n \"start\": 0,\n \"stop\": 150,\n \"len\": 150,\n \"col\": color,\n \"fx\": 0,\n \"sx\": 127,\n \"ix\": 255,\n \"pal\": 0,\n \"sel\": true,\n \"rev\": false,\n \"cln\": -1\n }]\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":580,"y":1980,"wires":[["c004591bcadd8a91","23343176c64b1ef2"]]},{"id":"0e31ac8a44de4537","type":"ui_colour_picker","z":"984bcf796bfc4df8","d":true,"name":"Farbe Dinett","label":"Farbe Dinett","group":"764326e280fa9577","format":"rgb","outformat":"string","showSwatch":true,"showPicker":false,"showValue":false,"showHue":false,"showAlpha":false,"showLightness":true,"square":"false","dynOutput":"false","order":6,"width":0,"height":0,"passthru":true,"topic":"topic","topicType":"msg","x":150,"y":1940,"wires":[["ec5947fdaa82c9d8"]]},{"id":"4e4ef75f028fba4d","type":"ui_slider","z":"984bcf796bfc4df8","d":true,"name":"","label":"Helligkeit Dinett","tooltip":"","group":"764326e280fa9577","order":9,"width":0,"height":0,"passthru":true,"outs":"all","topic":"topic","topicType":"msg","min":"10","max":"255","step":"10","x":160,"y":1980,"wires":[["4e383768e00ef07e"]]},{"id":"4e383768e00ef07e","type":"function","z":"984bcf796bfc4df8","name":"Dimmer","func":"var bri = msg.paylod\nflow.set(\"bri\",msg.payload)\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":400,"y":1980,"wires":[["70fa89b975de4e79"]]},{"id":"ee58fe84f011fefa","type":"function","z":"984bcf796bfc4df8","name":"Farbe","func":"var color_combined\nvar color = msg.paylod\n//flow.set(\"colorDinett\",msg.payload)\nvar color1 = [color]\nvar color2 = [0, 0, 0, 0]\nvar color3 = [0, 0, 0, 0]\n\ncolor_combined = [color1, color2, color3]\nflow.set(\"colorDinett\", color_combined)\nflow.set(\"color6\", color_combined)\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":630,"y":1940,"wires":[["e788c4a752268da1"]]},{"id":"ec5947fdaa82c9d8","type":"change","z":"984bcf796bfc4df8","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"$split(payload, /\\(|,|\\)/)[[1..3]].$number($trim($))\t","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":430,"y":1940,"wires":[["ee58fe84f011fefa","70fa89b975de4e79"]]},{"id":"650df678adc940c4","type":"ui_colour_picker","z":"984bcf796bfc4df8","d":true,"name":"Farbe Dinett","label":"Farbe Dinett","group":"764326e280fa9577","format":"rgb","outformat":"object","showSwatch":true,"showPicker":false,"showValue":false,"showHue":false,"showAlpha":false,"showLightness":true,"square":"false","dynOutput":"false","order":7,"width":0,"height":0,"passthru":true,"topic":"colour","topicType":"str","x":290,"y":2100,"wires":[["2b8142b831ba206d"]]},{"id":"2b8142b831ba206d","type":"join","z":"984bcf796bfc4df8","name":"","mode":"custom","build":"merged","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":true,"timeout":"","count":"5","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":590,"y":2100,"wires":[["cb3492d6ef941ea1"]]},{"id":"a2c42fedf8646529","type":"change","z":"984bcf796bfc4df8","name":"","rules":[{"t":"move","p":"payload","pt":"msg","to":"payload.bri","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":360,"y":2140,"wires":[["2b8142b831ba206d"]]},{"id":"cb3492d6ef941ea1","type":"change","z":"984bcf796bfc4df8","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\t \"on\":true,\t \"bri\": $$.payload.bri , \t \"seg\": [{\t \"id\":6,\t \"start\": 0,\t \"stop\": 150,\t \"len\": 150,\t \"col\": [$$.payload.r, $$.payload.g ,$$.payload.b, 0],\t \"fx\": 0,\t \"sx\": 127,\t \"ix\": 255,\t \"pal\": 0,\t \"sel\": true,\t \"rev\": false,\t \"cln\": -1\t }]\t}","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":790,"y":2100,"wires":[["1bfc13c35e99442c","838e109b884cbc09"]]},{"id":"2c6ca795b5281352","type":"ui_slider","z":"984bcf796bfc4df8","d":true,"name":"","label":"Helligkeit Dinett","tooltip":"","group":"764326e280fa9577","order":3,"width":0,"height":0,"passthru":true,"outs":"all","topic":"brightness","topicType":"str","min":"10","max":"255","step":"10","x":120,"y":2160,"wires":[["a2c42fedf8646529"]]},{"id":"1bfc13c35e99442c","type":"debug","z":"984bcf796bfc4df8","name":"Farbe","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"true","targetType":"full","statusVal":"payload","statusType":"auto","x":1070,"y":2100,"wires":[]},{"id":"838e109b884cbc09","type":"ui_text","z":"984bcf796bfc4df8","d":true,"group":"4dcefd65ae905569","order":2,"width":0,"height":0,"name":"","label":"text","format":"{{msg.payload}}","layout":"row-spread","x":1030,"y":2160,"wires":[]},{"id":"9b5ab4a88b2fd2f3","type":"ui_colour_picker","z":"984bcf796bfc4df8","d":true,"name":"Farbe Dinett","label":"Farbe Dinett","group":"764326e280fa9577","format":"rgb","outformat":"string","showSwatch":true,"showPicker":false,"showValue":false,"showHue":false,"showAlpha":false,"showLightness":true,"square":"false","dynOutput":"false","order":8,"width":0,"height":0,"passthru":true,"topic":"topic","topicType":"msg","x":250,"y":2220,"wires":[["f0319700cce51677"]]},{"id":"dbdc6fb4ea1dc94e","type":"debug","z":"984bcf796bfc4df8","name":"Farbe","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":910,"y":2220,"wires":[]},{"id":"f0319700cce51677","type":"change","z":"984bcf796bfc4df8","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"rgb","fromt":"str","to":"","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"(","fromt":"str","to":"","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":")","fromt":"str","to":",0","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":430,"y":2220,"wires":[["dbdc6fb4ea1dc94e","403d800c699f3a89"]]},{"id":"403d800c699f3a89","type":"function","z":"984bcf796bfc4df8","name":"Farbe","func":"var color = msg.paylod\nflow.set(\"colorDinett\",msg.payload)\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":650,"y":2220,"wires":[[]]},{"id":"23343176c64b1ef2","type":"debug","z":"984bcf796bfc4df8","name":"Farbe","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":870,"y":2000,"wires":[]},{"id":"c620cc0ecb8e289c","type":"ui_switch","z":"984bcf796bfc4df8","name":"","label":"Dinett AUS","tooltip":"","group":"764326e280fa9577","order":5,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"topic","topicType":"msg","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","animate":false,"x":330,"y":1500,"wires":[["0ec6eccbfdeedf27"]]},{"id":"764326e280fa9577","type":"ui_group","name":"W-Led","tab":"2fa37e0c8559eb92","order":7,"disp":true,"width":"6","collapse":false},{"id":"4dcefd65ae905569","type":"ui_group","name":"Info","tab":"c0c4a2d43d966569","order":3,"disp":true,"width":"6","collapse":false},{"id":"2fa37e0c8559eb92","type":"ui_tab","name":"Switches","icon":"mi-toggle_on","order":2,"disabled":false,"hidden":false},{"id":"c0c4a2d43d966569","type":"ui_tab","name":"Info","icon":"mi-info","order":1,"disabled":false,"hidden":false}]
Gruß
Arno
Nicht schlecht! Hab grad ein ähnliches Projekt mit den Segmenten, ist tatsächlich komplizierter als gedacht
Hab mir mal kurz deinen Ansatz mit den Farben angeguckt, aber seh da aber nicht so richtig durch.
Im Prinzip gibst du ja bei WLED drei Farben an, die dann jeweils von den verschiedenen Effekten genutzt werden. Nicht jeder Effekt benutzt jede Farbe und manche Effekte kann man auch nicht überschreiben, Stichwort “Rainbow”, der Effekt ist halt immer bunt, egal welche Farbe du einstellst.
Du hast also deine drei Farben (kann man in der WLED App sehr gut erkennen), die sind in Node-RED als Arrays dargestellt:
var color1 = [100, 149, 237, 0]
var color2 = [0, 0, 0, 0]
var color3 = [0, 0, 0, 0]
es ist dabei immer [R, G, B, A], wobei man den letzten Channel auf weglassen kann weil der eh nicht benutzt wird, also
var color1 = [100, 149, 237]
sollte eigentlich ausreichen.
Diese 3 Arrays werden dann wiederum zu einem einzelnen Array kombiniert mit
color_combined=[color1,color2,color3]
und an WLED geschickt, damit haben wir unsere drei Farben, die auch in der App angezeigt werden.
Das hast du ja auch so übernommen, wenn ich das richtig gesehen habe.
Du könntest dir jetzt zum Beispiel einen Colorpicker nehmen (ist bei den Dashboard Nodes dabei) und auf RGB einstellen, dann kannst du über das Dashboard eine Farbe auswählen und kannst sie dann weiter verarbeiten.
Achso und was mir noch aufgefallen ist: Wenn du einen Wert an die nächste Node weitergeben willst, dann kannst du diesen Wert auch zum Beispiel in msg.value speichern und in der nächsten Node damit wieder aufrufen. Das ist besser als eine Flow Variable dafür zu benutzen, weil wenn du die Flow Variable an einer anderen Stelle auch noch schreibst, dann kommt man da irgendwann durcheinander und es kann passieren dass Sachen geschaltet werden, die an dieser Stelle gar nicht passieren sollten.
Hallo Vincent
Danke für die Blumen,
das hat mich auch 2,5 Tage gkostet
In set “color und seg” lege ich die Farbe, Start- und Endpunkt fest.
Die Länge bräuchte man eigentlich nicht wenn man Start und Stop angibt.
Im 1. “set color und seg” lege ich auch die Helligkeit fest.(bri,255)
In “Ende und Länge” hole ich mir nur den Wert aus der Range Node.
Im 1. “Ende und Länge” muss die ID6 auf 0 gesetzt weden, sonst flackern alle LEDs nur noch unkontrolliert.
Da wußte ich mir nicht anders zu helfen.
In “set Payload” hole ich mir die ganzen Farben für die einzelnen Segmente rein.
Dort kann man unter IDx auch noch den Effekt (fx:12) einstellen.
Im “on:warmweiß” lege ich die Variblen für ID6 an und überschreibe die helligkeit mit (bri,90)
weil ich gedimmtes Licht haben möchte.
Das mit
var color1 = [100, 149, 237, 0] (die letzte Null ist glaube ich für den Weiß Kanal bei RGBWW)
var color2 = [0, 0, 0, 0]
var color3 = [0, 0, 0, 0]
habe ich aus eurem Beispiel, da wollte ich das Rad nicht neu erfinden.
Mit dem color picker hab ich versucht aber ich bekomme da kein Array hin das da akzeptiert wird.
Ich tue mich mit der Programmierung echt schwer, ich komme aus dem MSR Bereich,
und habe die Klimatisierung für ein Bürogebäude 20 Stockwerke 116 Controller, für 3000 Mittarbeiter programmiert, aber im Fup. Das hier ist eine komplett neu Welt für mich.
Gruß
Arno
Kleines Update
Farbe funktioniert jetzt auch
[{"id":"984bcf796bfc4df8","type":"tab","label":"W-LED","disabled":false,"info":"","env":[]},{"id":"7c41cc8bcf055d93","type":"inject","z":"984bcf796bfc4df8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"1","payload":"25","payloadType":"num","x":150,"y":660,"wires":[["6914d5adcdb542d1"]]},{"id":"f5a1a08a46515ec2","type":"inject","z":"984bcf796bfc4df8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"1","payload":"57","payloadType":"num","x":150,"y":740,"wires":[["6914d5adcdb542d1"]]},{"id":"a7624d274360eaaf","type":"inject","z":"984bcf796bfc4df8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"1","payload":"75","payloadType":"num","x":150,"y":780,"wires":[["6914d5adcdb542d1"]]},{"id":"1b6ccaa2711de9ca","type":"inject","z":"984bcf796bfc4df8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"1","payload":"100","payloadType":"num","x":150,"y":820,"wires":[["6914d5adcdb542d1"]]},{"id":"7f317e4ccfeeaa67","type":"inject","z":"984bcf796bfc4df8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"1","payload":"0","payloadType":"num","x":150,"y":620,"wires":[["6914d5adcdb542d1"]]},{"id":"801249cbc6c9849d","type":"inject","z":"984bcf796bfc4df8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"1","payload":"50","payloadType":"num","x":150,"y":700,"wires":[["6914d5adcdb542d1"]]},{"id":"6914d5adcdb542d1","type":"range","z":"984bcf796bfc4df8","minin":"0","maxin":"100","minout":"0","maxout":"100","action":"scale","round":false,"property":"payload","name":"","x":360,"y":700,"wires":[["c480264947806264"]]},{"id":"ae3346140e14f3a6","type":"function","z":"984bcf796bfc4df8","name":"global.get (\"Level1\")","func":"var level =global.get (\"Level1\")\nmsg.payload = level\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":380,"y":480,"wires":[["7833a12cbdf1f6a9"]]},{"id":"7833a12cbdf1f6a9","type":"debug","z":"984bcf796bfc4df8","name":"debug 2","active":false,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":620,"y":480,"wires":[]},{"id":"16c769202429aec2","type":"inject","z":"984bcf796bfc4df8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":150,"y":480,"wires":[["ae3346140e14f3a6"]]},{"id":"c480264947806264","type":"range","z":"984bcf796bfc4df8","minin":"0","maxin":"100","minout":"2","maxout":"13","action":"clamp","round":true,"property":"payload","name":"","x":510,"y":700,"wires":[["69bd5f2414289222","23010d7465129f21"]]},{"id":"69bd5f2414289222","type":"function","z":"984bcf796bfc4df8","name":"Ende und Länge ID0","func":"\nvar ende = msg.payload\n\nflow.set (\"stop0\",ende)\n\nflow.set(\"color6\", [0,0,0,0])\nflow.set(\"start6\", 0)\nflow.set(\"len6\", 0)\nflow.set(\"stop6\", 0)\n\nflow.set(\"bri\", 255)\n\nreturn msg","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":780,"y":680,"wires":[[]]},{"id":"23010d7465129f21","type":"function","z":"984bcf796bfc4df8","name":"set color & seg","func":"var battery = msg.payload\nflow.set(\"battery\", battery)\nvar color_combined0\nvar color_combined1\nvar color1 = [0, 100, 0, 0]\nvar color2 = [0, 0, 0, 0]\nvar color3 = [0, 0, 0, 0]\nvar stop\nvar len\n\n\nvar color11 = [255, 0, 0, 0]\nvar color12 = [0, 0, 0, 0]\nvar color13 = [0, 0, 0, 0]\n\nvar stop0 = flow.get (\"stop0\")\nvar start0 = 0\nvar len0 = (start0 + stop0)\n\nvar stop1 = 13\nvar start1 = stop0\nvar len1 = (stop1-start1)\n\ncolor_combined0=[color1,color2,color3]\nflow.set(\"color0\", color_combined0)\ncolor_combined1=[color11,color12,color13]\nflow.set(\"color1\", color_combined1)\n\nflow.set(\"start0\", start0)\nflow.set(\"len0\", len0)\nflow.set(\"stop0\", stop0)\n\nflow.set(\"start1\", start1)\nflow.set(\"len1\", len1)\nflow.set(\"stop1\", stop1)\n\nflow.set(\"bri\", 255)\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":720,"y":740,"wires":[["9817295514f811c1"]]},{"id":"9817295514f811c1","type":"function","z":"984bcf796bfc4df8","name":"set payload","func":"var color = flow.get(\"color0\")\nvar stop = flow.get(\"stop0\")\nvar len = flow.get(\"len0\")\nvar start = flow.get(\"start0\")\nvar color1 = flow.get(\"color1\")\nvar stop1 = flow.get(\"stop1\")\nvar len1 = flow.get(\"len1\")\nvar start1 = flow.get(\"start1\")\n\nvar color2 = flow.get(\"color2\")\nvar stop2 = flow.get(\"stop2\")\nvar len2 = flow.get(\"len2\")\nvar start2 = flow.get(\"start2\")\nvar color3 = flow.get(\"color3\")\nvar stop3 = flow.get(\"stop3\")\nvar len3 = flow.get(\"len3\")\nvar start3 = flow.get(\"start3\")\n\nvar color4 = flow.get(\"color4\")\nvar stop4 = flow.get(\"stop4\")\nvar len4 = flow.get(\"len4\")\nvar start4 = flow.get(\"start4\")\nvar color5 = flow.get(\"color5\")\nvar stop5 = flow.get(\"stop5\")\nvar len5 = flow.get(\"len5\")\nvar start5 = flow.get(\"start5\")\n\nvar color6 = flow.get(\"color6\")\nvar stop6 = flow.get(\"stop6\")\nvar len6 = flow.get(\"len6\")\nvar start6 = flow.get(\"start6\")\n\nvar bri = flow.get(\"bri\")\n\n\nmsg.payload = {\n \"on\":true,\n \"bri\": bri,\n \"transition\":1,\n \"seg\": [{\n \"ID0\":0,\n \"start\": 0,\n \"stop\": stop,\n \"len\": len,\n \"col\": color,\n \"fx\": 0,\n \"sx\": 20,\n \"ix\": 25,\n \"pal\": 0,\n \"sel\": true,\n \"rev\": false,\n \"cln\": -1,\n },\n {\n \"ID1\":1,\n \"start\": start1,\n \"stop\": stop1,\n \"len\": len1,\n \"col\": color1,\n \"fx\": 12,\n \"sx\": 20,\n \"ix\": 25,\n \"pal\": 0,\n \"sel\": true,\n \"rev\": false,\n \"cln\": -1\n },\n {\n \"ID2\": 2,\n \"start\": start2,\n \"stop\": stop2,\n \"len\": len2,\n \"col\": color2,\n \"fx\": 0,\n \"sx\": 20,\n \"ix\": 25,\n \"pal\": 0,\n \"sel\": true,\n \"rev\": false,\n \"cln\": -1,\n },\n {\n \"ID3\": 3,\n \"start\": start3,\n \"stop\": stop3,\n \"len\": len3,\n \"col\": color3,\n \"fx\": 12,\n \"sx\": 20,\n \"ix\": 25,\n \"pal\": 0,\n \"sel\": true,\n \"rev\": false,\n \"cln\": -1\n },\n {\n \"ID4\": 4,\n \"start\": start4,\n \"stop\": stop4,\n \"len\": len4,\n \"col\": color4,\n \"fx\": 12,\n \"sx\": 20,\n \"ix\": 25,\n \"pal\": 0,\n \"sel\": true,\n \"rev\": false,\n \"cln\": -1,\n },\n {\n \"ID5\": 5,\n \"start\": start5,\n \"stop\": stop5,\n \"len\": len5,\n \"col\": color5,\n \"fx\": 0,\n \"sx\": 20,\n \"ix\": 25,\n \"pal\": 0,\n \"sel\": true,\n \"rev\": false,\n \"cln\": -1\n \n },\n {\n \"ID6\": 6,\n \"start\": start6,\n \"stop\": stop6,\n \"len\": len6,\n \"col\": color6,\n \"fx\": 0,\n \"sx\": 20,\n \"ix\": 25,\n \"pal\": 0,\n \"sel\": true,\n \"rev\": false,\n \"cln\": -1\n \n }]\n \n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":930,"y":1020,"wires":[["9a2b1796e9592c6f","240cb1d14dcff19d"]]},{"id":"abca22528cecf3ac","type":"comment","z":"984bcf796bfc4df8","name":"W-LED Anzeige Strom","info":"","x":780,"y":620,"wires":[]},{"id":"9a2b1796e9592c6f","type":"http request","z":"984bcf796bfc4df8","name":"POST to WLED","method":"POST","ret":"obj","paytoqs":"query","url":"http://192.168.4.10/json/state","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":1220,"y":1020,"wires":[[]]},{"id":"498ea269467f115b","type":"inject","z":"984bcf796bfc4df8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"date","x":160,"y":160,"wires":[["98d19219ba846937","5cbe4d53a7d09811","8b6a6870dd2b4fc7","7286cfd8871b740c"]]},{"id":"98d19219ba846937","type":"http request","z":"984bcf796bfc4df8","name":"Effects","method":"GET","ret":"obj","paytoqs":"ignore","url":"http://192.168.4.10/json/eff","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":330,"y":160,"wires":[["cc52cbc721b09e54"]]},{"id":"5cbe4d53a7d09811","type":"http request","z":"984bcf796bfc4df8","name":"Palette","method":"GET","ret":"obj","paytoqs":"ignore","url":"http://192.168.4.10/json/pal","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":340,"y":200,"wires":[["fa88ad3c7a78a13f"]]},{"id":"cc52cbc721b09e54","type":"debug","z":"984bcf796bfc4df8","name":"Effects","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":470,"y":160,"wires":[]},{"id":"fa88ad3c7a78a13f","type":"debug","z":"984bcf796bfc4df8","name":"Palette","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":480,"y":200,"wires":[]},{"id":"8b6a6870dd2b4fc7","type":"http request","z":"984bcf796bfc4df8","name":"Info","method":"GET","ret":"obj","paytoqs":"ignore","url":"http://192.168.4.10/json/info","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":330,"y":240,"wires":[["5ad4d0345b882e98"]]},{"id":"7286cfd8871b740c","type":"http request","z":"984bcf796bfc4df8","name":"State","method":"GET","ret":"obj","paytoqs":"ignore","url":"http://192.168.4.10/json/state","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":330,"y":280,"wires":[["ba98b45b63681649"]]},{"id":"5ad4d0345b882e98","type":"debug","z":"984bcf796bfc4df8","name":"Info","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":470,"y":240,"wires":[]},{"id":"ba98b45b63681649","type":"debug","z":"984bcf796bfc4df8","name":"State","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":470,"y":280,"wires":[]},{"id":"202df0fd64154f7a","type":"inject","z":"984bcf796bfc4df8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"date","x":720,"y":100,"wires":[["93e586e52bf5f50c"]]},{"id":"f9b21e06c3ab2dd5","type":"inject","z":"984bcf796bfc4df8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"date","x":720,"y":140,"wires":[["1563ad15b873ed43"]]},{"id":"785335d9d7d2f5bf","type":"inject","z":"984bcf796bfc4df8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"date","x":720,"y":180,"wires":[["17788265de876ace"]]},{"id":"dbb6e32ec41f507d","type":"inject","z":"984bcf796bfc4df8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"date","x":720,"y":220,"wires":[["d80d43bc6219c6ac"]]},{"id":"93e586e52bf5f50c","type":"function","z":"984bcf796bfc4df8","name":"on:255","func":"msg.payload = {\"on\":true,\"bri\":255}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":890,"y":100,"wires":[["e09f4aefe7672897","7332a3e1e8fde049"]]},{"id":"1563ad15b873ed43","type":"function","z":"984bcf796bfc4df8","name":"off:0","func":"msg.payload = {\"on\":false}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":890,"y":140,"wires":[["e09f4aefe7672897","7332a3e1e8fde049"]]},{"id":"17788265de876ace","type":"function","z":"984bcf796bfc4df8","name":"on: orange","func":"msg.payload = {\n \"on\":true,\n \"bri\":255,\n \"seg\": [{\n \"start\": 0,\n \"stop\": 150,\n \"len\": 150,\n \"col\": [\n [255, 160, 0, 0],\n [0, 0, 0, 0],\n [0, 0, 0, 0]\n ],\n \"fx\": 0,\n \"sx\": 127,\n \"ix\": 255,\n \"pal\": 0,\n \"sel\": true,\n \"rev\": false,\n \"cln\": -1\n }]\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":910,"y":180,"wires":[["e09f4aefe7672897","7332a3e1e8fde049"]]},{"id":"d80d43bc6219c6ac","type":"function","z":"984bcf796bfc4df8","name":"on: blue","func":"msg.payload = {\n \"on\":true,\n \"bri\":255,\n \"seg\": [{\n \"start\": 0,\n \"stop\": 150,\n \"len\": 150,\n \"col\": [\n [0, 0, 255, 0],\n [0, 0, 0, 0],\n [0, 0, 0, 0]\n ],\n \"fx\": 0,\n \"sx\": 127,\n \"ix\": 255,\n \"pal\": 0,\n \"sel\": true,\n \"rev\": false,\n \"cln\": -1\n }]\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":900,"y":220,"wires":[["e09f4aefe7672897","7332a3e1e8fde049"]]},{"id":"e09f4aefe7672897","type":"debug","z":"984bcf796bfc4df8","name":"Effects","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1150,"y":180,"wires":[]},{"id":"7332a3e1e8fde049","type":"http request","z":"984bcf796bfc4df8","name":"POST to WLED","method":"POST","ret":"obj","paytoqs":"query","url":"http://192.168.4.10/json/state","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":1180,"y":140,"wires":[["3a4f075ea7d381f0"]]},{"id":"3a4f075ea7d381f0","type":"debug","z":"984bcf796bfc4df8","name":"response","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1340,"y":140,"wires":[]},{"id":"2063a356efa00f83","type":"inject","z":"984bcf796bfc4df8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"date","x":720,"y":260,"wires":[["31fc2b74308b8931"]]},{"id":"31fc2b74308b8931","type":"function","z":"984bcf796bfc4df8","name":"effect increment","func":"msg.payload = {\n \"on\":true,\n \"bri\":255,\n \"seg\": [{\n \"start\": 0,\n \"stop\": 150,\n \"len\": 150,\n \"fx\":\"~\",\n \"sx\": 127,\n \"ix\": 255,\n \"pal\": 0,\n \"sel\": true,\n \"rev\": false,\n \"cln\": -1\n }]\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":920,"y":260,"wires":[["7332a3e1e8fde049","e09f4aefe7672897"]]},{"id":"e7d844a8068225f6","type":"inject","z":"984bcf796bfc4df8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"date","x":720,"y":300,"wires":[["f7a7faad4b7ecdec"]]},{"id":"f7a7faad4b7ecdec","type":"function","z":"984bcf796bfc4df8","name":"effect increment 30","func":"msg.payload = {\n \"on\":true,\n \"bri\":255,\n \"seg\": [{\n \"start\": 0,\n \"stop\": 30,\n \"len\": 30,\n \"fx\":\"~\",\n \"sx\": 127,\n \"ix\": 255,\n \"pal\": 0,\n \"sel\": true,\n \"rev\": false,\n \"cln\": -1\n }]\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":930,"y":300,"wires":[["7332a3e1e8fde049"]]},{"id":"3a14dcea57de1e38","type":"comment","z":"984bcf796bfc4df8","name":"simple examples","info":"","x":740,"y":60,"wires":[]},{"id":"7d95dfcf03472ee1","type":"comment","z":"984bcf796bfc4df8","name":"get info from controller","info":"","x":380,"y":120,"wires":[]},{"id":"93cd5480e9159d7f","type":"inject","z":"984bcf796bfc4df8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"date","x":720,"y":340,"wires":[["1fd7e4528eeda7c7"]]},{"id":"1fd7e4528eeda7c7","type":"function","z":"984bcf796bfc4df8","name":"on: WW","func":"msg.payload = {\n \"on\":true,\n \"bri\":255,\n \"seg\": [{\n \"start\": 0,\n \"stop\": 150,\n \"len\": 150,\n \"col\": [\n [210, 150, 100,0],\n [0, 0, 0, 0],\n [0, 0, 0, 0]\n ],\n \"fx\": 0,\n \"sx\": 127,\n \"ix\": 255,\n \"pal\": 0,\n \"sel\": true,\n \"rev\": false,\n \"cln\": -1\n }]\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":900,"y":340,"wires":[["7332a3e1e8fde049","e09f4aefe7672897"]]},{"id":"ed7ade050a032154","type":"inject","z":"984bcf796bfc4df8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"1","payload":"25","payloadType":"num","x":150,"y":940,"wires":[["23e0bedb2aec19e7"]]},{"id":"1d9ed3718067f709","type":"inject","z":"984bcf796bfc4df8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"1","payload":"57","payloadType":"num","x":150,"y":1020,"wires":[["23e0bedb2aec19e7"]]},{"id":"679db549b67a4858","type":"inject","z":"984bcf796bfc4df8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"1","payload":"75","payloadType":"num","x":150,"y":1060,"wires":[["23e0bedb2aec19e7"]]},{"id":"231283c761c67d70","type":"inject","z":"984bcf796bfc4df8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"1","payload":"100","payloadType":"num","x":150,"y":1100,"wires":[["23e0bedb2aec19e7"]]},{"id":"d08d8aac4f0852eb","type":"inject","z":"984bcf796bfc4df8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"1","payload":"0","payloadType":"num","x":150,"y":900,"wires":[["23e0bedb2aec19e7"]]},{"id":"c3a264659373872a","type":"inject","z":"984bcf796bfc4df8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"1","payload":"50","payloadType":"num","x":150,"y":980,"wires":[["23e0bedb2aec19e7"]]},{"id":"23e0bedb2aec19e7","type":"range","z":"984bcf796bfc4df8","minin":"0","maxin":"100","minout":"0","maxout":"100","action":"scale","round":false,"property":"payload","name":"","x":360,"y":980,"wires":[["9af88c24f5ff15fc"]]},{"id":"9af88c24f5ff15fc","type":"range","z":"984bcf796bfc4df8","minin":"0","maxin":"100","minout":"13","maxout":"26","action":"clamp","round":true,"property":"payload","name":"","x":520,"y":980,"wires":[["fae4f7d2f45e2dac","fe92fb95b3a31610"]]},{"id":"fae4f7d2f45e2dac","type":"function","z":"984bcf796bfc4df8","name":"Ende und Länge ID0","func":"\nvar ende = msg.payload\nflow.set (\"stop2\",ende)\nreturn msg","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":720,"y":960,"wires":[[]]},{"id":"fe92fb95b3a31610","type":"function","z":"984bcf796bfc4df8","name":"set color & seg","func":"var wasser = msg.payload\nflow.set(\"wasser\", wasser)\nvar color_combined2\nvar color_combined3\nvar color1 = [100, 149, 237, 0]\nvar color2 = [0, 0, 0, 0]\nvar color3 = [0, 0, 0, 0]\nvar stop\nvar len\nvar stop2\n\nvar color11 = [255, 0, 0, 0]\nvar color12 = [0, 0, 0, 0]\nvar color13 = [0, 0, 0, 0]\n\nvar stop0 = flow.get (\"stop2\")\nvar start0 = 13\nvar len0 = (start0 + stop0)\n\nvar stop1 = 26\nvar start1 = stop0\nvar len1 = (stop1-start1)\n\ncolor_combined2=[color1,color2,color3]\nflow.set(\"color2\", color_combined2)\ncolor_combined3=[color11,color12,color13]\nflow.set(\"color3\", color_combined3)\n\nflow.set(\"start2\", start0)\nflow.set(\"len2\", len0)\nflow.set(\"stop2\", stop0)\n\nflow.set(\"start3\", start1)\nflow.set(\"len3\", len1)\nflow.set(\"stop3\", stop1)\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":720,"y":1040,"wires":[["9817295514f811c1"]]},{"id":"c3c4984024228d13","type":"comment","z":"984bcf796bfc4df8","name":"W-LED Anzeige Wasser","info":"","x":780,"y":900,"wires":[]},{"id":"ad635c6f7ca9db49","type":"inject","z":"984bcf796bfc4df8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"1","payload":"25","payloadType":"num","x":150,"y":1220,"wires":[["9d5f579d6baf19c2"]]},{"id":"8ad582f58ed7e83c","type":"inject","z":"984bcf796bfc4df8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"1","payload":"57","payloadType":"num","x":150,"y":1300,"wires":[["9d5f579d6baf19c2"]]},{"id":"d36ceb2ef4508fa2","type":"inject","z":"984bcf796bfc4df8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"1","payload":"75","payloadType":"num","x":150,"y":1340,"wires":[["9d5f579d6baf19c2"]]},{"id":"8b099f2abe40c097","type":"inject","z":"984bcf796bfc4df8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"1","payload":"100","payloadType":"num","x":150,"y":1380,"wires":[["9d5f579d6baf19c2"]]},{"id":"474932bce3db6304","type":"inject","z":"984bcf796bfc4df8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"1","payload":"0","payloadType":"num","x":150,"y":1180,"wires":[["9d5f579d6baf19c2"]]},{"id":"adc56c130bebc962","type":"inject","z":"984bcf796bfc4df8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"1","payload":"50","payloadType":"num","x":150,"y":1260,"wires":[["9d5f579d6baf19c2"]]},{"id":"9d5f579d6baf19c2","type":"range","z":"984bcf796bfc4df8","minin":"0","maxin":"100","minout":"0","maxout":"100","action":"scale","round":false,"property":"payload","name":"","x":360,"y":1260,"wires":[["e29c31cf3bb1750e"]]},{"id":"e29c31cf3bb1750e","type":"range","z":"984bcf796bfc4df8","minin":"0","maxin":"100","minout":"26","maxout":"39","action":"clamp","round":true,"property":"payload","name":"","x":520,"y":1260,"wires":[["8952a5669244c06d","0ee9ea8fd5d936d0"]]},{"id":"8952a5669244c06d","type":"function","z":"984bcf796bfc4df8","name":"Ende und Länge ID0","func":"\nvar ende = msg.payload\nflow.set (\"stop4\",ende)\nreturn msg","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":720,"y":1240,"wires":[[]]},{"id":"0ee9ea8fd5d936d0","type":"function","z":"984bcf796bfc4df8","name":"set color & seg","func":"var abwasser = msg.payload\nflow.set(\"abwasser\", abwasser)\nvar color_combined4\nvar color_combined5\nvar color1 = [139, 90, 43, 0]\nvar color2 = [0, 0, 0, 0]\nvar color3 = [0, 0, 0, 0]\nvar stop\nvar len\nvar stop4\n\nvar color11 = [0, 100, 0, 0]\nvar color12 = [0, 0, 0, 0]\nvar color13 = [0, 0, 0, 0]\n\nvar stop0 = flow.get (\"stop4\")\nvar start0 = 26\nvar len0 = (start0 + stop0)\n\nvar stop1 = 39\nvar start1 = stop0\nvar len1 = (stop1-start1)\n\ncolor_combined4=[color1,color2,color3]\nflow.set(\"color4\", color_combined4)\ncolor_combined5=[color11,color12,color13]\nflow.set(\"color5\", color_combined5)\n\nflow.set(\"start4\", start0)\nflow.set(\"len4\", len0)\nflow.set(\"stop4\", stop0)\n\nflow.set(\"start5\", start1)\nflow.set(\"len5\", len1)\nflow.set(\"stop5\", stop1)\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":720,"y":1300,"wires":[["9817295514f811c1"]]},{"id":"4cb5e771e08ba053","type":"comment","z":"984bcf796bfc4df8","name":"W-LED Anzeige Abwasser","info":"","x":790,"y":1180,"wires":[]},{"id":"4524b089cda43330","type":"inject","z":"984bcf796bfc4df8","name":"Taster Aus","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":"1","topic":"","payload":"","payloadType":"date","x":110,"y":1520,"wires":[["c620cc0ecb8e289c"]]},{"id":"0ec6eccbfdeedf27","type":"function","z":"984bcf796bfc4df8","name":"off:0","func":"msg.payload = {\"on\":false}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":810,"y":1480,"wires":[["9a2b1796e9592c6f"]]},{"id":"7a4592b2797b3c76","type":"mytimeout","z":"984bcf796bfc4df8","name":"","outtopic":"","outsafe":"","outwarning":"Warning","outunsafe":"off","warning":"-1","timer":"30","debug":false,"ndebug":false,"ignoreCase":false,"repeat":false,"again":false,"x":590,"y":1480,"wires":[["0ec6eccbfdeedf27"],[]]},{"id":"2fee2bda6138d332","type":"inject","z":"984bcf796bfc4df8","name":"Taster WW","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":100,"y":1620,"wires":[["b02eeab255e96d03"]]},{"id":"694f733ce17bc901","type":"function","z":"984bcf796bfc4df8","name":"on: Farbe","func":"var bri = flow.get(\"bri\")\nvar color = flow.get(\"colordinett\")\n\n\n\nmsg.payload = {\n \"on\":true,\n \"bri\": bri ,\n \"seg\": [{\n \"start\": 0,\n \"stop\": 150,\n \"len\": 150,\n \"col\": color,\n \"fx\": 0,\n \"sx\": 127,\n \"ix\": 255,\n \"pal\": 0,\n \"sel\": true,\n \"rev\": false,\n \"cln\": -1\n }]\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":820,"y":1700,"wires":[["9a2b1796e9592c6f"]]},{"id":"a8948779ee351763","type":"ui_slider","z":"984bcf796bfc4df8","name":"Dimmer Dinett","label":"Dimmer Dinett","tooltip":"","group":"764326e280fa9577","order":2,"width":0,"height":0,"passthru":false,"outs":"end","topic":"topic","topicType":"msg","min":"10","max":"255","step":"10","x":380,"y":1700,"wires":[["2e169a8b02a2c9e0"]]},{"id":"7a2c0b3a72c3030d","type":"ui_switch","z":"984bcf796bfc4df8","name":"","label":"Ambiente Dinett","tooltip":"","group":"764326e280fa9577","order":1,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"topic","topicType":"msg","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","animate":true,"x":380,"y":1660,"wires":[["2ed8f08e388f707e","b02eeab255e96d03"]]},{"id":"987e6f9722375d18","type":"ui_switch","z":"984bcf796bfc4df8","name":"","label":"Stausanforderung","tooltip":"","group":"764326e280fa9577","order":4,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"topic","topicType":"msg","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","animate":false,"x":310,"y":1480,"wires":[["0ee9ea8fd5d936d0","fe92fb95b3a31610","23010d7465129f21","69bd5f2414289222","7a4592b2797b3c76"]]},{"id":"044fee55717a7b1c","type":"function","z":"984bcf796bfc4df8","name":"on: warm weiß","func":"\nvar color = flow.get(\"colorww\")\nvar color_combined\nvar color1 = [255, 170, 88, 0]\nvar color2 = [0, 0, 0, 0]\nvar color3 = [0, 0, 0, 0]\n\nmsg.payload = {\n \"on\":true,\n \"bri\":90,\n \"seg\": [{\n \"start\": 0,\n \"stop\": 150,\n \"len\": 150,\n \"col\": color, \n \"fx\": 0,\n \"sx\": 127,\n \"ix\": 255,\n \"pal\": 0,\n \"sel\": true,\n \"rev\": false,\n \"cln\": -1\n }]\n}\n\n\nflow.set(\"color6\", color)\nflow.set(\"start6\", 0)\nflow.set(\"len6\", 39)\nflow.set(\"stop6\", 39)\nflow.set(\"bri\", 90)\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":820,"y":1620,"wires":[["9817295514f811c1"]]},{"id":"2e169a8b02a2c9e0","type":"function","z":"984bcf796bfc4df8","name":"Dimmer","func":"var bri = msg.paylod\nflow.set(\"bri\",msg.payload)\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":600,"y":1700,"wires":[["694f733ce17bc901"]]},{"id":"5b11cf80c7ba8cb3","type":"inject","z":"984bcf796bfc4df8","name":"Türkontakt","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"true","payloadType":"bool","x":100,"y":1480,"wires":[["987e6f9722375d18"]]},{"id":"2ed8f08e388f707e","type":"function","z":"984bcf796bfc4df8","name":"off:0","func":"msg.payload = {false:\"on\"}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1050,"y":1660,"wires":[[]]},{"id":"0e31ac8a44de4537","type":"ui_colour_picker","z":"984bcf796bfc4df8","name":"Farbe Dinett","label":"Farbe Dinett","group":"764326e280fa9577","format":"rgb","outformat":"string","showSwatch":true,"showPicker":true,"showValue":true,"showHue":false,"showAlpha":false,"showLightness":true,"square":"false","dynOutput":"false","order":6,"width":0,"height":0,"passthru":true,"topic":"topic","topicType":"msg","x":370,"y":1740,"wires":[["ec5947fdaa82c9d8"]]},{"id":"ec5947fdaa82c9d8","type":"change","z":"984bcf796bfc4df8","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"$split(payload, /\\(|,|\\)/)[[1..3]].$number($trim($))\t","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":590,"y":1740,"wires":[["2a0a4feace6b2c6a"]]},{"id":"c620cc0ecb8e289c","type":"ui_switch","z":"984bcf796bfc4df8","name":"","label":"Dinett AUS","tooltip":"","group":"764326e280fa9577","order":5,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"topic","topicType":"msg","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","animate":false,"x":290,"y":1520,"wires":[["0ec6eccbfdeedf27"]]},{"id":"b02eeab255e96d03","type":"function","z":"984bcf796bfc4df8","name":"set Farbe WW","func":"var color_combined\nvar color1 = [255, 170, 88, 0]\nvar color2 = [0, 0, 0, 0]\nvar color3 = [0, 0, 0, 0]\ncolor_combined = [color1, color2, color3]\nflow.set(\"colorww\", color_combined)\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":580,"y":1620,"wires":[["044fee55717a7b1c"]]},{"id":"2a0a4feace6b2c6a","type":"function","z":"984bcf796bfc4df8","name":"set Farbe WW","func":"var color_combined\nvar color1 = msg.payload\nvar color2 = [0, 0, 0, 0]\nvar color3 = [0, 0, 0, 0]\ncolor_combined = [color1, color2, color3]\nflow.set(\"colorww\", color_combined)\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":820,"y":1740,"wires":[["044fee55717a7b1c"]]},{"id":"240cb1d14dcff19d","type":"function","z":"984bcf796bfc4df8","name":"function 16","func":"var bri = flow.get(\"bri\")\nmsg.payload = bri\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":170,"y":1700,"wires":[["a8948779ee351763"]]},{"id":"764326e280fa9577","type":"ui_group","name":"W-Led","tab":"2fa37e0c8559eb92","order":7,"disp":true,"width":"6","collapse":false},{"id":"2fa37e0c8559eb92","type":"ui_tab","name":"Switches","icon":"mi-toggle_on","order":2,"disabled":false,"hidden":false}]