From 33ae3dfcd23a4e81ff6ab58c8c853705e5c16a2b Mon Sep 17 00:00:00 2001 From: LKuemmel <76958050+LKuemmel@users.noreply.github.com> Date: Fri, 6 Mar 2026 11:35:12 +0100 Subject: [PATCH] Verbraucher --- Simulator 2.x/simulator_flow.json | 13523 +++++++++++++++++----------- 1 file changed, 8404 insertions(+), 5119 deletions(-) diff --git a/Simulator 2.x/simulator_flow.json b/Simulator 2.x/simulator_flow.json index 421a0a9..9195132 100644 --- a/Simulator 2.x/simulator_flow.json +++ b/Simulator 2.x/simulator_flow.json @@ -1,4 +1,12 @@ [ + { + "id": "92165c72.a5f948", + "type": "tab", + "label": "Simulator 2.0", + "disabled": false, + "info": "# Simulator für openWB 2.x\nMit diesem Flow kann eine komplette virtuelle Umgebung für openWB bereitgestellt werden.\nDie Umgebung besteht aus einem Zähler (muss als \"EVU\" in der Hierarchie eingerichtet sein),\neinem PV-Modul, einem Batteriespeicher sowie drei Ladepunkten.\n\n## Hintergrundwissen\nDie PV-Anlage ist aktuell an alle drei Phasen \"angeschlossen\" und verteilt die Leistung gleichmäßig.\n_(ToDo: Anschluss variabel auf einzelne Phasen konfigurierbar)_\n\nDer Batteriespeicher verteilt seine Leistung ebenfalls gleichmäßig auf alle drei Phasen.\n_(ToDo: Anschluss variabel auf einzelne Phasen konfigurierbar)_\n\nDie Leistung des Speichers wird durch einen PID-Regler gesteuert. Die Parameter sind noch nicht optimal\neingestellt. Es kann vorkommen, dass die Regelung anfängt zu schwingen.\n_(ToDo: PID-Regler optimieren)_\n\n## Einrichtung\n**Da alle Komponenten in openWB 2.x dynamisch vergeben werden, müssen nach dem Import des Flows\ndie Komponenten-IDs an die jeweiligen Gegebenheiten der eigenen Installation angepasst werden!**\n\nDie Komponenten-IDs können in den Eigenschaften der Sub-Flows \"EVU\", \"PV1\", \"Bat\", \"LP1\", \"LP2\" und \"LP3\"\nfestgelegt werden.\n\nIn den Sub-Flow Eigenschaften der Ladepunkte kann ebenfalls festgelegt werden, an welcher Phase L1 des\nEVU angeschlossen ist. Dadurch können auch komplexe Setups mit (gut oder ungünstig) rotierten Phasen\nabgebildet werden.\n\n---\n\n# Steuerungsmöglichkeiten im Dashboard\n\n## EVU Zähler\nDer virtuelle Hausverbrauch kann im Dashboard je Phase festgelegt werden. Dadurch können gezielt Schieflasten\nfür das Lastmanagement erzeugt werden.\n\nDie Netzfrequenz des Zählers kann variiert werden, um den Netzschutz seitens des Energieversorgers zu testen.\n\n## PV\nDie aktuelle Leistung des Wechselrichters kann zwischen 0W und 10kW variiert werden.\n\n## Batteriespeicher\nDer aktuelle Ladestand (SoC) kann gezielt eingestellt werden.\n\nDie maximale Leistung des Speichers kann zwischen 0W und 5kW eingestellt werden.\n\nDie virtuelle Kapazität des Batteriespeichers kann auf bis zu 15kWh angepsst werden.\n\n## Ladepunkte\nEs kann ein Fahrzeug \"angesteckt\" werden.\n\nEs kann angegeben werden, wieviele Phasen das angeschlossene Fahrzeug maximal nutzen kann.\n", + "env": [] + }, { "id": "c5821ca1.ee2da", "type": "subflow", @@ -74,513 +82,393 @@ } }, { - "id": "180041c4.08fc2e", - "type": "change", - "z": "c5821ca1.ee2da", - "name": "", - "rules": [ + "id": "2dd5cf5c.4ae26", + "type": "subflow", + "name": "Sub BAT 2.0", + "info": "", + "category": "", + "in": [ { - "t": "set", - "p": "pv", - "pt": "flow", - "to": "$min([(payload+$flowContext(\"PVNorm\"))*-1,0])", - "tot": "jsonata" + "x": 40, + "y": 200, + "wires": [ + { + "id": "c7cb712c4b8055a0" + } + ] + } + ], + "out": [ + { + "x": 580, + "y": 40, + "wires": [ + { + "id": "28e0a4ab.758cfc", + "port": 0 + } + ] }, { - "t": "set", - "p": "payload", - "pt": "msg", - "to": "pv", - "tot": "flow" + "x": 1360, + "y": 560, + "wires": [ + { + "id": "2e89309f.ba832", + "port": 0 + } + ] }, { - "t": "set", - "p": "topic", - "pt": "msg", - "to": "/pv/W", - "tot": "str" + "x": 1120, + "y": 900, + "wires": [ + { + "id": "dec3f627.a2d958", + "port": 0 + }, + { + "id": "3ef4b7a7.942b78", + "port": 0 + }, + { + "id": "9079ffaf.4a096", + "port": 0 + } + ] + }, + { + "x": 1190, + "y": 220, + "wires": [ + { + "id": "fef8a714af3c543a", + "port": 0 + } + ] + }, + { + "x": 1230, + "y": 40, + "wires": [ + { + "id": "a6823773fb1192f8", + "port": 0 + } + ] } ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 760, - "y": 380, - "wires": [ - [ - "762b7362.1cab7c" - ] - ] - }, - { - "id": "2e0d1128.5eb14e", - "type": "smooth", - "z": "c5821ca1.ee2da", - "name": "", - "property": "payload", - "action": "mean", - "count": "10", - "round": "1", - "mult": "single", - "reduce": false, - "x": 560, - "y": 380, - "wires": [ - [ - "180041c4.08fc2e" - ] - ] - }, - { - "id": "6506b2a6.b2ebdc", - "type": "random", - "z": "c5821ca1.ee2da", - "name": "+/- 100W", - "low": "-100", - "high": "100", - "inte": "false", - "property": "payload", - "x": 360, - "y": 380, - "wires": [ - [ - "2e0d1128.5eb14e" - ] - ] - }, - { - "id": "27c8d022.8cc7c", - "type": "change", - "z": "c5821ca1.ee2da", - "name": "Energie in Wh", - "rules": [ + "env": [ { - "t": "set", - "p": "payload", - "pt": "msg", - "to": "$flowContext(\"pv\")*timeInterval/1000/3600*(-1)", - "tot": "jsonata" + "name": "Component-ID", + "type": "str", + "value": "2" } ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 760, - "y": 440, - "wires": [ - [ - "27220a75.050556" - ] + "meta": {}, + "color": "#DDAA99", + "outputLabels": [ + "openWB", + "schnelle Regelwerte", + "Chart", + "dynamisches Limit", + "Debug" ], - "info": "$number(payload)*(timeInterval/1000)/3600/1000" + "status": { + "x": 880, + "y": 40, + "wires": [ + { + "id": "f5afed4e.b6449", + "port": 0 + } + ] + } }, { - "id": "12b3849e.717fcb", - "type": "inject", - "z": "c5821ca1.ee2da", - "name": "", - "props": [ + "id": "da060938.c8ff48", + "type": "subflow", + "name": "Sub EVU 2.0", + "info": "", + "category": "", + "in": [ { - "p": "payload" + "x": 20, + "y": 580, + "wires": [ + { + "id": "60345bb6.1855d4" + } + ] } ], - "repeat": "2", - "crontab": "", - "once": true, - "onceDelay": "1", - "topic": "", - "payload": "", - "payloadType": "date", - "x": 150, - "y": 380, - "wires": [ - [ - "6506b2a6.b2ebdc" - ] - ] - }, - { - "id": "27220a75.050556", - "type": "change", - "z": "c5821ca1.ee2da", - "name": "Zähler aktualisieren", - "rules": [ + "out": [ { - "t": "set", - "p": "PV_Zähler", - "pt": "flow", - "to": "payload+$flowContext(\"PV_Zähler\")", - "tot": "jsonata" + "x": 580, + "y": 40, + "wires": [ + { + "id": "97a98e87.248e6", + "port": 0 + } + ] }, { - "t": "set", - "p": "payload", - "pt": "msg", - "to": "PV_Zähler", - "tot": "flow" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 970, - "y": 440, - "wires": [ - [] - ] - }, - { - "id": "f2680f1d.7414d", - "type": "inject", - "z": "c5821ca1.ee2da", - "name": "Publish Trigger", - "props": [ + "x": 1400, + "y": 1420, + "wires": [ + { + "id": "f7fd464c.dac218", + "port": 0 + } + ] + }, { - "p": "payload" + "x": 1140, + "y": 40, + "wires": [ + { + "id": "c1f27145620a046e", + "port": 0 + } + ] } ], - "repeat": "5", - "crontab": "", - "once": true, - "onceDelay": "5", - "topic": "", - "payload": "", - "payloadType": "date", - "x": 140, - "y": 40, - "wires": [ - [ - "cb144244.8df92" - ] - ] - }, - { - "id": "cb144244.8df92", - "type": "function", - "z": "c5821ca1.ee2da", - "name": "Senden der Flow-Daten", - "func": "const ComponentId = env.get(\"Component-ID\");\n\nconst actualPower = parseInt(flow.get(\"pv\").toFixed(0));\nconst actualPowerkW = actualPower / 1000;\n\nvar statusColor = \"green\";\nvar statusShape = \"dot\";\nif(actualPower > -100)\n statusColor= \"red\";\n\nnode.status({\n fill: statusColor,\n shape: statusShape,\n text:actualPowerkW.toFixed(1)+\"kW\"\n });\n\nreturn [\n [\n {\n topic: \"openWB/set/mqtt/pv/\" + ComponentId + \"/get/power\",\n payload: actualPower\n },\n {\n topic: \"openWB/set/mqtt/pv/\" + ComponentId + \"/get/exported\",\n payload: parseInt(flow.get(\"PV_Zähler\").toFixed(0))\n }\n ]\n]", - "outputs": 1, - "timeout": "", - "noerr": 0, - "initialize": "// Code added here will be run once\n// whenever the node is deployed.\nnode.status({\n fill: \"yellow\",\n shape: \"ring\",\n text: \"starting...\"\n });\n", - "finalize": "", - "libs": [], - "x": 370, - "y": 40, - "wires": [ - [] - ] - }, - { - "id": "b8b748bb.7b2148", - "type": "status", - "z": "c5821ca1.ee2da", - "name": "", - "scope": [ - "cb144244.8df92" - ], - "x": 700, - "y": 40, - "wires": [ - [] - ] - }, - { - "id": "c9a13be.fe492c8", - "type": "switch", - "z": "c5821ca1.ee2da", - "name": "Split Topics", - "property": "topic", - "propertyType": "msg", - "rules": [ + "env": [ { - "t": "regex", - "v": "\\/W$", - "vt": "str", - "case": false + "name": "Component-ID", + "type": "num", + "value": "0" } ], - "checkall": "true", - "repair": false, - "outputs": 1, - "x": 210, - "y": 140, - "wires": [ - [ - "25a41bf5.5cb904" - ] - ], + "meta": {}, + "color": "#DDAA99", "outputLabels": [ - "Soll-Leistung" - ] - }, - { - "id": "25a41bf5.5cb904", - "type": "change", - "z": "c5821ca1.ee2da", - "name": "", - "rules": [ - { - "t": "set", - "p": "PVNorm", - "pt": "flow", - "to": "payload", - "tot": "msg" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 430, - "y": 140, - "wires": [ - [] - ] - }, - { - "id": "7135e239.69cd8c", - "type": "inject", - "z": "c5821ca1.ee2da", - "name": "", - "props": [ - { - "p": "payload" - } + "openWB", + "schnelle Regelwerte", + "Debug" ], - "repeat": "", - "crontab": "", - "once": true, - "onceDelay": 0.1, - "topic": "", - "payload": "0", - "payloadType": "num", - "x": 130, - "y": 240, - "wires": [ - [ - "78037fbd.010fc", - "c7862a5e.6a3e28" + "status": { + "x": 850, + "y": 40, + "wires": [ + { + "id": "8d39538d.a5c0b", + "port": 0 + } ] - ] - }, - { - "id": "a0ab0f47.d1e2b", - "type": "change", - "z": "c5821ca1.ee2da", - "name": "Zähler initialisieren", - "rules": [ - { - "t": "set", - "p": "PV_Zähler", - "pt": "flow", - "to": "payload", - "tot": "msg" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 550, - "y": 240, - "wires": [ - [] - ] + } }, { - "id": "78037fbd.010fc", - "type": "switch", - "z": "c5821ca1.ee2da", - "name": "Zähler gesetzt?", - "property": "PV_Zähler", - "propertyType": "flow", - "rules": [ + "id": "5c4ac285.afe6e4", + "type": "subflow", + "name": "Sub Ladepunkt 2.0", + "info": "", + "category": "", + "in": [ { - "t": "null" + "x": 60, + "y": 180, + "wires": [ + { + "id": "5564373bd8d8091a" + } + ] } ], - "checkall": "true", - "repair": false, - "outputs": 1, - "x": 340, - "y": 240, - "wires": [ - [ - "a0ab0f47.d1e2b" - ] - ] - }, - { - "id": "c7862a5e.6a3e28", - "type": "change", - "z": "c5821ca1.ee2da", - "name": "Init flow context", - "rules": [ + "out": [ { - "t": "set", - "p": "pv", - "pt": "flow", - "to": "0", - "tot": "num" + "x": 620, + "y": 40, + "wires": [ + { + "id": "d477d279.2cc62", + "port": 0 + } + ] }, { - "t": "set", - "p": "PVNorm", - "pt": "flow", - "to": "1500", - "tot": "num" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 340, - "y": 280, - "wires": [ - [] - ] - }, - { - "id": "762b7362.1cab7c", - "type": "interval-length", - "z": "c5821ca1.ee2da", - "format": "mills", - "bytopic": false, - "minimum": "", - "maximum": "", - "window": "", - "timeout": false, - "msgTimeout": "", - "minimumunit": "msecs", - "maximumunit": "msecs", - "windowunit": "msecs", - "msgTimeoutUnit": "msecs", - "reset": false, - "startup": false, - "msgField": "timeInterval", - "timestampField": "previousTimestamp", - "repeatTimeout": false, - "name": "Zeit zwischen den Nachrichten messen", - "x": 460, - "y": 440, - "wires": [ - [ - "27c8d022.8cc7c" - ], - [] - ] - }, - { - "id": "fdaf3909e1383774", - "type": "inject", - "z": "c5821ca1.ee2da", - "name": "Debug", - "props": [ + "x": 1200, + "y": 700, + "wires": [ + { + "id": "2254d233.5854e6", + "port": 0 + }, + { + "id": "58ec8187c6755198", + "port": 0 + }, + { + "id": "71b196bb372367ab", + "port": 0 + } + ] + }, { - "p": "payload" + "x": 1100, + "y": 200, + "wires": [ + { + "id": "5b4b7510.acf434", + "port": 0 + }, + { + "id": "124dbffa.10bb", + "port": 0 + }, + { + "id": "5c185bf1.72503c", + "port": 0 + }, + { + "id": "78b855e9.ef0b24", + "port": 0 + }, + { + "id": "33434644.b16a22", + "port": 0 + } + ] }, { - "p": "topic", - "vt": "str" + "x": 1210, + "y": 40, + "wires": [ + { + "id": "bddf955cca42c275", + "port": 0 + } + ] } ], - "repeat": "10", - "crontab": "", - "once": true, - "onceDelay": "5", - "topic": "debug", - "payload": "{\t \"power\": $flowContext(\"pv\"),\t \"power_norm\": $flowContext(\"PVNorm\"),\t \"counter\": $flowContext(\"PV_Zähler\")\t}", - "payloadType": "jsonata", - "x": 1020, - "y": 40, - "wires": [ - [] - ] + "env": [ + { + "name": "Component-ID", + "type": "num", + "value": "", + "ui": { + "icon": "font-awesome/fa-hashtag", + "type": "spinner", + "opts": { + "min": 1 + } + } + }, + { + "name": "Phase1", + "type": "num", + "value": "1", + "ui": { + "icon": "font-awesome/fa-list-ol", + "type": "spinner", + "opts": { + "min": 1, + "max": 3 + } + } + }, + { + "name": "Chargepoint-ID", + "type": "num", + "value": "", + "ui": { + "type": "spinner", + "opts": { + "min": 1, + "max": 3 + } + } + } + ], + "meta": {}, + "color": "#DDAA99", + "inputLabels": [ + "Sollwerte" + ], + "outputLabels": [ + "openWB", + "schnelle Regelwerte", + "Input Passthrough", + "Debug" + ], + "status": { + "x": 900, + "y": 40, + "wires": [ + { + "id": "c4b80c5a.65fa88", + "port": 0 + } + ] + } }, { - "id": "2dd5cf5c.4ae26", + "id": "052d304dc9163933", "type": "subflow", - "name": "Sub BAT 2.0", + "name": "Verbraucher mit Leistungsvorgabe", "info": "", "category": "", "in": [ { - "x": 40, + "x": 60, "y": 200, "wires": [ { - "id": "c7cb712c4b8055a0" + "id": "09ab3747f1001b24" } ] } ], "out": [ { - "x": 580, - "y": 40, - "wires": [ - { - "id": "28e0a4ab.758cfc", - "port": 0 - } - ] - }, - { - "x": 1360, - "y": 560, + "x": 640, + "y": 60, "wires": [ { - "id": "2e89309f.ba832", + "id": "dac7ac0463bca7c8", "port": 0 } ] }, { - "x": 1120, - "y": 900, + "x": 1420, + "y": 600, "wires": [ { - "id": "dec3f627.a2d958", + "id": "4825ad03bdcc7575", "port": 0 }, { - "id": "3ef4b7a7.942b78", + "id": "5269dcb3ab718315", "port": 0 }, { - "id": "9079ffaf.4a096", + "id": "9e07ad7682b1e1e9", "port": 0 } ] }, { - "x": 1190, - "y": 220, + "x": 1150, + "y": 200, "wires": [ { - "id": "fef8a714af3c543a", + "id": "2260adcb773b534e", + "port": 0 + }, + { + "id": "707b107ce77e7a26", "port": 0 } ] }, { - "x": 1230, - "y": 40, + "x": 1270, + "y": 60, "wires": [ { - "id": "a6823773fb1192f8", + "id": "bf2dcdef57e1eb6b", "port": 0 } ] @@ -589,454 +477,695 @@ "env": [ { "name": "Component-ID", + "type": "num", + "value": "" + }, + { + "name": "max Phases", + "type": "num", + "value": "1" + }, + { + "name": "Verbraucher-ID", "type": "str", - "value": "2" + "value": "" } ], "meta": {}, "color": "#DDAA99", + "inputLabels": [ + "Soll-Werte" + ], "outputLabels": [ "openWB", "schnelle Regelwerte", - "Chart", - "dynamisches Limit", + "Input Passthrough", "Debug" ], "status": { - "x": 880, - "y": 40, + "x": 900, + "y": 60, "wires": [ { - "id": "f5afed4e.b6449", + "id": "4f2e52dace8b4fe1", "port": 0 } ] } }, { - "id": "fa698281.c98db", - "type": "change", - "z": "2dd5cf5c.4ae26", - "name": "", - "rules": [ + "id": "a9e11c55be21f50a", + "type": "subflow", + "name": "schaltbarer Verbraucher", + "info": "", + "category": "", + "in": [ { - "t": "set", - "p": "maxPower", - "pt": "flow", - "to": "$number(payload)", - "tot": "jsonata" + "x": 100, + "y": 260, + "wires": [ + { + "id": "3d3c56108a9d222e" + } + ] } ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 720, - "y": 180, - "wires": [ - [] - ] - }, - { - "id": "24d6c753.7611c8", - "type": "change", - "z": "2dd5cf5c.4ae26", - "name": "", - "rules": [ + "out": [ { - "t": "set", - "p": "maxCapacity", - "pt": "flow", - "to": "$number(payload)", - "tot": "jsonata" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 730, - "y": 260, - "wires": [ - [] - ] - }, - { - "id": "20f9c373.a12e3c", - "type": "change", - "z": "2dd5cf5c.4ae26", - "name": "", - "rules": [ - { - "t": "set", - "p": "evu", - "pt": "flow", - "to": "$number(payload)", - "tot": "jsonata" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 700, - "y": 300, - "wires": [ - [] - ] - }, - { - "id": "e46c92f3.d21a9", - "type": "switch", - "z": "2dd5cf5c.4ae26", - "name": "Split Topics", - "property": "topic", - "propertyType": "msg", - "rules": [ + "x": 640, + "y": 120, + "wires": [ + { + "id": "26d7b3bd820add4f", + "port": 0 + } + ] + }, { - "t": "regex", - "v": "\\/soc", - "vt": "str", - "case": false + "x": 1060, + "y": 560, + "wires": [ + { + "id": "3d372f7803fb246e", + "port": 0 + }, + { + "id": "7a2e71ba21a577c4", + "port": 0 + }, + { + "id": "d41ecc201a94a6d4", + "port": 0 + } + ] }, { - "t": "regex", - "v": "\\/BatMaxPower", - "vt": "str", - "case": false + "x": 1060, + "y": 260, + "wires": [ + { + "id": "056221a523f5b527", + "port": 0 + }, + { + "id": "6e979f192d1d7f19", + "port": 0 + } + ] }, { - "t": "regex", - "v": "\\/power_limit", - "vt": "str", - "case": false + "x": 1240, + "y": 120, + "wires": [ + { + "id": "06a5ee245d469b5e", + "port": 0 + } + ] + } + ], + "env": [ + { + "name": "Component-ID", + "type": "str", + "value": "" }, { - "t": "regex", - "v": "\\/BatCapacity", - "vt": "str", - "case": false + "name": "max Phases", + "type": "str", + "value": "1" }, { - "t": "regex", - "v": "\\/evu/W$", - "vt": "str", - "case": false + "name": "Verbraucher-ID", + "type": "str", + "value": "" } ], - "checkall": "true", - "repair": false, - "outputs": 5, - "x": 490, - "y": 200, - "wires": [ - [ - "84fa4a81.59f898" - ], - [ - "fa698281.c98db" - ], - [ - "fef8a714af3c543a" - ], - [ - "24d6c753.7611c8" - ], - [ - "20f9c373.a12e3c" + "meta": {}, + "color": "#DDAA99", + "status": { + "x": 960, + "y": 120, + "wires": [ + { + "id": "3ab6c65638eda30c", + "port": 0 + } ] - ], - "outputLabels": [ - "SoC", - "Max. Power", - "", - "Kapazität", - "EVU" - ] + } }, { - "id": "84fa4a81.59f898", - "type": "change", - "z": "2dd5cf5c.4ae26", - "name": "", - "rules": [ - { - "t": "set", - "p": "actualCapacity", - "pt": "flow", - "to": "(payload/100)*$flowContext(\"maxCapacity\")\t", - "tot": "jsonata" - } + "id": "10c935e7.d81c6a", + "type": "group", + "z": "92165c72.a5f948", + "name": "Ladepunkt 1", + "style": { + "label": true, + "stroke": "#0070c0", + "fill": "#0070c0", + "fill-opacity": "0.25" + }, + "nodes": [ + "a9947543.f34bd", + "9dad0a08.b2c0f", + "66502428.6bc2ec", + "4efd69fa.600b1", + "bcde68d8.fbde58", + "b4c0b8e7.95301", + "c2212cf2.e2bfe", + "bca07e3a.16ff08", + "c7894755.6c934", + "1c08d24.841d3ae", + "aa2ce19d.eaf1e8", + "5aa1d8c69080891b", + "e6650f13b3cc695a", + "ed32a789.f4f798", + "8c206019dae8c4f0", + "44f4fcadd171fe6d", + "1e68cfab.5aab5", + "3c77c4ed766b07a5", + "ac0a42a5e9a6a1d8", + "dab0d3d1144c2cc4" ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 730, - "y": 140, - "wires": [ - [] - ] + "x": 14, + "y": 1364, + "w": 1152, + "h": 417 }, { - "id": "f5afed4e.b6449", - "type": "status", - "z": "2dd5cf5c.4ae26", - "name": "", - "scope": [ - "28e0a4ab.758cfc" + "id": "9924f98f.a9ee4", + "type": "group", + "z": "92165c72.a5f948", + "name": "PV 1", + "style": { + "stroke": "#92d04f", + "fill": "#92d04f", + "fill-opacity": "0.25", + "label": true + }, + "nodes": [ + "2ab22961.d73e06", + "8c9d0662.e0c83", + "83082d16.5c0c", + "c6745675.5b9ec", + "c98a2da7.d75a38", + "54fdb013.3028f8", + "f5a5cec3.4fd8a8", + "9605f30870c8aa1a", + "c44e5ea9.d6b06" ], - "x": 720, - "y": 40, - "wires": [ - [] - ] - }, - { - "id": "28e0a4ab.758cfc", - "type": "function", - "z": "2dd5cf5c.4ae26", - "name": "Senden der Flow-Daten", - "func": "const ComponentId = env.get(\"Component-ID\");\n\nconst actualPower = parseInt(flow.get(\"bat\").toFixed(0));\nconst actualPowerkW = actualPower / 1000;\n\nconst maxCapacity = flow.get(\"maxCapacity\");\nconst actualCapacity = flow.get(\"actualCapacity\");\nvar actualSoc = actualCapacity / maxCapacity * 100;\nactualSoc = parseInt(actualSoc.toFixed(0));\n\nvar statusColor = \"yellow\";\nvar statusShape = \"ring\";\nif(actualPower < 0)\n statusColor = \"red\";\nif(actualPower > 0)\n statusColor = \"green\";\nif(actualSoc > 0)\n statusShape = \"dot\";\n\nnode.status({\n fill: statusColor,\n shape: statusShape,\n text: actualPowerkW.toFixed(1)+\"kW \" + actualSoc + \"%\"\n });\n\nreturn [\n [\n {\n topic: \"openWB/set/mqtt/bat/\" + ComponentId + \"/get/imported\",\n payload: parseFloat(flow.get(\"WhImported\").toFixed(3))\n },\n {\n topic: \"openWB/set/mqtt/bat/\" + ComponentId + \"/get/exported\",\n payload: parseFloat(flow.get(\"WhExported\").toFixed(3))\n },\n {\n topic: \"openWB/set/mqtt/bat/\" + ComponentId + \"/get/power\",\n payload: actualPower\n },\n {\n topic: \"openWB/set/mqtt/bat/\" + ComponentId + \"/get/soc\",\n payload: actualSoc\n },\n {\n topic: \"openWB/set/mqtt/bat/\" + ComponentId + \"/get/currents\",\n payload: JSON.stringify([actualPower / 230 / 3, actualPower / 230 / 3, actualPower / 230 / 3])\n },\n ]\n]", - "outputs": 1, - "timeout": "", - "noerr": 0, - "initialize": "", - "finalize": "", - "libs": [], - "x": 370, - "y": 40, - "wires": [ - [] - ] + "x": 14, + "y": 751.5, + "w": 1072, + "h": 209.5 }, { - "id": "4b72ed2d.3021d4", - "type": "inject", - "z": "2dd5cf5c.4ae26", - "name": "Publish Trigger", - "props": [ - { - "p": "payload" - } + "id": "adca6b9d.7ef678", + "type": "group", + "z": "92165c72.a5f948", + "name": "Ladepunkt 3", + "style": { + "label": true, + "stroke": "#0070c0", + "fill": "#0070c0", + "fill-opacity": "0.25" + }, + "nodes": [ + "f63b330f.c096e", + "db2cd204.7325b8", + "bb9a80f3.6ed8d", + "d1f901d9.c7e1e8", + "1d7224a3.976403", + "7e5d3fc0.81f4f8", + "c08ace1e.18cd08", + "e25c1f48.8f5e18", + "6add9cf1.e85094", + "b2b4e4a9.e78cd8", + "1ef6368267acccec", + "ab6610e58dd3eb1c", + "b9d330a1.5a", + "711106cc.96ed18", + "0a303aeb4727c810", + "268be22f.974e1e", + "61501fd2e18b0ed9", + "2397a2d2e13d5c0a", + "4ea0f783b9ca324e", + "fd0bd4a773502e77" ], - "repeat": "5", - "crontab": "", - "once": true, - "onceDelay": "5", - "topic": "", - "payload": "", - "payloadType": "date", - "x": 130, - "y": 40, - "wires": [ - [ - "28e0a4ab.758cfc" - ] - ] + "x": 14, + "y": 2284, + "w": 1152, + "h": 417 }, { - "id": "78c63bc8.9860b4", - "type": "inject", - "z": "2dd5cf5c.4ae26", - "name": "", - "props": [ - { - "p": "payload" - }, - { - "p": "topic", - "vt": "str" - } + "id": "ba86e05e.3eb518", + "type": "group", + "z": "92165c72.a5f948", + "name": "EVU", + "style": { + "stroke": "#ff0000", + "fill": "#ff0000", + "fill-opacity": "0.25", + "label": true + }, + "nodes": [ + "c5f91c31.79af98", + "2b5259d1.0e44ae", + "4c1c0dd1.be816c", + "fa5f56e0.4465e", + "90812723.7b3678", + "3e1bb28f.704a8e", + "f754ebac.d7d598", + "e854990fb4f9fab2", + "b46365f7d8aa13b6", + "524bd7697f7a306c", + "cde7317bc368b6b3", + "3036d462.5d789c", + "50edc6fb6d78740a", + "9145b76c44a9c929", + "3d8e2d3b4ee89e76", + "dc8f75f240dcf3b8", + "80ec81072842f306", + "7e693d583a244143" ], - "repeat": "", - "crontab": "", - "once": true, - "onceDelay": 0.1, - "topic": "", - "payload": "0", - "payloadType": "num", - "x": 130, - "y": 380, - "wires": [ - [ - "13d7d661.97e00a", - "778f747e.c1b43c", - "b274f2af.4b00a" - ] - ] + "x": 14, + "y": 431.5, + "w": 1092, + "h": 289.5 }, { - "id": "5b44278d.e38d58", - "type": "change", - "z": "2dd5cf5c.4ae26", - "name": "Zähler Bezug initialisieren", - "rules": [ - { - "t": "set", - "p": "WhImported", - "pt": "flow", - "to": "payload", - "tot": "msg" - } + "id": "c8376289.15bc1", + "type": "group", + "z": "92165c72.a5f948", + "name": "Speicher", + "style": { + "stroke": "#ffC000", + "fill": "#ffC000", + "fill-opacity": "0.25", + "label": true + }, + "nodes": [ + "9641b34b.2e9cd", + "145b387d.21aa88", + "dc7c97e6.6d6ad8", + "8243b679.c8f0f8", + "9ac3e1c9.e83e1", + "5deb68e4.79c458", + "96ea46e5.2b8618", + "ab178052.48bc98", + "a5a86b10.4dee38", + "d34c32d3.8f3448", + "6faaaef.e02a3d", + "bc6d74f3.8135d8", + "3df4fb4b.a9b13c", + "daf73f9a.fb50e", + "cf0bcd92.6fbe48", + "7a4711d4a689d6d4", + "234fd994.ef3106", + "426f7138f5a76fbd", + "f79cda2c7665fad2" ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 630, - "y": 380, - "wires": [ - [] - ] + "x": 14, + "y": 976.5, + "w": 1092, + "h": 344.5 }, { - "id": "13d7d661.97e00a", - "type": "switch", - "z": "2dd5cf5c.4ae26", - "name": "Zähler Bezug gesetzt?", - "property": "WhImported", - "propertyType": "flow", - "rules": [ - { - "t": "null" - } + "id": "4ffeb8f2.88e97", + "type": "group", + "z": "92165c72.a5f948", + "name": "Ladepunkt 2", + "style": { + "label": true, + "stroke": "#0070c0", + "fill": "#0070c0", + "fill-opacity": "0.25" + }, + "nodes": [ + "9e477905.67cf68", + "30584a7c.88a996", + "ea8feee.389911", + "1b06aa0d.461b36", + "ce8b41fa.71b588", + "bd2575a0.0cbce", + "f1d863d5.a29c18", + "b5d70a0.77f3e78", + "73ffea7f.199e1c", + "f3d097a6.b80d18", + "89dc41d2.e8c018", + "266b0231.f4db36", + "4a41415e440b1304", + "0b69966b365c4536", + "43a92dd0.39da44", + "25f6934e60f9b4d6", + "5316d2315b34de5a", + "cbdca721f944522a", + "e648cfa22c2cd2ec", + "347e9bc401e0eddd" ], - "checkall": "true", - "repair": false, - "outputs": 1, - "x": 340, - "y": 380, - "wires": [ - [ - "5b44278d.e38d58" - ] - ] + "x": 14, + "y": 1824, + "w": 1152, + "h": 417 }, { - "id": "778f747e.c1b43c", - "type": "switch", - "z": "2dd5cf5c.4ae26", - "name": "Zähler Einspeisung gesetzt?", - "property": "WhExported", - "propertyType": "flow", - "rules": [ - { - "t": "null" - } + "id": "3e039a5092696f5f", + "type": "group", + "z": "92165c72.a5f948", + "name": "Allgemeine Nodes", + "style": { + "label": true + }, + "nodes": [ + "51d8d30d.b63194", + "fd94d24f.8eb11", + "f8fb4ebc3ad90445", + "529ef24e.47a72c", + "426f1381e1bed357", + "d81e2c4a9ea1ce1d", + "b05ac649dc15c76c", + "44c4f45ac0baaebf", + "893e8cb8939049e1", + "340744fb3ea1d989", + "74218e8a39137399" ], - "checkall": "true", - "repair": false, - "outputs": 1, - "x": 360, - "y": 420, - "wires": [ - [ - "c5700f42.8bcec" - ] - ] + "x": 34, + "y": 19, + "w": 1072, + "h": 322 }, { - "id": "c5700f42.8bcec", - "type": "change", - "z": "2dd5cf5c.4ae26", - "name": "Zähler Einspeisung initialisieren", - "rules": [ - { - "t": "set", - "p": "WhExported", - "pt": "flow", - "to": "payload", - "tot": "msg" - } + "id": "3444dcfc9d2aa675", + "type": "group", + "z": "92165c72.a5f948", + "name": "Verbraucher 4", + "style": { + "label": true, + "stroke": "#0070c0", + "fill": "#0070c0", + "fill-opacity": "0.25" + }, + "nodes": [ + "f6984bc71f81fea2", + "cd21d82c8438791e", + "da3b73029a8aecc5", + "2f8a6b8232b5e44b", + "197ed74550f85c9d", + "5ffbd11579ac50d7", + "cf3743e585085543", + "baf911e204a9816b", + "b6b215bf96743aea", + "8479e1c35f076052", + "e89a3cfb4a4c3fd5", + "c9c4291fce70b5e3", + "1d10f97883bb139a" ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 650, - "y": 420, - "wires": [ - [] - ] + "x": 14, + "y": 2744, + "w": 1192, + "h": 297 }, { - "id": "b274f2af.4b00a", + "id": "52f077e1e1db7ab5", + "type": "group", + "z": "92165c72.a5f948", + "name": "Verbraucher 5", + "style": { + "label": true, + "stroke": "#0070c0", + "fill": "#0070c0", + "fill-opacity": "0.25" + }, + "nodes": [ + "ff5dd392f78b2d8f", + "81ab1a3af019de85", + "ef0b4f386d197401", + "74b0bdb72a62f98b", + "87f445e673cc518d", + "838438ec9c35e07b", + "d3d2fcdd8e890908", + "6942229fffd2fd78", + "35c18cbd1d408e5f", + "c60d53f962472948", + "8c58f3c90106e5a2", + "9c32231b50f615ef", + "46dc9a5ce83fdf2d", + "e1aa322b025a934d", + "eb6fe5a064b91460" + ], + "x": 14, + "y": 3099, + "w": 1192, + "h": 302 + }, + { + "id": "5c48b79a.d6b918", + "type": "mqtt-broker", + "name": "openWB-20", + "broker": "localhost", + "port": "1883", + "clientid": "node-red-simulator", + "autoConnect": true, + "usetls": false, + "compatmode": false, + "protocolVersion": "4", + "keepalive": "60", + "cleansession": true, + "autoUnsubscribe": true, + "birthTopic": "", + "birthQos": "0", + "birthPayload": "", + "birthMsg": {}, + "closeTopic": "", + "closeQos": "0", + "closePayload": "", + "closeMsg": {}, + "willTopic": "", + "willQos": "0", + "willPayload": "", + "willMsg": {}, + "userProps": "", + "sessionExpiry": "" + }, + { + "id": "940b8055.1139f", + "type": "ui_tab", + "name": "Simulator 2.0", + "icon": "fa-car ", + "order": 1, + "disabled": false, + "hidden": false + }, + { + "id": "703fdeb2.7ab84", + "type": "ui_group", + "name": "Lp 1", + "tab": "940b8055.1139f", + "order": 4, + "disp": true, + "width": "6", + "collapse": true, + "className": "" + }, + { + "id": "77ebf297.439d3c", + "type": "ui_group", + "name": "Lp 3", + "tab": "940b8055.1139f", + "order": 6, + "disp": true, + "width": "6", + "collapse": false, + "className": "" + }, + { + "id": "9b18f281.ca979", + "type": "ui_group", + "name": "EVU Zähler", + "tab": "940b8055.1139f", + "order": 1, + "disp": true, + "width": "6", + "collapse": false, + "className": "" + }, + { + "id": "bda74558.0d74e8", + "type": "ui_group", + "name": "Speicher 1", + "tab": "940b8055.1139f", + "order": 3, + "disp": true, + "width": "6", + "collapse": false, + "className": "" + }, + { + "id": "1690fa25.a7c9a6", + "type": "ui_group", + "name": "PV 1", + "tab": "940b8055.1139f", + "order": 2, + "disp": true, + "width": "6", + "collapse": false, + "className": "" + }, + { + "id": "3fdb380f.aba898", + "type": "ui_group", + "name": "Lp 2", + "tab": "940b8055.1139f", + "order": 5, + "disp": true, + "width": "6", + "collapse": false, + "className": "" + }, + { + "id": "027f72e4a03b6182", + "type": "ui_base", + "theme": { + "name": "theme-light", + "lightTheme": { + "default": "#0094CE", + "baseColor": "#0094CE", + "baseFont": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif", + "edited": true, + "reset": false + }, + "darkTheme": { + "default": "#097479", + "baseColor": "#097479", + "baseFont": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif", + "edited": false + }, + "customTheme": { + "name": "Untitled Theme 1", + "default": "#4B7930", + "baseColor": "#4B7930", + "baseFont": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif" + }, + "themeState": { + "base-color": { + "default": "#0094CE", + "value": "#0094CE", + "edited": false + }, + "page-titlebar-backgroundColor": { + "value": "#0094CE", + "edited": false + }, + "page-backgroundColor": { + "value": "#fafafa", + "edited": false + }, + "page-sidebar-backgroundColor": { + "value": "#ffffff", + "edited": false + }, + "group-textColor": { + "value": "#1bbfff", + "edited": false + }, + "group-borderColor": { + "value": "#ffffff", + "edited": false + }, + "group-backgroundColor": { + "value": "#ffffff", + "edited": false + }, + "widget-textColor": { + "value": "#111111", + "edited": false + }, + "widget-backgroundColor": { + "value": "#0094ce", + "edited": false + }, + "widget-borderColor": { + "value": "#ffffff", + "edited": false + }, + "base-font": { + "value": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif" + } + }, + "angularTheme": { + "primary": "indigo", + "accents": "blue", + "warn": "red", + "background": "grey", + "palette": "light" + } + }, + "site": { + "name": "Node-RED Dashboard", + "hideToolbar": "false", + "allowSwipe": "false", + "lockMenu": "false", + "allowTempTheme": "true", + "dateFormat": "DD.MM.YYYY", + "sizes": { + "sx": 48, + "sy": 48, + "gx": 6, + "gy": 6, + "cx": 6, + "cy": 6, + "px": 0, + "py": 0 + } + } + }, + { + "id": "0360fe6d7d9bc018", + "type": "ui_group", + "name": "Verbraucher 4 mit Leistungsvorgabe", + "tab": "940b8055.1139f", + "order": 7, + "disp": true, + "width": 6, + "collapse": false, + "className": "" + }, + { + "id": "0757fad41b9a9fcd", + "type": "ui_group", + "name": "schaltbarer Verbraucher 5", + "tab": "940b8055.1139f", + "order": 8, + "disp": true, + "width": 6, + "collapse": false, + "className": "" + }, + { + "id": "180041c4.08fc2e", "type": "change", - "z": "2dd5cf5c.4ae26", - "name": "Init flow context", + "z": "c5821ca1.ee2da", + "name": "", "rules": [ { "t": "set", - "p": "bat", - "pt": "flow", - "to": "0", - "tot": "num" - }, - { - "t": "set", - "p": "evu", - "pt": "flow", - "to": "0", - "tot": "num" - }, - { - "t": "set", - "p": "maxPower", - "pt": "flow", - "to": "3300", - "tot": "num" - }, - { - "t": "set", - "p": "dynamicMaxPower", + "p": "pv", "pt": "flow", - "to": "3300", - "tot": "str" + "to": "$min([(payload+$flowContext(\"PVNorm\"))*-1,0])", + "tot": "jsonata" }, { "t": "set", - "p": "maxCapacity", - "pt": "flow", - "to": "5000", - "tot": "num" + "p": "payload", + "pt": "msg", + "to": "pv", + "tot": "flow" }, - { - "t": "set", - "p": "actualCapacity", - "pt": "flow", - "to": "2500", - "tot": "num" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 320, - "y": 460, - "wires": [ - [] - ] - }, - { - "id": "dec3f627.a2d958", - "type": "change", - "z": "2dd5cf5c.4ae26", - "name": "", - "rules": [ { "t": "set", "p": "topic", "pt": "msg", - "to": "EVU", + "to": "/pv/W", "tot": "str" } ], @@ -1045,24 +1174,62 @@ "from": "", "to": "", "reg": false, - "x": 920, - "y": 840, + "x": 760, + "y": 380, "wires": [ - [] + [ + "762b7362.1cab7c" + ] ] }, { - "id": "3ef4b7a7.942b78", - "type": "change", - "z": "2dd5cf5c.4ae26", + "id": "2e0d1128.5eb14e", + "type": "smooth", + "z": "c5821ca1.ee2da", "name": "", - "rules": [ - { + "property": "payload", + "action": "mean", + "count": "10", + "round": "1", + "mult": "single", + "reduce": false, + "x": 560, + "y": 380, + "wires": [ + [ + "180041c4.08fc2e" + ] + ] + }, + { + "id": "6506b2a6.b2ebdc", + "type": "random", + "z": "c5821ca1.ee2da", + "name": "+/- 100W", + "low": "-100", + "high": "100", + "inte": "false", + "property": "payload", + "x": 360, + "y": 380, + "wires": [ + [ + "2e0d1128.5eb14e" + ] + ] + }, + { + "id": "27c8d022.8cc7c", + "type": "change", + "z": "c5821ca1.ee2da", + "name": "Energie in Wh", + "rules": [ + { "t": "set", - "p": "topic", + "p": "payload", "pt": "msg", - "to": "BAT", - "tot": "str" + "to": "$flowContext(\"pv\")*timeInterval/1000/3600*(-1)", + "tot": "jsonata" } ], "action": "", @@ -1070,55 +1237,59 @@ "from": "", "to": "", "reg": false, - "x": 920, - "y": 880, + "x": 760, + "y": 440, "wires": [ - [] - ] + [ + "27220a75.050556" + ] + ], + "info": "$number(payload)*(timeInterval/1000)/3600/1000" }, { - "id": "bef0a1f8.2e2cf", + "id": "12b3849e.717fcb", "type": "inject", - "z": "2dd5cf5c.4ae26", - "name": "Clear chart on deploy", + "z": "c5821ca1.ee2da", + "name": "", "props": [ { - "p": "payload", - "v": "{\"data\":[]}", - "vt": "json" - }, - { - "p": "topic", - "v": "", - "vt": "string" + "p": "payload" } ], - "repeat": "", + "repeat": "2", "crontab": "", "once": true, + "onceDelay": "1", "topic": "", - "payload": "{\"data\":[]}", - "payloadType": "json", - "x": 680, - "y": 960, + "payload": "", + "payloadType": "date", + "x": 150, + "y": 380, "wires": [ [ - "9079ffaf.4a096" + "6506b2a6.b2ebdc" ] ] }, { - "id": "9079ffaf.4a096", + "id": "27220a75.050556", "type": "change", - "z": "2dd5cf5c.4ae26", - "name": "", + "z": "c5821ca1.ee2da", + "name": "Zähler aktualisieren", "rules": [ { - "t": "move", - "p": "payload.data", + "t": "set", + "p": "PV_Zähler", + "pt": "flow", + "to": "payload+$flowContext(\"PV_Zähler\")", + "tot": "jsonata" + }, + { + "t": "set", + "p": "payload", "pt": "msg", - "to": "payload", - "tot": "msg" + "to": "PV_Zähler", + "tot": "flow" } ], "action": "", @@ -1126,140 +1297,110 @@ "from": "", "to": "", "reg": false, - "x": 916, - "y": 960, + "x": 970, + "y": 440, "wires": [ [] ] }, { - "id": "167235f4.d859ea", - "type": "function", - "z": "2dd5cf5c.4ae26", - "name": "Map to Power Range", - "func": "const range = flow.get(\"maxPower\");\nconst dynamicPower = flow.get(\"dynamicMaxPower\");\nconst actualCapacity = flow.get(\"actualCapacity\");\nconst maxCapacity = flow.get(\"maxCapacity\");\nmsg.payload = msg.payload * (2 * range) - range;\nif (actualCapacity == 0) {\n msg.payload = Math.max(msg.payload, 0);\n} else if (actualCapacity == maxCapacity) {\n msg.payload = Math.min(msg.payload, 0);\n}\nif (dynamicPower != null) {\n if (dynamicPower > 0) {\n msg.payload = dynamicPower;\n } else if (Math.abs(msg.payload) > dynamicPower) {\n msg.payload = dynamicPower;\n }\n}\nreturn msg;", - "outputs": 1, - "timeout": "", - "noerr": 0, - "initialize": "", - "finalize": "", - "libs": [], - "x": 620, - "y": 560, - "wires": [ - [ - "3ef4b7a7.942b78", - "2e89309f.ba832" - ] - ] - }, - { - "id": "a6d6bae9.e7d3f8", + "id": "f2680f1d.7414d", "type": "inject", - "z": "2dd5cf5c.4ae26", - "name": "", + "z": "c5821ca1.ee2da", + "name": "Publish Trigger", "props": [ { "p": "payload" } ], - "repeat": "2", + "repeat": "5", "crontab": "", "once": true, "onceDelay": "5", "topic": "", - "payload": "evu", - "payloadType": "flow", + "payload": "", + "payloadType": "date", "x": 140, - "y": 560, + "y": 40, "wires": [ [ - "dec3f627.a2d958", - "9ef887dd.50864" + "cb144244.8df92" ] ] }, { - "id": "dc6bbb24.2c42a8", - "type": "switch", - "z": "2dd5cf5c.4ae26", + "id": "cb144244.8df92", + "type": "function", + "z": "c5821ca1.ee2da", + "name": "Senden der Flow-Daten", + "func": "const ComponentId = env.get(\"Component-ID\");\n\nconst actualPower = parseInt(flow.get(\"pv\").toFixed(0));\nconst actualPowerkW = actualPower / 1000;\n\nvar statusColor = \"green\";\nvar statusShape = \"dot\";\nif(actualPower > -100)\n statusColor= \"red\";\n\nnode.status({\n fill: statusColor,\n shape: statusShape,\n text:actualPowerkW.toFixed(1)+\"kW\"\n });\n\nreturn [\n [\n {\n topic: \"openWB/set/mqtt/pv/\" + ComponentId + \"/get/power\",\n payload: actualPower\n },\n {\n topic: \"openWB/set/mqtt/pv/\" + ComponentId + \"/get/exported\",\n payload: parseInt(flow.get(\"PV_Zähler\").toFixed(0))\n }\n ]\n]", + "outputs": 1, + "timeout": "", + "noerr": 0, + "initialize": "// Code added here will be run once\n// whenever the node is deployed.\nnode.status({\n fill: \"yellow\",\n shape: \"ring\",\n text: \"starting...\"\n });\n", + "finalize": "", + "libs": [], + "x": 370, + "y": 40, + "wires": [ + [] + ] + }, + { + "id": "b8b748bb.7b2148", + "type": "status", + "z": "c5821ca1.ee2da", "name": "", - "property": "bat", - "propertyType": "flow", - "rules": [ - { - "t": "lt", - "v": "0", - "vt": "str" - }, - { - "t": "gte", - "v": "0", - "vt": "str" - } + "scope": [ + "cb144244.8df92" ], - "checkall": "true", - "repair": false, - "outputs": 2, - "x": 910, - "y": 640, + "x": 700, + "y": 40, "wires": [ - [ - "3c54d06e.c5af5" - ], - [ - "23f1985b.8c78b8" - ] + [] ] }, { - "id": "32fd7a43.8ae456", - "type": "change", - "z": "2dd5cf5c.4ae26", - "name": "Energie in Wh", + "id": "c9a13be.fe492c8", + "type": "switch", + "z": "c5821ca1.ee2da", + "name": "Split Topics", + "property": "topic", + "propertyType": "msg", "rules": [ { - "t": "set", - "p": "payload", - "pt": "msg", - "to": "timeInterval/1000/3600*$flowContext(\"bat\")", - "tot": "jsonata" + "t": "regex", + "v": "\\/W$", + "vt": "str", + "case": false } ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 740, - "y": 640, + "checkall": "true", + "repair": false, + "outputs": 1, + "x": 210, + "y": 140, "wires": [ [ - "dc6bbb24.2c42a8", - "a4d0b51c.aa13c8" + "25a41bf5.5cb904" ] ], - "info": "$number(payload)*(timeInterval/1000)/3600/1000" + "outputLabels": [ + "Soll-Leistung" + ] }, { - "id": "3c54d06e.c5af5", + "id": "25a41bf5.5cb904", "type": "change", - "z": "2dd5cf5c.4ae26", - "name": "Zähler Einspeisung aktualisieren", + "z": "c5821ca1.ee2da", + "name": "", "rules": [ { "t": "set", - "p": "WhExported", + "p": "PVNorm", "pt": "flow", - "to": "payload*(-1)+$flowContext(\"WhExported\")", - "tot": "jsonata" - }, - { - "t": "set", - "p": "payload", - "pt": "msg", - "to": "WhExported", - "tot": "flow" + "to": "payload", + "tot": "msg" } ], "action": "", @@ -1267,31 +1408,50 @@ "from": "", "to": "", "reg": false, - "x": 1150, - "y": 620, + "x": 430, + "y": 140, "wires": [ [] ] }, { - "id": "23f1985b.8c78b8", + "id": "7135e239.69cd8c", + "type": "inject", + "z": "c5821ca1.ee2da", + "name": "", + "props": [ + { + "p": "payload" + } + ], + "repeat": "", + "crontab": "", + "once": true, + "onceDelay": 0.1, + "topic": "", + "payload": "0", + "payloadType": "num", + "x": 130, + "y": 240, + "wires": [ + [ + "78037fbd.010fc", + "c7862a5e.6a3e28" + ] + ] + }, + { + "id": "a0ab0f47.d1e2b", "type": "change", - "z": "2dd5cf5c.4ae26", - "name": "Zähler Bezug aktualisieren", + "z": "c5821ca1.ee2da", + "name": "Zähler initialisieren", "rules": [ { "t": "set", - "p": "WhImported", + "p": "PV_Zähler", "pt": "flow", - "to": "payload+$flowContext(\"WhImported\")", - "tot": "jsonata" - }, - { - "t": "set", - "p": "payload", - "pt": "msg", - "to": "WhImported", - "tot": "flow" + "to": "payload", + "tot": "msg" } ], "action": "", @@ -1299,31 +1459,54 @@ "from": "", "to": "", "reg": false, - "x": 1140, - "y": 660, + "x": 550, + "y": 240, "wires": [ [] ] }, { - "id": "2e89309f.ba832", + "id": "78037fbd.010fc", + "type": "switch", + "z": "c5821ca1.ee2da", + "name": "Zähler gesetzt?", + "property": "PV_Zähler", + "propertyType": "flow", + "rules": [ + { + "t": "null" + } + ], + "checkall": "true", + "repair": false, + "outputs": 1, + "x": 340, + "y": 240, + "wires": [ + [ + "a0ab0f47.d1e2b" + ] + ] + }, + { + "id": "c7862a5e.6a3e28", "type": "change", - "z": "2dd5cf5c.4ae26", - "name": "", + "z": "c5821ca1.ee2da", + "name": "Init flow context", "rules": [ { "t": "set", - "p": "topic", - "pt": "msg", - "to": "/houseBattery/W", - "tot": "str" + "p": "pv", + "pt": "flow", + "to": "0", + "tot": "num" }, { "t": "set", - "p": "bat", + "p": "PVNorm", "pt": "flow", - "to": "payload", - "tot": "msg" + "to": "1500", + "tot": "num" } ], "action": "", @@ -1331,58 +1514,16 @@ "from": "", "to": "", "reg": false, - "x": 940, - "y": 560, - "wires": [ - [ - "73fdf2f2.666c1c" - ] - ] - }, - { - "id": "a4d0b51c.aa13c8", - "type": "function", - "z": "2dd5cf5c.4ae26", - "name": "actualCapacity aktualisieren (SoC)", - "func": "var actualCapacity = flow.get(\"actualCapacity\");\nconst maxCapacity = flow.get(\"maxCapacity\");\n\nactualCapacity = Math.min(\n Math.max(\n actualCapacity + msg.payload,\n 0\n ),\n maxCapacity\n );\n\nflow.set(\"actualCapacity\", actualCapacity);\nmsg.payload = actualCapacity;\n\nreturn msg;", - "outputs": 1, - "timeout": "", - "noerr": 0, - "initialize": "", - "finalize": "", - "libs": [], - "x": 1000, - "y": 720, + "x": 340, + "y": 280, "wires": [ [] ] }, { - "id": "9ef887dd.50864", - "type": "PID", - "z": "2dd5cf5c.4ae26", - "name": "Leistungsregelung", - "setpoint": "0", - "pb": "11000", - "ti": "6", - "td": 0, - "integral_default": 0.5, - "smooth_factor": "0", - "max_interval": "10", - "enable": 1, - "disabled_op": "0,5", - "x": 370, - "y": 560, - "wires": [ - [ - "167235f4.d859ea" - ] - ] - }, - { - "id": "73fdf2f2.666c1c", + "id": "762b7362.1cab7c", "type": "interval-length", - "z": "2dd5cf5c.4ae26", + "z": "c5821ca1.ee2da", "format": "mills", "bytopic": false, "minimum": "", @@ -1400,19 +1541,19 @@ "timestampField": "previousTimestamp", "repeatTimeout": false, "name": "Zeit zwischen den Nachrichten messen", - "x": 440, - "y": 640, + "x": 460, + "y": 440, "wires": [ [ - "32fd7a43.8ae456" + "27c8d022.8cc7c" ], [] ] }, { - "id": "a6823773fb1192f8", + "id": "fdaf3909e1383774", "type": "inject", - "z": "2dd5cf5c.4ae26", + "z": "c5821ca1.ee2da", "name": "Debug", "props": [ { @@ -1428,25 +1569,25 @@ "once": true, "onceDelay": "5", "topic": "debug", - "payload": "{\t \"power\": $flowContext(\"bat\"),\t \"max_power\": $flowContext(\"maxPower\"),\t \"dynamic_max_power\": $flowContext(\"dynamicMaxPower\"),\t \"evu_power\": $flowContext(\"evu\"),\t \"actual_capacity\": $flowContext(\"actualCapacity\"),\t \"max_capacity\": $flowContext(\"maxCapacity\"),\t \"counter_import\": $flowContext(\"WhImported\"),\t \"counter_export\": $flowContext(\"WhExported\")\t}", + "payload": "{\t \"power\": $flowContext(\"pv\"),\t \"power_norm\": $flowContext(\"PVNorm\"),\t \"counter\": $flowContext(\"PV_Zähler\")\t}", "payloadType": "jsonata", - "x": 1060, + "x": 1020, "y": 40, "wires": [ [] ] }, { - "id": "fef8a714af3c543a", + "id": "fa698281.c98db", "type": "change", "z": "2dd5cf5c.4ae26", "name": "", "rules": [ { "t": "set", - "p": "dynamicMaxPower", + "p": "maxPower", "pt": "flow", - "to": "payload = null ? payload : $number(payload)", + "to": "$number(payload)", "tot": "jsonata" } ], @@ -1455,253 +1596,256 @@ "from": "", "to": "", "reg": false, - "x": 750, - "y": 220, + "x": 720, + "y": 180, "wires": [ [] ] }, { - "id": "c7cb712c4b8055a0", + "id": "24d6c753.7611c8", + "type": "change", + "z": "2dd5cf5c.4ae26", + "name": "", + "rules": [ + { + "t": "set", + "p": "maxCapacity", + "pt": "flow", + "to": "$number(payload)", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 730, + "y": 260, + "wires": [ + [] + ] + }, + { + "id": "20f9c373.a12e3c", + "type": "change", + "z": "2dd5cf5c.4ae26", + "name": "", + "rules": [ + { + "t": "set", + "p": "evu", + "pt": "flow", + "to": "$number(payload)", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 700, + "y": 300, + "wires": [ + [] + ] + }, + { + "id": "e46c92f3.d21a9", "type": "switch", "z": "2dd5cf5c.4ae26", - "name": "Filter by Component-ID", + "name": "Split Topics", "property": "topic", "propertyType": "msg", "rules": [ { - "t": "jsonata_exp", - "v": "$contains(topic, \"bat/\" & $string($env(\"Component-ID\")) & \"/\")", - "vt": "jsonata" + "t": "regex", + "v": "\\/soc", + "vt": "str", + "case": false }, { "t": "regex", - "v": "^/", + "v": "\\/BatMaxPower", + "vt": "str", + "case": false + }, + { + "t": "regex", + "v": "\\/power_limit", + "vt": "str", + "case": false + }, + { + "t": "regex", + "v": "\\/BatCapacity", + "vt": "str", + "case": false + }, + { + "t": "regex", + "v": "\\/evu/W$", "vt": "str", "case": false } ], "checkall": "true", "repair": false, - "outputs": 2, - "x": 230, + "outputs": 5, + "x": 490, "y": 200, "wires": [ [ - "e46c92f3.d21a9" + "84fa4a81.59f898" ], [ - "e46c92f3.d21a9" + "fa698281.c98db" + ], + [ + "fef8a714af3c543a" + ], + [ + "24d6c753.7611c8" + ], + [ + "20f9c373.a12e3c" ] - ] - }, - { - "id": "da060938.c8ff48", - "type": "subflow", - "name": "Sub EVU 2.0", - "info": "", - "category": "", - "in": [ - { - "x": 40, - "y": 380, - "wires": [ - { - "id": "60345bb6.1855d4" - } - ] - } - ], - "out": [ - { - "x": 560, - "y": 40, - "wires": [ - { - "id": "97a98e87.248e6", - "port": 0 - } - ] - }, - { - "x": 1400, - "y": 1040, - "wires": [ - { - "id": "f7fd464c.dac218", - "port": 0 - } - ] - }, - { - "x": 1140, - "y": 40, - "wires": [ - { - "id": "c1f27145620a046e", - "port": 0 - } - ] - } - ], - "env": [ - { - "name": "Component-ID", - "type": "num", - "value": "0" - } ], - "meta": {}, - "color": "#DDAA99", "outputLabels": [ - "openWB", - "schnelle Regelwerte", - "Debug", - "Dashboard" - ], - "status": { - "x": 850, - "y": 40, - "wires": [ - { - "id": "8d39538d.a5c0b", - "port": 0 - } - ] - } + "SoC", + "Max. Power", + "", + "Kapazität", + "EVU" + ] }, { - "id": "a14ffb7.da27208", - "type": "inject", - "z": "da060938.c8ff48", + "id": "84fa4a81.59f898", + "type": "change", + "z": "2dd5cf5c.4ae26", "name": "", - "props": [ + "rules": [ { - "p": "payload" + "t": "set", + "p": "actualCapacity", + "pt": "flow", + "to": "(payload/100)*$flowContext(\"maxCapacity\")\t", + "tot": "jsonata" } ], - "repeat": "2", - "crontab": "", - "once": true, - "onceDelay": "2", - "topic": "", - "payload": "", - "payloadType": "date", - "x": 130, - "y": 980, - "wires": [ - [ - "2eb2b9d4.130976" - ] - ] - }, - { - "id": "2eb2b9d4.130976", - "type": "random", - "z": "da060938.c8ff48", - "name": "+/- 50 W", - "low": "-50", - "high": "50", - "inte": "false", - "property": "payload", - "x": 320, - "y": 980, + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 730, + "y": 140, "wires": [ - [ - "43f0c42.2e71e3c" - ] + [] ] }, { - "id": "43f0c42.2e71e3c", - "type": "smooth", - "z": "da060938.c8ff48", + "id": "f5afed4e.b6449", + "type": "status", + "z": "2dd5cf5c.4ae26", "name": "", - "property": "payload", - "action": "mean", - "count": "10", - "round": "1", - "mult": "single", - "reduce": false, - "x": 500, - "y": 980, + "scope": [ + "28e0a4ab.758cfc" + ], + "x": 720, + "y": 40, "wires": [ - [ - "80f26b21aa9b6cca" - ] + [] ] }, { - "id": "3ba0e67b.44155a", + "id": "28e0a4ab.758cfc", "type": "function", - "z": "da060938.c8ff48", - "name": "Summe", - "func": "node.status({\n text: flow.get(\"leistungLP1\")+\"/\"+flow.get(\"leistungLP2\")+\"/\"+flow.get(\"leistungLP3\")+\"/\"+flow.get(\"hausverbrauch\")+\"/\"+flow.get(\"pv\")+\"/\"+flow.get(\"bat\")\n });\n\n\nmsg.payload = flow.get(\"leistungLP1\") + flow.get(\"leistungLP2\") + flow.get(\"leistungLP3\") + flow.get(\"hausverbrauch\") + flow.get(\"pv\") + flow.get(\"bat\")\nreturn msg;", + "z": "2dd5cf5c.4ae26", + "name": "Senden der Flow-Daten", + "func": "const ComponentId = env.get(\"Component-ID\");\n\nconst actualPower = parseInt(flow.get(\"bat\").toFixed(0));\nconst actualPowerkW = actualPower / 1000;\n\nconst maxCapacity = flow.get(\"maxCapacity\");\nconst actualCapacity = flow.get(\"actualCapacity\");\nvar actualSoc = actualCapacity / maxCapacity * 100;\nactualSoc = parseInt(actualSoc.toFixed(0));\n\nvar statusColor = \"yellow\";\nvar statusShape = \"ring\";\nif(actualPower < 0)\n statusColor = \"red\";\nif(actualPower > 0)\n statusColor = \"green\";\nif(actualSoc > 0)\n statusShape = \"dot\";\n\nnode.status({\n fill: statusColor,\n shape: statusShape,\n text: actualPowerkW.toFixed(1)+\"kW \" + actualSoc + \"%\"\n });\n\nreturn [\n [\n {\n topic: \"openWB/set/mqtt/bat/\" + ComponentId + \"/get/imported\",\n payload: parseFloat(flow.get(\"WhImported\").toFixed(3))\n },\n {\n topic: \"openWB/set/mqtt/bat/\" + ComponentId + \"/get/exported\",\n payload: parseFloat(flow.get(\"WhExported\").toFixed(3))\n },\n {\n topic: \"openWB/set/mqtt/bat/\" + ComponentId + \"/get/power\",\n payload: actualPower\n },\n {\n topic: \"openWB/set/mqtt/bat/\" + ComponentId + \"/get/soc\",\n payload: actualSoc\n },\n {\n topic: \"openWB/set/mqtt/bat/\" + ComponentId + \"/get/currents\",\n payload: JSON.stringify([actualPower / 230 / 3, actualPower / 230 / 3, actualPower / 230 / 3])\n },\n ]\n]", "outputs": 1, + "timeout": "", "noerr": 0, "initialize": "", "finalize": "", "libs": [], - "x": 600, - "y": 1040, + "x": 370, + "y": 40, + "wires": [ + [] + ] + }, + { + "id": "4b72ed2d.3021d4", + "type": "inject", + "z": "2dd5cf5c.4ae26", + "name": "Publish Trigger", + "props": [ + { + "p": "payload" + } + ], + "repeat": "5", + "crontab": "", + "once": true, + "onceDelay": "5", + "topic": "", + "payload": "", + "payloadType": "date", + "x": 130, + "y": 40, "wires": [ [ - "f7fd464c.dac218" + "28e0a4ab.758cfc" ] ] }, { - "id": "9e71bf31.d0c6d", - "type": "switch", - "z": "da060938.c8ff48", - "name": "Einspeisung/Bezug", - "property": "evu", - "propertyType": "flow", - "rules": [ + "id": "78c63bc8.9860b4", + "type": "inject", + "z": "2dd5cf5c.4ae26", + "name": "", + "props": [ { - "t": "lt", - "v": "0", - "vt": "str" + "p": "payload" }, { - "t": "gte", - "v": "0", + "p": "topic", "vt": "str" } ], - "checkall": "true", - "repair": false, - "outputs": 2, - "x": 930, - "y": 1140, + "repeat": "", + "crontab": "", + "once": true, + "onceDelay": 0.1, + "topic": "", + "payload": "0", + "payloadType": "num", + "x": 130, + "y": 380, "wires": [ [ - "5381aca8.785c94" - ], - [ - "68dda824.2a1208" + "13d7d661.97e00a", + "778f747e.c1b43c", + "b274f2af.4b00a" ] ] }, { - "id": "f7fd464c.dac218", + "id": "5b44278d.e38d58", "type": "change", - "z": "da060938.c8ff48", - "name": "", + "z": "2dd5cf5c.4ae26", + "name": "Zähler Bezug initialisieren", "rules": [ { "t": "set", - "p": "evu", + "p": "WhImported", "pt": "flow", "to": "payload", "tot": "msg" - }, - { - "t": "set", - "p": "topic", - "pt": "msg", - "to": "/evu/W", - "tot": "str" } ], "action": "", @@ -1709,175 +1853,70 @@ "from": "", "to": "", "reg": false, - "x": 800, - "y": 1040, + "x": 630, + "y": 380, "wires": [ - [ - "9eed1b2f.670f88" - ] + [] ] }, { - "id": "2af10c7b.8279c4", - "type": "change", - "z": "da060938.c8ff48", - "name": "Energie in Wh", + "id": "13d7d661.97e00a", + "type": "switch", + "z": "2dd5cf5c.4ae26", + "name": "Zähler Bezug gesetzt?", + "property": "WhImported", + "propertyType": "flow", "rules": [ { - "t": "set", - "p": "payload", - "pt": "msg", - "to": "$flowContext(\"evu\")*timeInterval/1000/3600", - "tot": "jsonata" + "t": "null" } ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 720, - "y": 1140, + "checkall": "true", + "repair": false, + "outputs": 1, + "x": 340, + "y": 380, "wires": [ [ - "9e71bf31.d0c6d" + "5b44278d.e38d58" ] - ], - "info": "$number(payload)*(timeInterval/1000)/3600/1000" - }, - { - "id": "5381aca8.785c94", - "type": "change", - "z": "da060938.c8ff48", - "name": "Zähler Einspeisung aktualisieren", - "rules": [ - { - "t": "set", - "p": "WhExported", - "pt": "flow", - "to": "payload*(-1)+$flowContext(\"WhExported\")", - "tot": "jsonata" - }, - { - "t": "set", - "p": "payload", - "pt": "msg", - "to": "WhExported", - "tot": "flow" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 1190, - "y": 1120, - "wires": [ - [] ] }, { - "id": "68dda824.2a1208", - "type": "change", - "z": "da060938.c8ff48", - "name": "Zähler Bezug aktualisieren", + "id": "778f747e.c1b43c", + "type": "switch", + "z": "2dd5cf5c.4ae26", + "name": "Zähler Einspeisung gesetzt?", + "property": "WhExported", + "propertyType": "flow", "rules": [ { - "t": "set", - "p": "WhImported", - "pt": "flow", - "to": "payload+$flowContext(\"WhImported\")", - "tot": "jsonata" - }, - { - "t": "set", - "p": "payload", - "pt": "msg", - "to": "WhImported", - "tot": "flow" + "t": "null" } ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 1180, - "y": 1160, - "wires": [ - [] - ] - }, - { - "id": "8d39538d.a5c0b", - "type": "status", - "z": "da060938.c8ff48", - "name": "", - "scope": [ - "97a98e87.248e6" - ], - "x": 740, - "y": 40, - "wires": [ - [] - ] - }, - { - "id": "97a98e87.248e6", - "type": "function", - "z": "da060938.c8ff48", - "name": "Senden der Flow-Daten", - "func": "const ComponentId = env.get(\"Component-ID\");\n\nconst actualPower = parseInt(flow.get(\"evu\").toFixed(0));\nconst actualPowerkW = actualPower / 1000;\nconst actualCurrent = flow.get(\"evu_current\");\nconst voltageL1 = flow.get(\"spannungL1\");\nconst voltageL2 = flow.get(\"spannungL2\");\nconst voltageL3 = flow.get(\"spannungL3\");\nconst powerFactorL1 = flow.get(\"leistungsfaktorL1\");\nconst powerFactorL2 = flow.get(\"leistungsfaktorL2\");\nconst powerFactorL3 = flow.get(\"leistungsfaktorL3\");\n\nvar statusColor = \"green\";\nvar statusShape = \"dot\";\nif(actualPower > 0)\n statusColor= \"red\";\n\nnode.status({\n fill: statusColor,\n shape: statusShape,\n text:actualPowerkW.toFixed(1)+\"kW, \"+flow.get(\"evu_current\")\n });\n\nreturn [\n [\n {\n topic: \"openWB/set/mqtt/counter/\" + ComponentId + \"/get/imported\",\n payload: parseFloat(flow.get(\"WhImported\").toFixed(3))\n },\n {\n topic: \"openWB/set/mqtt/counter/\" + ComponentId + \"/get/exported\",\n payload: parseFloat(flow.get(\"WhExported\").toFixed(3))\n },\n {\n topic: \"openWB/set/mqtt/counter/\" + ComponentId + \"/get/power\",\n payload: parseInt(flow.get(\"evu\").toFixed(0))\n },\n {\n topic: \"openWB/set/mqtt/counter/\" + ComponentId + \"/get/currents\",\n payload: actualCurrent\n },\n {\n topic: \"openWB/set/mqtt/counter/\" + ComponentId + \"/get/voltages\",\n payload: [voltageL1, voltageL2, voltageL3]\n },\n {\n topic: \"openWB/set/mqtt/counter/\" + ComponentId + \"/get/powers\",\n payload: [voltageL1 * actualCurrent[0] * powerFactorL1, voltageL2 * actualCurrent[1] * powerFactorL2, voltageL3 * actualCurrent[2] * powerFactorL3]\n },\n {\n topic: \"openWB/set/mqtt/counter/\" + ComponentId + \"/get/power_factors\",\n payload: [powerFactorL1, powerFactorL2, powerFactorL3]\n },\n {\n topic: \"openWB/set/mqtt/counter/\" + ComponentId + \"/get/frequency\",\n payload: parseFloat(flow.get(\"frequency\"))\n }\n ]\n]", + "checkall": "true", + "repair": false, "outputs": 1, - "timeout": "", - "noerr": 0, - "initialize": "", - "finalize": "", - "libs": [], - "x": 380, - "y": 40, - "wires": [ - [] - ] - }, - { - "id": "7ccddecd.3d4f7", - "type": "inject", - "z": "da060938.c8ff48", - "name": "Publish Trigger", - "props": [ - { - "p": "payload" - } - ], - "repeat": "5", - "crontab": "", - "once": true, - "onceDelay": "5", - "topic": "", - "payload": "", - "payloadType": "date", - "x": 140, - "y": 40, + "x": 360, + "y": 420, "wires": [ [ - "97a98e87.248e6" + "c5700f42.8bcec" ] ] }, { - "id": "d4ec25e5.d87818", + "id": "c5700f42.8bcec", "type": "change", - "z": "da060938.c8ff48", - "name": "", + "z": "2dd5cf5c.4ae26", + "name": "Zähler Einspeisung initialisieren", "rules": [ { "t": "set", - "p": "leistungLP1", + "p": "WhExported", "pt": "flow", - "to": "$number(payload)", - "tot": "jsonata" + "to": "payload", + "tot": "msg" } ], "action": "", @@ -1885,24 +1924,59 @@ "from": "", "to": "", "reg": false, - "x": 440, - "y": 360, + "x": 650, + "y": 420, "wires": [ [] ] }, { - "id": "d02876f.be87688", + "id": "b274f2af.4b00a", "type": "change", - "z": "da060938.c8ff48", - "name": "", + "z": "2dd5cf5c.4ae26", + "name": "Init flow context", "rules": [ { "t": "set", - "p": "leistungLP2", + "p": "bat", "pt": "flow", - "to": "$number(payload)", - "tot": "jsonata" + "to": "0", + "tot": "num" + }, + { + "t": "set", + "p": "evu", + "pt": "flow", + "to": "0", + "tot": "num" + }, + { + "t": "set", + "p": "maxPower", + "pt": "flow", + "to": "3300", + "tot": "num" + }, + { + "t": "set", + "p": "dynamicMaxPower", + "pt": "flow", + "to": "3300", + "tot": "str" + }, + { + "t": "set", + "p": "maxCapacity", + "pt": "flow", + "to": "5000", + "tot": "num" + }, + { + "t": "set", + "p": "actualCapacity", + "pt": "flow", + "to": "2500", + "tot": "num" } ], "action": "", @@ -1910,24 +1984,24 @@ "from": "", "to": "", "reg": false, - "x": 440, + "x": 320, "y": 460, "wires": [ [] ] }, { - "id": "15aef799.6ac4c8", + "id": "dec3f627.a2d958", "type": "change", - "z": "da060938.c8ff48", + "z": "2dd5cf5c.4ae26", "name": "", "rules": [ { "t": "set", - "p": "leistungLP3", - "pt": "flow", - "to": "$number(payload)", - "tot": "jsonata" + "p": "topic", + "pt": "msg", + "to": "EVU", + "tot": "str" } ], "action": "", @@ -1935,24 +2009,24 @@ "from": "", "to": "", "reg": false, - "x": 440, - "y": 560, + "x": 920, + "y": 840, "wires": [ [] ] }, { - "id": "1e14f60e.53005a", + "id": "3ef4b7a7.942b78", "type": "change", - "z": "da060938.c8ff48", + "z": "2dd5cf5c.4ae26", "name": "", "rules": [ { "t": "set", - "p": "pv", - "pt": "flow", - "to": "$number(payload)", - "tot": "jsonata" + "p": "topic", + "pt": "msg", + "to": "BAT", + "tot": "str" } ], "action": "", @@ -1960,246 +2034,53 @@ "from": "", "to": "", "reg": false, - "x": 410, - "y": 660, + "x": 920, + "y": 880, "wires": [ [] ] }, { - "id": "60345bb6.1855d4", - "type": "switch", - "z": "da060938.c8ff48", - "name": "Split Topics", - "property": "topic", - "propertyType": "msg", - "rules": [ - { - "t": "regex", - "v": "\\/Hausverbrauch_p1$", - "vt": "str", - "case": false - }, - { - "t": "regex", - "v": "\\/Hausverbrauch_p2$", - "vt": "str", - "case": false - }, - { - "t": "regex", - "v": "\\/Hausverbrauch_p3$", - "vt": "str", - "case": false - }, - { - "t": "regex", - "v": "^simulator\\/chargepoint\\/[0-9]+\\/id$", - "vt": "str", - "case": false - }, - { - "t": "cont", - "v": "$join(\t [\t \"/chargepoint/\",\t $string($flowContext(\"id_LP1\")),\t \"/get/power_all\"\t ]\t)", - "vt": "jsonata" - }, - { - "t": "cont", - "v": "$join(\t [\t \"/chargepoint/\",\t $string($flowContext(\"id_LP1\")),\t \"/get/current_p1\"\t \t ]\t\t)\t", - "vt": "jsonata" - }, - { - "t": "cont", - "v": "$join(\t [\t \"/chargepoint/\",\t $string($flowContext(\"id_LP1\")),\t \"/get/current_p2\"\t \t ]\t\t)\t", - "vt": "jsonata" - }, - { - "t": "cont", - "v": "$join(\t [\t \"/chargepoint/\",\t $string($flowContext(\"id_LP1\")),\t \"/get/current_p3\"\t \t ]\t\t)\t", - "vt": "jsonata" - }, - { - "t": "cont", - "v": "$join(\t [\t \"/chargepoint/\",\t $string($flowContext(\"id_LP2\")),\t \"/get/power_all\"\t ]\t)", - "vt": "jsonata" - }, - { - "t": "cont", - "v": "$join(\t [\t \"/chargepoint/\",\t $string($flowContext(\"id_LP2\")),\t \"/get/current_p1\"\t \t ]\t\t)\t", - "vt": "jsonata" - }, - { - "t": "cont", - "v": "$join(\t [\t \"/chargepoint/\",\t $string($flowContext(\"id_LP2\")),\t \"/get/current_p2\"\t \t ]\t\t)\t", - "vt": "jsonata" - }, - { - "t": "cont", - "v": "$join(\t [\t \"/chargepoint/\",\t $string($flowContext(\"id_LP2\")),\t \"/get/current_p3\"\t \t ]\t\t)\t", - "vt": "jsonata" - }, - { - "t": "cont", - "v": "$join(\t [\t \"/chargepoint/\",\t $string($flowContext(\"id_LP3\")),\t \"/get/power_all\"\t ]\t)", - "vt": "jsonata" - }, - { - "t": "cont", - "v": "$join(\t [\t \"/chargepoint/\",\t $string($flowContext(\"id_LP3\")),\t \"/get/current_p1\"\t \t ]\t\t)\t", - "vt": "jsonata" - }, - { - "t": "cont", - "v": "$join(\t [\t \"/chargepoint/\",\t $string($flowContext(\"id_LP3\")),\t \"/get/current_p2\"\t \t ]\t\t)\t", - "vt": "jsonata" - }, - { - "t": "cont", - "v": "$join(\t [\t \"/chargepoint/\",\t $string($flowContext(\"id_LP3\")),\t \"/get/current_p3\"\t \t ]\t\t)\t", - "vt": "jsonata" - }, - { - "t": "regex", - "v": "\\/house[Bb]attery\\/W", - "vt": "str", - "case": false - }, - { - "t": "regex", - "v": "\\/pv\\/W$", - "vt": "str", - "case": false - }, - { - "t": "regex", - "v": "\\/frequency$", - "vt": "str", - "case": false - } - ], - "checkall": "true", - "repair": false, - "outputs": 19, - "x": 190, - "y": 380, - "wires": [ - [ - "1711441c919e2a1d" - ], - [ - "fc15ba2aeda2dbb2" - ], - [ - "a8e83e7e034910ce" - ], - [ - "ee96ba88673e1d59" - ], - [ - "d4ec25e5.d87818" - ], - [ - "aa9606e1.040c08" - ], - [ - "3491db86.1e0edc" - ], - [ - "98aedca3.6266b8" - ], - [ - "d02876f.be87688" - ], - [ - "1fe40bfd.d602cc" - ], - [ - "562388d9.7f1a9" - ], - [ - "41b8245b.5e25dc" - ], - [ - "15aef799.6ac4c8" - ], - [ - "d2263cc3.f53ef" - ], - [ - "68aeb24.1c455cc" - ], - [ - "eb955622.f1f86" - ], - [ - "e8165b40.91b4d8" - ], - [ - "1e14f60e.53005a" - ], - [ - "4d3c89efaca7be5e" - ] - ], - "outputLabels": [ - "", - "", - "", - "", - "Ladepunkt 1", - "", - "", - "", - "Ladepunkt 2", - "", - "", - "", - "Ladepunkt 3", - "", - "", - "", - "Speicher", - "PV 1", - "" - ] - }, - { - "id": "afb834d1.ac7628", + "id": "bef0a1f8.2e2cf", "type": "inject", - "z": "da060938.c8ff48", - "name": "", + "z": "2dd5cf5c.4ae26", + "name": "Clear chart on deploy", "props": [ { - "p": "payload" + "p": "payload", + "v": "{\"data\":[]}", + "vt": "json" + }, + { + "p": "topic", + "v": "", + "vt": "string" } ], "repeat": "", "crontab": "", "once": true, - "onceDelay": 0.1, "topic": "", - "payload": "0", - "payloadType": "num", - "x": 110, - "y": 800, + "payload": "{\"data\":[]}", + "payloadType": "json", + "x": 680, + "y": 960, "wires": [ [ - "a01ce865.943878", - "9573d411.0e2728", - "479952ca.b09c9c" + "9079ffaf.4a096" ] ] }, { - "id": "3d3ebf4b.ea013", + "id": "9079ffaf.4a096", "type": "change", - "z": "da060938.c8ff48", - "name": "Zähler Bezug initialisieren", + "z": "2dd5cf5c.4ae26", + "name": "", "rules": [ { - "t": "set", - "p": "WhImported", - "pt": "flow", + "t": "move", + "p": "payload.data", + "pt": "msg", "to": "payload", "tot": "msg" } @@ -2209,70 +2090,104 @@ "from": "", "to": "", "reg": false, - "x": 610, - "y": 800, + "x": 916, + "y": 960, "wires": [ [] ] }, { - "id": "a01ce865.943878", - "type": "switch", - "z": "da060938.c8ff48", - "name": "Zähler Bezug gesetzt?", - "property": "WhImported", - "propertyType": "flow", - "rules": [ - { - "t": "null" - } - ], - "checkall": "true", - "repair": false, + "id": "167235f4.d859ea", + "type": "function", + "z": "2dd5cf5c.4ae26", + "name": "Map to Power Range", + "func": "const range = flow.get(\"maxPower\");\nconst dynamicPower = flow.get(\"dynamicMaxPower\");\nconst actualCapacity = flow.get(\"actualCapacity\");\nconst maxCapacity = flow.get(\"maxCapacity\");\n\nmsg.payload = msg.payload * (2 * range) - range;\n\nif (actualCapacity == 0) {\n msg.payload = Math.max(msg.payload, 0);\n} else if (actualCapacity == maxCapacity) {\n msg.payload = Math.min(msg.payload, 0);\n}\n\nif (dynamicPower != null) { \n if (dynamicPower > 0) {\n msg.payload = dynamicPower;\n } else if (Math.abs(msg.payload) > Math.abs(dynamicPower)) { \n msg.payload = dynamicPower;\n }\n}\n\nreturn msg;", "outputs": 1, - "x": 320, - "y": 800, - "wires": [ - [ - "3d3ebf4b.ea013" + "timeout": "", + "noerr": 0, + "initialize": "", + "finalize": "", + "libs": [], + "x": 660, + "y": 560, + "wires": [ + [ + "3ef4b7a7.942b78", + "2e89309f.ba832" ] ] }, { - "id": "9573d411.0e2728", + "id": "a6d6bae9.e7d3f8", + "type": "inject", + "z": "2dd5cf5c.4ae26", + "name": "", + "props": [ + { + "p": "payload" + } + ], + "repeat": "2", + "crontab": "", + "once": true, + "onceDelay": "5", + "topic": "", + "payload": "evu", + "payloadType": "flow", + "x": 140, + "y": 560, + "wires": [ + [ + "dec3f627.a2d958", + "9ef887dd.50864" + ] + ] + }, + { + "id": "dc6bbb24.2c42a8", "type": "switch", - "z": "da060938.c8ff48", - "name": "Zähler Einspeisung gesetzt?", - "property": "WhExported", + "z": "2dd5cf5c.4ae26", + "name": "", + "property": "bat", "propertyType": "flow", "rules": [ { - "t": "null" + "t": "lt", + "v": "0", + "vt": "str" + }, + { + "t": "gte", + "v": "0", + "vt": "str" } ], "checkall": "true", "repair": false, - "outputs": 1, - "x": 340, - "y": 840, + "outputs": 2, + "x": 910, + "y": 640, "wires": [ [ - "76ad4288.0e1b7c" + "3c54d06e.c5af5" + ], + [ + "23f1985b.8c78b8" ] ] }, { - "id": "76ad4288.0e1b7c", + "id": "32fd7a43.8ae456", "type": "change", - "z": "da060938.c8ff48", - "name": "Zähler Einspeisung initialisieren", + "z": "2dd5cf5c.4ae26", + "name": "Energie in Wh", "rules": [ { "t": "set", - "p": "WhExported", - "pt": "flow", - "to": "payload", - "tot": "msg" + "p": "payload", + "pt": "msg", + "to": "timeInterval/1000/3600*$flowContext(\"bat\")", + "tot": "jsonata" } ], "action": "", @@ -2280,24 +2195,35 @@ "from": "", "to": "", "reg": false, - "x": 630, - "y": 840, + "x": 740, + "y": 640, "wires": [ - [] - ] + [ + "dc6bbb24.2c42a8", + "a4d0b51c.aa13c8" + ] + ], + "info": "$number(payload)*(timeInterval/1000)/3600/1000" }, { - "id": "e8165b40.91b4d8", + "id": "3c54d06e.c5af5", "type": "change", - "z": "da060938.c8ff48", - "name": "", + "z": "2dd5cf5c.4ae26", + "name": "Zähler Einspeisung aktualisieren", "rules": [ { "t": "set", - "p": "bat", + "p": "WhExported", "pt": "flow", - "to": "$number(payload)", + "to": "payload*(-1)+$flowContext(\"WhExported\")", "tot": "jsonata" + }, + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "WhExported", + "tot": "flow" } ], "action": "", @@ -2305,115 +2231,31 @@ "from": "", "to": "", "reg": false, - "x": 420, - "y": 700, + "x": 1150, + "y": 620, "wires": [ [] ] }, { - "id": "479952ca.b09c9c", + "id": "23f1985b.8c78b8", "type": "change", - "z": "da060938.c8ff48", - "name": "Init flow context", + "z": "2dd5cf5c.4ae26", + "name": "Zähler Bezug aktualisieren", "rules": [ { "t": "set", - "p": "leistungLP1", - "pt": "flow", - "to": "0", - "tot": "num" - }, - { - "t": "set", - "p": "leistungLP2", - "pt": "flow", - "to": "0", - "tot": "num" - }, - { - "t": "set", - "p": "leistungLP3", - "pt": "flow", - "to": "0", - "tot": "num" - }, - { - "t": "set", - "p": "evu", - "pt": "flow", - "to": "0", - "tot": "num" - }, - { - "t": "set", - "p": "pv", - "pt": "flow", - "to": "0", - "tot": "num" - }, - { - "t": "set", - "p": "bat", - "pt": "flow", - "to": "0", - "tot": "num" - }, - { - "t": "set", - "p": "hausverbrauch", - "pt": "flow", - "to": "1000", - "tot": "num" - }, - { - "t": "set", - "p": "HausverbrauchNorm", - "pt": "flow", - "to": "1000", - "tot": "num" - }, - { - "t": "set", - "p": "spannungL1", - "pt": "flow", - "to": "230", - "tot": "num" - }, - { - "t": "set", - "p": "spannungL2", - "pt": "flow", - "to": "230", - "tot": "num" - }, - { - "t": "set", - "p": "spannungL3", - "pt": "flow", - "to": "230", - "tot": "num" - }, - { - "t": "set", - "p": "leistungsfaktorL1", - "pt": "flow", - "to": "1.0", - "tot": "num" - }, - { - "t": "set", - "p": "leistungsfaktorL2", + "p": "WhImported", "pt": "flow", - "to": "1.0", - "tot": "num" + "to": "payload+$flowContext(\"WhImported\")", + "tot": "jsonata" }, { "t": "set", - "p": "leistungsfaktorL3", - "pt": "flow", - "to": "1.0", - "tot": "num" + "p": "payload", + "pt": "msg", + "to": "WhImported", + "tot": "flow" } ], "action": "", @@ -2421,24 +2263,31 @@ "from": "", "to": "", "reg": false, - "x": 300, - "y": 880, + "x": 1140, + "y": 660, "wires": [ [] ] }, { - "id": "aa9606e1.040c08", + "id": "2e89309f.ba832", "type": "change", - "z": "da060938.c8ff48", + "z": "2dd5cf5c.4ae26", "name": "", "rules": [ { "t": "set", - "p": "current_p1_LP1", + "p": "topic", + "pt": "msg", + "to": "/houseBattery/W", + "tot": "str" + }, + { + "t": "set", + "p": "bat", "pt": "flow", - "to": "$number(payload)", - "tot": "jsonata" + "to": "payload", + "tot": "msg" } ], "action": "", @@ -2446,92 +2295,122 @@ "from": "", "to": "", "reg": false, - "x": 460, - "y": 400, + "x": 940, + "y": 560, "wires": [ - [] + [ + "73fdf2f2.666c1c" + ] ] }, { - "id": "6c586f55.6462e", + "id": "a4d0b51c.aa13c8", "type": "function", - "z": "da060938.c8ff48", - "name": "Ströme", - "func": "const current_others = (flow.get(\"pv\") + flow.get(\"bat\")) / 230 / 3\nconst currentP1 = current_others + flow.get(\"hausverbrauch_p1\") / 230 + flow.get(\"current_p1_LP1\") + flow.get(\"current_p1_LP2\") + flow.get(\"current_p1_LP3\")\nconst currentP2 = current_others + flow.get(\"hausverbrauch_p2\") / 230 + flow.get(\"current_p2_LP1\") + flow.get(\"current_p2_LP2\") + flow.get(\"current_p2_LP3\")\nconst currentP3 = current_others + flow.get(\"hausverbrauch_p3\") / 230 + flow.get(\"current_p3_LP1\") + flow.get(\"current_p3_LP2\") + flow.get(\"current_p3_LP3\")\n\nmsg.payload = [parseFloat(currentP1.toFixed(2)), parseFloat(currentP2.toFixed(2)), parseFloat(currentP3.toFixed(2))]\nreturn msg;", + "z": "2dd5cf5c.4ae26", + "name": "actualCapacity aktualisieren (SoC)", + "func": "var actualCapacity = flow.get(\"actualCapacity\");\nconst maxCapacity = flow.get(\"maxCapacity\");\n\nactualCapacity = Math.min(\n Math.max(\n actualCapacity + msg.payload,\n 0\n ),\n maxCapacity\n );\n\nflow.set(\"actualCapacity\", actualCapacity);\nmsg.payload = actualCapacity;\n\nreturn msg;", "outputs": 1, + "timeout": "", "noerr": 0, "initialize": "", "finalize": "", "libs": [], - "x": 1020, - "y": 980, + "x": 1000, + "y": 720, + "wires": [ + [] + ] + }, + { + "id": "9ef887dd.50864", + "type": "PID", + "z": "2dd5cf5c.4ae26", + "name": "Leistungsregelung", + "setpoint": "0", + "pb": "11000", + "ti": "6", + "td": 0, + "integral_default": 0.5, + "smooth_factor": "0", + "max_interval": "10", + "enable": 1, + "disabled_op": "0,5", + "x": 390, + "y": 560, "wires": [ [ - "3c97930d.404f4c" + "167235f4.d859ea" ] ] }, { - "id": "3c97930d.404f4c", - "type": "change", - "z": "da060938.c8ff48", - "name": "", - "rules": [ - { - "t": "set", - "p": "evu_current", - "pt": "flow", - "to": "payload", - "tot": "msg" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 1230, - "y": 980, + "id": "73fdf2f2.666c1c", + "type": "interval-length", + "z": "2dd5cf5c.4ae26", + "format": "mills", + "bytopic": false, + "minimum": "", + "maximum": "", + "window": "", + "timeout": false, + "msgTimeout": "", + "minimumunit": "msecs", + "maximumunit": "msecs", + "windowunit": "msecs", + "msgTimeoutUnit": "msecs", + "reset": false, + "startup": false, + "msgField": "timeInterval", + "timestampField": "previousTimestamp", + "repeatTimeout": false, + "name": "Zeit zwischen den Nachrichten messen", + "x": 440, + "y": 640, "wires": [ + [ + "32fd7a43.8ae456" + ], [] ] }, { - "id": "1fe40bfd.d602cc", - "type": "change", - "z": "da060938.c8ff48", - "name": "", - "rules": [ + "id": "a6823773fb1192f8", + "type": "inject", + "z": "2dd5cf5c.4ae26", + "name": "Debug", + "props": [ { - "t": "set", - "p": "current_p1_LP2", - "pt": "flow", - "to": "$number(payload)", - "tot": "jsonata" + "p": "payload" + }, + { + "p": "topic", + "vt": "str" } ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 460, - "y": 500, + "repeat": "10", + "crontab": "", + "once": true, + "onceDelay": "5", + "topic": "debug", + "payload": "{\t \"power\": $flowContext(\"bat\"),\t \"max_power\": $flowContext(\"maxPower\"),\t \"dynamic_max_power\": $flowContext(\"dynamicMaxPower\"),\t \"evu_power\": $flowContext(\"evu\"),\t \"actual_capacity\": $flowContext(\"actualCapacity\"),\t \"max_capacity\": $flowContext(\"maxCapacity\"),\t \"counter_import\": $flowContext(\"WhImported\"),\t \"counter_export\": $flowContext(\"WhExported\")\t}", + "payloadType": "jsonata", + "x": 1060, + "y": 40, "wires": [ [] ] }, { - "id": "d2263cc3.f53ef", + "id": "fef8a714af3c543a", "type": "change", - "z": "da060938.c8ff48", + "z": "2dd5cf5c.4ae26", "name": "", "rules": [ { "t": "set", - "p": "current_p1_LP3", + "p": "dynamicMaxPower", "pt": "flow", - "to": "$number(payload)", + "to": "payload = null ? payload : $number(payload)", "tot": "jsonata" } ], @@ -2540,124 +2419,179 @@ "from": "", "to": "", "reg": false, - "x": 460, - "y": 600, + "x": 750, + "y": 220, "wires": [ [] ] }, { - "id": "3491db86.1e0edc", - "type": "change", - "z": "da060938.c8ff48", - "name": "", + "id": "c7cb712c4b8055a0", + "type": "switch", + "z": "2dd5cf5c.4ae26", + "name": "Filter by Component-ID", + "property": "topic", + "propertyType": "msg", "rules": [ { - "t": "set", - "p": "current_p2_LP1", - "pt": "flow", - "to": "$number(payload)", - "tot": "jsonata" + "t": "jsonata_exp", + "v": "$contains(topic, \"bat/\" & $string($env(\"Component-ID\")) & \"/\")", + "vt": "jsonata" + }, + { + "t": "regex", + "v": "^/", + "vt": "str", + "case": false } ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 780, - "y": 400, + "checkall": "true", + "repair": false, + "outputs": 2, + "x": 230, + "y": 200, "wires": [ - [] + [ + "e46c92f3.d21a9" + ], + [ + "e46c92f3.d21a9" + ] ] }, { - "id": "98aedca3.6266b8", - "type": "change", + "id": "a14ffb7.da27208", + "type": "inject", "z": "da060938.c8ff48", "name": "", - "rules": [ + "props": [ { - "t": "set", - "p": "current_p3_LP1", - "pt": "flow", - "to": "$number(payload)", - "tot": "jsonata" + "p": "payload" } ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 1100, - "y": 400, + "repeat": "2", + "crontab": "", + "once": true, + "onceDelay": "2", + "topic": "", + "payload": "", + "payloadType": "date", + "x": 130, + "y": 1280, "wires": [ - [] + [ + "2eb2b9d4.130976" + ] ] }, { - "id": "562388d9.7f1a9", - "type": "change", + "id": "2eb2b9d4.130976", + "type": "random", "z": "da060938.c8ff48", - "name": "", - "rules": [ - { - "t": "set", - "p": "current_p2_LP2", - "pt": "flow", - "to": "$number(payload)", - "tot": "jsonata" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 780, - "y": 500, + "name": "+/- 50 W", + "low": "-50", + "high": "50", + "inte": "false", + "property": "payload", + "x": 320, + "y": 1360, "wires": [ - [] + [ + "43f0c42.2e71e3c" + ] ] }, { - "id": "41b8245b.5e25dc", - "type": "change", + "id": "43f0c42.2e71e3c", + "type": "smooth", "z": "da060938.c8ff48", "name": "", - "rules": [ - { - "t": "set", - "p": "current_p3_LP2", - "pt": "flow", - "to": "$number(payload)", - "tot": "jsonata" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 1100, - "y": 500, + "property": "payload", + "action": "mean", + "count": "10", + "round": "1", + "mult": "single", + "reduce": false, + "x": 500, + "y": 1360, "wires": [ - [] + [ + "80f26b21aa9b6cca" + ] ] }, { - "id": "68aeb24.1c455cc", - "type": "change", - "z": "da060938.c8ff48", + "id": "3ba0e67b.44155a", + "type": "function", + "z": "da060938.c8ff48", + "name": "Summe", + "func": "node.warn(flow.get(\"leistungLP1\") + \"/\" + flow.get(\"leistungLP2\") + \"/\" + flow.get(\"leistungLP3\") + \"/\" + flow.get(\"hausverbrauch\") + \"/\" + flow.get(\"pv\") + \"/\" + flow.get(\"bat\") + \"/\" + flow.get(\"leistungConsumer4\") + \"/\" + flow.get(\"leistungConsumer5\"));\n\n\nmsg.payload = flow.get(\"leistungLP1\") + flow.get(\"leistungLP2\") + flow.get(\"leistungLP3\") + flow.get(\"hausverbrauch\") + flow.get(\"pv\") + flow.get(\"bat\") + flow.get(\"leistungConsumer4\") + flow.get(\"leistungConsumer5\")\nreturn msg;", + "outputs": 1, + "timeout": "", + "noerr": 0, + "initialize": "", + "finalize": "", + "libs": [], + "x": 600, + "y": 1420, + "wires": [ + [ + "f7fd464c.dac218" + ] + ] + }, + { + "id": "9e71bf31.d0c6d", + "type": "switch", + "z": "da060938.c8ff48", + "name": "Einspeisung/Bezug", + "property": "evu", + "propertyType": "flow", + "rules": [ + { + "t": "lt", + "v": "0", + "vt": "str" + }, + { + "t": "gte", + "v": "0", + "vt": "str" + } + ], + "checkall": "true", + "repair": false, + "outputs": 2, + "x": 930, + "y": 1520, + "wires": [ + [ + "5381aca8.785c94" + ], + [ + "68dda824.2a1208" + ] + ] + }, + { + "id": "f7fd464c.dac218", + "type": "change", + "z": "da060938.c8ff48", "name": "", "rules": [ { "t": "set", - "p": "current_p2_LP3", + "p": "evu", "pt": "flow", - "to": "$number(payload)", - "tot": "jsonata" + "to": "payload", + "tot": "msg" + }, + { + "t": "set", + "p": "topic", + "pt": "msg", + "to": "/evu/W", + "tot": "str" } ], "action": "", @@ -2665,23 +2599,25 @@ "from": "", "to": "", "reg": false, - "x": 780, - "y": 600, + "x": 800, + "y": 1420, "wires": [ - [] + [ + "9eed1b2f.670f88" + ] ] }, { - "id": "eb955622.f1f86", + "id": "2af10c7b.8279c4", "type": "change", "z": "da060938.c8ff48", - "name": "", + "name": "Energie in Wh", "rules": [ { "t": "set", - "p": "current_p3_LP3", - "pt": "flow", - "to": "$number(payload)", + "p": "payload", + "pt": "msg", + "to": "$flowContext(\"evu\")*timeInterval/1000/3600", "tot": "jsonata" } ], @@ -2690,54 +2626,34 @@ "from": "", "to": "", "reg": false, - "x": 1100, - "y": 600, - "wires": [ - [] - ] - }, - { - "id": "9eed1b2f.670f88", - "type": "interval-length", - "z": "da060938.c8ff48", - "format": "mills", - "bytopic": false, - "minimum": "", - "maximum": "", - "window": "", - "timeout": false, - "msgTimeout": "", - "minimumunit": "msecs", - "maximumunit": "msecs", - "windowunit": "msecs", - "msgTimeoutUnit": "msecs", - "reset": false, - "startup": false, - "msgField": "timeInterval", - "timestampField": "previousTimestamp", - "repeatTimeout": false, - "name": "Zeit zwischen den Nachrichten messen", - "x": 420, - "y": 1140, + "x": 720, + "y": 1520, "wires": [ [ - "2af10c7b.8279c4" - ], - [] - ] + "9e71bf31.d0c6d" + ] + ], + "info": "$number(payload)*(timeInterval/1000)/3600/1000" }, { - "id": "4d3c89efaca7be5e", + "id": "5381aca8.785c94", "type": "change", "z": "da060938.c8ff48", - "name": "", + "name": "Zähler Einspeisung aktualisieren", "rules": [ { "t": "set", - "p": "frequency", + "p": "WhExported", "pt": "flow", - "to": "$number(payload)", + "to": "payload*(-1)+$flowContext(\"WhExported\")", "tot": "jsonata" + }, + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "WhExported", + "tot": "flow" } ], "action": "", @@ -2745,24 +2661,31 @@ "from": "", "to": "", "reg": false, - "x": 440, - "y": 740, + "x": 1190, + "y": 1500, "wires": [ [] ] }, { - "id": "1711441c919e2a1d", + "id": "68dda824.2a1208", "type": "change", "z": "da060938.c8ff48", - "name": "", + "name": "Zähler Bezug aktualisieren", "rules": [ { "t": "set", - "p": "HausverbrauchNorm_p1", + "p": "WhImported", "pt": "flow", - "to": "payload", - "tot": "msg" + "to": "payload+$flowContext(\"WhImported\")", + "tot": "jsonata" + }, + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "WhImported", + "tot": "flow" } ], "action": "", @@ -2770,24 +2693,81 @@ "from": "", "to": "", "reg": false, - "x": 480, - "y": 160, + "x": 1180, + "y": 1540, "wires": [ [] ] }, { - "id": "fc15ba2aeda2dbb2", + "id": "8d39538d.a5c0b", + "type": "status", + "z": "da060938.c8ff48", + "name": "", + "scope": [ + "97a98e87.248e6" + ], + "x": 740, + "y": 40, + "wires": [ + [] + ] + }, + { + "id": "97a98e87.248e6", + "type": "function", + "z": "da060938.c8ff48", + "name": "Senden der Flow-Daten", + "func": "const ComponentId = env.get(\"Component-ID\");\n\nconst actualPower = parseInt(flow.get(\"evu\").toFixed(0));\nconst actualPowerkW = actualPower / 1000;\nconst actualCurrent = flow.get(\"evu_current\");\nconst voltageL1 = flow.get(\"spannungL1\");\nconst voltageL2 = flow.get(\"spannungL2\");\nconst voltageL3 = flow.get(\"spannungL3\");\nconst powerFactorL1 = flow.get(\"leistungsfaktorL1\");\nconst powerFactorL2 = flow.get(\"leistungsfaktorL2\");\nconst powerFactorL3 = flow.get(\"leistungsfaktorL3\");\n\nvar statusColor = \"green\";\nvar statusShape = \"dot\";\nif(actualPower > 0)\n statusColor= \"red\";\n\nnode.status({\n fill: statusColor,\n shape: statusShape,\n text:actualPowerkW.toFixed(1)+\"kW, \"+flow.get(\"evu_current\")\n });\n\nreturn [\n [\n {\n topic: \"openWB/set/mqtt/counter/\" + ComponentId + \"/get/imported\",\n payload: parseFloat(flow.get(\"WhImported\").toFixed(3))\n },\n {\n topic: \"openWB/set/mqtt/counter/\" + ComponentId + \"/get/exported\",\n payload: parseFloat(flow.get(\"WhExported\").toFixed(3))\n },\n {\n topic: \"openWB/set/mqtt/counter/\" + ComponentId + \"/get/power\",\n payload: parseInt(flow.get(\"evu\").toFixed(0))\n },\n {\n topic: \"openWB/set/mqtt/counter/\" + ComponentId + \"/get/currents\",\n payload: actualCurrent\n },\n {\n topic: \"openWB/set/mqtt/counter/\" + ComponentId + \"/get/voltages\",\n payload: [voltageL1, voltageL2, voltageL3]\n },\n {\n topic: \"openWB/set/mqtt/counter/\" + ComponentId + \"/get/powers\",\n payload: [voltageL1 * actualCurrent[0] * powerFactorL1, voltageL2 * actualCurrent[1] * powerFactorL2, voltageL3 * actualCurrent[2] * powerFactorL3]\n },\n {\n topic: \"openWB/set/mqtt/counter/\" + ComponentId + \"/get/power_factors\",\n payload: [powerFactorL1, powerFactorL2, powerFactorL3]\n },\n {\n topic: \"openWB/set/mqtt/counter/\" + ComponentId + \"/get/frequency\",\n payload: parseFloat(flow.get(\"frequency\"))\n }\n ]\n]", + "outputs": 1, + "timeout": "", + "noerr": 0, + "initialize": "", + "finalize": "", + "libs": [], + "x": 380, + "y": 40, + "wires": [ + [] + ] + }, + { + "id": "7ccddecd.3d4f7", + "type": "inject", + "z": "da060938.c8ff48", + "name": "Publish Trigger", + "props": [ + { + "p": "payload" + } + ], + "repeat": "5", + "crontab": "", + "once": true, + "onceDelay": "5", + "topic": "", + "payload": "", + "payloadType": "date", + "x": 140, + "y": 40, + "wires": [ + [ + "97a98e87.248e6" + ] + ] + }, + { + "id": "d4ec25e5.d87818", "type": "change", "z": "da060938.c8ff48", "name": "", "rules": [ { "t": "set", - "p": "HausverbrauchNorm_p2", + "p": "leistungLP1", "pt": "flow", - "to": "payload", - "tot": "msg" + "to": "$number(payload)", + "tot": "jsonata" } ], "action": "", @@ -2795,24 +2775,24 @@ "from": "", "to": "", "reg": false, - "x": 800, - "y": 160, + "x": 440, + "y": 420, "wires": [ [] ] }, { - "id": "a8e83e7e034910ce", + "id": "d02876f.be87688", "type": "change", "z": "da060938.c8ff48", "name": "", "rules": [ { "t": "set", - "p": "HausverbrauchNorm_p3", + "p": "leistungLP2", "pt": "flow", - "to": "payload", - "tot": "msg" + "to": "$number(payload)", + "tot": "jsonata" } ], "action": "", @@ -2820,44 +2800,23 @@ "from": "", "to": "", "reg": false, - "x": 1120, - "y": 160, + "x": 440, + "y": 520, "wires": [ [] ] }, { - "id": "80f26b21aa9b6cca", + "id": "15aef799.6ac4c8", "type": "change", "z": "da060938.c8ff48", "name": "", "rules": [ { "t": "set", - "p": "hausverbrauch_p1", - "pt": "flow", - "to": "$max(\t [\t payload+$flowContext(\"HausverbrauchNorm_p1\"),\t 0\t ]\t)", - "tot": "jsonata" - }, - { - "t": "set", - "p": "hausverbrauch_p2", + "p": "leistungLP3", "pt": "flow", - "to": "$max(\t [\t payload+$flowContext(\"HausverbrauchNorm_p2\"),\t 0\t ]\t)", - "tot": "jsonata" - }, - { - "t": "set", - "p": "hausverbrauch_p3", - "pt": "flow", - "to": "$max(\t [\t payload+$flowContext(\"HausverbrauchNorm_p3\"),\t 0\t ]\t)", - "tot": "jsonata" - }, - { - "t": "set", - "p": "hausverbrauch", - "pt": "flow", - "to": "$flowContext(\"hausverbrauch_p1\") + $flowContext(\"hausverbrauch_p2\") + $flowContext(\"hausverbrauch_p3\")", + "to": "$number(payload)", "tot": "jsonata" } ], @@ -2866,95 +2825,24 @@ "from": "", "to": "", "reg": false, - "x": 790, - "y": 980, - "wires": [ - [ - "3ba0e67b.44155a", - "6c586f55.6462e" - ] - ] - }, - { - "id": "c1f27145620a046e", - "type": "inject", - "z": "da060938.c8ff48", - "name": "Debug", - "props": [ - { - "p": "payload" - }, - { - "p": "topic", - "vt": "str" - } - ], - "repeat": "10", - "crontab": "", - "once": true, - "onceDelay": "5", - "topic": "debug", - "payload": "{\t \"haus_norm\": [\t $flowContext(\"HausverbrauchNorm_p1\"),\t $flowContext(\"HausverbrauchNorm_p1\"),\t $flowContext(\"HausverbrauchNorm_p1\")\t ],\t \"haus\": [\t $flowContext(\"hausverbrauch_p1\"),\t $flowContext(\"hausverbrauch_p2\"),\t $flowContext(\"hausverbrauch_p3\")\t ],\t \"pv\": $flowContext(\"pv\"),\t \"bat\": $flowContext(\"bat\"),\t \"lp1\": [\t $flowContext(\"id_LP1\"),\t $flowContext(\"current_p1_LP1\"),\t $flowContext(\"current_p2_LP1\"),\t $flowContext(\"current_p3_LP1\")\t ],\t \"lp2\": [\t $flowContext(\"id_LP2\"),\t $flowContext(\"current_p1_LP2\"),\t $flowContext(\"current_p2_LP2\"),\t $flowContext(\"current_p3_LP2\")\t ],\t \"lp3\": [\t $flowContext(\"id_LP3\"),\t $flowContext(\"current_p1_LP3\"),\t $flowContext(\"current_p2_LP3\"),\t $flowContext(\"current_p3_LP3\")\t ]\t}", - "payloadType": "jsonata", - "x": 1020, - "y": 40, + "x": 440, + "y": 620, "wires": [ [] ] }, { - "id": "ee96ba88673e1d59", - "type": "switch", - "z": "da060938.c8ff48", - "name": "Switch by LP", - "property": "topic", - "propertyType": "msg", - "rules": [ - { - "t": "cont", - "v": "/1/", - "vt": "str" - }, - { - "t": "cont", - "v": "/2/", - "vt": "str" - }, - { - "t": "cont", - "v": "/3/", - "vt": "str" - } - ], - "checkall": "true", - "repair": false, - "outputs": 3, - "x": 410, - "y": 260, - "wires": [ - [ - "2fa0518014006c84" - ], - [ - "b7990ed38fa1acd5" - ], - [ - "2954b1834ffee518" - ] - ] - }, - { - "id": "2fa0518014006c84", + "id": "1e14f60e.53005a", "type": "change", "z": "da060938.c8ff48", "name": "", "rules": [ { "t": "set", - "p": "id_LP1", + "p": "pv", "pt": "flow", - "to": "payload", - "tot": "msg" + "to": "$number(payload)", + "tot": "jsonata" } ], "action": "", @@ -2962,310 +2850,159 @@ "from": "", "to": "", "reg": false, - "x": 650, - "y": 220, + "x": 410, + "y": 960, "wires": [ [] ] }, { - "id": "b7990ed38fa1acd5", - "type": "change", + "id": "60345bb6.1855d4", + "type": "switch", "z": "da060938.c8ff48", - "name": "", + "name": "Split Topics", + "property": "topic", + "propertyType": "msg", "rules": [ { - "t": "set", - "p": "id_LP2", - "pt": "flow", - "to": "payload", - "tot": "msg" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 650, - "y": 260, - "wires": [ - [] - ] - }, - { - "id": "2954b1834ffee518", - "type": "change", - "z": "da060938.c8ff48", - "name": "", - "rules": [ + "t": "regex", + "v": "\\/Hausverbrauch_p1$", + "vt": "str", + "case": false + }, { - "t": "set", - "p": "id_LP3", - "pt": "flow", - "to": "payload", - "tot": "msg" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 650, - "y": 300, - "wires": [ - [] - ] - }, - { - "id": "5c4ac285.afe6e4", - "type": "subflow", - "name": "Sub Ladepunkt 2.0", - "info": "", - "category": "", - "in": [ + "t": "regex", + "v": "\\/Hausverbrauch_p2$", + "vt": "str", + "case": false + }, { - "x": 60, - "y": 180, - "wires": [ - { - "id": "5564373bd8d8091a" - } - ] - } - ], - "out": [ + "t": "regex", + "v": "\\/Hausverbrauch_p3$", + "vt": "str", + "case": false + }, { - "x": 620, - "y": 40, - "wires": [ - { - "id": "d477d279.2cc62", - "port": 0 - } - ] + "t": "regex", + "v": "^simulator\\/chargepoint\\/[0-9]+\\/id$", + "vt": "str", + "case": false }, { - "x": 1200, - "y": 700, - "wires": [ - { - "id": "2254d233.5854e6", - "port": 0 - }, - { - "id": "58ec8187c6755198", - "port": 0 - }, - { - "id": "71b196bb372367ab", - "port": 0 - } - ] + "t": "regex", + "v": "^simulator\\/consumer\\/[0-9]+\\/id$", + "vt": "str", + "case": false }, { - "x": 1100, - "y": 200, - "wires": [ - { - "id": "5b4b7510.acf434", - "port": 0 - }, - { - "id": "124dbffa.10bb", - "port": 0 - }, - { - "id": "5c185bf1.72503c", - "port": 0 - }, - { - "id": "78b855e9.ef0b24", - "port": 0 - }, - { - "id": "33434644.b16a22", - "port": 0 - } - ] + "t": "cont", + "v": "$join(\t [\t \"/chargepoint/\",\t $string($flowContext(\"id_LP1\")),\t \"/get/power_all\"\t ]\t)", + "vt": "jsonata" }, { - "x": 1210, - "y": 40, - "wires": [ - { - "id": "bddf955cca42c275", - "port": 0 - } - ] - } - ], - "env": [ + "t": "cont", + "v": "$join(\t [\t \"/chargepoint/\",\t $string($flowContext(\"id_LP1\")),\t \"/get/current_p1\"\t \t ]\t\t)\t", + "vt": "jsonata" + }, { - "name": "Component-ID", - "type": "num", - "value": "", - "ui": { - "icon": "font-awesome/fa-hashtag", - "type": "spinner", - "opts": { - "min": 1 - } - } + "t": "cont", + "v": "$join(\t [\t \"/chargepoint/\",\t $string($flowContext(\"id_LP1\")),\t \"/get/current_p2\"\t \t ]\t\t)\t", + "vt": "jsonata" }, { - "name": "Phase1", - "type": "num", - "value": "1", - "ui": { - "icon": "font-awesome/fa-list-ol", - "type": "spinner", - "opts": { - "min": 1, - "max": 3 - } - } + "t": "cont", + "v": "$join(\t [\t \"/chargepoint/\",\t $string($flowContext(\"id_LP1\")),\t \"/get/current_p3\"\t \t ]\t\t)\t", + "vt": "jsonata" }, { - "name": "Chargepoint-ID", - "type": "num", - "value": "", - "ui": { - "type": "spinner", - "opts": { - "min": 1, - "max": 3 - } - } - } - ], - "meta": {}, - "color": "#DDAA99", - "inputLabels": [ - "Sollwerte" - ], - "outputLabels": [ - "openWB", - "schnelle Regelwerte", - "Input Passthrough", - "Debug" - ], - "status": { - "x": 900, - "y": 40, - "wires": [ - { - "id": "c4b80c5a.65fa88", - "port": 0 - } - ] - } - }, - { - "id": "5b4b7510.acf434", - "type": "change", - "z": "5c4ac285.afe6e4", - "name": "", - "rules": [ + "t": "cont", + "v": "$join(\t [\t \"/chargepoint/\",\t $string($flowContext(\"id_LP2\")),\t \"/get/power_all\"\t ]\t)", + "vt": "jsonata" + }, { - "t": "set", - "p": "Lp_Sollstrom", - "pt": "flow", - "to": "$number(payload)", - "tot": "jsonata" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 770, - "y": 120, - "wires": [ - [] - ] - }, - { - "id": "124dbffa.10bb", - "type": "change", - "z": "5c4ac285.afe6e4", - "name": "", - "rules": [ + "t": "cont", + "v": "$join(\t [\t \"/chargepoint/\",\t $string($flowContext(\"id_LP2\")),\t \"/get/current_p1\"\t \t ]\t\t)\t", + "vt": "jsonata" + }, { - "t": "set", - "p": "Lp_EV_Phasen", - "pt": "flow", - "to": "payload", - "tot": "msg" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 770, - "y": 160, - "wires": [ - [] - ] - }, - { - "id": "78b855e9.ef0b24", - "type": "change", - "z": "5c4ac285.afe6e4", - "name": "", - "rules": [ + "t": "cont", + "v": "$join(\t [\t \"/chargepoint/\",\t $string($flowContext(\"id_LP2\")),\t \"/get/current_p2\"\t \t ]\t\t)\t", + "vt": "jsonata" + }, { - "t": "set", - "p": "Lp_Stecker", - "pt": "flow", - "to": "payload", - "tot": "msg" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 760, - "y": 240, - "wires": [ - [] - ] - }, - { - "id": "f1d98f14.271ef", - "type": "switch", - "z": "5c4ac285.afe6e4", - "name": "Split Topics", - "property": "topic", - "propertyType": "msg", - "rules": [ + "t": "cont", + "v": "$join(\t [\t \"/chargepoint/\",\t $string($flowContext(\"id_LP2\")),\t \"/get/current_p3\"\t \t ]\t\t)\t", + "vt": "jsonata" + }, { - "t": "regex", - "v": "\\/set\\/current$", - "vt": "str", - "case": false + "t": "cont", + "v": "$join(\t [\t \"/chargepoint/\",\t $string($flowContext(\"id_LP3\")),\t \"/get/power_all\"\t ]\t)", + "vt": "jsonata" }, { - "t": "regex", - "v": "\\/max_phases$", - "vt": "str", - "case": false + "t": "cont", + "v": "$join(\t [\t \"/chargepoint/\",\t $string($flowContext(\"id_LP3\")),\t \"/get/current_p1\"\t \t ]\t\t)\t", + "vt": "jsonata" + }, + { + "t": "cont", + "v": "$join(\t [\t \"/chargepoint/\",\t $string($flowContext(\"id_LP3\")),\t \"/get/current_p2\"\t \t ]\t\t)\t", + "vt": "jsonata" + }, + { + "t": "cont", + "v": "$join(\t [\t \"/chargepoint/\",\t $string($flowContext(\"id_LP3\")),\t \"/get/current_p3\"\t \t ]\t\t)\t", + "vt": "jsonata" + }, + { + "t": "cont", + "v": "$join(\t [\t \"/consumer/\",\t $string($flowContext(\"id_Consumer4\")),\t \"/get/power_all\"\t ]\t)", + "vt": "jsonata" + }, + { + "t": "cont", + "v": "$join(\t [\t \"/consumer/\",\t $string($flowContext(\"id_Consumer4\")),\t \"/get/current_p1\"\t \t ]\t\t)\t", + "vt": "jsonata" + }, + { + "t": "cont", + "v": "$join(\t [\t \"/consumer/\",\t $string($flowContext(\"id_Consumer4\")),\t \"/get/current_p2\"\t \t ]\t\t)\t", + "vt": "jsonata" + }, + { + "t": "cont", + "v": "$join(\t [\t \"/consumer/\",\t $string($flowContext(\"id_Consumer4\")),\t \"/get/current_p3\"\t \t ]\t\t)\t", + "vt": "jsonata" + }, + { + "t": "cont", + "v": "$join(\t [\t \"/consumer/\",\t $string($flowContext(\"id_Consumer5\")),\t \"/get/power_all\"\t ]\t)", + "vt": "jsonata" + }, + { + "t": "cont", + "v": "$join(\t [\t \"/consumer/\",\t $string($flowContext(\"id_Consumer5\")),\t \"/get/current_p1\"\t \t ]\t\t)\t", + "vt": "jsonata" + }, + { + "t": "cont", + "v": "$join(\t [\t \"/consumer/\",\t $string($flowContext(\"id_Consumer5\")),\t \"/get/current_p2\"\t \t ]\t\t)\t", + "vt": "jsonata" + }, + { + "t": "cont", + "v": "$join(\t [\t \"/consumer/\",\t $string($flowContext(\"id_Consumer5\")),\t \"/get/current_p3\"\t \t ]\t\t)\t", + "vt": "jsonata" }, { "t": "regex", - "v": "\\/phases_to_use$", + "v": "\\/house[Bb]attery\\/W", "vt": "str", "case": false }, { "t": "regex", - "v": "\\/plug_state$", + "v": "\\/pv\\/W$", "vt": "str", "case": false }, @@ -3278,112 +3015,165 @@ ], "checkall": "true", "repair": false, - "outputs": 5, - "x": 510, - "y": 180, + "outputs": 28, + "x": 230, + "y": 580, "wires": [ [ - "5b4b7510.acf434" + "1711441c919e2a1d" ], [ - "124dbffa.10bb" + "fc15ba2aeda2dbb2" ], [ - "5c185bf1.72503c" + "a8e83e7e034910ce" ], [ - "78b855e9.ef0b24" + "ee96ba88673e1d59" ], [ - "33434644.b16a22" - ] - ], - "outputLabels": [ - "Sollstrom", - "Aktive Phasen", - null, - "Stecker-Status", - "Soll-Netzfrequenz" - ] - }, - { - "id": "546e1a19.1c607c", - "type": "inject", - "z": "5c4ac285.afe6e4", - "name": "Publish Trigger", - "props": [ - { - "p": "payload" - } - ], - "repeat": "5", - "crontab": "", - "once": true, - "onceDelay": "5", - "topic": "", - "payload": "", - "payloadType": "date", - "x": 140, - "y": 40, - "wires": [ + "8b715b00726b42d5" + ], [ - "d477d279.2cc62" + "d4ec25e5.d87818" + ], + [ + "aa9606e1.040c08" + ], + [ + "3491db86.1e0edc" + ], + [ + "98aedca3.6266b8" + ], + [ + "d02876f.be87688" + ], + [ + "1fe40bfd.d602cc" + ], + [ + "562388d9.7f1a9" + ], + [ + "41b8245b.5e25dc" + ], + [ + "15aef799.6ac4c8" + ], + [ + "d2263cc3.f53ef" + ], + [ + "68aeb24.1c455cc" + ], + [ + "eb955622.f1f86" + ], + [ + "625ef4cd47cfd7f8" + ], + [ + "8ea260cde13ce65e" + ], + [ + "aec1ab45f4246c67" + ], + [ + "e8dacffdf212e720" + ], + [ + "a92b6567600fd71e" + ], + [ + "9c42d4fc35fb1f55" + ], + [ + "7c9f546019bc25b3" + ], + [ + "907a7950ce566da2" + ], + [ + "e8165b40.91b4d8" + ], + [ + "1e14f60e.53005a" + ], + [ + "4d3c89efaca7be5e" ] + ], + "outputLabels": [ + "", + "", + "", + "", + "", + "Ladepunkt 1", + "", + "", + "", + "Ladepunkt 2", + "", + "", + "", + "Ladepunkt 3", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "Speicher", + "PV 1", + "" ] }, { - "id": "d477d279.2cc62", - "type": "function", - "z": "5c4ac285.afe6e4", - "name": "Senden der Flow-Daten", - "func": "const LPNumber = env.get(\"Component-ID\");\n\nvar chargestat = 0;\nif( flow.get(\"Lp_Strom1\") > 0 || flow.get(\"Lp_Strom2\") > 0 || flow.get(\"Lp_Strom3\") > 0 ){\n chargestat = 1;\n}\n\nvar statusColor = \"red\";\nvar statusShape = \"ring\";\nif (flow.get(\"Lp_Stecker\") == 1){\n statusColor = \"green\"\n if (chargestat == 1){\n statusShape = \"dot\";\n }\n}\n\nconst actualPower = parseInt(flow.get(\"Lp_Ladeleistung\").toFixed(0));\nconst actualPowerkW = actualPower / 1000;\nconst phasesInUse = flow.get(\"Lp_Phasen\");\nconst phasesToUse = flow.get(\"Lp_Phasenumschaltung\");\nconst phasesEVmax = flow.get(\"Lp_EV_Phasen\");\nconst currentL1 = flow.get(\"Lp_Strom1\");\nconst currentL2 = flow.get(\"Lp_Strom2\");\nconst currentL3 = flow.get(\"Lp_Strom3\");\nconst volatageL1 = flow.get(\"Lp_Spannung1\");\nconst volatageL2 = flow.get(\"Lp_Spannung2\");\nconst volatageL3 = flow.get(\"Lp_Spannung3\");\nconst powerFactorL1 = flow.get(\"Lp_Leistungsfaktor1\");\nconst powerFactorL2 = flow.get(\"Lp_Leistungsfaktor2\");\nconst powerFactorL3 = flow.get(\"Lp_Leistungsfaktor3\");\n\nnode.status({\n fill: statusColor,\n shape: statusShape,\n text:actualPowerkW.toFixed(1)+\"kW \"+phasesInUse+\"P(\"+phasesEVmax+\"/\"+phasesToUse+\")\"\n });\n\nreturn [\n [\n {\n topic: \"openWB/set/mqtt/chargepoint/\" + LPNumber + \"/get/currents\",\n payload: [currentL1, currentL2, currentL3]\n },\n {\n topic: \"openWB/set/mqtt/chargepoint/\" + LPNumber + \"/get/evse_current\",\n payload: currentL1\n },\n {\n topic: \"openWB/set/mqtt/chargepoint/\" + LPNumber + \"/get/voltages\",\n payload: [volatageL1, volatageL2, volatageL3]\n },\n {\n topic: \"openWB/set/mqtt/chargepoint/\" + LPNumber + \"/get/power\",\n payload: actualPower\n },\n {\n topic: \"openWB/set/mqtt/chargepoint/\" + LPNumber + \"/get/powers\",\n payload: [volatageL1 * currentL1 * powerFactorL1, volatageL2 * currentL2 * powerFactorL2, volatageL3 * currentL3 * powerFactorL3]\n },\n {\n topic: \"openWB/set/mqtt/chargepoint/\" + LPNumber + \"/get/power_factors\",\n payload: [powerFactorL1, powerFactorL2, powerFactorL3]\n },\n {\n topic: \"openWB/set/mqtt/chargepoint/\" + LPNumber + \"/get/frequency\",\n payload: flow.get(\"Lp_Netzfrequenz\")\n },\n {\n topic: \"openWB/set/mqtt/chargepoint/\" + LPNumber + \"/get/imported\",\n payload: parseFloat(flow.get(\"Lp_Zähler_laden\").toFixed(3))\n },\n {\n topic: \"openWB/set/mqtt/chargepoint/\" + LPNumber + \"/get/exported\",\n payload: parseFloat(flow.get(\"Lp_Zähler_entladen\").toFixed(3))\n },\n {\n topic: \"openWB/set/mqtt/chargepoint/\" + LPNumber + \"/get/plug_state\",\n payload: flow.get(\"Lp_Stecker\")\n },\n {\n topic: \"openWB/set/mqtt/chargepoint/\" + LPNumber + \"/get/charge_state\",\n payload: chargestat\n },\n {\n topic: \"openWB/set/mqtt/chargepoint/\" + LPNumber + \"/get/phases_in_use\",\n payload: phasesInUse\n }\n ]\n]\n", - "outputs": 1, - "timeout": "", - "noerr": 0, - "initialize": "", - "finalize": "", - "libs": [], - "x": 410, - "y": 40, - "wires": [ - [] - ] - }, - { - "id": "16b7648f.04f14b", - "type": "switch", - "z": "5c4ac285.afe6e4", - "name": "Zähler laden gesetzt?", - "property": "Lp_Zähler_laden", - "propertyType": "flow", - "rules": [ + "id": "afb834d1.ac7628", + "type": "inject", + "z": "da060938.c8ff48", + "name": "", + "props": [ { - "t": "null" + "p": "payload" } ], - "checkall": "true", - "repair": false, - "outputs": 1, - "x": 400, - "y": 340, + "repeat": "", + "crontab": "", + "once": true, + "onceDelay": 0.1, + "topic": "", + "payload": "0", + "payloadType": "num", + "x": 110, + "y": 1100, "wires": [ [ - "898e546f.9440e" + "a01ce865.943878", + "9573d411.0e2728", + "479952ca.b09c9c" ] ] }, { - "id": "898e546f.9440e", + "id": "3d3ebf4b.ea013", "type": "change", - "z": "5c4ac285.afe6e4", - "name": "Zähler laden init", + "z": "da060938.c8ff48", + "name": "Zähler Bezug initialisieren", "rules": [ { "t": "set", - "p": "Lp_Zähler_laden", + "p": "WhImported", "pt": "flow", - "to": "0", - "tot": "num" + "to": "payload", + "tot": "msg" } ], "action": "", @@ -3391,87 +3181,70 @@ "from": "", "to": "", "reg": false, - "x": 640, - "y": 340, + "x": 610, + "y": 1100, "wires": [ [] ] }, { - "id": "fa801f38.18d6c8", - "type": "inject", - "z": "5c4ac285.afe6e4", - "name": "Init", - "props": [ + "id": "a01ce865.943878", + "type": "switch", + "z": "da060938.c8ff48", + "name": "Zähler Bezug gesetzt?", + "property": "WhImported", + "propertyType": "flow", + "rules": [ { - "p": "payload" + "t": "null" } ], - "repeat": "", - "crontab": "", - "once": true, - "onceDelay": 0.1, - "topic": "", - "payload": "", - "payloadType": "date", - "x": 130, - "y": 340, + "checkall": "true", + "repair": false, + "outputs": 1, + "x": 320, + "y": 1100, "wires": [ [ - "16b7648f.04f14b", - "4351720d.b31ed4", - "58ec8187c6755198", - "4d37676232ebd1a7" + "3d3ebf4b.ea013" ] ] }, { - "id": "5aa7e41e.77b01c", - "type": "change", - "z": "5c4ac285.afe6e4", - "name": "Energie in Wh", + "id": "9573d411.0e2728", + "type": "switch", + "z": "da060938.c8ff48", + "name": "Zähler Einspeisung gesetzt?", + "property": "WhExported", + "propertyType": "flow", "rules": [ { - "t": "set", - "p": "payload", - "pt": "msg", - "to": "$flowContext(\"Lp_Ladeleistung\")*timeInterval/1000/3600", - "tot": "jsonata" + "t": "null" } ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 740, - "y": 760, + "checkall": "true", + "repair": false, + "outputs": 1, + "x": 340, + "y": 1140, "wires": [ [ - "bd7cd25d6f0276eb" + "76ad4288.0e1b7c" ] - ], - "info": "$number(payload)*(timeInterval/1000)/3600/1000" + ] }, { - "id": "eae3cd53.403d28", + "id": "76ad4288.0e1b7c", "type": "change", - "z": "5c4ac285.afe6e4", - "name": "Zähler laden aktualisieren", + "z": "da060938.c8ff48", + "name": "Zähler Einspeisung initialisieren", "rules": [ { "t": "set", - "p": "Lp_Zähler_laden", + "p": "WhExported", "pt": "flow", - "to": "payload+$flowContext(\"Lp_Zähler_laden\")", - "tot": "jsonata" - }, - { - "t": "set", - "p": "payload", - "pt": "msg", - "to": "Lp_Zähler_laden", - "tot": "flow" + "to": "payload", + "tot": "msg" } ], "action": "", @@ -3479,42 +3252,24 @@ "from": "", "to": "", "reg": false, - "x": 1150, - "y": 760, + "x": 630, + "y": 1140, "wires": [ - [ - "d28d6c2d.ccd198" - ] + [] ] }, { - "id": "2254d233.5854e6", + "id": "e8165b40.91b4d8", "type": "change", - "z": "5c4ac285.afe6e4", + "z": "da060938.c8ff48", "name": "", "rules": [ { "t": "set", - "p": "Lp_Ladeleistung", + "p": "bat", "pt": "flow", - "to": "$flowContext(\"Lp_Spannung1\")*$flowContext(\"Lp_Strom1\")*$flowContext(\"Lp_Leistungsfaktor1\")+$flowContext(\"Lp_Spannung2\")*$flowContext(\"Lp_Strom2\")*$flowContext(\"Lp_Leistungsfaktor2\")+$flowContext(\"Lp_Spannung3\")*$flowContext(\"Lp_Strom3\")*$flowContext(\"Lp_Leistungsfaktor3\")", + "to": "$number(payload)", "tot": "jsonata" - }, - { - "t": "set", - "p": "payload", - "pt": "msg", - "to": "Lp_Ladeleistung", - "tot": "flow" - }, - { - "t": "change", - "p": "topic", - "pt": "msg", - "from": "#", - "fromt": "str", - "to": "Component-ID", - "tot": "env" } ], "action": "", @@ -3522,72 +3277,115 @@ "from": "", "to": "", "reg": false, - "x": 740, - "y": 700, - "wires": [ - [ - "65aa4e7c.604d5" - ] - ] - }, - { - "id": "95e69cc1.77d8d8", - "type": "inject", - "z": "5c4ac285.afe6e4", - "name": "", - "props": [ - { - "p": "payload" - } - ], - "repeat": "2", - "crontab": "", - "once": true, - "onceDelay": "1", - "topic": "", - "payload": "Lp_Sollstrom", - "payloadType": "flow", - "x": 170, - "y": 520, + "x": 420, + "y": 1000, "wires": [ - [ - "5db82d46.a42464" - ] + [] ] }, { - "id": "43c64905.ca1d68", + "id": "479952ca.b09c9c", "type": "change", - "z": "5c4ac285.afe6e4", - "name": "", + "z": "da060938.c8ff48", + "name": "Init flow context", "rules": [ { "t": "set", - "p": "Lp_Spannung1", + "p": "leistungLP1", "pt": "flow", - "to": "payload", - "tot": "jsonata" + "to": "0", + "tot": "num" }, { "t": "set", - "p": "Lp_Spannung2", + "p": "leistungLP2", "pt": "flow", - "to": "payload", - "tot": "jsonata" + "to": "0", + "tot": "num" }, { "t": "set", - "p": "Lp_Spannung3", + "p": "leistungLP3", "pt": "flow", - "to": "payload", - "tot": "jsonata" + "to": "0", + "tot": "num" }, { "t": "set", - "p": "topic", - "pt": "msg", - "to": "/chargepoint/#/get/power_all", - "tot": "str" + "p": "evu", + "pt": "flow", + "to": "0", + "tot": "num" + }, + { + "t": "set", + "p": "pv", + "pt": "flow", + "to": "0", + "tot": "num" + }, + { + "t": "set", + "p": "bat", + "pt": "flow", + "to": "0", + "tot": "num" + }, + { + "t": "set", + "p": "hausverbrauch", + "pt": "flow", + "to": "1000", + "tot": "num" + }, + { + "t": "set", + "p": "HausverbrauchNorm", + "pt": "flow", + "to": "1000", + "tot": "num" + }, + { + "t": "set", + "p": "spannungL1", + "pt": "flow", + "to": "230", + "tot": "num" + }, + { + "t": "set", + "p": "spannungL2", + "pt": "flow", + "to": "230", + "tot": "num" + }, + { + "t": "set", + "p": "spannungL3", + "pt": "flow", + "to": "230", + "tot": "num" + }, + { + "t": "set", + "p": "leistungsfaktorL1", + "pt": "flow", + "to": "1.0", + "tot": "num" + }, + { + "t": "set", + "p": "leistungsfaktorL2", + "pt": "flow", + "to": "1.0", + "tot": "num" + }, + { + "t": "set", + "p": "leistungsfaktorL3", + "pt": "flow", + "to": "1.0", + "tot": "num" } ], "action": "", @@ -3595,89 +3393,24 @@ "from": "", "to": "", "reg": false, - "x": 740, - "y": 640, - "wires": [ - [ - "2254d233.5854e6" - ] - ] - }, - { - "id": "cd6c0260.bf728", - "type": "comment", - "z": "5c4ac285.afe6e4", - "name": "Spannungen", - "info": "", - "x": 150, - "y": 640, - "wires": [] - }, - { - "id": "b05f8ef.8357c7", - "type": "comment", - "z": "5c4ac285.afe6e4", - "name": "Ströme", - "info": "", - "x": 130, - "y": 580, - "wires": [] - }, - { - "id": "2ed9ad3b.5b9922", - "type": "comment", - "z": "5c4ac285.afe6e4", - "name": "Leistung", - "info": "", - "x": 140, - "y": 700, - "wires": [] - }, - { - "id": "5db82d46.a42464", - "type": "switch", - "z": "5c4ac285.afe6e4", - "name": "angesteckt?", - "property": "Lp_Stecker", - "propertyType": "flow", - "rules": [ - { - "t": "eq", - "v": "0", - "vt": "num" - }, - { - "t": "eq", - "v": "1", - "vt": "num" - } - ], - "checkall": "true", - "repair": false, - "outputs": 2, - "x": 370, - "y": 520, + "x": 300, + "y": 1180, "wires": [ - [ - "c4b09682.906f4" - ], - [ - "702fd2d4.54ae6c" - ] + [] ] }, { - "id": "c4b09682.906f4", + "id": "aa9606e1.040c08", "type": "change", - "z": "5c4ac285.afe6e4", - "name": "Sollstrom = 0", + "z": "da060938.c8ff48", + "name": "", "rules": [ { "t": "set", - "p": "payload", - "pt": "msg", - "to": "0", - "tot": "num" + "p": "current_p1_LP1", + "pt": "flow", + "to": "$number(payload)", + "tot": "jsonata" } ], "action": "", @@ -3685,171 +3418,168 @@ "from": "", "to": "", "reg": false, - "x": 580, - "y": 520, + "x": 460, + "y": 460, "wires": [ - [ - "702fd2d4.54ae6c" - ] + [] ] }, { - "id": "a93713d.2f351f", - "type": "comment", - "z": "5c4ac285.afe6e4", - "name": "Zählerstand", - "info": "", - "x": 150, - "y": 760, - "wires": [] - }, - { - "id": "d8be3486.74562", - "type": "random", - "z": "5c4ac285.afe6e4", - "name": "230V +/-5V", - "low": "225", - "high": "235", - "inte": "false", - "property": "payload", - "x": 370, - "y": 640, + "id": "6c586f55.6462e", + "type": "function", + "z": "da060938.c8ff48", + "name": "Ströme", + "func": "const current_others = (flow.get(\"pv\") + flow.get(\"bat\")) / 230 / 3\nconst currentP1 = current_others + flow.get(\"hausverbrauch_p1\") / 230 + flow.get(\"current_p1_LP1\") + flow.get(\"current_p1_LP2\") + flow.get(\"current_p1_LP3\") + flow.get(\"current_p1_Consumer4\") + flow.get(\"current_p1_Consumer5\")\nconst currentP2 = current_others + flow.get(\"hausverbrauch_p2\") / 230 + flow.get(\"current_p2_LP1\") + flow.get(\"current_p2_LP2\") + flow.get(\"current_p2_LP3\") + flow.get(\"current_p2_Consumer4\") + flow.get(\"current_p2_Consumer5\")\nconst currentP3 = current_others + flow.get(\"hausverbrauch_p3\") / 230 + flow.get(\"current_p3_LP1\") + flow.get(\"current_p3_LP2\") + flow.get(\"current_p3_LP3\") + flow.get(\"current_p3_Consumer4\") + flow.get(\"current_p3_Consumer5\")\n\nmsg.payload = [parseFloat(currentP1.toFixed(2)), parseFloat(currentP2.toFixed(2)), parseFloat(currentP3.toFixed(2))]\nreturn msg;", + "outputs": 1, + "timeout": "", + "noerr": 0, + "initialize": "", + "finalize": "", + "libs": [], + "x": 1020, + "y": 1360, "wires": [ [ - "5944aff0.c01d48" + "3c97930d.404f4c" ] ] }, { - "id": "702fd2d4.54ae6c", - "type": "smooth", - "z": "5c4ac285.afe6e4", + "id": "3c97930d.404f4c", + "type": "change", + "z": "da060938.c8ff48", "name": "", - "property": "payload", - "action": "mean", - "count": "4", - "round": "0", - "mult": "single", - "reduce": false, - "x": 560, - "y": 580, + "rules": [ + { + "t": "set", + "p": "evu_current", + "pt": "flow", + "to": "payload", + "tot": "msg" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 1230, + "y": 1360, "wires": [ - [ - "62f55674.8ce028" - ] + [] ] }, { - "id": "5944aff0.c01d48", - "type": "smooth", - "z": "5c4ac285.afe6e4", + "id": "1fe40bfd.d602cc", + "type": "change", + "z": "da060938.c8ff48", "name": "", - "property": "payload", - "action": "mean", - "count": "10", - "round": "1", - "mult": "single", - "reduce": false, - "x": 540, - "y": 640, + "rules": [ + { + "t": "set", + "p": "current_p1_LP2", + "pt": "flow", + "to": "$number(payload)", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 460, + "y": 560, "wires": [ - [ - "43c64905.ca1d68" - ] + [] ] }, { - "id": "c4b80c5a.65fa88", - "type": "status", - "z": "5c4ac285.afe6e4", + "id": "d2263cc3.f53ef", + "type": "change", + "z": "da060938.c8ff48", "name": "", - "scope": [ - "d477d279.2cc62" + "rules": [ + { + "t": "set", + "p": "current_p1_LP3", + "pt": "flow", + "to": "$number(payload)", + "tot": "jsonata" + } ], - "x": 780, - "y": 40, + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 460, + "y": 660, "wires": [ [] ] }, { - "id": "62f55674.8ce028", - "type": "function", - "z": "5c4ac285.afe6e4", + "id": "3491db86.1e0edc", + "type": "change", + "z": "da060938.c8ff48", "name": "", - "func": "const phasesEVmax = flow.get(\"Lp_EV_Phasen\");\nconst phasesLPmax = flow.get(\"Lp_Phasenumschaltung\");\nvar phasesInUse = phasesEVmax;\nif(phasesEVmax > phasesLPmax){\n phasesInUse = phasesLPmax;\n}\n\nvar phaseCurrents = [0,0,0];\n\nphaseCurrents[0] = msg.payload;\nif( phasesInUse > 1 )\n phaseCurrents[1] = msg.payload;\nif( phasesInUse > 2 )\n phaseCurrents[2] = msg.payload;\n\nflow.set(\"Lp_Strom1\", phaseCurrents[0]);\nflow.set(\"Lp_Strom2\", phaseCurrents[1]);\nflow.set(\"Lp_Strom3\", phaseCurrents[2]);\nflow.set(\"Lp_Phasen\", phasesInUse);\n\nreturn msg;\n", - "outputs": 1, - "timeout": "", - "noerr": 0, - "initialize": "", - "finalize": "", - "libs": [], - "x": 740, - "y": 580, - "wires": [ - [ - "d8be3486.74562", - "71b196bb372367ab" - ] - ] - }, - { - "id": "d04bd47e.42ea98", - "type": "comment", - "z": "5c4ac285.afe6e4", - "name": "Netzfrequenz", - "info": "", - "x": 150, - "y": 860, - "wires": [] - }, - { - "id": "d28d6c2d.ccd198", - "type": "random", - "z": "5c4ac285.afe6e4", - "name": "+/-0.1Hz", - "low": "-0.1", - "high": "0.1", - "inte": "false", - "property": "payload", - "x": 360, - "y": 860, + "rules": [ + { + "t": "set", + "p": "current_p2_LP1", + "pt": "flow", + "to": "$number(payload)", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 780, + "y": 460, "wires": [ - [ - "25ba0874.01329" - ] + [] ] }, { - "id": "25ba0874.01329", - "type": "smooth", - "z": "5c4ac285.afe6e4", + "id": "98aedca3.6266b8", + "type": "change", + "z": "da060938.c8ff48", "name": "", - "property": "payload", - "action": "mean", - "count": "5", - "round": "2", - "mult": "single", - "reduce": false, - "x": 560, - "y": 860, + "rules": [ + { + "t": "set", + "p": "current_p3_LP1", + "pt": "flow", + "to": "$number(payload)", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 1100, + "y": 460, "wires": [ - [ - "a8b4d76e.b28828" - ] + [] ] }, { - "id": "a8b4d76e.b28828", + "id": "562388d9.7f1a9", "type": "change", - "z": "5c4ac285.afe6e4", + "z": "da060938.c8ff48", "name": "", "rules": [ { "t": "set", - "p": "Lp_Netzfrequenz", + "p": "current_p2_LP2", "pt": "flow", - "to": "payload+$flowContext(\"Lp_NetzfrequenzNorm\")", + "to": "$number(payload)", "tot": "jsonata" } ], @@ -3859,23 +3589,23 @@ "to": "", "reg": false, "x": 780, - "y": 860, + "y": 560, "wires": [ [] ] }, { - "id": "33434644.b16a22", + "id": "41b8245b.5e25dc", "type": "change", - "z": "5c4ac285.afe6e4", + "z": "da060938.c8ff48", "name": "", "rules": [ { "t": "set", - "p": "Lp_NetzfrequenzNorm", + "p": "current_p3_LP2", "pt": "flow", - "to": "payload", - "tot": "msg" + "to": "$number(payload)", + "tot": "jsonata" } ], "action": "", @@ -3883,108 +3613,24 @@ "from": "", "to": "", "reg": false, - "x": 800, - "y": 280, + "x": 1100, + "y": 560, "wires": [ [] ] }, { - "id": "4351720d.b31ed4", + "id": "68aeb24.1c455cc", "type": "change", - "z": "5c4ac285.afe6e4", - "name": "Init flow context", + "z": "da060938.c8ff48", + "name": "", "rules": [ { "t": "set", - "p": "Lp_NetzfrequenzNorm", - "pt": "flow", - "to": "50", - "tot": "num" - }, - { - "t": "set", - "p": "Lp_Netzfrequenz", + "p": "current_p2_LP3", "pt": "flow", - "to": "50", - "tot": "num" - }, - { - "t": "set", - "p": "Lp_Strom1", - "pt": "flow", - "to": "0", - "tot": "num" - }, - { - "t": "set", - "p": "Lp_Strom2", - "pt": "flow", - "to": "0", - "tot": "num" - }, - { - "t": "set", - "p": "Lp_Strom2", - "pt": "flow", - "to": "0", - "tot": "num" - }, - { - "t": "set", - "p": "Lp_Spannung1", - "pt": "flow", - "to": "230", - "tot": "num" - }, - { - "t": "set", - "p": "Lp_Spannung2", - "pt": "flow", - "to": "230", - "tot": "num" - }, - { - "t": "set", - "p": "Lp_Spannung3", - "pt": "flow", - "to": "230", - "tot": "num" - }, - { - "t": "set", - "p": "Lp_Ladeleistung", - "pt": "flow", - "to": "0", - "tot": "num" - }, - { - "t": "set", - "p": "Lp_Phasen", - "pt": "flow", - "to": "0", - "tot": "num" - }, - { - "t": "set", - "p": "Lp_Leistungsfaktor1", - "pt": "flow", - "to": "1.0", - "tot": "num" - }, - { - "t": "set", - "p": "Lp_Leistungsfaktor2", - "pt": "flow", - "to": "1.0", - "tot": "num" - }, - { - "t": "set", - "p": "Lp_Leistungsfaktor3", - "pt": "flow", - "to": "1.0", - "tot": "num" + "to": "$number(payload)", + "tot": "jsonata" } ], "action": "", @@ -3992,24 +3638,24 @@ "from": "", "to": "", "reg": false, - "x": 380, - "y": 420, + "x": 780, + "y": 660, "wires": [ [] ] }, { - "id": "5c185bf1.72503c", + "id": "eb955622.f1f86", "type": "change", - "z": "5c4ac285.afe6e4", + "z": "da060938.c8ff48", "name": "", "rules": [ { "t": "set", - "p": "Lp_Phasenumschaltung", + "p": "current_p3_LP3", "pt": "flow", - "to": "payload", - "tot": "msg" + "to": "$number(payload)", + "tot": "jsonata" } ], "action": "", @@ -4017,16 +3663,16 @@ "from": "", "to": "", "reg": false, - "x": 800, - "y": 200, + "x": 1100, + "y": 660, "wires": [ [] ] }, { - "id": "65aa4e7c.604d5", + "id": "9eed1b2f.670f88", "type": "interval-length", - "z": "5c4ac285.afe6e4", + "z": "da060938.c8ff48", "format": "mills", "bytopic": false, "minimum": "", @@ -4044,67 +3690,26 @@ "timestampField": "previousTimestamp", "repeatTimeout": false, "name": "Zeit zwischen den Nachrichten messen", - "x": 460, - "y": 760, + "x": 420, + "y": 1520, "wires": [ [ - "5aa7e41e.77b01c" + "2af10c7b.8279c4" ], [] ] }, { - "id": "5564373bd8d8091a", - "type": "switch", - "z": "5c4ac285.afe6e4", - "name": "Filter by Component-ID", - "property": "topic", - "propertyType": "msg", - "rules": [ - { - "t": "jsonata_exp", - "v": "$contains(topic, \"chargepoint/\" & $string($env(\"Component-ID\")) & \"/\")", - "vt": "jsonata" - }, - { - "t": "regex", - "v": "^/", - "vt": "str", - "case": false - } - ], - "checkall": "true", - "repair": false, - "outputs": 2, - "x": 250, - "y": 180, - "wires": [ - [ - "f1d98f14.271ef" - ], - [ - "f1d98f14.271ef" - ] - ] - }, - { - "id": "58ec8187c6755198", + "id": "4d3c89efaca7be5e", "type": "change", - "z": "5c4ac285.afe6e4", - "name": "Push component-id to evu node", + "z": "da060938.c8ff48", + "name": "", "rules": [ { "t": "set", - "p": "topic", - "pt": "msg", - "to": "$join(\t [\t \"simulator/chargepoint/\",\t $string($env(\"Chargepoint-ID\")),\t \"/id\"\t ]\t)", - "tot": "jsonata" - }, - { - "t": "set", - "p": "payload", - "pt": "msg", - "to": "$env(\"Component-ID\")", + "p": "frequency", + "pt": "flow", + "to": "$number(payload)", "tot": "jsonata" } ], @@ -4113,74 +3718,74 @@ "from": "", "to": "", "reg": false, - "x": 430, - "y": 460, + "x": 440, + "y": 1040, "wires": [ [] ] }, { - "id": "bddf955cca42c275", - "type": "inject", - "z": "5c4ac285.afe6e4", - "name": "Debug", - "props": [ - { - "p": "payload" - }, + "id": "1711441c919e2a1d", + "type": "change", + "z": "da060938.c8ff48", + "name": "", + "rules": [ { - "p": "topic", - "vt": "str" + "t": "set", + "p": "HausverbrauchNorm_p1", + "pt": "flow", + "to": "payload", + "tot": "msg" } ], - "repeat": "10", - "crontab": "", - "once": true, - "onceDelay": "5", - "topic": "debug", - "payload": "{\t \"power\": $flowContext(\"Lp_Ladeleistung\"),\t \"sollstrom\": $flowContext(\"Lp_Sollstrom\"),\t \"strom\": [\t $flowContext(\"Lp_Strom1\"),\t $flowContext(\"Lp_Strom2\"),\t $flowContext(\"Lp_Strom3\")\t ],\t \"spannung\": [\t $flowContext(\"Lp_Spannung1\"),\t $flowContext(\"Lp_Spannung2\"),\t $flowContext(\"Lp_Spannung3\")\t ],\t \"lp_phasen\": $flowContext(\"Lp_Phasen\"),\t \"ev_phasen\": $flowContext(\"Lp_EV_Phasen\"),\t \"phasenumschaltung\": $flowContext(\"Lp_Phasenumschaltung\"),\t \"stecker\": $flowContext(\"Lp_Stecker\"),\t \"frequenz\": $flowContext(\"Lp_Netzfrequenz\"),\t \"frequenz_norm\": $flowContext(\"Lp_NetzfrequenzNorm\"),\t \"imported\": $flowContext(\"Lp_Zähler_laden\"),\t \"exported\": $flowContext(\"Lp_Zähler_entladen\")\t}", - "payloadType": "jsonata", - "x": 1060, - "y": 40, + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 480, + "y": 100, "wires": [ [] ] }, { - "id": "4d37676232ebd1a7", - "type": "switch", - "z": "5c4ac285.afe6e4", - "name": "Zähler entladen gesetzt?", - "property": "Lp_Zähler_entladen", - "propertyType": "flow", + "id": "fc15ba2aeda2dbb2", + "type": "change", + "z": "da060938.c8ff48", + "name": "", "rules": [ { - "t": "null" + "t": "set", + "p": "HausverbrauchNorm_p2", + "pt": "flow", + "to": "payload", + "tot": "msg" } ], - "checkall": "true", - "repair": false, - "outputs": 1, - "x": 410, - "y": 380, + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 480, + "y": 140, "wires": [ - [ - "8c6c68173df4bf12" - ] + [] ] }, { - "id": "8c6c68173df4bf12", + "id": "a8e83e7e034910ce", "type": "change", - "z": "5c4ac285.afe6e4", - "name": "Zähler entladen init", + "z": "da060938.c8ff48", + "name": "", "rules": [ { "t": "set", - "p": "Lp_Zähler_entladen", + "p": "HausverbrauchNorm_p3", "pt": "flow", - "to": "0", - "tot": "num" + "to": "payload", + "tot": "msg" } ], "action": "", @@ -4188,66 +3793,141 @@ "from": "", "to": "", "reg": false, - "x": 650, - "y": 380, + "x": 480, + "y": 180, "wires": [ [] ] }, { - "id": "bd7cd25d6f0276eb", - "type": "switch", - "z": "5c4ac285.afe6e4", + "id": "80f26b21aa9b6cca", + "type": "change", + "z": "da060938.c8ff48", "name": "", - "property": "payload", - "propertyType": "msg", "rules": [ { - "t": "gte", - "v": "0", - "vt": "num" + "t": "set", + "p": "hausverbrauch_p1", + "pt": "flow", + "to": "$max(\t [\t payload+$flowContext(\"HausverbrauchNorm_p1\"),\t 0\t ]\t)", + "tot": "jsonata" }, { - "t": "else" + "t": "set", + "p": "hausverbrauch_p2", + "pt": "flow", + "to": "$max(\t [\t payload+$flowContext(\"HausverbrauchNorm_p2\"),\t 0\t ]\t)", + "tot": "jsonata" + }, + { + "t": "set", + "p": "hausverbrauch_p3", + "pt": "flow", + "to": "$max(\t [\t payload+$flowContext(\"HausverbrauchNorm_p3\"),\t 0\t ]\t)", + "tot": "jsonata" + }, + { + "t": "set", + "p": "hausverbrauch", + "pt": "flow", + "to": "$flowContext(\"hausverbrauch_p1\") + $flowContext(\"hausverbrauch_p2\") + $flowContext(\"hausverbrauch_p3\")", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 790, + "y": 1360, + "wires": [ + [ + "3ba0e67b.44155a", + "6c586f55.6462e" + ] + ] + }, + { + "id": "c1f27145620a046e", + "type": "inject", + "z": "da060938.c8ff48", + "name": "Debug", + "props": [ + { + "p": "payload" + }, + { + "p": "topic", + "vt": "str" + } + ], + "repeat": "10", + "crontab": "", + "once": true, + "onceDelay": "5", + "topic": "debug", + "payload": "{\t \"haus_norm\": [\t $flowContext(\"HausverbrauchNorm_p1\"),\t $flowContext(\"HausverbrauchNorm_p1\"),\t $flowContext(\"HausverbrauchNorm_p1\")\t ],\t \"haus\": [\t $flowContext(\"hausverbrauch_p1\"),\t $flowContext(\"hausverbrauch_p2\"),\t $flowContext(\"hausverbrauch_p3\")\t ],\t \"pv\": $flowContext(\"pv\"),\t \"bat\": $flowContext(\"bat\"),\t \"lp1\": [\t $flowContext(\"id_LP1\"),\t $flowContext(\"current_p1_LP1\"),\t $flowContext(\"current_p2_LP1\"),\t $flowContext(\"current_p3_LP1\")\t ],\t \"lp2\": [\t $flowContext(\"id_LP2\"),\t $flowContext(\"current_p1_LP2\"),\t $flowContext(\"current_p2_LP2\"),\t $flowContext(\"current_p3_LP2\")\t ],\t \"lp3\": [\t $flowContext(\"id_LP3\"),\t $flowContext(\"current_p1_LP3\"),\t $flowContext(\"current_p2_LP3\"),\t $flowContext(\"current_p3_LP3\")\t ]\t}", + "payloadType": "jsonata", + "x": 980, + "y": 40, + "wires": [ + [] + ] + }, + { + "id": "ee96ba88673e1d59", + "type": "switch", + "z": "da060938.c8ff48", + "name": "Switch by LP", + "property": "topic", + "propertyType": "msg", + "rules": [ + { + "t": "cont", + "v": "/1/", + "vt": "str" + }, + { + "t": "cont", + "v": "/2/", + "vt": "str" + }, + { + "t": "cont", + "v": "/3/", + "vt": "str" } ], "checkall": "true", "repair": false, - "outputs": 2, - "x": 930, - "y": 760, + "outputs": 3, + "x": 410, + "y": 260, "wires": [ [ - "eae3cd53.403d28" + "2fa0518014006c84" ], [ - "733f65e137ec70e1" + "b7990ed38fa1acd5" + ], + [ + "2954b1834ffee518" ] - ], - "outputLabels": [ - "laden", - "entladen" ] }, { - "id": "733f65e137ec70e1", + "id": "2fa0518014006c84", "type": "change", - "z": "5c4ac285.afe6e4", - "name": "Zähler entladen aktualisieren", + "z": "da060938.c8ff48", + "name": "", "rules": [ { "t": "set", - "p": "Lp_Zähler_entladen", + "p": "id_LP1", "pt": "flow", - "to": "-payload+$flowContext(\"Lp_Zähler_entladen\")", - "tot": "jsonata" - }, - { - "t": "set", - "p": "payload", - "pt": "msg", - "to": "Lp_Zähler_entladen", - "tot": "flow" + "to": "payload", + "tot": "msg" } ], "action": "", @@ -4255,284 +3935,3614 @@ "from": "", "to": "", "reg": false, - "x": 1160, - "y": 800, + "x": 650, + "y": 220, "wires": [ - [ - "d28d6c2d.ccd198" - ] + [] ] }, { - "id": "71b196bb372367ab", - "type": "function", - "z": "5c4ac285.afe6e4", - "name": "Phasen für EVU rotieren", - "func": "const componentId = env.get(\"Component-ID\");\nconst phasesInUse = flow.get(\"Lp_Phasen\");\nconst phase1 = parseInt(env.get(\"Phase1\"));\n\nvar phaseCurrents = [0,0,0];\n\nswitch (phase1) {\n case 1:\n phaseCurrents[0] = msg.payload;\n if( phasesInUse > 1 )\n phaseCurrents[1] = msg.payload;\n if( phasesInUse > 2 )\n phaseCurrents[2] = msg.payload;\n break;\n case 2:\n phaseCurrents[1] = msg.payload;\n if( phasesInUse > 1 )\n phaseCurrents[2] = msg.payload;\n if( phasesInUse > 2 )\n phaseCurrents[0] = msg.payload;\n break;\n case 3:\n phaseCurrents[2] = msg.payload;\n if( phasesInUse > 1 )\n phaseCurrents[0] = msg.payload;\n if( phasesInUse > 2 )\n phaseCurrents[1] = msg.payload;\n break;\n}\n\nvar evuPhaseCurrentMsgs = [\n {\n \"topic\": \"/chargepoint/\" + componentId + \"/get/current_p1\",\n \"payload\": phaseCurrents[0]\n },\n {\n \"topic\": \"/chargepoint/\" + componentId + \"/get/current_p2\",\n \"payload\": phaseCurrents[1]\n },\n {\n \"topic\": \"/chargepoint/\" + componentId + \"/get/current_p3\",\n \"payload\": phaseCurrents[2]\n }\n];\n\nreturn [evuPhaseCurrentMsgs];\n", - "outputs": 1, - "noerr": 0, - "initialize": "", - "finalize": "", - "libs": [], - "x": 990, - "y": 580, + "id": "b7990ed38fa1acd5", + "type": "change", + "z": "da060938.c8ff48", + "name": "", + "rules": [ + { + "t": "set", + "p": "id_LP2", + "pt": "flow", + "to": "payload", + "tot": "msg" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 650, + "y": 260, "wires": [ [] - ], - "outputLabels": [ - "Strom EVU (phasenrotiert)" ] }, { - "id": "92165c72.a5f948", - "type": "tab", - "label": "Simulator 2.0", - "disabled": false, - "info": "# Simulator für openWB 2.x\nMit diesem Flow kann eine komplette virtuelle Umgebung für openWB bereitgestellt werden.\nDie Umgebung besteht aus einem Zähler (muss als \"EVU\" in der Hierarchie eingerichtet sein),\neinem PV-Modul, einem Batteriespeicher sowie drei Ladepunkten.\n\n## Hintergrundwissen\nDie PV-Anlage ist aktuell an alle drei Phasen \"angeschlossen\" und verteilt die Leistung gleichmäßig.\n_(ToDo: Anschluss variabel auf einzelne Phasen konfigurierbar)_\n\nDer Batteriespeicher verteilt seine Leistung ebenfalls gleichmäßig auf alle drei Phasen.\n_(ToDo: Anschluss variabel auf einzelne Phasen konfigurierbar)_\n\nDie Leistung des Speichers wird durch einen PID-Regler gesteuert. Die Parameter sind noch nicht optimal\neingestellt. Es kann vorkommen, dass die Regelung anfängt zu schwingen.\n_(ToDo: PID-Regler optimieren)_\n\n## Einrichtung\n**Da alle Komponenten in openWB 2.x dynamisch vergeben werden, müssen nach dem Import des Flows\ndie Komponenten-IDs an die jeweiligen Gegebenheiten der eigenen Installation angepasst werden!**\n\nDie Komponenten-IDs können in den Eigenschaften der Sub-Flows \"EVU\", \"PV1\", \"Bat\", \"LP1\", \"LP2\" und \"LP3\"\nfestgelegt werden.\n\nIn den Sub-Flow Eigenschaften der Ladepunkte kann ebenfalls festgelegt werden, an welcher Phase L1 des\nEVU angeschlossen ist. Dadurch können auch komplexe Setups mit (gut oder ungünstig) rotierten Phasen\nabgebildet werden.\n\n---\n\n# Steuerungsmöglichkeiten im Dashboard\n\n## EVU Zähler\nDer virtuelle Hausverbrauch kann im Dashboard je Phase festgelegt werden. Dadurch können gezielt Schieflasten\nfür das Lastmanagement erzeugt werden.\n\nDie Netzfrequenz des Zählers kann variiert werden, um den Netzschutz seitens des Energieversorgers zu testen.\n\n## PV\nDie aktuelle Leistung des Wechselrichters kann zwischen 0W und 10kW variiert werden.\n\n## Batteriespeicher\nDer aktuelle Ladestand (SoC) kann gezielt eingestellt werden.\n\nDie maximale Leistung des Speichers kann zwischen 0W und 5kW eingestellt werden.\n\nDie virtuelle Kapazität des Batteriespeichers kann auf bis zu 15kWh angepsst werden.\n\n## Ladepunkte\nEs kann ein Fahrzeug \"angesteckt\" werden.\n\nEs kann angegeben werden, wieviele Phasen das angeschlossene Fahrzeug maximal nutzen kann.\n", - "env": [] + "id": "2954b1834ffee518", + "type": "change", + "z": "da060938.c8ff48", + "name": "", + "rules": [ + { + "t": "set", + "p": "id_LP3", + "pt": "flow", + "to": "payload", + "tot": "msg" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 650, + "y": 300, + "wires": [ + [] + ] }, { - "id": "10c935e7.d81c6a", - "type": "group", - "z": "92165c72.a5f948", - "name": "Ladepunkt 1", - "style": { - "label": true, - "stroke": "#0070c0", - "fill": "#0070c0", - "fill-opacity": "0.25" - }, - "nodes": [ - "a9947543.f34bd", - "9dad0a08.b2c0f", - "66502428.6bc2ec", - "4efd69fa.600b1", - "bcde68d8.fbde58", - "b4c0b8e7.95301", - "c2212cf2.e2bfe", - "bca07e3a.16ff08", - "c7894755.6c934", - "1c08d24.841d3ae", - "aa2ce19d.eaf1e8", - "5aa1d8c69080891b", - "e6650f13b3cc695a", - "ed32a789.f4f798", - "8c206019dae8c4f0", - "44f4fcadd171fe6d", - "1e68cfab.5aab5", - "3c77c4ed766b07a5", - "ac0a42a5e9a6a1d8", - "dab0d3d1144c2cc4" + "id": "625ef4cd47cfd7f8", + "type": "change", + "z": "da060938.c8ff48", + "name": "", + "rules": [ + { + "t": "set", + "p": "leistungConsumer4", + "pt": "flow", + "to": "$number(payload)", + "tot": "jsonata" + } ], - "x": 14, - "y": 1184, - "w": 1152, - "h": 417 + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 470, + "y": 720, + "wires": [ + [] + ] }, { - "id": "9924f98f.a9ee4", - "type": "group", - "z": "92165c72.a5f948", - "name": "PV 1", - "style": { - "stroke": "#92d04f", - "fill": "#92d04f", - "fill-opacity": "0.25", - "label": true - }, - "nodes": [ - "2ab22961.d73e06", - "8c9d0662.e0c83", - "83082d16.5c0c", - "c6745675.5b9ec", - "c98a2da7.d75a38", - "54fdb013.3028f8", - "f5a5cec3.4fd8a8", - "9605f30870c8aa1a", - "c44e5ea9.d6b06" + "id": "8ea260cde13ce65e", + "type": "change", + "z": "da060938.c8ff48", + "name": "", + "rules": [ + { + "t": "set", + "p": "current_p1_Consumer4", + "pt": "flow", + "to": "$number(payload)", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 480, + "y": 760, + "wires": [ + [] + ] + }, + { + "id": "aec1ab45f4246c67", + "type": "change", + "z": "da060938.c8ff48", + "name": "", + "rules": [ + { + "t": "set", + "p": "current_p2_Consumer4", + "pt": "flow", + "to": "$number(payload)", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 800, + "y": 760, + "wires": [ + [] + ] + }, + { + "id": "e8dacffdf212e720", + "type": "change", + "z": "da060938.c8ff48", + "name": "", + "rules": [ + { + "t": "set", + "p": "current_p3_Consumer4", + "pt": "flow", + "to": "$number(payload)", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 1120, + "y": 760, + "wires": [ + [] + ] + }, + { + "id": "8b715b00726b42d5", + "type": "switch", + "z": "da060938.c8ff48", + "name": "Switch by consumer", + "property": "topic", + "propertyType": "msg", + "rules": [ + { + "t": "cont", + "v": "/4/", + "vt": "str" + }, + { + "t": "cont", + "v": "/5/", + "vt": "str" + } + ], + "checkall": "true", + "repair": false, + "outputs": 2, + "x": 440, + "y": 360, + "wires": [ + [ + "5e196b3209d47b9f" + ], + [ + "8b950e1864ee55c1" + ] + ] + }, + { + "id": "5e196b3209d47b9f", + "type": "change", + "z": "da060938.c8ff48", + "name": "", + "rules": [ + { + "t": "set", + "p": "id_Consumer4", + "pt": "flow", + "to": "payload", + "tot": "msg" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 670, + "y": 340, + "wires": [ + [] + ] + }, + { + "id": "983db8d2e5aa66be", + "type": "comment", + "z": "da060938.c8ff48", + "name": "Ströme", + "info": "", + "x": 110, + "y": 1360, + "wires": [] + }, + { + "id": "f7296b8c3747a961", + "type": "comment", + "z": "da060938.c8ff48", + "name": "Leistung", + "info": "", + "x": 120, + "y": 1420, + "wires": [] + }, + { + "id": "d7833cbb6d0f40f6", + "type": "comment", + "z": "da060938.c8ff48", + "name": "Zählerstand", + "info": "", + "x": 130, + "y": 1520, + "wires": [] + }, + { + "id": "a92b6567600fd71e", + "type": "change", + "z": "da060938.c8ff48", + "name": "", + "rules": [ + { + "t": "set", + "p": "leistungConsumer5", + "pt": "flow", + "to": "$number(payload)", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 470, + "y": 820, + "wires": [ + [] + ] + }, + { + "id": "9c42d4fc35fb1f55", + "type": "change", + "z": "da060938.c8ff48", + "name": "", + "rules": [ + { + "t": "set", + "p": "current_p1_Consumer5", + "pt": "flow", + "to": "$number(payload)", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 480, + "y": 860, + "wires": [ + [] + ] + }, + { + "id": "7c9f546019bc25b3", + "type": "change", + "z": "da060938.c8ff48", + "name": "", + "rules": [ + { + "t": "set", + "p": "current_p2_Consumer5", + "pt": "flow", + "to": "$number(payload)", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 800, + "y": 860, + "wires": [ + [] + ] + }, + { + "id": "907a7950ce566da2", + "type": "change", + "z": "da060938.c8ff48", + "name": "", + "rules": [ + { + "t": "set", + "p": "current_p3_Consumer5", + "pt": "flow", + "to": "$number(payload)", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 1120, + "y": 860, + "wires": [ + [] + ] + }, + { + "id": "8b950e1864ee55c1", + "type": "change", + "z": "da060938.c8ff48", + "name": "", + "rules": [ + { + "t": "set", + "p": "id_Consumer5", + "pt": "flow", + "to": "payload", + "tot": "msg" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 670, + "y": 380, + "wires": [ + [] + ] + }, + { + "id": "5b4b7510.acf434", + "type": "change", + "z": "5c4ac285.afe6e4", + "name": "", + "rules": [ + { + "t": "set", + "p": "Lp_Sollstrom", + "pt": "flow", + "to": "$number(payload)", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 770, + "y": 120, + "wires": [ + [] + ] + }, + { + "id": "124dbffa.10bb", + "type": "change", + "z": "5c4ac285.afe6e4", + "name": "", + "rules": [ + { + "t": "set", + "p": "Lp_EV_Phasen", + "pt": "flow", + "to": "payload", + "tot": "msg" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 770, + "y": 160, + "wires": [ + [] + ] + }, + { + "id": "78b855e9.ef0b24", + "type": "change", + "z": "5c4ac285.afe6e4", + "name": "", + "rules": [ + { + "t": "set", + "p": "Lp_Stecker", + "pt": "flow", + "to": "payload", + "tot": "msg" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 760, + "y": 240, + "wires": [ + [] + ] + }, + { + "id": "f1d98f14.271ef", + "type": "switch", + "z": "5c4ac285.afe6e4", + "name": "Split Topics", + "property": "topic", + "propertyType": "msg", + "rules": [ + { + "t": "regex", + "v": "\\/set\\/current$", + "vt": "str", + "case": false + }, + { + "t": "regex", + "v": "\\/max_phases$", + "vt": "str", + "case": false + }, + { + "t": "regex", + "v": "\\/phases_to_use$", + "vt": "str", + "case": false + }, + { + "t": "regex", + "v": "\\/plug_state$", + "vt": "str", + "case": false + }, + { + "t": "regex", + "v": "\\/frequency$", + "vt": "str", + "case": false + } + ], + "checkall": "true", + "repair": false, + "outputs": 5, + "x": 510, + "y": 180, + "wires": [ + [ + "5b4b7510.acf434" + ], + [ + "124dbffa.10bb" + ], + [ + "5c185bf1.72503c" + ], + [ + "78b855e9.ef0b24" + ], + [ + "33434644.b16a22" + ] + ], + "outputLabels": [ + "Sollstrom", + "Aktive Phasen", + "", + "Stecker-Status", + "Soll-Netzfrequenz" + ] + }, + { + "id": "546e1a19.1c607c", + "type": "inject", + "z": "5c4ac285.afe6e4", + "name": "Publish Trigger", + "props": [ + { + "p": "payload" + } + ], + "repeat": "5", + "crontab": "", + "once": true, + "onceDelay": "5", + "topic": "", + "payload": "", + "payloadType": "date", + "x": 140, + "y": 40, + "wires": [ + [ + "d477d279.2cc62" + ] + ] + }, + { + "id": "d477d279.2cc62", + "type": "function", + "z": "5c4ac285.afe6e4", + "name": "Senden der Flow-Daten", + "func": "const LPNumber = env.get(\"Component-ID\");\n\nvar chargestat = 0;\nif( flow.get(\"Lp_Strom1\") > 0 || flow.get(\"Lp_Strom2\") > 0 || flow.get(\"Lp_Strom3\") > 0 ){\n chargestat = 1;\n}\n\nvar statusColor = \"red\";\nvar statusShape = \"ring\";\nif (flow.get(\"Lp_Stecker\") == 1){\n statusColor = \"green\"\n if (chargestat == 1){\n statusShape = \"dot\";\n }\n}\n\nconst actualPower = parseInt(flow.get(\"Lp_Ladeleistung\").toFixed(0));\nconst actualPowerkW = actualPower / 1000;\nconst phasesInUse = flow.get(\"Lp_Phasen\");\nconst phasesToUse = flow.get(\"Lp_Phasenumschaltung\");\nconst phasesEVmax = flow.get(\"Lp_EV_Phasen\");\nconst currentL1 = flow.get(\"Lp_Strom1\");\nconst currentL2 = flow.get(\"Lp_Strom2\");\nconst currentL3 = flow.get(\"Lp_Strom3\");\nconst volatageL1 = flow.get(\"Lp_Spannung1\");\nconst volatageL2 = flow.get(\"Lp_Spannung2\");\nconst volatageL3 = flow.get(\"Lp_Spannung3\");\nconst powerFactorL1 = flow.get(\"Lp_Leistungsfaktor1\");\nconst powerFactorL2 = flow.get(\"Lp_Leistungsfaktor2\");\nconst powerFactorL3 = flow.get(\"Lp_Leistungsfaktor3\");\n\nnode.status({\n fill: statusColor,\n shape: statusShape,\n text:actualPowerkW.toFixed(1)+\"kW \"+phasesInUse+\"P(\"+phasesEVmax+\"/\"+phasesToUse+\")\"\n });\n\nreturn [\n [\n {\n topic: \"openWB/set/mqtt/chargepoint/\" + LPNumber + \"/get/currents\",\n payload: [currentL1, currentL2, currentL3]\n },\n {\n topic: \"openWB/set/mqtt/chargepoint/\" + LPNumber + \"/get/evse_current\",\n payload: currentL1\n },\n {\n topic: \"openWB/set/mqtt/chargepoint/\" + LPNumber + \"/get/voltages\",\n payload: [volatageL1, volatageL2, volatageL3]\n },\n {\n topic: \"openWB/set/mqtt/chargepoint/\" + LPNumber + \"/get/power\",\n payload: actualPower\n },\n {\n topic: \"openWB/set/mqtt/chargepoint/\" + LPNumber + \"/get/powers\",\n payload: [volatageL1 * currentL1 * powerFactorL1, volatageL2 * currentL2 * powerFactorL2, volatageL3 * currentL3 * powerFactorL3]\n },\n {\n topic: \"openWB/set/mqtt/chargepoint/\" + LPNumber + \"/get/power_factors\",\n payload: [powerFactorL1, powerFactorL2, powerFactorL3]\n },\n {\n topic: \"openWB/set/mqtt/chargepoint/\" + LPNumber + \"/get/frequency\",\n payload: flow.get(\"Lp_Netzfrequenz\")\n },\n {\n topic: \"openWB/set/mqtt/chargepoint/\" + LPNumber + \"/get/imported\",\n payload: parseFloat(flow.get(\"Lp_Zähler_laden\").toFixed(3))\n },\n {\n topic: \"openWB/set/mqtt/chargepoint/\" + LPNumber + \"/get/exported\",\n payload: parseFloat(flow.get(\"Lp_Zähler_entladen\").toFixed(3))\n },\n {\n topic: \"openWB/set/mqtt/chargepoint/\" + LPNumber + \"/get/plug_state\",\n payload: flow.get(\"Lp_Stecker\")\n },\n {\n topic: \"openWB/set/mqtt/chargepoint/\" + LPNumber + \"/get/charge_state\",\n payload: chargestat\n },\n {\n topic: \"openWB/set/mqtt/chargepoint/\" + LPNumber + \"/get/phases_in_use\",\n payload: phasesInUse\n }\n ]\n]\n", + "outputs": 1, + "timeout": "", + "noerr": 0, + "initialize": "", + "finalize": "", + "libs": [], + "x": 410, + "y": 40, + "wires": [ + [] + ] + }, + { + "id": "16b7648f.04f14b", + "type": "switch", + "z": "5c4ac285.afe6e4", + "name": "Zähler laden gesetzt?", + "property": "Lp_Zähler_laden", + "propertyType": "flow", + "rules": [ + { + "t": "null" + } + ], + "checkall": "true", + "repair": false, + "outputs": 1, + "x": 400, + "y": 340, + "wires": [ + [ + "898e546f.9440e" + ] + ] + }, + { + "id": "898e546f.9440e", + "type": "change", + "z": "5c4ac285.afe6e4", + "name": "Zähler laden init", + "rules": [ + { + "t": "set", + "p": "Lp_Zähler_laden", + "pt": "flow", + "to": "0", + "tot": "num" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 640, + "y": 340, + "wires": [ + [] + ] + }, + { + "id": "fa801f38.18d6c8", + "type": "inject", + "z": "5c4ac285.afe6e4", + "name": "Init", + "props": [ + { + "p": "payload" + } + ], + "repeat": "", + "crontab": "", + "once": true, + "onceDelay": 0.1, + "topic": "", + "payload": "", + "payloadType": "date", + "x": 130, + "y": 340, + "wires": [ + [ + "16b7648f.04f14b", + "4351720d.b31ed4", + "58ec8187c6755198", + "4d37676232ebd1a7" + ] + ] + }, + { + "id": "5aa7e41e.77b01c", + "type": "change", + "z": "5c4ac285.afe6e4", + "name": "Energie in Wh", + "rules": [ + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "$flowContext(\"Lp_Ladeleistung\")*timeInterval/1000/3600", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 740, + "y": 760, + "wires": [ + [ + "bd7cd25d6f0276eb" + ] + ], + "info": "$number(payload)*(timeInterval/1000)/3600/1000" + }, + { + "id": "eae3cd53.403d28", + "type": "change", + "z": "5c4ac285.afe6e4", + "name": "Zähler laden aktualisieren", + "rules": [ + { + "t": "set", + "p": "Lp_Zähler_laden", + "pt": "flow", + "to": "payload+$flowContext(\"Lp_Zähler_laden\")", + "tot": "jsonata" + }, + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "Lp_Zähler_laden", + "tot": "flow" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 1150, + "y": 760, + "wires": [ + [ + "d28d6c2d.ccd198" + ] + ] + }, + { + "id": "2254d233.5854e6", + "type": "change", + "z": "5c4ac285.afe6e4", + "name": "", + "rules": [ + { + "t": "set", + "p": "Lp_Ladeleistung", + "pt": "flow", + "to": "$flowContext(\"Lp_Spannung1\")*$flowContext(\"Lp_Strom1\")*$flowContext(\"Lp_Leistungsfaktor1\")+$flowContext(\"Lp_Spannung2\")*$flowContext(\"Lp_Strom2\")*$flowContext(\"Lp_Leistungsfaktor2\")+$flowContext(\"Lp_Spannung3\")*$flowContext(\"Lp_Strom3\")*$flowContext(\"Lp_Leistungsfaktor3\")", + "tot": "jsonata" + }, + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "Lp_Ladeleistung", + "tot": "flow" + }, + { + "t": "change", + "p": "topic", + "pt": "msg", + "from": "#", + "fromt": "str", + "to": "Component-ID", + "tot": "env" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 740, + "y": 700, + "wires": [ + [ + "65aa4e7c.604d5" + ] + ] + }, + { + "id": "95e69cc1.77d8d8", + "type": "inject", + "z": "5c4ac285.afe6e4", + "name": "", + "props": [ + { + "p": "payload" + } + ], + "repeat": "2", + "crontab": "", + "once": true, + "onceDelay": "1", + "topic": "", + "payload": "Lp_Sollstrom", + "payloadType": "flow", + "x": 170, + "y": 520, + "wires": [ + [ + "5db82d46.a42464" + ] + ] + }, + { + "id": "43c64905.ca1d68", + "type": "change", + "z": "5c4ac285.afe6e4", + "name": "", + "rules": [ + { + "t": "set", + "p": "Lp_Spannung1", + "pt": "flow", + "to": "payload", + "tot": "jsonata" + }, + { + "t": "set", + "p": "Lp_Spannung2", + "pt": "flow", + "to": "payload", + "tot": "jsonata" + }, + { + "t": "set", + "p": "Lp_Spannung3", + "pt": "flow", + "to": "payload", + "tot": "jsonata" + }, + { + "t": "set", + "p": "topic", + "pt": "msg", + "to": "/chargepoint/#/get/power_all", + "tot": "str" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 740, + "y": 640, + "wires": [ + [ + "2254d233.5854e6" + ] + ] + }, + { + "id": "cd6c0260.bf728", + "type": "comment", + "z": "5c4ac285.afe6e4", + "name": "Spannungen", + "info": "", + "x": 150, + "y": 640, + "wires": [] + }, + { + "id": "b05f8ef.8357c7", + "type": "comment", + "z": "5c4ac285.afe6e4", + "name": "Ströme", + "info": "", + "x": 130, + "y": 580, + "wires": [] + }, + { + "id": "2ed9ad3b.5b9922", + "type": "comment", + "z": "5c4ac285.afe6e4", + "name": "Leistung", + "info": "", + "x": 140, + "y": 700, + "wires": [] + }, + { + "id": "5db82d46.a42464", + "type": "switch", + "z": "5c4ac285.afe6e4", + "name": "angesteckt?", + "property": "Lp_Stecker", + "propertyType": "flow", + "rules": [ + { + "t": "eq", + "v": "0", + "vt": "num" + }, + { + "t": "eq", + "v": "1", + "vt": "num" + } + ], + "checkall": "true", + "repair": false, + "outputs": 2, + "x": 330, + "y": 580, + "wires": [ + [ + "c4b09682.906f4" + ], + [ + "702fd2d4.54ae6c" + ] + ] + }, + { + "id": "c4b09682.906f4", + "type": "change", + "z": "5c4ac285.afe6e4", + "name": "Sollstrom = 0", + "rules": [ + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "0", + "tot": "num" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 510, + "y": 560, + "wires": [ + [ + "702fd2d4.54ae6c" + ] + ] + }, + { + "id": "a93713d.2f351f", + "type": "comment", + "z": "5c4ac285.afe6e4", + "name": "Zählerstand", + "info": "", + "x": 150, + "y": 760, + "wires": [] + }, + { + "id": "d8be3486.74562", + "type": "random", + "z": "5c4ac285.afe6e4", + "name": "230V +/-5V", + "low": "225", + "high": "235", + "inte": "false", + "property": "payload", + "x": 370, + "y": 640, + "wires": [ + [ + "5944aff0.c01d48" + ] + ] + }, + { + "id": "702fd2d4.54ae6c", + "type": "smooth", + "z": "5c4ac285.afe6e4", + "name": "", + "property": "payload", + "action": "mean", + "count": "4", + "round": "0", + "mult": "single", + "reduce": false, + "x": 680, + "y": 580, + "wires": [ + [ + "62f55674.8ce028" + ] + ] + }, + { + "id": "5944aff0.c01d48", + "type": "smooth", + "z": "5c4ac285.afe6e4", + "name": "", + "property": "payload", + "action": "mean", + "count": "10", + "round": "1", + "mult": "single", + "reduce": false, + "x": 540, + "y": 640, + "wires": [ + [ + "43c64905.ca1d68" + ] + ] + }, + { + "id": "c4b80c5a.65fa88", + "type": "status", + "z": "5c4ac285.afe6e4", + "name": "", + "scope": [ + "d477d279.2cc62" + ], + "x": 780, + "y": 40, + "wires": [ + [] + ] + }, + { + "id": "62f55674.8ce028", + "type": "function", + "z": "5c4ac285.afe6e4", + "name": "", + "func": "const phasesEVmax = flow.get(\"Lp_EV_Phasen\");\nconst phasesLPmax = flow.get(\"Lp_Phasenumschaltung\");\nvar phasesInUse = phasesEVmax;\nif(phasesEVmax > phasesLPmax){\n phasesInUse = phasesLPmax;\n}\n\nvar phaseCurrents = [0,0,0];\n\nphaseCurrents[0] = msg.payload;\nif( phasesInUse > 1 )\n phaseCurrents[1] = msg.payload;\nif( phasesInUse > 2 )\n phaseCurrents[2] = msg.payload;\n\nflow.set(\"Lp_Strom1\", phaseCurrents[0]);\nflow.set(\"Lp_Strom2\", phaseCurrents[1]);\nflow.set(\"Lp_Strom3\", phaseCurrents[2]);\nflow.set(\"Lp_Phasen\", phasesInUse);\n\nreturn msg;\n", + "outputs": 1, + "timeout": "", + "noerr": 0, + "initialize": "", + "finalize": "", + "libs": [], + "x": 840, + "y": 580, + "wires": [ + [ + "d8be3486.74562", + "71b196bb372367ab" + ] + ] + }, + { + "id": "d04bd47e.42ea98", + "type": "comment", + "z": "5c4ac285.afe6e4", + "name": "Netzfrequenz", + "info": "", + "x": 150, + "y": 860, + "wires": [] + }, + { + "id": "d28d6c2d.ccd198", + "type": "random", + "z": "5c4ac285.afe6e4", + "name": "+/-0.1Hz", + "low": "-0.1", + "high": "0.1", + "inte": "false", + "property": "payload", + "x": 360, + "y": 860, + "wires": [ + [ + "25ba0874.01329" + ] + ] + }, + { + "id": "25ba0874.01329", + "type": "smooth", + "z": "5c4ac285.afe6e4", + "name": "", + "property": "payload", + "action": "mean", + "count": "5", + "round": "2", + "mult": "single", + "reduce": false, + "x": 560, + "y": 860, + "wires": [ + [ + "a8b4d76e.b28828" + ] + ] + }, + { + "id": "a8b4d76e.b28828", + "type": "change", + "z": "5c4ac285.afe6e4", + "name": "", + "rules": [ + { + "t": "set", + "p": "Lp_Netzfrequenz", + "pt": "flow", + "to": "payload+$flowContext(\"Lp_NetzfrequenzNorm\")", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 780, + "y": 860, + "wires": [ + [] + ] + }, + { + "id": "33434644.b16a22", + "type": "change", + "z": "5c4ac285.afe6e4", + "name": "", + "rules": [ + { + "t": "set", + "p": "Lp_NetzfrequenzNorm", + "pt": "flow", + "to": "payload", + "tot": "msg" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 800, + "y": 280, + "wires": [ + [] + ] + }, + { + "id": "4351720d.b31ed4", + "type": "change", + "z": "5c4ac285.afe6e4", + "name": "Init flow context", + "rules": [ + { + "t": "set", + "p": "Lp_NetzfrequenzNorm", + "pt": "flow", + "to": "50", + "tot": "num" + }, + { + "t": "set", + "p": "Lp_Netzfrequenz", + "pt": "flow", + "to": "50", + "tot": "num" + }, + { + "t": "set", + "p": "Lp_Strom1", + "pt": "flow", + "to": "0", + "tot": "num" + }, + { + "t": "set", + "p": "Lp_Strom2", + "pt": "flow", + "to": "0", + "tot": "num" + }, + { + "t": "set", + "p": "Lp_Strom2", + "pt": "flow", + "to": "0", + "tot": "num" + }, + { + "t": "set", + "p": "Lp_Spannung1", + "pt": "flow", + "to": "230", + "tot": "num" + }, + { + "t": "set", + "p": "Lp_Spannung2", + "pt": "flow", + "to": "230", + "tot": "num" + }, + { + "t": "set", + "p": "Lp_Spannung3", + "pt": "flow", + "to": "230", + "tot": "num" + }, + { + "t": "set", + "p": "Lp_Ladeleistung", + "pt": "flow", + "to": "0", + "tot": "num" + }, + { + "t": "set", + "p": "Lp_Phasen", + "pt": "flow", + "to": "0", + "tot": "num" + }, + { + "t": "set", + "p": "Lp_Leistungsfaktor1", + "pt": "flow", + "to": "1.0", + "tot": "num" + }, + { + "t": "set", + "p": "Lp_Leistungsfaktor2", + "pt": "flow", + "to": "1.0", + "tot": "num" + }, + { + "t": "set", + "p": "Lp_Leistungsfaktor3", + "pt": "flow", + "to": "1.0", + "tot": "num" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 380, + "y": 420, + "wires": [ + [] + ] + }, + { + "id": "5c185bf1.72503c", + "type": "change", + "z": "5c4ac285.afe6e4", + "name": "", + "rules": [ + { + "t": "set", + "p": "Lp_Phasenumschaltung", + "pt": "flow", + "to": "payload", + "tot": "msg" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 800, + "y": 200, + "wires": [ + [] + ] + }, + { + "id": "65aa4e7c.604d5", + "type": "interval-length", + "z": "5c4ac285.afe6e4", + "format": "mills", + "bytopic": false, + "minimum": "", + "maximum": "", + "window": "", + "timeout": false, + "msgTimeout": "", + "minimumunit": "msecs", + "maximumunit": "msecs", + "windowunit": "msecs", + "msgTimeoutUnit": "msecs", + "reset": false, + "startup": false, + "msgField": "timeInterval", + "timestampField": "previousTimestamp", + "repeatTimeout": false, + "name": "Zeit zwischen den Nachrichten messen", + "x": 460, + "y": 760, + "wires": [ + [ + "5aa7e41e.77b01c" + ], + [] + ] + }, + { + "id": "5564373bd8d8091a", + "type": "switch", + "z": "5c4ac285.afe6e4", + "name": "Filter by Component-ID", + "property": "topic", + "propertyType": "msg", + "rules": [ + { + "t": "jsonata_exp", + "v": "$contains(topic, \"chargepoint/\" & $string($env(\"Component-ID\")) & \"/\")", + "vt": "jsonata" + }, + { + "t": "regex", + "v": "^/", + "vt": "str", + "case": false + } + ], + "checkall": "true", + "repair": false, + "outputs": 2, + "x": 250, + "y": 180, + "wires": [ + [ + "f1d98f14.271ef" + ], + [ + "f1d98f14.271ef" + ] + ] + }, + { + "id": "58ec8187c6755198", + "type": "change", + "z": "5c4ac285.afe6e4", + "name": "Push component-id to evu node", + "rules": [ + { + "t": "set", + "p": "topic", + "pt": "msg", + "to": "$join(\t [\t \"simulator/chargepoint/\",\t $string($env(\"Chargepoint-ID\")),\t \"/id\"\t ]\t)", + "tot": "jsonata" + }, + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "$env(\"Component-ID\")", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 430, + "y": 460, + "wires": [ + [] + ] + }, + { + "id": "bddf955cca42c275", + "type": "inject", + "z": "5c4ac285.afe6e4", + "name": "Debug", + "props": [ + { + "p": "payload" + }, + { + "p": "topic", + "vt": "str" + } + ], + "repeat": "10", + "crontab": "", + "once": true, + "onceDelay": "5", + "topic": "debug", + "payload": "{\t \"power\": $flowContext(\"Lp_Ladeleistung\"),\t \"sollstrom\": $flowContext(\"Lp_Sollstrom\"),\t \"strom\": [\t $flowContext(\"Lp_Strom1\"),\t $flowContext(\"Lp_Strom2\"),\t $flowContext(\"Lp_Strom3\")\t ],\t \"spannung\": [\t $flowContext(\"Lp_Spannung1\"),\t $flowContext(\"Lp_Spannung2\"),\t $flowContext(\"Lp_Spannung3\")\t ],\t \"lp_phasen\": $flowContext(\"Lp_Phasen\"),\t \"ev_phasen\": $flowContext(\"Lp_EV_Phasen\"),\t \"phasenumschaltung\": $flowContext(\"Lp_Phasenumschaltung\"),\t \"stecker\": $flowContext(\"Lp_Stecker\"),\t \"frequenz\": $flowContext(\"Lp_Netzfrequenz\"),\t \"frequenz_norm\": $flowContext(\"Lp_NetzfrequenzNorm\"),\t \"imported\": $flowContext(\"Lp_Zähler_laden\"),\t \"exported\": $flowContext(\"Lp_Zähler_entladen\")\t}", + "payloadType": "jsonata", + "x": 1060, + "y": 40, + "wires": [ + [] + ] + }, + { + "id": "4d37676232ebd1a7", + "type": "switch", + "z": "5c4ac285.afe6e4", + "name": "Zähler entladen gesetzt?", + "property": "Lp_Zähler_entladen", + "propertyType": "flow", + "rules": [ + { + "t": "null" + } + ], + "checkall": "true", + "repair": false, + "outputs": 1, + "x": 410, + "y": 380, + "wires": [ + [ + "8c6c68173df4bf12" + ] + ] + }, + { + "id": "8c6c68173df4bf12", + "type": "change", + "z": "5c4ac285.afe6e4", + "name": "Zähler entladen init", + "rules": [ + { + "t": "set", + "p": "Lp_Zähler_entladen", + "pt": "flow", + "to": "0", + "tot": "num" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 650, + "y": 380, + "wires": [ + [] + ] + }, + { + "id": "bd7cd25d6f0276eb", + "type": "switch", + "z": "5c4ac285.afe6e4", + "name": "", + "property": "payload", + "propertyType": "msg", + "rules": [ + { + "t": "gte", + "v": "0", + "vt": "num" + }, + { + "t": "else" + } + ], + "checkall": "true", + "repair": false, + "outputs": 2, + "x": 930, + "y": 760, + "wires": [ + [ + "eae3cd53.403d28" + ], + [ + "733f65e137ec70e1" + ] + ], + "outputLabels": [ + "laden", + "entladen" + ] + }, + { + "id": "733f65e137ec70e1", + "type": "change", + "z": "5c4ac285.afe6e4", + "name": "Zähler entladen aktualisieren", + "rules": [ + { + "t": "set", + "p": "Lp_Zähler_entladen", + "pt": "flow", + "to": "-payload+$flowContext(\"Lp_Zähler_entladen\")", + "tot": "jsonata" + }, + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "Lp_Zähler_entladen", + "tot": "flow" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 1160, + "y": 800, + "wires": [ + [ + "d28d6c2d.ccd198" + ] + ] + }, + { + "id": "71b196bb372367ab", + "type": "function", + "z": "5c4ac285.afe6e4", + "name": "Phasen für EVU rotieren", + "func": "const componentId = env.get(\"Component-ID\");\nconst phasesInUse = flow.get(\"Lp_Phasen\");\nconst phase1 = parseInt(env.get(\"Phase1\"));\n\nvar phaseCurrents = [0,0,0];\n\nswitch (phase1) {\n case 1:\n phaseCurrents[0] = msg.payload;\n if( phasesInUse > 1 )\n phaseCurrents[1] = msg.payload;\n if( phasesInUse > 2 )\n phaseCurrents[2] = msg.payload;\n break;\n case 2:\n phaseCurrents[1] = msg.payload;\n if( phasesInUse > 1 )\n phaseCurrents[2] = msg.payload;\n if( phasesInUse > 2 )\n phaseCurrents[0] = msg.payload;\n break;\n case 3:\n phaseCurrents[2] = msg.payload;\n if( phasesInUse > 1 )\n phaseCurrents[0] = msg.payload;\n if( phasesInUse > 2 )\n phaseCurrents[1] = msg.payload;\n break;\n}\n\nvar evuPhaseCurrentMsgs = [\n {\n \"topic\": \"/chargepoint/\" + componentId + \"/get/current_p1\",\n \"payload\": phaseCurrents[0]\n },\n {\n \"topic\": \"/chargepoint/\" + componentId + \"/get/current_p2\",\n \"payload\": phaseCurrents[1]\n },\n {\n \"topic\": \"/chargepoint/\" + componentId + \"/get/current_p3\",\n \"payload\": phaseCurrents[2]\n }\n];\n\nreturn [evuPhaseCurrentMsgs];\n", + "outputs": 1, + "timeout": "", + "noerr": 0, + "initialize": "", + "finalize": "", + "libs": [], + "x": 1070, + "y": 580, + "wires": [ + [] + ], + "outputLabels": [ + "Strom EVU (phasenrotiert)" + ] + }, + { + "id": "2260adcb773b534e", + "type": "change", + "z": "052d304dc9163933", + "name": "", + "rules": [ + { + "t": "set", + "p": "Consumer_Soll_Leistung", + "pt": "flow", + "to": "$number(payload)", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 800, + "y": 180, + "wires": [ + [] + ] + }, + { + "id": "707b107ce77e7a26", + "type": "change", + "z": "052d304dc9163933", + "name": "", + "rules": [ + { + "t": "set", + "p": "Consumer_Phasen", + "pt": "flow", + "to": "payload", + "tot": "msg" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 790, + "y": 220, + "wires": [ + [] + ] + }, + { + "id": "a2fc98f5c1af42e0", + "type": "switch", + "z": "052d304dc9163933", + "name": "Split Topics", + "property": "topic", + "propertyType": "msg", + "rules": [ + { + "t": "regex", + "v": "\\/set\\/power$", + "vt": "str", + "case": false + }, + { + "t": "regex", + "v": "\\/max_phases$", + "vt": "str", + "case": false + } + ], + "checkall": "true", + "repair": false, + "outputs": 2, + "x": 510, + "y": 200, + "wires": [ + [ + "2260adcb773b534e" + ], + [ + "707b107ce77e7a26" + ] + ], + "outputLabels": [ + "Sollstrom", + "Aktive Phasen" + ] + }, + { + "id": "f54b75b0396aaa32", + "type": "inject", + "z": "052d304dc9163933", + "name": "Publish Trigger", + "props": [ + { + "p": "payload" + } + ], + "repeat": "5", + "crontab": "", + "once": true, + "onceDelay": "5", + "topic": "", + "payload": "", + "payloadType": "date", + "x": 140, + "y": 60, + "wires": [ + [ + "dac7ac0463bca7c8" + ] + ] + }, + { + "id": "dac7ac0463bca7c8", + "type": "function", + "z": "052d304dc9163933", + "name": "Senden der Flow-Daten", + "func": "const Consumer_Number = env.get(\"Component-ID\")\n\nvar statusColor = \"red\"\nvar statusShape = \"ring\"\n\nconst actualPower = parseInt(flow.get(\"Consumer_Leistung\").toFixed(0))\nconst actualPowerkW = actualPower / 1000\nconst phases = flow.get(\"Consumer_Phasen\")\nconst currentL1 = flow.get(\"Consumer_Strom1\")\nconst currentL2 = flow.get(\"Consumer_Strom2\")\nconst currentL3 = flow.get(\"Consumer_Strom3\")\nconst voltageL1 = flow.get(\"Consumer_Spannung1\")\nconst voltageL2 = flow.get(\"Consumer_Spannung2\")\nconst voltageL3 = flow.get(\"Consumer_Spannung3\")\n\nnode.status({\n fill: statusColor,\n shape: statusShape,\n text: actualPowerkW.toFixed(1) + \"kW \" + phases + \"Phasen\"\n})\n\nreturn [\n [\n {\n topic: \"openWB/set/mqtt/consumer/\" + Consumer_Number + \"/get/currents\",\n payload: [currentL1, currentL2, currentL3]\n },\n {\n topic: \"openWB/set/mqtt/consumer/\" + Consumer_Number + \"/get/voltages\",\n payload: [voltageL1, voltageL2, voltageL3]\n },\n {\n topic: \"openWB/set/mqtt/consumer/\" + Consumer_Number + \"/get/power\",\n payload: actualPower\n },\n {\n topic: \"openWB/set/mqtt/consumer/\" + Consumer_Number + \"/get/powers\",\n payload: [voltageL1 * currentL1, voltageL2 * currentL2, voltageL3 * currentL3]\n },\n {\n topic: \"openWB/set/mqtt/consumer/\" + Consumer_Number + \"/get/imported\",\n payload: parseFloat(flow.get(\"Consumer_Zähler_laden\").toFixed(3))\n },\n ]\n]\n", + "outputs": 1, + "timeout": "", + "noerr": 0, + "initialize": "", + "finalize": "", + "libs": [], + "x": 410, + "y": 60, + "wires": [ + [] + ] + }, + { + "id": "70b180145442241a", + "type": "switch", + "z": "052d304dc9163933", + "name": "Zähler laden gesetzt?", + "property": "Consumer_Zähler_laden", + "propertyType": "flow", + "rules": [ + { + "t": "null" + } + ], + "checkall": "true", + "repair": false, + "outputs": 1, + "x": 400, + "y": 360, + "wires": [ + [ + "544c1c7bca2c841c" + ] + ] + }, + { + "id": "544c1c7bca2c841c", + "type": "change", + "z": "052d304dc9163933", + "name": "Zähler laden init", + "rules": [ + { + "t": "set", + "p": "Consumer_Zähler_laden", + "pt": "flow", + "to": "0", + "tot": "num" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 640, + "y": 360, + "wires": [ + [] + ] + }, + { + "id": "f7ad10316d6eccd6", + "type": "inject", + "z": "052d304dc9163933", + "name": "Init", + "props": [ + { + "p": "payload" + } + ], + "repeat": "", + "crontab": "", + "once": true, + "onceDelay": 0.1, + "topic": "", + "payload": "", + "payloadType": "date", + "x": 110, + "y": 360, + "wires": [ + [ + "70b180145442241a", + "15ea994cbede5744", + "4825ad03bdcc7575" + ] + ] + }, + { + "id": "892b0bf0d0147c2a", + "type": "change", + "z": "052d304dc9163933", + "name": "Energie in Wh", + "rules": [ + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "$flowContext(\"Consumer_Leistung\")*timeInterval/1000/3600", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 660, + "y": 780, + "wires": [ + [ + "e598ba6d0eb959cc" + ] + ], + "info": "$number(payload)*(timeInterval/1000)/3600/1000" + }, + { + "id": "dc888ec246854e0d", + "type": "change", + "z": "052d304dc9163933", + "name": "Zähler laden aktualisieren", + "rules": [ + { + "t": "set", + "p": "Consumer_Zähler_laden", + "pt": "flow", + "to": "payload+$flowContext(\"Consumer_Zähler_laden\")", + "tot": "jsonata" + }, + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "Consumer_Zähler_laden", + "tot": "flow" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 1070, + "y": 780, + "wires": [ + [] + ] + }, + { + "id": "471105ca7f915adf", + "type": "inject", + "z": "052d304dc9163933", + "name": "", + "props": [ + { + "p": "payload" + } + ], + "repeat": "2", + "crontab": "", + "once": true, + "onceDelay": "1", + "topic": "", + "payload": "Consumer_Soll_Leistung", + "payloadType": "flow", + "x": 190, + "y": 540, + "wires": [ + [ + "6099da680064ca09" + ] + ] + }, + { + "id": "5383bb979ec0d4c9", + "type": "change", + "z": "052d304dc9163933", + "name": "", + "rules": [ + { + "t": "set", + "p": "Consumer_Spannung1", + "pt": "flow", + "to": "payload", + "tot": "jsonata" + }, + { + "t": "set", + "p": "Consumer_Spannung2", + "pt": "flow", + "to": "payload", + "tot": "jsonata" + }, + { + "t": "set", + "p": "Consumer_Spannung3", + "pt": "flow", + "to": "payload", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 790, + "y": 660, + "wires": [ + [ + "3ba79e6d97a14cf2" + ] + ] + }, + { + "id": "4ed0b41553186933", + "type": "comment", + "z": "052d304dc9163933", + "name": "Spannungen", + "info": "", + "x": 150, + "y": 660, + "wires": [] + }, + { + "id": "aea72c8ca721082b", + "type": "comment", + "z": "052d304dc9163933", + "name": "Ströme", + "info": "", + "x": 130, + "y": 720, + "wires": [] + }, + { + "id": "98c9e014fb3c83b7", + "type": "comment", + "z": "052d304dc9163933", + "name": "Leistung", + "info": "", + "x": 140, + "y": 600, + "wires": [] + }, + { + "id": "8aa1d695bd6a6d1c", + "type": "comment", + "z": "052d304dc9163933", + "name": "Zählerstand", + "info": "", + "x": 150, + "y": 780, + "wires": [] + }, + { + "id": "90afd7e3e83a083c", + "type": "random", + "z": "052d304dc9163933", + "name": "230V +/-5V", + "low": "225", + "high": "235", + "inte": "false", + "property": "payload", + "x": 370, + "y": 660, + "wires": [ + [ + "f99aa55e04838f4a" + ] + ] + }, + { + "id": "af6900689bb9c78e", + "type": "smooth", + "z": "052d304dc9163933", + "name": "", + "property": "payload", + "action": "mean", + "count": "4", + "round": "0", + "mult": "single", + "reduce": false, + "x": 820, + "y": 600, + "wires": [ + [ + "90afd7e3e83a083c", + "5269dcb3ab718315" + ] + ] + }, + { + "id": "f99aa55e04838f4a", + "type": "smooth", + "z": "052d304dc9163933", + "name": "", + "property": "payload", + "action": "mean", + "count": "10", + "round": "1", + "mult": "single", + "reduce": false, + "x": 540, + "y": 660, + "wires": [ + [ + "5383bb979ec0d4c9" + ] + ] + }, + { + "id": "4f2e52dace8b4fe1", + "type": "status", + "z": "052d304dc9163933", + "name": "", + "scope": [ + "dac7ac0463bca7c8" + ], + "x": 780, + "y": 60, + "wires": [ + [] + ] + }, + { + "id": "3ba79e6d97a14cf2", + "type": "function", + "z": "052d304dc9163933", + "name": "", + "func": "const componentId = env.get(\"Component-ID\");\nconst phases = flow.get(\"Consumer_Phasen\");\nconst power = flow.get(\"Consumer_Leistung\")\n\nvar phaseCurrents = [0, 0, 0];\n\nphaseCurrents[0] = power / phases / flow.get(\"Consumer_Spannung1\");\nif (phases > 1)\n phaseCurrents[1] = power / phases / flow.get(\"Consumer_Spannung2\");\nif (phases > 2)\n phaseCurrents[2] = power / phases / flow.get(\"Consumer_Spannung3\");\n\nflow.set(\"Consumer_Strom1\", phaseCurrents[0]);\nflow.set(\"Consumer_Strom2\", phaseCurrents[1]);\nflow.set(\"Consumer_Strom3\", phaseCurrents[2]);\n\nvar evuCurrentMsgs = [\n {\n \"topic\": \"/consumer/\" + componentId + \"/get/current_p1\",\n \"payload\": flow.get(\"Consumer_Strom1\")\n },\n {\n \"topic\": \"/consumer/\" + componentId + \"/get/current_p2\",\n \"payload\": flow.get(\"Consumer_Strom2\")\n },\n {\n \"topic\": \"/consumer/\" + componentId + \"/get/current_p3\",\n \"payload\": flow.get(\"Consumer_Strom3\")\n }\n];\n\nreturn [evuCurrentMsgs];\n", + "outputs": 1, + "timeout": "", + "noerr": 0, + "initialize": "", + "finalize": "", + "libs": [], + "x": 820, + "y": 720, + "wires": [ + [ + "dcb19ba9bf344797", + "9e07ad7682b1e1e9" + ] + ] + }, + { + "id": "15ea994cbede5744", + "type": "change", + "z": "052d304dc9163933", + "name": "Init flow context", + "rules": [ + { + "t": "set", + "p": "Consumer_Strom1", + "pt": "flow", + "to": "0", + "tot": "num" + }, + { + "t": "set", + "p": "Consumer_Strom2", + "pt": "flow", + "to": "0", + "tot": "num" + }, + { + "t": "set", + "p": "Consumer_Strom2", + "pt": "flow", + "to": "0", + "tot": "num" + }, + { + "t": "set", + "p": "Consumer_Spannung1", + "pt": "flow", + "to": "230", + "tot": "num" + }, + { + "t": "set", + "p": "Consumer_Spannung2", + "pt": "flow", + "to": "230", + "tot": "num" + }, + { + "t": "set", + "p": "Consumer_Spannung3", + "pt": "flow", + "to": "230", + "tot": "num" + }, + { + "t": "set", + "p": "Consumer_Leistung", + "pt": "flow", + "to": "0", + "tot": "num" + }, + { + "t": "set", + "p": "Consumer_Soll_Leistung", + "pt": "flow", + "to": "0", + "tot": "num" + }, + { + "t": "set", + "p": "Consumer_Phasen", + "pt": "flow", + "to": "1", + "tot": "num" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 380, + "y": 400, + "wires": [ + [] + ] + }, + { + "id": "dcb19ba9bf344797", + "type": "interval-length", + "z": "052d304dc9163933", + "format": "mills", + "bytopic": false, + "minimum": "", + "maximum": "", + "window": "", + "timeout": false, + "msgTimeout": "", + "minimumunit": "msecs", + "maximumunit": "msecs", + "windowunit": "msecs", + "msgTimeoutUnit": "msecs", + "reset": false, + "startup": false, + "msgField": "timeInterval", + "timestampField": "previousTimestamp", + "repeatTimeout": false, + "name": "Zeit zwischen Nachrichten", + "x": 420, + "y": 780, + "wires": [ + [ + "892b0bf0d0147c2a" + ], + [] + ] + }, + { + "id": "09ab3747f1001b24", + "type": "switch", + "z": "052d304dc9163933", + "name": "Filter by Component-ID", + "property": "topic", + "propertyType": "msg", + "rules": [ + { + "t": "jsonata_exp", + "v": "$contains(topic, \"consumer/\" & $string($env(\"Component-ID\")) & \"/\")", + "vt": "jsonata" + }, + { + "t": "regex", + "v": "^/", + "vt": "str", + "case": false + } + ], + "checkall": "true", + "repair": false, + "outputs": 2, + "x": 250, + "y": 200, + "wires": [ + [ + "a2fc98f5c1af42e0" + ], + [ + "a2fc98f5c1af42e0" + ] + ] + }, + { + "id": "4825ad03bdcc7575", + "type": "change", + "z": "052d304dc9163933", + "name": "Push component-id to evu node", + "rules": [ + { + "t": "set", + "p": "topic", + "pt": "msg", + "to": "$join(\t [\t \"simulator/consumer/\",\t $string($env(\"Verbraucher-ID\")),\t \"/id\"\t ]\t)", + "tot": "jsonata" + }, + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "$env(\"Component-ID\")", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 430, + "y": 440, + "wires": [ + [] + ] + }, + { + "id": "bf2dcdef57e1eb6b", + "type": "inject", + "z": "052d304dc9163933", + "name": "Debug", + "props": [ + { + "p": "payload" + }, + { + "p": "topic", + "vt": "str" + } + ], + "repeat": "10", + "crontab": "", + "once": true, + "onceDelay": "5", + "topic": "debug", + "payload": "{\t \"power\": $flowContext(\"Consumer_Leistung\"),\t \"sollleistung\": $flowContext(\"Consumer_Soll_Leistung\"),\t \"strom\": [\t $flowContext(\"Consumer_Strom1\"),\t $flowContext(\"Consumer_Strom2\"),\t $flowContext(\"Consumer_Strom3\")\t ],\t \"spannung\": [\t $flowContext(\"Consumer_Spannung1\"),\t $flowContext(\"Consumer_Spannung2\"),\t $flowContext(\"Consumer_Spannung3\")\t ],\t \"phasen\": $flowContext(\"Consumer_Phasen\"),\t \"imported\": $flowContext(\"Consumer_Zähler_laden\")\t }", + "payloadType": "jsonata", + "x": 1060, + "y": 60, + "wires": [ + [] + ] + }, + { + "id": "e598ba6d0eb959cc", + "type": "switch", + "z": "052d304dc9163933", + "name": "", + "property": "payload", + "propertyType": "msg", + "rules": [ + { + "t": "gte", + "v": "0", + "vt": "num" + }, + { + "t": "else" + } + ], + "checkall": "true", + "repair": false, + "outputs": 2, + "x": 830, + "y": 780, + "wires": [ + [ + "dc888ec246854e0d" + ], + [] + ], + "outputLabels": [ + "laden", + "entladen" + ] + }, + { + "id": "6099da680064ca09", + "type": "random", + "z": "052d304dc9163933", + "name": "+/-100W", + "low": "-100", + "high": "100", + "inte": "false", + "property": "payload", + "x": 360, + "y": 600, + "wires": [ + [ + "9b910ecd1c91e198" + ] + ] + }, + { + "id": "9b910ecd1c91e198", + "type": "change", + "z": "052d304dc9163933", + "name": "", + "rules": [ + { + "t": "set", + "p": "Consumer_Leistung", + "pt": "flow", + "to": "payload+$flowContext(\"Consumer_Soll_Leistung\")", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 590, + "y": 600, + "wires": [ + [ + "af6900689bb9c78e" + ] + ] + }, + { + "id": "5269dcb3ab718315", + "type": "change", + "z": "052d304dc9163933", + "name": "", + "rules": [ + { + "t": "set", + "p": "topic", + "pt": "msg", + "to": "/consumer/#/get/power_all", + "tot": "str" + }, + { + "t": "change", + "p": "topic", + "pt": "msg", + "from": "#", + "fromt": "str", + "to": "Component-ID", + "tot": "env" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 1010, + "y": 600, + "wires": [ + [] + ] + }, + { + "id": "9e07ad7682b1e1e9", + "type": "function", + "z": "052d304dc9163933", + "name": "function 1", + "func": "node.warn(\"payload \"+msg.payload)\nreturn msg;", + "outputs": 1, + "timeout": 0, + "noerr": 0, + "initialize": "", + "finalize": "", + "libs": [], + "x": 1060, + "y": 640, + "wires": [ + [] + ] + }, + { + "id": "056221a523f5b527", + "type": "change", + "z": "a9e11c55be21f50a", + "name": "", + "rules": [ + { + "t": "set", + "p": "Consumer_Schaltzustand", + "pt": "flow", + "to": "$bool(payload)", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 850, + "y": 240, + "wires": [ + [] + ] + }, + { + "id": "6e979f192d1d7f19", + "type": "change", + "z": "a9e11c55be21f50a", + "name": "", + "rules": [ + { + "t": "set", + "p": "Consumer_Phasen", + "pt": "flow", + "to": "payload", + "tot": "msg" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 830, + "y": 280, + "wires": [ + [] + ] + }, + { + "id": "ecec82abc42cd302", + "type": "switch", + "z": "a9e11c55be21f50a", + "name": "Split Topics", + "property": "topic", + "propertyType": "msg", + "rules": [ + { + "t": "regex", + "v": "\\/set\\/switch$", + "vt": "str", + "case": false + }, + { + "t": "regex", + "v": "\\/max_phases$", + "vt": "str", + "case": false + }, + { + "t": "regex", + "v": "\\/min_current$", + "vt": "str", + "case": false + } + ], + "checkall": "true", + "repair": false, + "outputs": 3, + "x": 550, + "y": 260, + "wires": [ + [ + "056221a523f5b527" + ], + [ + "6e979f192d1d7f19" + ], + [ + "beccbbd7ae0627ff" + ] + ], + "outputLabels": [ + "Sollstrom", + "Aktive Phasen", + null + ] + }, + { + "id": "24855079cea07c9f", + "type": "inject", + "z": "a9e11c55be21f50a", + "name": "Publish Trigger", + "props": [ + { + "p": "payload" + } + ], + "repeat": "5", + "crontab": "", + "once": true, + "onceDelay": "5", + "topic": "", + "payload": "", + "payloadType": "date", + "x": 180, + "y": 120, + "wires": [ + [ + "26d7b3bd820add4f" + ] + ] + }, + { + "id": "26d7b3bd820add4f", + "type": "function", + "z": "a9e11c55be21f50a", + "name": "Senden der Flow-Daten", + "func": "const Consumer_Number = env.get(\"Component-ID\")\n\nvar statusColor = \"red\"\nvar statusShape = \"ring\"\n\nconst actualPower = parseInt(flow.get(\"Consumer_Leistung\").toFixed(0))\nconst actualPowerkW = actualPower / 1000\nconst phases = flow.get(\"Consumer_Phasen\")\nconst currentL1 = flow.get(\"Consumer_Strom1\")\nconst currentL2 = flow.get(\"Consumer_Strom2\")\nconst currentL3 = flow.get(\"Consumer_Strom3\")\nconst voltageL1 = flow.get(\"Consumer_Spannung1\")\nconst voltageL2 = flow.get(\"Consumer_Spannung2\")\nconst voltageL3 = flow.get(\"Consumer_Spannung3\")\n\nnode.status({\n fill: statusColor,\n shape: statusShape,\n text: actualPowerkW.toFixed(1) + \"kW \" + phases + \"Phasen\"\n})\n\nreturn [\n [\n {\n topic: \"openWB/set/mqtt/consumer/\" + Consumer_Number + \"/get/currents\",\n payload: [currentL1, currentL2, currentL3]\n },\n {\n topic: \"openWB/set/mqtt/consumer/\" + Consumer_Number + \"/get/voltages\",\n payload: [voltageL1, voltageL2, voltageL3]\n },\n {\n topic: \"openWB/set/mqtt/consumer/\" + Consumer_Number + \"/get/power\",\n payload: actualPower\n },\n {\n topic: \"openWB/set/mqtt/consumer/\" + Consumer_Number + \"/get/powers\",\n payload: [voltageL1 * currentL1, voltageL2 * currentL2, voltageL3 * currentL3]\n },\n {\n topic: \"openWB/set/mqtt/consumer/\" + Consumer_Number + \"/get/imported\",\n payload: parseFloat(flow.get(\"Consumer_Zähler_laden\").toFixed(3))\n },\n ]\n]\n", + "outputs": 1, + "timeout": "", + "noerr": 0, + "initialize": "", + "finalize": "", + "libs": [], + "x": 450, + "y": 120, + "wires": [ + [] + ] + }, + { + "id": "295939c2c634d880", + "type": "switch", + "z": "a9e11c55be21f50a", + "name": "Zähler laden gesetzt?", + "property": "Consumer_Zähler_laden", + "propertyType": "flow", + "rules": [ + { + "t": "null" + } + ], + "checkall": "true", + "repair": false, + "outputs": 1, + "x": 440, + "y": 420, + "wires": [ + [ + "f39e96896e094a9e" + ] + ] + }, + { + "id": "f39e96896e094a9e", + "type": "change", + "z": "a9e11c55be21f50a", + "name": "Zähler laden init", + "rules": [ + { + "t": "set", + "p": "Consumer_Zähler_laden", + "pt": "flow", + "to": "0", + "tot": "num" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 680, + "y": 420, + "wires": [ + [] + ] + }, + { + "id": "a03fe444201f7a0e", + "type": "inject", + "z": "a9e11c55be21f50a", + "name": "Init", + "props": [ + { + "p": "payload" + } + ], + "repeat": "", + "crontab": "", + "once": true, + "onceDelay": 0.1, + "topic": "", + "payload": "", + "payloadType": "date", + "x": 150, + "y": 420, + "wires": [ + [ + "295939c2c634d880", + "464610a4a3e351df", + "3d372f7803fb246e" + ] + ] + }, + { + "id": "577aa04b515b1545", + "type": "change", + "z": "a9e11c55be21f50a", + "name": "Energie in Wh", + "rules": [ + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "$flowContext(\"Consumer_Leistung\")*timeInterval/1000/3600", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 700, + "y": 880, + "wires": [ + [ + "29fab90ad259f2f4" + ] + ], + "info": "$number(payload)*(timeInterval/1000)/3600/1000" + }, + { + "id": "7794cbb5e92cca2d", + "type": "change", + "z": "a9e11c55be21f50a", + "name": "Zähler laden aktualisieren", + "rules": [ + { + "t": "set", + "p": "Consumer_Zähler_laden", + "pt": "flow", + "to": "payload+$flowContext(\"Consumer_Zähler_laden\")", + "tot": "jsonata" + }, + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "Consumer_Zähler_laden", + "tot": "flow" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 1110, + "y": 880, + "wires": [ + [] + ] + }, + { + "id": "cbc8be2ffccb5790", + "type": "inject", + "z": "a9e11c55be21f50a", + "name": "", + "props": [ + { + "p": "payload" + } + ], + "repeat": "2", + "crontab": "", + "once": true, + "onceDelay": "1", + "topic": "", + "payload": "Consumer_Schaltzustand", + "payloadType": "flow", + "x": 230, + "y": 600, + "wires": [ + [ + "1c8020160fcebc7f" + ] + ] + }, + { + "id": "45a79582348b9669", + "type": "change", + "z": "a9e11c55be21f50a", + "name": "", + "rules": [ + { + "t": "set", + "p": "Consumer_Spannung1", + "pt": "flow", + "to": "payload", + "tot": "jsonata" + }, + { + "t": "set", + "p": "Consumer_Spannung2", + "pt": "flow", + "to": "payload", + "tot": "jsonata" + }, + { + "t": "set", + "p": "Consumer_Spannung3", + "pt": "flow", + "to": "payload", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 830, + "y": 760, + "wires": [ + [ + "d41ecc201a94a6d4" + ] + ] + }, + { + "id": "6070ac91f1d12edb", + "type": "comment", + "z": "a9e11c55be21f50a", + "name": "Spannungen", + "info": "", + "x": 190, + "y": 760, + "wires": [] + }, + { + "id": "fa515b552b78f7dd", + "type": "comment", + "z": "a9e11c55be21f50a", + "name": "Ströme", + "info": "", + "x": 170, + "y": 820, + "wires": [] + }, + { + "id": "7321503e261e2859", + "type": "comment", + "z": "a9e11c55be21f50a", + "name": "Leistung", + "info": "", + "x": 180, + "y": 660, + "wires": [] + }, + { + "id": "ab07f2cd7588de7a", + "type": "comment", + "z": "a9e11c55be21f50a", + "name": "Zählerstand", + "info": "", + "x": 190, + "y": 880, + "wires": [] + }, + { + "id": "3b7ed893d4cf9bd2", + "type": "random", + "z": "a9e11c55be21f50a", + "name": "230V +/-5V", + "low": "225", + "high": "235", + "inte": "false", + "property": "payload", + "x": 410, + "y": 760, + "wires": [ + [ + "936ebbd626445590" + ] + ] + }, + { + "id": "42eec4e987e21a92", + "type": "smooth", + "z": "a9e11c55be21f50a", + "name": "", + "property": "payload", + "action": "mean", + "count": "4", + "round": "0", + "mult": "single", + "reduce": false, + "x": 860, + "y": 660, + "wires": [ + [ + "3b7ed893d4cf9bd2", + "7a2e71ba21a577c4" + ] + ] + }, + { + "id": "936ebbd626445590", + "type": "smooth", + "z": "a9e11c55be21f50a", + "name": "", + "property": "payload", + "action": "mean", + "count": "10", + "round": "1", + "mult": "single", + "reduce": false, + "x": 600, + "y": 760, + "wires": [ + [ + "45a79582348b9669" + ] + ] + }, + { + "id": "3ab6c65638eda30c", + "type": "status", + "z": "a9e11c55be21f50a", + "name": "", + "scope": [ + "26d7b3bd820add4f" + ], + "x": 820, + "y": 120, + "wires": [ + [] + ] + }, + { + "id": "d41ecc201a94a6d4", + "type": "function", + "z": "a9e11c55be21f50a", + "name": "", + "func": "const componentId = env.get(\"Component-ID\");\nconst phases = flow.get(\"Consumer_Phasen\");\nconst power = flow.get(\"Consumer_Leistung\")\nvar phaseCurrents = [0, 0, 0];\n\nphaseCurrents[0] = power / phases / flow.get(\"Consumer_Spannung1\");\nif (phases > 1)\n phaseCurrents[1] = power / phases / flow.get(\"Consumer_Spannung2\");\nif (phases > 2)\n phaseCurrents[2] = power / phases / flow.get(\"Consumer_Spannung3\");\n\nflow.set(\"Consumer_Strom1\", phaseCurrents[0]);\nflow.set(\"Consumer_Strom2\", phaseCurrents[1]);\nflow.set(\"Consumer_Strom3\", phaseCurrents[2]);\n\nvar evuCurrentMsgs = [\n {\n \"topic\": \"/consumer/\" + componentId + \"/get/current_p1\",\n \"payload\": flow.get(\"Consumer_Strom1\")\n },\n {\n \"topic\": \"/consumer/\" + componentId + \"/get/current_p2\",\n \"payload\": flow.get(\"Consumer_Strom2\")\n },\n {\n \"topic\": \"/consumer/\" + componentId + \"/get/current_p3\",\n \"payload\": flow.get(\"Consumer_Strom3\")\n }\n];\n\nreturn [evuCurrentMsgs];\n", + "outputs": 1, + "timeout": "", + "noerr": 0, + "initialize": "", + "finalize": "", + "libs": [], + "x": 860, + "y": 820, + "wires": [ + [ + "53053d4362659af6" + ] + ] + }, + { + "id": "464610a4a3e351df", + "type": "change", + "z": "a9e11c55be21f50a", + "name": "Init flow context", + "rules": [ + { + "t": "set", + "p": "Consumer_Strom1", + "pt": "flow", + "to": "0", + "tot": "num" + }, + { + "t": "set", + "p": "Consumer_Strom2", + "pt": "flow", + "to": "0", + "tot": "num" + }, + { + "t": "set", + "p": "Consumer_Strom2", + "pt": "flow", + "to": "0", + "tot": "num" + }, + { + "t": "set", + "p": "Consumer_Spannung1", + "pt": "flow", + "to": "230", + "tot": "num" + }, + { + "t": "set", + "p": "Consumer_Spannung2", + "pt": "flow", + "to": "230", + "tot": "num" + }, + { + "t": "set", + "p": "Consumer_Spannung3", + "pt": "flow", + "to": "230", + "tot": "num" + }, + { + "t": "set", + "p": "Consumer_Leistung", + "pt": "flow", + "to": "0", + "tot": "num" + }, + { + "t": "set", + "p": "Consumer_Min_Current", + "pt": "flow", + "to": "5", + "tot": "num" + }, + { + "t": "set", + "p": "Consumer_Schaltzustand", + "pt": "flow", + "to": "false", + "tot": "bool" + }, + { + "t": "set", + "p": "Consumer_Phasen", + "pt": "flow", + "to": "1", + "tot": "num" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 420, + "y": 460, + "wires": [ + [] + ] + }, + { + "id": "53053d4362659af6", + "type": "interval-length", + "z": "a9e11c55be21f50a", + "format": "mills", + "bytopic": false, + "minimum": "", + "maximum": "", + "window": "", + "timeout": false, + "msgTimeout": "", + "minimumunit": "msecs", + "maximumunit": "msecs", + "windowunit": "msecs", + "msgTimeoutUnit": "msecs", + "reset": false, + "startup": false, + "msgField": "timeInterval", + "timestampField": "previousTimestamp", + "repeatTimeout": false, + "name": "Zeit zwischen Nachrichten", + "x": 460, + "y": 880, + "wires": [ + [ + "577aa04b515b1545" + ], + [] + ] + }, + { + "id": "3d3c56108a9d222e", + "type": "switch", + "z": "a9e11c55be21f50a", + "name": "Filter by Component-ID", + "property": "topic", + "propertyType": "msg", + "rules": [ + { + "t": "jsonata_exp", + "v": "$contains(topic, \"consumer/\" & $string($env(\"Component-ID\")) & \"/\")", + "vt": "jsonata" + }, + { + "t": "regex", + "v": "^/", + "vt": "str", + "case": false + } + ], + "checkall": "true", + "repair": false, + "outputs": 2, + "x": 290, + "y": 260, + "wires": [ + [ + "ecec82abc42cd302" + ], + [ + "ecec82abc42cd302" + ] + ] + }, + { + "id": "3d372f7803fb246e", + "type": "change", + "z": "a9e11c55be21f50a", + "name": "Push component-id to evu node", + "rules": [ + { + "t": "set", + "p": "topic", + "pt": "msg", + "to": "$join(\t [\t \"simulator/consumer/\",\t $string($env(\"Verbraucher-ID\")),\t \"/id\"\t ]\t)", + "tot": "jsonata" + }, + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "$env(\"Component-ID\")", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 470, + "y": 500, + "wires": [ + [] + ] + }, + { + "id": "06a5ee245d469b5e", + "type": "inject", + "z": "a9e11c55be21f50a", + "name": "Debug", + "props": [ + { + "p": "payload" + }, + { + "p": "topic", + "vt": "str" + } + ], + "repeat": "10", + "crontab": "", + "once": true, + "onceDelay": "5", + "topic": "debug", + "payload": "{\t \"power\": $flowContext(\"Consumer_Leistung\"),\t \"sollleistung\": $flowContext(\"Consumer_Soll_Leistung\"),\t \"strom\": [\t $flowContext(\"Consumer_Strom1\"),\t $flowContext(\"Consumer_Strom2\"),\t $flowContext(\"Consumer_Strom3\")\t ],\t \"spannung\": [\t $flowContext(\"Consumer_Spannung1\"),\t $flowContext(\"Consumer_Spannung2\"),\t $flowContext(\"Consumer_Spannung3\")\t ],\t \"phasen\": $flowContext(\"Consumer_Phasen\"),\t \"imported\": $flowContext(\"Consumer_Zähler_laden\")\t }", + "payloadType": "jsonata", + "x": 1100, + "y": 120, + "wires": [ + [] + ] + }, + { + "id": "29fab90ad259f2f4", + "type": "switch", + "z": "a9e11c55be21f50a", + "name": "", + "property": "payload", + "propertyType": "msg", + "rules": [ + { + "t": "gte", + "v": "0", + "vt": "num" + }, + { + "t": "else" + } + ], + "checkall": "true", + "repair": false, + "outputs": 2, + "x": 870, + "y": 880, + "wires": [ + [ + "7794cbb5e92cca2d" + ], + [] + ], + "outputLabels": [ + "laden", + "entladen" + ] + }, + { + "id": "a93b32e18f127f51", + "type": "change", + "z": "a9e11c55be21f50a", + "name": "", + "rules": [ + { + "t": "set", + "p": "Consumer_Leistung", + "pt": "flow", + "to": "$flowContext(\"Consumer_Min_Current\")*$flowContext(\"Consumer_Phasen\")*230", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 630, + "y": 640, + "wires": [ + [ + "42eec4e987e21a92" + ] + ] + }, + { + "id": "1c8020160fcebc7f", + "type": "switch", + "z": "a9e11c55be21f50a", + "name": "", + "property": "Consumer_Schaltzustand", + "propertyType": "flow", + "rules": [ + { + "t": "true" + }, + { + "t": "false" + } ], - "x": 14, - "y": 571.5, - "w": 1072, - "h": 209.5 + "checkall": "true", + "repair": false, + "outputs": 2, + "x": 390, + "y": 660, + "wires": [ + [ + "a93b32e18f127f51" + ], + [ + "419dcd8e89054a4a" + ] + ] + }, + { + "id": "419dcd8e89054a4a", + "type": "change", + "z": "a9e11c55be21f50a", + "name": "", + "rules": [ + { + "t": "set", + "p": "Consumer_Leistung", + "pt": "flow", + "to": "0", + "tot": "num" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 630, + "y": 680, + "wires": [ + [ + "42eec4e987e21a92" + ] + ] + }, + { + "id": "beccbbd7ae0627ff", + "type": "change", + "z": "a9e11c55be21f50a", + "name": "", + "rules": [ + { + "t": "set", + "p": "Consumer_Min_current", + "pt": "flow", + "to": "payload", + "tot": "msg" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 840, + "y": 320, + "wires": [ + [] + ] + }, + { + "id": "7a2e71ba21a577c4", + "type": "change", + "z": "a9e11c55be21f50a", + "name": "", + "rules": [ + { + "t": "set", + "p": "topic", + "pt": "msg", + "to": "/consumer/#/get/power_all", + "tot": "str" + }, + { + "t": "change", + "p": "topic", + "pt": "msg", + "from": "#", + "fromt": "str", + "to": "Component-ID", + "tot": "env" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 1050, + "y": 660, + "wires": [ + [] + ] + }, + { + "id": "a9947543.f34bd", + "type": "inject", + "z": "92165c72.a5f948", + "g": "10c935e7.d81c6a", + "name": "max. 3 Phasen", + "props": [ + { + "p": "payload" + }, + { + "p": "topic", + "vt": "str" + } + ], + "repeat": "", + "crontab": "", + "once": true, + "onceDelay": "1", + "topic": "/max_phases", + "payload": "3", + "payloadType": "num", + "x": 140, + "y": 1480, + "wires": [ + [ + "bca07e3a.16ff08" + ] + ] + }, + { + "id": "9dad0a08.b2c0f", + "type": "inject", + "z": "92165c72.a5f948", + "g": "10c935e7.d81c6a", + "name": "Abgesteckt", + "props": [ + { + "p": "payload" + }, + { + "p": "topic", + "vt": "str" + } + ], + "repeat": "", + "crontab": "", + "once": true, + "onceDelay": "1", + "topic": "/plug_state", + "payload": "0", + "payloadType": "num", + "x": 130, + "y": 1520, + "wires": [ + [ + "bca07e3a.16ff08" + ] + ] + }, + { + "id": "51d8d30d.b63194", + "type": "mqtt in", + "z": "92165c72.a5f948", + "g": "3e039a5092696f5f", + "name": "", + "topic": "openWB/mqtt/chargepoint/+/set/current", + "qos": "0", + "datatype": "json", + "broker": "5c48b79a.d6b918", + "nl": false, + "rap": false, + "inputs": 0, + "x": 220, + "y": 60, + "wires": [ + [ + "f8fb4ebc3ad90445" + ] + ] + }, + { + "id": "529ef24e.47a72c", + "type": "mqtt out", + "z": "92165c72.a5f948", + "g": "3e039a5092696f5f", + "name": "", + "topic": "", + "qos": "0", + "retain": "true", + "respTopic": "", + "contentType": "", + "userProps": "", + "correl": "", + "expiry": "", + "broker": "5c48b79a.d6b918", + "x": 1030, + "y": 60, + "wires": [] + }, + { + "id": "66502428.6bc2ec", + "type": "ui_dropdown", + "z": "92165c72.a5f948", + "g": "10c935e7.d81c6a", + "name": "EV1 max. Phasen", + "label": "EV max. Phasen", + "tooltip": "", + "place": "Select option", + "group": "703fdeb2.7ab84", + "order": 8, + "width": 0, + "height": 0, + "passthru": false, + "multiple": false, + "options": [ + { + "label": "1 Phase", + "value": 1, + "type": "num" + }, + { + "label": "2 Phasen", + "value": 2, + "type": "num" + }, + { + "label": "3 Phasen", + "value": 3, + "type": "num" + } + ], + "payload": "", + "topic": "/max_phases", + "topicType": "str", + "className": "", + "x": 590, + "y": 1580, + "wires": [ + [ + "bca07e3a.16ff08" + ] + ] + }, + { + "id": "4efd69fa.600b1", + "type": "ui_switch", + "z": "92165c72.a5f948", + "g": "10c935e7.d81c6a", + "name": "Lp1 Stecker", + "label": "Stecker", + "tooltip": "", + "group": "703fdeb2.7ab84", + "order": 7, + "width": 0, + "height": 0, + "passthru": false, + "decouple": "true", + "topic": "/plug_state", + "topicType": "str", + "style": "", + "onvalue": "1", + "onvalueType": "num", + "onicon": "", + "oncolor": "", + "offvalue": "0", + "offvalueType": "num", + "officon": "", + "offcolor": "", + "animate": true, + "className": "", + "x": 570, + "y": 1640, + "wires": [ + [ + "bca07e3a.16ff08" + ] + ] }, { - "id": "adca6b9d.7ef678", - "type": "group", + "id": "bcde68d8.fbde58", + "type": "ui_text", "z": "92165c72.a5f948", - "name": "Ladepunkt 3", - "style": { - "label": true, - "stroke": "#0070c0", - "fill": "#0070c0", - "fill-opacity": "0.25" - }, - "nodes": [ - "f63b330f.c096e", - "db2cd204.7325b8", - "bb9a80f3.6ed8d", - "d1f901d9.c7e1e8", - "1d7224a3.976403", - "7e5d3fc0.81f4f8", - "c08ace1e.18cd08", - "e25c1f48.8f5e18", - "6add9cf1.e85094", - "b2b4e4a9.e78cd8", - "1ef6368267acccec", - "ab6610e58dd3eb1c", - "b9d330a1.5a", - "711106cc.96ed18", - "0a303aeb4727c810", - "268be22f.974e1e", - "61501fd2e18b0ed9", - "2397a2d2e13d5c0a", - "4ea0f783b9ca324e", - "fd0bd4a773502e77" + "g": "10c935e7.d81c6a", + "group": "703fdeb2.7ab84", + "order": 6, + "width": 0, + "height": 0, + "name": "Lp1 Zähler Ladung", + "label": "Zählerstand laden", + "format": "{{value/1000 | number:3}} kWh", + "layout": "row-spread", + "className": "", + "x": 1030, + "y": 1500, + "wires": [] + }, + { + "id": "b4c0b8e7.95301", + "type": "ui_text", + "z": "92165c72.a5f948", + "g": "10c935e7.d81c6a", + "group": "703fdeb2.7ab84", + "order": 2, + "width": 0, + "height": 0, + "name": "Lp1 Sollstrom", + "label": "Soll-Strom", + "format": "{{msg.payload}} A", + "layout": "row-spread", + "className": "", + "x": 1020, + "y": 1700, + "wires": [] + }, + { + "id": "c2212cf2.e2bfe", + "type": "ui_gauge", + "z": "92165c72.a5f948", + "g": "10c935e7.d81c6a", + "name": "Lp1 Leistung", + "group": "703fdeb2.7ab84", + "order": 5, + "width": 0, + "height": 0, + "gtype": "gage", + "title": "Leistung", + "label": "kW", + "format": "{{value/1000 | number:2}}", + "min": 0, + "max": "22080", + "colors": [ + "#00b500", + "#00ff00", + "#00b500" ], - "x": 14, - "y": 2104, - "w": 1152, - "h": 417 + "seg1": "4140", + "seg2": "7360", + "className": "", + "x": 1010, + "y": 1580, + "wires": [] }, { - "id": "ba86e05e.3eb518", - "type": "group", + "id": "bca07e3a.16ff08", + "type": "subflow:5c4ac285.afe6e4", "z": "92165c72.a5f948", - "name": "EVU", - "style": { - "stroke": "#ff0000", - "fill": "#ff0000", - "fill-opacity": "0.25", - "label": true - }, - "nodes": [ - "c5f91c31.79af98", - "2b5259d1.0e44ae", - "4c1c0dd1.be816c", - "fa5f56e0.4465e", - "90812723.7b3678", - "3e1bb28f.704a8e", - "f754ebac.d7d598", - "e854990fb4f9fab2", - "b46365f7d8aa13b6", - "524bd7697f7a306c", - "cde7317bc368b6b3", - "3036d462.5d789c", - "50edc6fb6d78740a", - "9145b76c44a9c929", - "3d8e2d3b4ee89e76", - "dc8f75f240dcf3b8", - "80ec81072842f306", - "7e693d583a244143" + "g": "10c935e7.d81c6a", + "name": "LP1", + "env": [ + { + "name": "Component-ID", + "value": "3", + "type": "num" + }, + { + "name": "Chargepoint-ID", + "value": "1", + "type": "num" + }, + { + "name": "Component ID", + "value": "3", + "type": "num" + } ], - "x": 14, - "y": 251.5, - "w": 1092, - "h": 289.5 + "x": 630, + "y": 1420, + "wires": [ + [ + "c7894755.6c934", + "ed32a789.f4f798", + "e6650f13b3cc695a" + ], + [ + "1c08d24.841d3ae" + ], + [ + "44f4fcadd171fe6d" + ], + [] + ], + "outputLabels": [ + "openWB", + "schnelle Regelwerte", + "input passthrough", + "" + ] }, { - "id": "c8376289.15bc1", - "type": "group", + "id": "c7894755.6c934", + "type": "switch", "z": "92165c72.a5f948", - "name": "Speicher", - "style": { - "stroke": "#ffC000", - "fill": "#ffC000", - "fill-opacity": "0.25", - "label": true - }, - "nodes": [ - "9641b34b.2e9cd", - "145b387d.21aa88", - "dc7c97e6.6d6ad8", - "8243b679.c8f0f8", - "9ac3e1c9.e83e1", - "5deb68e4.79c458", - "96ea46e5.2b8618", - "ab178052.48bc98", - "a5a86b10.4dee38", - "d34c32d3.8f3448", - "6faaaef.e02a3d", - "bc6d74f3.8135d8", - "3df4fb4b.a9b13c", - "daf73f9a.fb50e", - "cf0bcd92.6fbe48", - "7a4711d4a689d6d4", - "234fd994.ef3106", - "426f7138f5a76fbd", - "f79cda2c7665fad2" + "g": "10c935e7.d81c6a", + "name": "", + "property": "topic", + "propertyType": "msg", + "rules": [ + { + "t": "regex", + "v": "\\/get\\/imported$", + "vt": "str", + "case": false + }, + { + "t": "regex", + "v": "\\/get\\/exported$", + "vt": "str", + "case": false + }, + { + "t": "regex", + "v": "\\/get\\/power$", + "vt": "str", + "case": false + }, + { + "t": "regex", + "v": "\\/get\\/phases_in_use$", + "vt": "str", + "case": false + }, + { + "t": "regex", + "v": "\\/get\\/currents$", + "vt": "str", + "case": false + } + ], + "checkall": "true", + "repair": false, + "outputs": 5, + "x": 810, + "y": 1520, + "wires": [ + [ + "bcde68d8.fbde58" + ], + [ + "3c77c4ed766b07a5" + ], + [ + "c2212cf2.e2bfe" + ], + [ + "1e68cfab.5aab5" + ], + [ + "8c206019dae8c4f0" + ] ], - "x": 14, - "y": 796.5, - "w": 1092, - "h": 344.5 + "outputLabels": [ + "Zählerstand laden", + "Zählerstand entladen", + "Leistung", + "aktive Phasen", + "Ströme" + ] }, { - "id": "4ffeb8f2.88e97", - "type": "group", + "id": "f63b330f.c096e", + "type": "ui_text", "z": "92165c72.a5f948", - "name": "Ladepunkt 2", - "style": { - "label": true, - "stroke": "#0070c0", - "fill": "#0070c0", - "fill-opacity": "0.25" - }, - "nodes": [ - "9e477905.67cf68", - "30584a7c.88a996", - "ea8feee.389911", - "1b06aa0d.461b36", - "ce8b41fa.71b588", - "bd2575a0.0cbce", - "f1d863d5.a29c18", - "b5d70a0.77f3e78", - "73ffea7f.199e1c", - "f3d097a6.b80d18", - "89dc41d2.e8c018", - "266b0231.f4db36", - "4a41415e440b1304", - "0b69966b365c4536", - "43a92dd0.39da44", - "25f6934e60f9b4d6", - "5316d2315b34de5a", - "cbdca721f944522a", - "e648cfa22c2cd2ec", - "347e9bc401e0eddd" - ], - "x": 14, - "y": 1644, - "w": 1152, - "h": 417 + "g": "adca6b9d.7ef678", + "group": "77ebf297.439d3c", + "order": 2, + "width": 0, + "height": 0, + "name": "Lp3 Sollstrom", + "label": "Soll-Strom", + "format": "{{msg.payload}} A", + "layout": "row-spread", + "x": 1020, + "y": 2620, + "wires": [] }, { - "id": "3e039a5092696f5f", - "type": "group", + "id": "db2cd204.7325b8", + "type": "ui_dropdown", "z": "92165c72.a5f948", - "name": "Allgemeine Nodes", - "style": { - "label": true - }, - "nodes": [ - "51d8d30d.b63194", - "fd94d24f.8eb11", - "f8fb4ebc3ad90445", - "529ef24e.47a72c", - "426f1381e1bed357", - "d81e2c4a9ea1ce1d", - "b05ac649dc15c76c" + "g": "adca6b9d.7ef678", + "name": "EV3 max. Phasen", + "label": "EV max. Phasen", + "tooltip": "", + "place": "Select option", + "group": "77ebf297.439d3c", + "order": 8, + "width": 0, + "height": 0, + "passthru": false, + "multiple": false, + "options": [ + { + "label": "1 Phase", + "value": 1, + "type": "num" + }, + { + "label": "2 Phasen", + "value": 2, + "type": "num" + }, + { + "label": "3 Phasen", + "value": 3, + "type": "num" + } ], - "x": 4, - "y": 19, - "w": 1082, - "h": 202 + "payload": "", + "topic": "/max_phases", + "topicType": "str", + "className": "", + "x": 590, + "y": 2500, + "wires": [ + [ + "7e5d3fc0.81f4f8" + ] + ] }, { - "id": "a9947543.f34bd", + "id": "bb9a80f3.6ed8d", + "type": "ui_switch", + "z": "92165c72.a5f948", + "g": "adca6b9d.7ef678", + "name": "Lp3 Stecker", + "label": "Stecker", + "tooltip": "", + "group": "77ebf297.439d3c", + "order": 7, + "width": 0, + "height": 0, + "passthru": false, + "decouple": "true", + "topic": "/plug_state", + "topicType": "str", + "style": "", + "onvalue": "1", + "onvalueType": "num", + "onicon": "", + "oncolor": "", + "offvalue": "0", + "offvalueType": "num", + "officon": "", + "offcolor": "", + "animate": true, + "className": "", + "x": 570, + "y": 2560, + "wires": [ + [ + "7e5d3fc0.81f4f8" + ] + ] + }, + { + "id": "d1f901d9.c7e1e8", "type": "inject", "z": "92165c72.a5f948", - "g": "10c935e7.d81c6a", - "name": "max. 3 Phasen", + "g": "adca6b9d.7ef678", + "name": "max. 1 Phase", "props": [ { "p": "payload" @@ -4547,21 +7557,21 @@ "once": true, "onceDelay": "1", "topic": "/max_phases", - "payload": "3", + "payload": "1", "payloadType": "num", "x": 140, - "y": 1300, + "y": 2400, "wires": [ [ - "bca07e3a.16ff08" + "7e5d3fc0.81f4f8" ] ] }, { - "id": "9dad0a08.b2c0f", + "id": "1d7224a3.976403", "type": "inject", "z": "92165c72.a5f948", - "g": "10c935e7.d81c6a", + "g": "adca6b9d.7ef678", "name": "Abgesteckt", "props": [ { @@ -4580,414 +7590,514 @@ "payload": "0", "payloadType": "num", "x": 130, - "y": 1340, - "wires": [ - [ - "bca07e3a.16ff08" - ] - ] - }, - { - "id": "51d8d30d.b63194", - "type": "mqtt in", - "z": "92165c72.a5f948", - "g": "3e039a5092696f5f", - "name": "", - "topic": "openWB/mqtt/chargepoint/+/set/current", - "qos": "0", - "datatype": "json", - "broker": "5c48b79a.d6b918", - "nl": false, - "rap": false, - "inputs": 0, - "x": 200, - "y": 60, + "y": 2440, "wires": [ [ - "f8fb4ebc3ad90445" + "7e5d3fc0.81f4f8" ] ] }, { - "id": "529ef24e.47a72c", - "type": "mqtt out", - "z": "92165c72.a5f948", - "g": "3e039a5092696f5f", - "name": "", - "topic": "", - "qos": "0", - "retain": "true", - "respTopic": "", - "contentType": "", - "userProps": "", - "correl": "", - "expiry": "", - "broker": "5c48b79a.d6b918", - "x": 1010, - "y": 60, - "wires": [] - }, - { - "id": "66502428.6bc2ec", - "type": "ui_dropdown", + "id": "7e5d3fc0.81f4f8", + "type": "subflow:5c4ac285.afe6e4", "z": "92165c72.a5f948", - "g": "10c935e7.d81c6a", - "name": "EV1 max. Phasen", - "label": "EV max. Phasen", - "tooltip": "", - "place": "Select option", - "group": "703fdeb2.7ab84", - "order": 8, - "width": 0, - "height": 0, - "passthru": false, - "multiple": false, - "options": [ + "g": "adca6b9d.7ef678", + "name": "LP3", + "env": [ { - "label": "1 Phase", - "value": 1, + "name": "Component-ID", + "value": "5", "type": "num" }, { - "label": "2 Phasen", - "value": 2, + "name": "Phase1", + "value": "3", "type": "num" }, { - "label": "3 Phasen", - "value": 3, + "name": "Chargepoint-ID", + "value": "3", + "type": "num" + }, + { + "name": "LPNumber", + "value": "3", "type": "num" } ], - "payload": "", - "topic": "/max_phases", - "topicType": "str", - "className": "", - "x": 590, - "y": 1400, + "x": 630, + "y": 2340, "wires": [ [ - "bca07e3a.16ff08" - ] + "b9d330a1.5a", + "711106cc.96ed18", + "ab6610e58dd3eb1c" + ], + [ + "6add9cf1.e85094" + ], + [ + "61501fd2e18b0ed9" + ], + [] ] }, { - "id": "4efd69fa.600b1", - "type": "ui_switch", + "id": "c08ace1e.18cd08", + "type": "ui_gauge", "z": "92165c72.a5f948", - "g": "10c935e7.d81c6a", - "name": "Lp1 Stecker", - "label": "Stecker", - "tooltip": "", - "group": "703fdeb2.7ab84", - "order": 7, + "g": "adca6b9d.7ef678", + "name": "Lp3 Leistung", + "group": "77ebf297.439d3c", + "order": 5, "width": 0, "height": 0, - "passthru": false, - "decouple": "true", - "topic": "/plug_state", - "topicType": "str", - "style": "", - "onvalue": "1", - "onvalueType": "num", - "onicon": "", - "oncolor": "", - "offvalue": "0", - "offvalueType": "num", - "officon": "", - "offcolor": "", - "animate": true, + "gtype": "gage", + "title": "Leistung", + "label": "kW", + "format": "{{value/1000 | number:2}}", + "min": 0, + "max": "22080", + "colors": [ + "#00b500", + "#00ff00", + "#00b500" + ], + "seg1": "4140", + "seg2": "7360", "className": "", - "x": 570, - "y": 1460, - "wires": [ - [ - "bca07e3a.16ff08" - ] - ] + "x": 1010, + "y": 2500, + "wires": [] }, { - "id": "bcde68d8.fbde58", + "id": "e25c1f48.8f5e18", "type": "ui_text", "z": "92165c72.a5f948", - "g": "10c935e7.d81c6a", - "group": "703fdeb2.7ab84", + "g": "adca6b9d.7ef678", + "group": "77ebf297.439d3c", "order": 6, "width": 0, "height": 0, - "name": "Lp1 Zähler Ladung", + "name": "Lp3 Zähler Ladung", "label": "Zählerstand laden", "format": "{{value/1000 | number:3}} kWh", "layout": "row-spread", "className": "", "x": 1030, - "y": 1320, + "y": 2420, "wires": [] }, { - "id": "b4c0b8e7.95301", + "id": "c5f91c31.79af98", + "type": "switch", + "z": "92165c72.a5f948", + "g": "ba86e05e.3eb518", + "name": "", + "property": "topic", + "propertyType": "msg", + "rules": [ + { + "t": "regex", + "v": "\\/imported$", + "vt": "str", + "case": false + }, + { + "t": "regex", + "v": "\\/exported$", + "vt": "str", + "case": false + }, + { + "t": "regex", + "v": "\\/power$", + "vt": "str", + "case": false + }, + { + "t": "regex", + "v": "\\/currents$", + "vt": "str", + "case": false + } + ], + "checkall": "true", + "repair": false, + "outputs": 4, + "x": 790, + "y": 580, + "wires": [ + [ + "fa5f56e0.4465e" + ], + [ + "2b5259d1.0e44ae" + ], + [ + "4c1c0dd1.be816c" + ], + [ + "524bd7697f7a306c" + ] + ], + "outputLabels": [ + "Zählerstand Import", + "Zählerstand Export", + "Leistung", + "Ströme" + ] + }, + { + "id": "2b5259d1.0e44ae", "type": "ui_text", "z": "92165c72.a5f948", - "g": "10c935e7.d81c6a", - "group": "703fdeb2.7ab84", - "order": 2, + "g": "ba86e05e.3eb518", + "group": "9b18f281.ca979", + "order": 5, "width": 0, "height": 0, - "name": "Lp1 Sollstrom", - "label": "Soll-Strom", - "format": "{{msg.payload}} A", + "name": "EVU Zähler Export", + "label": "Zählerstand Exp.", + "format": "{{value/1000 | number:3}} kWh", "layout": "row-spread", - "className": "", - "x": 1020, - "y": 1520, + "x": 990, + "y": 600, "wires": [] }, { - "id": "c2212cf2.e2bfe", + "id": "4c1c0dd1.be816c", "type": "ui_gauge", "z": "92165c72.a5f948", - "g": "10c935e7.d81c6a", - "name": "Lp1 Leistung", - "group": "703fdeb2.7ab84", - "order": 5, + "g": "ba86e05e.3eb518", + "name": "EVU Leistung", + "group": "9b18f281.ca979", + "order": 7, "width": 0, "height": 0, "gtype": "gage", "title": "Leistung", "label": "kW", "format": "{{value/1000 | number:2}}", - "min": 0, - "max": "22080", + "min": "-10000", + "max": "20000", "colors": [ - "#00b500", "#00ff00", - "#00b500" + "#ff0000", + "#ff0000" ], - "seg1": "4140", - "seg2": "7360", - "className": "", - "x": 1010, - "y": 1400, + "seg1": "0", + "seg2": "0", + "x": 980, + "y": 640, "wires": [] }, { - "id": "bca07e3a.16ff08", - "type": "subflow:5c4ac285.afe6e4", + "id": "fa5f56e0.4465e", + "type": "ui_text", "z": "92165c72.a5f948", - "g": "10c935e7.d81c6a", - "name": "LP1", - "env": [ - { - "name": "Component-ID", - "value": "3", - "type": "num" - }, - { - "name": "Chargepoint-ID", - "value": "1", - "type": "num" - }, - { - "name": "Component ID", - "value": "3", - "type": "num" - } - ], - "x": 630, - "y": 1240, + "g": "ba86e05e.3eb518", + "group": "9b18f281.ca979", + "order": 6, + "width": 0, + "height": 0, + "name": "EVU Zähler Import", + "label": "Zählerstand Imp.", + "format": "{{value/1000 | number:3}} kWh", + "layout": "row-spread", + "x": 990, + "y": 560, + "wires": [] + }, + { + "id": "90812723.7b3678", + "type": "subflow:da060938.c8ff48", + "z": "92165c72.a5f948", + "g": "ba86e05e.3eb518", + "name": "EVU", + "env": [], + "x": 590, + "y": 480, "wires": [ [ - "c7894755.6c934", - "ed32a789.f4f798", - "e6650f13b3cc695a" - ], - [ - "1c08d24.841d3ae" + "c5f91c31.79af98", + "3036d462.5d789c", + "cde7317bc368b6b3" ], [ - "44f4fcadd171fe6d" + "f754ebac.d7d598" ], [] ], "outputLabels": [ "openWB", "schnelle Regelwerte", - "input passthrough", "" ] }, { - "id": "c7894755.6c934", + "id": "3e1bb28f.704a8e", + "type": "link in", + "z": "92165c72.a5f948", + "g": "ba86e05e.3eb518", + "name": "EVU In", + "links": [ + "daf73f9a.fb50e", + "54fdb013.3028f8", + "1c08d24.841d3ae", + "73ffea7f.199e1c", + "6add9cf1.e85094", + "5ffbd11579ac50d7", + "87f445e673cc518d" + ], + "x": 335, + "y": 480, + "wires": [ + [ + "90812723.7b3678" + ] + ] + }, + { + "id": "9641b34b.2e9cd", "type": "switch", "z": "92165c72.a5f948", - "g": "10c935e7.d81c6a", + "g": "c8376289.15bc1", "name": "", "property": "topic", "propertyType": "msg", "rules": [ { "t": "regex", - "v": "\\/get\\/imported$", - "vt": "str", - "case": false - }, - { - "t": "regex", - "v": "\\/get\\/exported$", + "v": "\\/imported$", "vt": "str", "case": false }, { "t": "regex", - "v": "\\/get\\/power$", + "v": "\\/exported$", "vt": "str", "case": false }, { "t": "regex", - "v": "\\/get\\/phases_in_use$", + "v": "\\/power$", "vt": "str", "case": false }, { "t": "regex", - "v": "\\/get\\/currents$", + "v": "\\/soc$", "vt": "str", "case": false } ], "checkall": "true", "repair": false, - "outputs": 5, - "x": 810, - "y": 1340, + "outputs": 4, + "x": 790, + "y": 1140, "wires": [ [ - "bcde68d8.fbde58" - ], - [ - "3c77c4ed766b07a5" + "145b387d.21aa88" ], [ - "c2212cf2.e2bfe" + "dc7c97e6.6d6ad8" ], [ - "1e68cfab.5aab5" + "8243b679.c8f0f8" ], [ - "8c206019dae8c4f0" + "9ac3e1c9.e83e1", + "5deb68e4.79c458" ] ], "outputLabels": [ - "Zählerstand laden", - "Zählerstand entladen", + "Zählerstand Import", + "Zählerstand Export", "Leistung", - "aktive Phasen", - "Ströme" + "SoC" ] }, { - "id": "f63b330f.c096e", + "id": "145b387d.21aa88", "type": "ui_text", "z": "92165c72.a5f948", - "g": "adca6b9d.7ef678", - "group": "77ebf297.439d3c", - "order": 2, + "g": "c8376289.15bc1", + "group": "bda74558.0d74e8", + "order": 5, "width": 0, "height": 0, - "name": "Lp3 Sollstrom", - "label": "Soll-Strom", - "format": "{{msg.payload}} A", + "name": "BAT Zähler Import", + "label": "Zählerstand Imp.", + "format": "{{value/1000 | number:3}} kWh", "layout": "row-spread", - "x": 1020, - "y": 2440, + "x": 990, + "y": 1120, "wires": [] }, { - "id": "db2cd204.7325b8", - "type": "ui_dropdown", + "id": "dc7c97e6.6d6ad8", + "type": "ui_text", "z": "92165c72.a5f948", - "g": "adca6b9d.7ef678", - "name": "EV3 max. Phasen", - "label": "EV max. Phasen", - "tooltip": "", - "place": "Select option", - "group": "77ebf297.439d3c", + "g": "c8376289.15bc1", + "group": "bda74558.0d74e8", + "order": 6, + "width": 0, + "height": 0, + "name": "BAT Zähler Export", + "label": "Zählerstand Exp.", + "format": "{{value/1000 | number:3}} kWh", + "layout": "row-spread", + "x": 990, + "y": 1160, + "wires": [] + }, + { + "id": "8243b679.c8f0f8", + "type": "ui_gauge", + "z": "92165c72.a5f948", + "g": "c8376289.15bc1", + "name": "BAT Leistung", + "group": "bda74558.0d74e8", + "order": 7, + "width": 0, + "height": 0, + "gtype": "gage", + "title": "Leistung", + "label": "kW", + "format": "{{value/1000 | number:2}}", + "min": "-5000", + "max": "5000", + "colors": [ + "#00ff00", + "#ffff00", + "#ff0000" + ], + "seg1": "0", + "seg2": "0", + "className": "", + "x": 970, + "y": 1200, + "wires": [] + }, + { + "id": "9ac3e1c9.e83e1", + "type": "ui_gauge", + "z": "92165c72.a5f948", + "g": "c8376289.15bc1", + "name": "BAT SoC", + "group": "bda74558.0d74e8", "order": 8, "width": 0, "height": 0, + "gtype": "wave", + "title": "SoC", + "label": "%", + "format": "{{value}}", + "min": "0", + "max": "100", + "colors": [ + "#ff0000", + "#ffff00", + "#00ff00" + ], + "seg1": "33", + "seg2": "66", + "x": 960, + "y": 1240, + "wires": [] + }, + { + "id": "5deb68e4.79c458", + "type": "ui_slider", + "z": "92165c72.a5f948", + "g": "c8376289.15bc1", + "name": "Ladestand", + "label": "SoC", + "tooltip": "", + "group": "bda74558.0d74e8", + "order": 1, + "width": 0, + "height": 0, "passthru": false, - "multiple": false, - "options": [ - { - "label": "1 Phase", - "value": 1, - "type": "num" - }, + "outs": "end", + "topic": "/soc", + "topicType": "str", + "min": 0, + "max": "100", + "step": "1", + "className": "", + "x": 970, + "y": 1280, + "wires": [ + [ + "bc6d74f3.8135d8" + ] + ] + }, + { + "id": "96ea46e5.2b8618", + "type": "inject", + "z": "92165c72.a5f948", + "g": "c8376289.15bc1", + "name": "50% SoC", + "props": [ { - "label": "2 Phasen", - "value": 2, - "type": "num" + "p": "payload" }, { - "label": "3 Phasen", - "value": 3, - "type": "num" + "p": "topic", + "vt": "str" } ], - "payload": "", - "topic": "/max_phases", - "topicType": "str", - "className": "", - "x": 590, - "y": 2320, + "repeat": "", + "crontab": "", + "once": true, + "onceDelay": "0.1", + "topic": "/soc", + "payload": "50", + "payloadType": "num", + "x": 120, + "y": 1100, "wires": [ [ - "7e5d3fc0.81f4f8" + "bc6d74f3.8135d8" ] ] }, { - "id": "bb9a80f3.6ed8d", - "type": "ui_switch", + "id": "ab178052.48bc98", + "type": "ui_slider", "z": "92165c72.a5f948", - "g": "adca6b9d.7ef678", - "name": "Lp3 Stecker", - "label": "Stecker", + "g": "c8376289.15bc1", + "name": "", + "label": "Max. Leistung", "tooltip": "", - "group": "77ebf297.439d3c", - "order": 7, + "group": "bda74558.0d74e8", + "order": 3, "width": 0, "height": 0, - "passthru": false, - "decouple": "true", - "topic": "/plug_state", - "topicType": "str", - "style": "", - "onvalue": "1", - "onvalueType": "num", - "onicon": "", - "oncolor": "", - "offvalue": "0", - "offvalueType": "num", - "officon": "", - "offcolor": "", - "animate": true, - "className": "", - "x": 570, - "y": 2380, + "passthru": true, + "outs": "end", + "topic": "/BatMaxPower", + "min": 0, + "max": "5000", + "step": "100", + "x": 400, + "y": 1160, "wires": [ [ - "7e5d3fc0.81f4f8" + "bc6d74f3.8135d8" ] ] }, { - "id": "d1f901d9.c7e1e8", + "id": "a5a86b10.4dee38", "type": "inject", "z": "92165c72.a5f948", - "g": "adca6b9d.7ef678", - "name": "max. 1 Phase", + "g": "c8376289.15bc1", + "name": "3300W Leistung", "props": [ { "p": "payload" @@ -5000,24 +8110,50 @@ "repeat": "", "crontab": "", "once": true, - "onceDelay": "1", - "topic": "/max_phases", - "payload": "1", + "onceDelay": 0.1, + "topic": "/BatMaxPower", + "payload": "3300", "payloadType": "num", "x": 140, - "y": 2220, + "y": 1160, + "wires": [ + [ + "ab178052.48bc98" + ] + ] + }, + { + "id": "d34c32d3.8f3448", + "type": "ui_slider", + "z": "92165c72.a5f948", + "g": "c8376289.15bc1", + "name": "", + "label": "Kapazität", + "tooltip": "", + "group": "bda74558.0d74e8", + "order": 2, + "width": 0, + "height": 0, + "passthru": true, + "outs": "end", + "topic": "/BatCapacity", + "min": 0, + "max": "15000", + "step": "1000", + "x": 380, + "y": 1220, "wires": [ [ - "7e5d3fc0.81f4f8" + "bc6d74f3.8135d8" ] ] }, { - "id": "1d7224a3.976403", + "id": "6faaaef.e02a3d", "type": "inject", "z": "92165c72.a5f948", - "g": "adca6b9d.7ef678", - "name": "Abgesteckt", + "g": "c8376289.15bc1", + "name": "5kWh Kapazität", "props": [ { "p": "payload" @@ -5030,124 +8166,194 @@ "repeat": "", "crontab": "", "once": true, - "onceDelay": "1", - "topic": "/plug_state", - "payload": "0", + "onceDelay": 0.1, + "topic": "/BatCapacity", + "payload": "5000", "payloadType": "num", - "x": 130, - "y": 2260, + "x": 140, + "y": 1220, "wires": [ [ - "7e5d3fc0.81f4f8" + "d34c32d3.8f3448" ] ] }, { - "id": "7e5d3fc0.81f4f8", - "type": "subflow:5c4ac285.afe6e4", + "id": "bc6d74f3.8135d8", + "type": "subflow:2dd5cf5c.4ae26", "z": "92165c72.a5f948", - "g": "adca6b9d.7ef678", - "name": "LP3", - "env": [ - { - "name": "Component-ID", - "value": "5", - "type": "num" - }, - { - "name": "Phase1", - "value": "3", - "type": "num" - }, - { - "name": "Chargepoint-ID", - "value": "3", - "type": "num" - }, - { - "name": "LPNumber", - "value": "3", - "type": "num" - } - ], - "x": 630, - "y": 2160, + "g": "c8376289.15bc1", + "name": "Bat", + "env": [], + "x": 590, + "y": 1040, "wires": [ [ - "b9d330a1.5a", - "711106cc.96ed18", - "ab6610e58dd3eb1c" + "9641b34b.2e9cd", + "7a4711d4a689d6d4", + "234fd994.ef3106" ], [ - "6add9cf1.e85094" + "daf73f9a.fb50e" ], [ - "61501fd2e18b0ed9" + "3df4fb4b.a9b13c" + ], + [ + "f79cda2c7665fad2" ], [] ] }, { - "id": "c08ace1e.18cd08", - "type": "ui_gauge", + "id": "3df4fb4b.a9b13c", + "type": "ui_chart", "z": "92165c72.a5f948", - "g": "adca6b9d.7ef678", - "name": "Lp3 Leistung", - "group": "77ebf297.439d3c", - "order": 5, + "g": "c8376289.15bc1", + "name": "", + "group": "bda74558.0d74e8", + "order": 9, "width": 0, "height": 0, - "gtype": "gage", - "title": "Leistung", - "label": "kW", - "format": "{{value/1000 | number:2}}", - "min": 0, - "max": "22080", + "label": "chart", + "chartType": "line", + "legend": "false", + "xformat": "HH:mm:ss", + "interpolate": "linear", + "nodata": "", + "dot": false, + "ymin": "", + "ymax": "", + "removeOlder": 1, + "removeOlderPoints": "", + "removeOlderUnit": "3600", + "cutout": 0, + "useOneColor": false, + "useUTC": false, "colors": [ - "#00b500", - "#00ff00", - "#00b500" + "#1f77b4", + "#aec7e8", + "#ff7f0e", + "#2ca02c", + "#98df8a", + "#d62728", + "#ff9896", + "#9467bd", + "#c5b0d5" ], - "seg1": "4140", - "seg2": "7360", - "className": "", - "x": 1010, - "y": 2320, + "outputs": 1, + "x": 790, + "y": 1240, + "wires": [ + [] + ] + }, + { + "id": "daf73f9a.fb50e", + "type": "link out", + "z": "92165c72.a5f948", + "g": "c8376289.15bc1", + "name": "BAT out", + "links": [ + "3e1bb28f.704a8e" + ], + "x": 755, + "y": 1200, "wires": [] }, { - "id": "e25c1f48.8f5e18", - "type": "ui_text", + "id": "f754ebac.d7d598", + "type": "link out", + "z": "92165c72.a5f948", + "g": "ba86e05e.3eb518", + "name": "EVU Out", + "mode": "link", + "links": [ + "cf0bcd92.6fbe48" + ], + "x": 715, + "y": 680, + "wires": [] + }, + { + "id": "cf0bcd92.6fbe48", + "type": "link in", + "z": "92165c72.a5f948", + "g": "c8376289.15bc1", + "name": "BAT In", + "links": [ + "f754ebac.d7d598", + "b05ac649dc15c76c" + ], + "x": 335, + "y": 1040, + "wires": [ + [ + "bc6d74f3.8135d8" + ] + ] + }, + { + "id": "1c08d24.841d3ae", + "type": "link out", + "z": "92165c72.a5f948", + "g": "10c935e7.d81c6a", + "name": "LP1 out", + "links": [ + "3e1bb28f.704a8e" + ], + "x": 775, + "y": 1460, + "wires": [] + }, + { + "id": "6add9cf1.e85094", + "type": "link out", "z": "92165c72.a5f948", "g": "adca6b9d.7ef678", - "group": "77ebf297.439d3c", - "order": 6, + "name": "LP3 out", + "links": [ + "3e1bb28f.704a8e" + ], + "x": 775, + "y": 2380, + "wires": [] + }, + { + "id": "2ab22961.d73e06", + "type": "ui_slider", + "z": "92165c72.a5f948", + "g": "9924f98f.a9ee4", + "name": "", + "label": "PV-Leistung", + "tooltip": "", + "group": "1690fa25.a7c9a6", + "order": 2, "width": 0, "height": 0, - "name": "Lp3 Zähler Ladung", - "label": "Zählerstand laden", - "format": "{{value/1000 | number:3}} kWh", - "layout": "row-spread", - "className": "", - "x": 1030, - "y": 2240, - "wires": [] + "passthru": true, + "outs": "end", + "topic": "/W", + "min": 0, + "max": "10000", + "step": "100", + "x": 390, + "y": 800, + "wires": [ + [ + "c98a2da7.d75a38" + ] + ] }, { - "id": "c5f91c31.79af98", + "id": "8c9d0662.e0c83", "type": "switch", "z": "92165c72.a5f948", - "g": "ba86e05e.3eb518", + "g": "9924f98f.a9ee4", "name": "", "property": "topic", "propertyType": "msg", "rules": [ - { - "t": "regex", - "v": "\\/imported$", - "vt": "str", - "case": false - }, { "t": "regex", "v": "\\/exported$", @@ -5159,388 +8365,556 @@ "v": "\\/power$", "vt": "str", "case": false - }, - { - "t": "regex", - "v": "\\/currents$", - "vt": "str", - "case": false } ], "checkall": "true", "repair": false, - "outputs": 4, + "outputs": 2, "x": 790, - "y": 400, + "y": 880, "wires": [ [ - "fa5f56e0.4465e" - ], - [ - "2b5259d1.0e44ae" - ], - [ - "4c1c0dd1.be816c" + "83082d16.5c0c" ], [ - "524bd7697f7a306c" + "c6745675.5b9ec" ] ], "outputLabels": [ - "Zählerstand Import", - "Zählerstand Export", - "Leistung", - "Ströme" + "Zählerstand", + "Leistung" ] }, { - "id": "2b5259d1.0e44ae", + "id": "83082d16.5c0c", "type": "ui_text", "z": "92165c72.a5f948", - "g": "ba86e05e.3eb518", - "group": "9b18f281.ca979", - "order": 5, + "g": "9924f98f.a9ee4", + "group": "1690fa25.a7c9a6", + "order": 3, "width": 0, "height": 0, - "name": "EVU Zähler Export", - "label": "Zählerstand Exp.", + "name": "PV Zähler", + "label": "Zählerstand", "format": "{{value/1000 | number:3}} kWh", "layout": "row-spread", - "x": 990, - "y": 420, + "x": 960, + "y": 880, "wires": [] }, { - "id": "4c1c0dd1.be816c", + "id": "c6745675.5b9ec", "type": "ui_gauge", "z": "92165c72.a5f948", - "g": "ba86e05e.3eb518", - "name": "EVU Leistung", - "group": "9b18f281.ca979", - "order": 7, + "g": "9924f98f.a9ee4", + "name": "PV Leistung", + "group": "1690fa25.a7c9a6", + "order": 4, "width": 0, "height": 0, "gtype": "gage", "title": "Leistung", "label": "kW", "format": "{{value/1000 | number:2}}", - "min": "-10000", - "max": "20000", + "min": 0, + "max": "-10000", "colors": [ + "#00b500", "#00ff00", - "#ff0000", - "#ff0000" + "#00b500" ], - "seg1": "0", - "seg2": "0", - "x": 980, - "y": 460, - "wires": [] - }, - { - "id": "fa5f56e0.4465e", - "type": "ui_text", - "z": "92165c72.a5f948", - "g": "ba86e05e.3eb518", - "group": "9b18f281.ca979", - "order": 6, - "width": 0, - "height": 0, - "name": "EVU Zähler Import", - "label": "Zählerstand Imp.", - "format": "{{value/1000 | number:3}} kWh", - "layout": "row-spread", - "x": 990, - "y": 380, + "seg1": "", + "seg2": "", + "x": 970, + "y": 920, "wires": [] }, { - "id": "90812723.7b3678", - "type": "subflow:da060938.c8ff48", + "id": "c98a2da7.d75a38", + "type": "subflow:c5821ca1.ee2da", "z": "92165c72.a5f948", - "g": "ba86e05e.3eb518", - "name": "EVU", + "g": "9924f98f.a9ee4", + "name": "PV1", "env": [], "x": 590, - "y": 300, + "y": 800, "wires": [ [ - "c5f91c31.79af98", - "3036d462.5d789c", - "cde7317bc368b6b3" + "8c9d0662.e0c83", + "c44e5ea9.d6b06", + "9605f30870c8aa1a" ], [ - "f754ebac.d7d598" + "54fdb013.3028f8" ], [] - ], - "outputLabels": [ - "openWB", - "schnelle Regelwerte", - "" ] }, { - "id": "3e1bb28f.704a8e", - "type": "link in", + "id": "54fdb013.3028f8", + "type": "link out", "z": "92165c72.a5f948", - "g": "ba86e05e.3eb518", - "name": "EVU In", + "g": "9924f98f.a9ee4", + "name": "PV out", "links": [ - "daf73f9a.fb50e", - "54fdb013.3028f8", - "1c08d24.841d3ae", - "73ffea7f.199e1c", - "6add9cf1.e85094" + "3e1bb28f.704a8e" ], - "x": 335, - "y": 300, + "x": 715, + "y": 920, + "wires": [] + }, + { + "id": "f5a5cec3.4fd8a8", + "type": "inject", + "z": "92165c72.a5f948", + "g": "9924f98f.a9ee4", + "name": "1500 W", + "props": [ + { + "p": "payload" + }, + { + "p": "topic", + "vt": "str" + } + ], + "repeat": "", + "crontab": "", + "once": true, + "onceDelay": "1", + "topic": "/W", + "payload": "1500", + "payloadType": "num", + "x": 120, + "y": 800, "wires": [ [ - "90812723.7b3678" + "2ab22961.d73e06" ] ] }, { - "id": "9641b34b.2e9cd", + "id": "fd94d24f.8eb11", + "type": "mqtt in", + "z": "92165c72.a5f948", + "g": "3e039a5092696f5f", + "name": "", + "topic": "openWB/mqtt/chargepoint/+/set/phases_to_use", + "qos": "0", + "datatype": "json", + "broker": "5c48b79a.d6b918", + "nl": false, + "rap": false, + "inputs": 0, + "x": 240, + "y": 120, + "wires": [ + [ + "f8fb4ebc3ad90445" + ] + ] + }, + { + "id": "aa2ce19d.eaf1e8", + "type": "ui_text", + "z": "92165c72.a5f948", + "g": "10c935e7.d81c6a", + "group": "703fdeb2.7ab84", + "order": 3, + "width": 0, + "height": 0, + "name": "Lp1 Sollphasen", + "label": "Soll-Phasen", + "format": "{{msg.payload}}", + "layout": "row-spread", + "className": "", + "x": 1020, + "y": 1740, + "wires": [] + }, + { + "id": "b2b4e4a9.e78cd8", + "type": "ui_text", + "z": "92165c72.a5f948", + "g": "adca6b9d.7ef678", + "group": "77ebf297.439d3c", + "order": 3, + "width": 0, + "height": 0, + "name": "Lp3 Sollphasen", + "label": "Soll-Phasen", + "format": "{{msg.payload}}", + "layout": "row-spread", + "x": 1020, + "y": 2660, + "wires": [] + }, + { + "id": "1e68cfab.5aab5", + "type": "ui_text", + "z": "92165c72.a5f948", + "g": "10c935e7.d81c6a", + "group": "703fdeb2.7ab84", + "order": 4, + "width": 0, + "height": 0, + "name": "Lp1 Phasen", + "label": "Ist-Phasen", + "format": "{{msg.payload}}", + "layout": "row-spread", + "x": 1010, + "y": 1620, + "wires": [] + }, + { + "id": "268be22f.974e1e", + "type": "ui_text", + "z": "92165c72.a5f948", + "g": "adca6b9d.7ef678", + "group": "77ebf297.439d3c", + "order": 4, + "width": 0, + "height": 0, + "name": "Lp3 Phasen", + "label": "Ist-Phasen", + "format": "{{msg.payload}}", + "layout": "row-spread", + "x": 1010, + "y": 2540, + "wires": [] + }, + { + "id": "b9d330a1.5a", "type": "switch", "z": "92165c72.a5f948", - "g": "c8376289.15bc1", + "g": "adca6b9d.7ef678", "name": "", "property": "topic", "propertyType": "msg", "rules": [ { "t": "regex", - "v": "\\/imported$", + "v": "\\/get\\/imported$", "vt": "str", "case": false }, { "t": "regex", - "v": "\\/exported$", + "v": "\\/get\\/exported$", "vt": "str", "case": false }, { "t": "regex", - "v": "\\/power$", + "v": "\\/get\\/power$", "vt": "str", "case": false }, { "t": "regex", - "v": "\\/soc$", + "v": "\\/get\\/phases_in_use$", + "vt": "str", + "case": false + }, + { + "t": "regex", + "v": "\\/get\\/currents$", "vt": "str", "case": false } ], "checkall": "true", "repair": false, - "outputs": 4, - "x": 790, - "y": 960, + "outputs": 5, + "x": 810, + "y": 2440, "wires": [ [ - "145b387d.21aa88" + "e25c1f48.8f5e18" ], [ - "dc7c97e6.6d6ad8" + "2397a2d2e13d5c0a" ], [ - "8243b679.c8f0f8" + "c08ace1e.18cd08" ], [ - "9ac3e1c9.e83e1", - "5deb68e4.79c458" + "268be22f.974e1e" + ], + [ + "0a303aeb4727c810" ] ], "outputLabels": [ - "Zählerstand Import", - "Zählerstand Export", + "Zählerstand laden", + "Zählerstand entladen", "Leistung", - "SoC" + "aktive Phasen", + "Ströme" ] }, { - "id": "145b387d.21aa88", - "type": "ui_text", + "id": "c44e5ea9.d6b06", + "type": "debug", "z": "92165c72.a5f948", - "g": "c8376289.15bc1", - "group": "bda74558.0d74e8", - "order": 5, - "width": 0, - "height": 0, - "name": "BAT Zähler Import", - "label": "Zählerstand Imp.", - "format": "{{value/1000 | number:3}} kWh", - "layout": "row-spread", - "x": 990, - "y": 940, + "g": "9924f98f.a9ee4", + "name": "", + "active": false, + "tosidebar": true, + "console": false, + "tostatus": false, + "complete": "false", + "statusVal": "", + "statusType": "auto", + "x": 970, + "y": 800, "wires": [] }, { - "id": "dc7c97e6.6d6ad8", - "type": "ui_text", + "id": "3036d462.5d789c", + "type": "debug", "z": "92165c72.a5f948", - "g": "c8376289.15bc1", - "group": "bda74558.0d74e8", - "order": 6, - "width": 0, - "height": 0, - "name": "BAT Zähler Export", - "label": "Zählerstand Exp.", - "format": "{{value/1000 | number:3}} kWh", - "layout": "row-spread", - "x": 990, - "y": 980, + "g": "ba86e05e.3eb518", + "name": "", + "active": false, + "tosidebar": true, + "console": false, + "tostatus": false, + "complete": "false", + "statusVal": "", + "statusType": "auto", + "x": 970, + "y": 480, "wires": [] }, { - "id": "8243b679.c8f0f8", - "type": "ui_gauge", + "id": "234fd994.ef3106", + "type": "debug", "z": "92165c72.a5f948", "g": "c8376289.15bc1", - "name": "BAT Leistung", - "group": "bda74558.0d74e8", - "order": 7, - "width": 0, - "height": 0, - "gtype": "gage", - "title": "Leistung", - "label": "kW", - "format": "{{value/1000 | number:2}}", - "min": "-5000", - "max": "5000", - "colors": [ - "#00ff00", - "#ffff00", - "#ff0000" - ], - "seg1": "0", - "seg2": "0", - "className": "", + "name": "", + "active": false, + "tosidebar": true, + "console": false, + "tostatus": false, + "complete": "false", + "statusVal": "", + "statusType": "auto", "x": 970, - "y": 1020, + "y": 1040, "wires": [] }, { - "id": "9ac3e1c9.e83e1", - "type": "ui_gauge", + "id": "ed32a789.f4f798", + "type": "debug", "z": "92165c72.a5f948", - "g": "c8376289.15bc1", - "name": "BAT SoC", - "group": "bda74558.0d74e8", - "order": 8, - "width": 0, - "height": 0, - "gtype": "wave", - "title": "SoC", - "label": "%", - "format": "{{value}}", - "min": "0", - "max": "100", - "colors": [ - "#ff0000", - "#ffff00", - "#00ff00" - ], - "seg1": "33", - "seg2": "66", - "x": 960, - "y": 1060, + "g": "10c935e7.d81c6a", + "name": "", + "active": false, + "tosidebar": true, + "console": false, + "tostatus": false, + "complete": "false", + "statusVal": "", + "statusType": "auto", + "x": 1010, + "y": 1420, "wires": [] }, { - "id": "5deb68e4.79c458", + "id": "43a92dd0.39da44", + "type": "debug", + "z": "92165c72.a5f948", + "g": "4ffeb8f2.88e97", + "name": "", + "active": false, + "tosidebar": true, + "console": false, + "tostatus": false, + "complete": "false", + "statusVal": "", + "statusType": "auto", + "x": 1010, + "y": 1880, + "wires": [] + }, + { + "id": "711106cc.96ed18", + "type": "debug", + "z": "92165c72.a5f948", + "g": "adca6b9d.7ef678", + "name": "", + "active": false, + "tosidebar": true, + "console": false, + "tostatus": false, + "complete": "false", + "statusVal": "", + "statusType": "auto", + "x": 1010, + "y": 2340, + "wires": [] + }, + { + "id": "e854990fb4f9fab2", + "type": "inject", + "z": "92165c72.a5f948", + "g": "ba86e05e.3eb518", + "name": "Netzfrequenz 50Hz", + "props": [ + { + "p": "payload" + }, + { + "p": "topic", + "vt": "str" + } + ], + "repeat": "", + "crontab": "", + "once": true, + "onceDelay": "1", + "topic": "/frequency", + "payload": "50", + "payloadType": "num", + "x": 150, + "y": 520, + "wires": [ + [ + "b46365f7d8aa13b6" + ] + ] + }, + { + "id": "b46365f7d8aa13b6", "type": "ui_slider", "z": "92165c72.a5f948", - "g": "c8376289.15bc1", - "name": "Ladestand", - "label": "SoC", + "g": "ba86e05e.3eb518", + "name": "EVU Netzfrequenz", + "label": "Netzfrequenz", "tooltip": "", - "group": "bda74558.0d74e8", - "order": 1, + "group": "9b18f281.ca979", + "order": 9, "width": 0, "height": 0, - "passthru": false, + "passthru": true, "outs": "end", - "topic": "/soc", + "topic": "/frequency", "topicType": "str", - "min": 0, - "max": "100", - "step": "1", + "min": "40", + "max": "55", + "step": "0.1", "className": "", - "x": 970, - "y": 1100, + "x": 370, + "y": 520, "wires": [ [ - "bc6d74f3.8135d8" + "90812723.7b3678" ] ] }, { - "id": "96ea46e5.2b8618", - "type": "inject", + "id": "9e477905.67cf68", + "type": "ui_text", "z": "92165c72.a5f948", - "g": "c8376289.15bc1", - "name": "50% SoC", - "props": [ + "g": "4ffeb8f2.88e97", + "group": "3fdb380f.aba898", + "order": 2, + "width": 0, + "height": 0, + "name": "Lp2 Sollstrom", + "label": "Soll-Strom", + "format": "{{msg.payload}} A", + "layout": "row-spread", + "x": 1020, + "y": 2160, + "wires": [] + }, + { + "id": "30584a7c.88a996", + "type": "ui_dropdown", + "z": "92165c72.a5f948", + "g": "4ffeb8f2.88e97", + "name": "EV2 max. Phasen", + "label": "EV max. Phasen", + "tooltip": "", + "place": "Select option", + "group": "3fdb380f.aba898", + "order": 8, + "width": 0, + "height": 0, + "passthru": false, + "multiple": false, + "options": [ { - "p": "payload" + "label": "1 Phase", + "value": 1, + "type": "num" }, { - "p": "topic", - "vt": "str" + "label": "2 Phasen", + "value": 2, + "type": "num" + }, + { + "label": "3 Phasen", + "value": 3, + "type": "num" } ], - "repeat": "", - "crontab": "", - "once": true, - "onceDelay": "0.1", - "topic": "/soc", - "payload": "50", - "payloadType": "num", - "x": 120, - "y": 920, + "payload": "", + "topic": "/max_phases", + "topicType": "str", + "className": "", + "x": 590, + "y": 2040, "wires": [ [ - "bc6d74f3.8135d8" + "bd2575a0.0cbce" ] ] }, { - "id": "ab178052.48bc98", - "type": "ui_slider", + "id": "ea8feee.389911", + "type": "ui_switch", "z": "92165c72.a5f948", - "g": "c8376289.15bc1", - "name": "", - "label": "Max. Leistung", + "g": "4ffeb8f2.88e97", + "name": "Lp2 Stecker", + "label": "Stecker", "tooltip": "", - "group": "bda74558.0d74e8", - "order": 3, + "group": "3fdb380f.aba898", + "order": 7, "width": 0, "height": 0, - "passthru": true, - "outs": "end", - "topic": "/BatMaxPower", - "min": 0, - "max": "5000", - "step": "100", - "x": 400, - "y": 980, + "passthru": false, + "decouple": "true", + "topic": "/plug_state", + "topicType": "str", + "style": "", + "onvalue": "1", + "onvalueType": "num", + "onicon": "", + "oncolor": "", + "offvalue": "0", + "offvalueType": "num", + "officon": "", + "offcolor": "", + "animate": true, + "className": "", + "x": 570, + "y": 2100, "wires": [ [ - "bc6d74f3.8135d8" + "bd2575a0.0cbce" ] ] }, { - "id": "a5a86b10.4dee38", + "id": "1b06aa0d.461b36", "type": "inject", "z": "92165c72.a5f948", - "g": "c8376289.15bc1", - "name": "3300W Leistung", + "g": "4ffeb8f2.88e97", + "name": "max. 2 Phasen", "props": [ { "p": "payload" @@ -5553,50 +8927,24 @@ "repeat": "", "crontab": "", "once": true, - "onceDelay": 0.1, - "topic": "/BatMaxPower", - "payload": "3300", + "onceDelay": "1", + "topic": "/max_phases", + "payload": "2", "payloadType": "num", "x": 140, - "y": 980, - "wires": [ - [ - "ab178052.48bc98" - ] - ] - }, - { - "id": "d34c32d3.8f3448", - "type": "ui_slider", - "z": "92165c72.a5f948", - "g": "c8376289.15bc1", - "name": "", - "label": "Kapazität", - "tooltip": "", - "group": "bda74558.0d74e8", - "order": 2, - "width": 0, - "height": 0, - "passthru": true, - "outs": "end", - "topic": "/BatCapacity", - "min": 0, - "max": "15000", - "step": "1000", - "x": 380, - "y": 1040, + "y": 1940, "wires": [ [ - "bc6d74f3.8135d8" + "bd2575a0.0cbce" ] ] }, { - "id": "6faaaef.e02a3d", + "id": "ce8b41fa.71b588", "type": "inject", "z": "92165c72.a5f948", - "g": "c8376289.15bc1", - "name": "5kWh Kapazität", + "g": "4ffeb8f2.88e97", + "name": "Abgesteckt", "props": [ { "p": "payload" @@ -5609,754 +8957,743 @@ "repeat": "", "crontab": "", "once": true, - "onceDelay": 0.1, - "topic": "/BatCapacity", - "payload": "5000", + "onceDelay": "1", + "topic": "/plug_state", + "payload": "0", "payloadType": "num", - "x": 140, - "y": 1040, + "x": 130, + "y": 1980, "wires": [ [ - "d34c32d3.8f3448" + "bd2575a0.0cbce" ] ] }, { - "id": "bc6d74f3.8135d8", - "type": "subflow:2dd5cf5c.4ae26", + "id": "bd2575a0.0cbce", + "type": "subflow:5c4ac285.afe6e4", "z": "92165c72.a5f948", - "g": "c8376289.15bc1", - "name": "Bat", - "env": [], - "x": 590, - "y": 860, + "g": "4ffeb8f2.88e97", + "name": "LP2", + "env": [ + { + "name": "Component-ID", + "value": "4", + "type": "num" + }, + { + "name": "Phase1", + "value": "2", + "type": "num" + }, + { + "name": "Chargepoint-ID", + "value": "2", + "type": "num" + }, + { + "name": "LPNumber", + "value": "2", + "type": "num" + } + ], + "x": 630, + "y": 1880, "wires": [ [ - "9641b34b.2e9cd", - "7a4711d4a689d6d4", - "234fd994.ef3106" - ], - [ - "daf73f9a.fb50e" + "266b0231.f4db36", + "43a92dd0.39da44", + "0b69966b365c4536" ], [ - "3df4fb4b.a9b13c" + "73ffea7f.199e1c" ], [ - "f79cda2c7665fad2" + "5316d2315b34de5a" ], [] ] }, { - "id": "3df4fb4b.a9b13c", - "type": "ui_chart", + "id": "f1d863d5.a29c18", + "type": "ui_gauge", "z": "92165c72.a5f948", - "g": "c8376289.15bc1", - "name": "", - "group": "bda74558.0d74e8", - "order": 9, + "g": "4ffeb8f2.88e97", + "name": "Lp2 Leistung", + "group": "3fdb380f.aba898", + "order": 5, "width": 0, "height": 0, - "label": "chart", - "chartType": "line", - "legend": "false", - "xformat": "HH:mm:ss", - "interpolate": "linear", - "nodata": "", - "dot": false, - "ymin": "", - "ymax": "", - "removeOlder": 1, - "removeOlderPoints": "", - "removeOlderUnit": "3600", - "cutout": 0, - "useOneColor": false, - "useUTC": false, + "gtype": "gage", + "title": "Leistung", + "label": "kW", + "format": "{{value/1000 | number:2}}", + "min": 0, + "max": "22080", "colors": [ - "#1f77b4", - "#aec7e8", - "#ff7f0e", - "#2ca02c", - "#98df8a", - "#d62728", - "#ff9896", - "#9467bd", - "#c5b0d5" - ], - "outputs": 1, - "x": 790, - "y": 1060, - "wires": [ - [] - ] - }, - { - "id": "daf73f9a.fb50e", - "type": "link out", - "z": "92165c72.a5f948", - "g": "c8376289.15bc1", - "name": "BAT out", - "links": [ - "3e1bb28f.704a8e" - ], - "x": 755, - "y": 1020, - "wires": [] - }, - { - "id": "f754ebac.d7d598", - "type": "link out", - "z": "92165c72.a5f948", - "g": "ba86e05e.3eb518", - "name": "EVU Out", - "links": [ - "cf0bcd92.6fbe48" + "#00b500", + "#00ff00", + "#00b500" ], - "x": 715, - "y": 500, + "seg1": "4140", + "seg2": "7360", + "className": "", + "x": 1010, + "y": 2040, "wires": [] }, { - "id": "cf0bcd92.6fbe48", - "type": "link in", + "id": "b5d70a0.77f3e78", + "type": "ui_text", "z": "92165c72.a5f948", - "g": "c8376289.15bc1", - "name": "BAT In", - "links": [ - "f754ebac.d7d598", - "b05ac649dc15c76c" - ], - "x": 335, - "y": 860, - "wires": [ - [ - "bc6d74f3.8135d8" - ] - ] + "g": "4ffeb8f2.88e97", + "group": "3fdb380f.aba898", + "order": 6, + "width": 0, + "height": 0, + "name": "Lp2 Zähler Ladung", + "label": "Zählerstand laden", + "format": "{{value/1000 | number:3}} kWh", + "layout": "row-spread", + "className": "", + "x": 1030, + "y": 1960, + "wires": [] }, { - "id": "1c08d24.841d3ae", + "id": "73ffea7f.199e1c", "type": "link out", "z": "92165c72.a5f948", - "g": "10c935e7.d81c6a", - "name": "LP1 out", + "g": "4ffeb8f2.88e97", + "name": "LP2 out", "links": [ "3e1bb28f.704a8e" ], "x": 775, - "y": 1280, + "y": 1920, "wires": [] }, { - "id": "6add9cf1.e85094", - "type": "link out", + "id": "f3d097a6.b80d18", + "type": "ui_text", "z": "92165c72.a5f948", - "g": "adca6b9d.7ef678", - "name": "LP3 out", - "links": [ - "3e1bb28f.704a8e" - ], - "x": 775, + "g": "4ffeb8f2.88e97", + "group": "3fdb380f.aba898", + "order": 3, + "width": 0, + "height": 0, + "name": "Lp2 Sollphasen", + "label": "Soll-Phasen", + "format": "{{msg.payload}}", + "layout": "row-spread", + "x": 1020, "y": 2200, "wires": [] }, { - "id": "2ab22961.d73e06", - "type": "ui_slider", + "id": "89dc41d2.e8c018", + "type": "ui_text", "z": "92165c72.a5f948", - "g": "9924f98f.a9ee4", - "name": "", - "label": "PV-Leistung", - "tooltip": "", - "group": "1690fa25.a7c9a6", - "order": 2, + "g": "4ffeb8f2.88e97", + "group": "3fdb380f.aba898", + "order": 4, "width": 0, "height": 0, - "passthru": true, - "outs": "end", - "topic": "/W", - "min": 0, - "max": "10000", - "step": "100", - "x": 390, - "y": 620, - "wires": [ - [ - "c98a2da7.d75a38" - ] - ] + "name": "Lp2 Phasen", + "label": "Ist-Phasen", + "format": "{{msg.payload}}", + "layout": "row-spread", + "x": 1010, + "y": 2080, + "wires": [] }, { - "id": "8c9d0662.e0c83", + "id": "266b0231.f4db36", "type": "switch", "z": "92165c72.a5f948", - "g": "9924f98f.a9ee4", + "g": "4ffeb8f2.88e97", "name": "", "property": "topic", "propertyType": "msg", "rules": [ { "t": "regex", - "v": "\\/exported$", + "v": "\\/get\\/imported$", "vt": "str", "case": false }, { "t": "regex", - "v": "\\/power$", + "v": "\\/get\\/exported$", + "vt": "str", + "case": false + }, + { + "t": "regex", + "v": "\\/get\\/power$", + "vt": "str", + "case": false + }, + { + "t": "regex", + "v": "\\/get\\/phases_in_use$", + "vt": "str", + "case": false + }, + { + "t": "regex", + "v": "\\/get\\/currents$", "vt": "str", "case": false } ], "checkall": "true", "repair": false, - "outputs": 2, - "x": 790, - "y": 700, + "outputs": 5, + "x": 810, + "y": 1980, "wires": [ [ - "83082d16.5c0c" + "b5d70a0.77f3e78" ], [ - "c6745675.5b9ec" + "cbdca721f944522a" + ], + [ + "f1d863d5.a29c18" + ], + [ + "89dc41d2.e8c018" + ], + [ + "25f6934e60f9b4d6" ] ], "outputLabels": [ - "Zählerstand", - "Leistung" + "Zählerstand laden", + "Zählerstand entladen", + "Leistung", + "aktive Phasen", + "Ströme" ] }, { - "id": "83082d16.5c0c", - "type": "ui_text", + "id": "f8fb4ebc3ad90445", + "type": "link out", "z": "92165c72.a5f948", - "g": "9924f98f.a9ee4", - "group": "1690fa25.a7c9a6", - "order": 3, - "width": 0, - "height": 0, - "name": "PV Zähler", - "label": "Zählerstand", - "format": "{{value/1000 | number:3}} kWh", - "layout": "row-spread", - "x": 960, - "y": 700, + "g": "3e039a5092696f5f", + "name": "Set Chargepoint", + "mode": "link", + "links": [ + "1ef6368267acccec", + "4a41415e440b1304", + "5aa1d8c69080891b" + ], + "x": 495, + "y": 60, "wires": [] }, { - "id": "c6745675.5b9ec", - "type": "ui_gauge", + "id": "5aa1d8c69080891b", + "type": "link in", "z": "92165c72.a5f948", - "g": "9924f98f.a9ee4", - "name": "PV Leistung", - "group": "1690fa25.a7c9a6", - "order": 4, - "width": 0, - "height": 0, - "gtype": "gage", - "title": "Leistung", - "label": "kW", - "format": "{{value/1000 | number:2}}", - "min": 0, - "max": "-10000", - "colors": [ - "#00b500", - "#00ff00", - "#00b500" + "g": "10c935e7.d81c6a", + "name": "LP1 Set Current", + "links": [ + "f8fb4ebc3ad90445" ], - "seg1": "", - "seg2": "", - "x": 970, - "y": 740, - "wires": [] + "x": 155, + "y": 1420, + "wires": [ + [ + "bca07e3a.16ff08" + ] + ] }, { - "id": "c98a2da7.d75a38", - "type": "subflow:c5821ca1.ee2da", + "id": "4a41415e440b1304", + "type": "link in", "z": "92165c72.a5f948", - "g": "9924f98f.a9ee4", - "name": "PV1", - "env": [], - "x": 590, - "y": 620, + "g": "4ffeb8f2.88e97", + "name": "LP2 Set", + "links": [ + "f8fb4ebc3ad90445" + ], + "x": 155, + "y": 1880, "wires": [ [ - "8c9d0662.e0c83", - "c44e5ea9.d6b06", - "9605f30870c8aa1a" - ], + "bd2575a0.0cbce" + ] + ] + }, + { + "id": "1ef6368267acccec", + "type": "link in", + "z": "92165c72.a5f948", + "g": "adca6b9d.7ef678", + "name": "LP3 Set", + "links": [ + "f8fb4ebc3ad90445" + ], + "x": 155, + "y": 2340, + "wires": [ + [ + "7e5d3fc0.81f4f8" + ] + ] + }, + { + "id": "426f1381e1bed357", + "type": "link in", + "z": "92165c72.a5f948", + "g": "3e039a5092696f5f", + "name": "Out OpenWB", + "links": [ + "0b69966b365c4536", + "e6650f13b3cc695a", + "ab6610e58dd3eb1c", + "cde7317bc368b6b3", + "9605f30870c8aa1a", + "7a4711d4a689d6d4", + "baf911e204a9816b", + "d3d2fcdd8e890908" + ], + "x": 795, + "y": 60, + "wires": [ [ - "54fdb013.3028f8" - ], - [] + "529ef24e.47a72c" + ] ] }, { - "id": "54fdb013.3028f8", + "id": "e6650f13b3cc695a", "type": "link out", "z": "92165c72.a5f948", - "g": "9924f98f.a9ee4", - "name": "PV out", + "g": "10c935e7.d81c6a", + "name": "LP1 Out OpenWB", + "mode": "link", "links": [ - "3e1bb28f.704a8e" + "426f1381e1bed357" ], - "x": 715, - "y": 740, + "x": 955, + "y": 1460, "wires": [] }, { - "id": "f5a5cec3.4fd8a8", - "type": "inject", + "id": "0b69966b365c4536", + "type": "link out", "z": "92165c72.a5f948", - "g": "9924f98f.a9ee4", - "name": "1500 W", - "props": [ - { - "p": "payload" - }, - { - "p": "topic", - "vt": "str" - } + "g": "4ffeb8f2.88e97", + "name": "LP2 Out OpenWB", + "mode": "link", + "links": [ + "426f1381e1bed357" ], - "repeat": "", - "crontab": "", - "once": true, - "onceDelay": "1", - "topic": "/W", - "payload": "1500", - "payloadType": "num", - "x": 120, - "y": 620, - "wires": [ - [ - "2ab22961.d73e06" - ] - ] + "x": 955, + "y": 1920, + "wires": [] }, { - "id": "fd94d24f.8eb11", - "type": "mqtt in", + "id": "ab6610e58dd3eb1c", + "type": "link out", "z": "92165c72.a5f948", - "g": "3e039a5092696f5f", - "name": "", - "topic": "openWB/mqtt/chargepoint/+/set/phases_to_use", - "qos": "0", - "datatype": "json", - "broker": "5c48b79a.d6b918", - "nl": false, - "rap": false, - "inputs": 0, - "x": 220, - "y": 120, - "wires": [ - [ - "f8fb4ebc3ad90445" - ] - ] + "g": "adca6b9d.7ef678", + "name": "LP3 Out OpenWB", + "mode": "link", + "links": [ + "426f1381e1bed357" + ], + "x": 955, + "y": 2380, + "wires": [] }, { - "id": "aa2ce19d.eaf1e8", + "id": "8c206019dae8c4f0", "type": "ui_text", "z": "92165c72.a5f948", "g": "10c935e7.d81c6a", "group": "703fdeb2.7ab84", - "order": 3, + "order": 9, "width": 0, "height": 0, - "name": "Lp1 Sollphasen", - "label": "Soll-Phasen", - "format": "{{msg.payload}}", + "name": "", + "label": "Lp1 Ströme", + "format": "{{msg.payload[0] | number:2}} / {{msg.payload[1] | number:2}} / {{msg.payload[2] | number:2}}", "layout": "row-spread", "className": "", - "x": 1020, - "y": 1560, - "wires": [] - }, - { - "id": "b2b4e4a9.e78cd8", - "type": "ui_text", - "z": "92165c72.a5f948", - "g": "adca6b9d.7ef678", - "group": "77ebf297.439d3c", - "order": 3, - "width": 0, - "height": 0, - "name": "Lp3 Sollphasen", - "label": "Soll-Phasen", - "format": "{{msg.payload}}", - "layout": "row-spread", - "x": 1020, - "y": 2480, + "x": 1010, + "y": 1660, "wires": [] }, { - "id": "1e68cfab.5aab5", + "id": "25f6934e60f9b4d6", "type": "ui_text", "z": "92165c72.a5f948", - "g": "10c935e7.d81c6a", - "group": "703fdeb2.7ab84", - "order": 4, + "g": "4ffeb8f2.88e97", + "group": "3fdb380f.aba898", + "order": 9, "width": 0, "height": 0, - "name": "Lp1 Phasen", - "label": "Ist-Phasen", - "format": "{{msg.payload}}", + "name": "", + "label": "Lp2 Ströme", + "format": "{{msg.payload[0] | number:2}} / {{msg.payload[1] | number:2}} / {{msg.payload[2] | number:2}}", "layout": "row-spread", + "className": "", "x": 1010, - "y": 1440, + "y": 2120, "wires": [] }, { - "id": "268be22f.974e1e", + "id": "0a303aeb4727c810", "type": "ui_text", "z": "92165c72.a5f948", "g": "adca6b9d.7ef678", "group": "77ebf297.439d3c", - "order": 4, + "order": 9, "width": 0, "height": 0, - "name": "Lp3 Phasen", - "label": "Ist-Phasen", - "format": "{{msg.payload}}", + "name": "", + "label": "Lp3 Ströme", + "format": "{{msg.payload[0] | number:2}} / {{msg.payload[1] | number:2}} / {{msg.payload[2] | number:2}}", "layout": "row-spread", + "className": "", "x": 1010, - "y": 2360, + "y": 2580, "wires": [] }, { - "id": "b9d330a1.5a", + "id": "44f4fcadd171fe6d", "type": "switch", "z": "92165c72.a5f948", - "g": "adca6b9d.7ef678", + "g": "10c935e7.d81c6a", "name": "", "property": "topic", "propertyType": "msg", "rules": [ { "t": "regex", - "v": "\\/get\\/imported$", + "v": "\\/max_phases$", + "vt": "str", + "case": false + }, + { + "t": "regex", + "v": "\\/plug_state$", + "vt": "str", + "case": false + }, + { + "t": "regex", + "v": "\\/current$", + "vt": "str", + "case": false + }, + { + "t": "regex", + "v": "\\/phases_to_use$", + "vt": "str", + "case": false + } + ], + "checkall": "true", + "repair": false, + "outputs": 4, + "x": 370, + "y": 1680, + "wires": [ + [ + "66502428.6bc2ec" + ], + [ + "4efd69fa.600b1" + ], + [ + "b4c0b8e7.95301" + ], + [ + "aa2ce19d.eaf1e8" + ] + ], + "outputLabels": [ + "", + "", + "Sollstrom", + "Sollphasen" + ] + }, + { + "id": "5316d2315b34de5a", + "type": "switch", + "z": "92165c72.a5f948", + "g": "4ffeb8f2.88e97", + "name": "", + "property": "topic", + "propertyType": "msg", + "rules": [ + { + "t": "regex", + "v": "\\/max_phases$", + "vt": "str", + "case": false + }, + { + "t": "regex", + "v": "\\/plug_state$", + "vt": "str", + "case": false + }, + { + "t": "regex", + "v": "\\/current$", "vt": "str", "case": false }, { "t": "regex", - "v": "\\/get\\/exported$", + "v": "\\/phases_to_use$", + "vt": "str", + "case": false + } + ], + "checkall": "true", + "repair": false, + "outputs": 4, + "x": 370, + "y": 2140, + "wires": [ + [ + "30584a7c.88a996" + ], + [ + "ea8feee.389911" + ], + [ + "9e477905.67cf68" + ], + [ + "f3d097a6.b80d18" + ] + ], + "outputLabels": [ + "", + "", + "Sollstrom", + "Sollphasen" + ] + }, + { + "id": "61501fd2e18b0ed9", + "type": "switch", + "z": "92165c72.a5f948", + "g": "adca6b9d.7ef678", + "name": "", + "property": "topic", + "propertyType": "msg", + "rules": [ + { + "t": "regex", + "v": "\\/max_phases$", "vt": "str", "case": false }, { "t": "regex", - "v": "\\/get\\/power$", + "v": "\\/plug_state$", "vt": "str", "case": false }, { "t": "regex", - "v": "\\/get\\/phases_in_use$", + "v": "\\/current$", "vt": "str", "case": false }, { "t": "regex", - "v": "\\/get\\/currents$", + "v": "\\/phases_to_use$", "vt": "str", "case": false } ], "checkall": "true", "repair": false, - "outputs": 5, - "x": 810, - "y": 2260, + "outputs": 4, + "x": 370, + "y": 2600, "wires": [ [ - "e25c1f48.8f5e18" - ], - [ - "2397a2d2e13d5c0a" + "db2cd204.7325b8" ], [ - "c08ace1e.18cd08" + "bb9a80f3.6ed8d" ], [ - "268be22f.974e1e" + "f63b330f.c096e" ], [ - "0a303aeb4727c810" + "b2b4e4a9.e78cd8" ] ], "outputLabels": [ - "Zählerstand laden", - "Zählerstand entladen", - "Leistung", - "aktive Phasen", - "Ströme" + "", + "", + "Sollstrom", + "Sollphasen" ] }, { - "id": "c44e5ea9.d6b06", - "type": "debug", - "z": "92165c72.a5f948", - "g": "9924f98f.a9ee4", - "name": "", - "active": false, - "tosidebar": true, - "console": false, - "tostatus": false, - "complete": "false", - "statusVal": "", - "statusType": "auto", - "x": 970, - "y": 620, - "wires": [] - }, - { - "id": "3036d462.5d789c", - "type": "debug", + "id": "524bd7697f7a306c", + "type": "ui_text", "z": "92165c72.a5f948", "g": "ba86e05e.3eb518", + "group": "9b18f281.ca979", + "order": 8, + "width": 0, + "height": 0, "name": "", - "active": false, - "tosidebar": true, - "console": false, - "tostatus": false, - "complete": "false", - "statusVal": "", - "statusType": "auto", - "x": 970, - "y": 300, - "wires": [] - }, - { - "id": "234fd994.ef3106", - "type": "debug", - "z": "92165c72.a5f948", - "g": "c8376289.15bc1", - "name": "", - "active": false, - "tosidebar": true, - "console": false, - "tostatus": false, - "complete": "false", - "statusVal": "", - "statusType": "auto", + "label": "EVU Ströme", + "format": "{{msg.payload[0] | number:2}} / {{msg.payload[1] | number:2}} / {{msg.payload[2] | number:2}}", + "layout": "row-spread", + "className": "", "x": 970, - "y": 860, - "wires": [] - }, - { - "id": "ed32a789.f4f798", - "type": "debug", - "z": "92165c72.a5f948", - "g": "10c935e7.d81c6a", - "name": "", - "active": false, - "tosidebar": true, - "console": false, - "tostatus": false, - "complete": "false", - "statusVal": "", - "statusType": "auto", - "x": 1010, - "y": 1240, + "y": 680, "wires": [] }, { - "id": "43a92dd0.39da44", - "type": "debug", + "id": "cde7317bc368b6b3", + "type": "link out", "z": "92165c72.a5f948", - "g": "4ffeb8f2.88e97", - "name": "", - "active": false, - "tosidebar": true, - "console": false, - "tostatus": false, - "complete": "false", - "statusVal": "", - "statusType": "auto", - "x": 1010, - "y": 1700, + "g": "ba86e05e.3eb518", + "name": "EVU Out OpenWB", + "mode": "link", + "links": [ + "426f1381e1bed357" + ], + "x": 915, + "y": 520, "wires": [] }, { - "id": "711106cc.96ed18", - "type": "debug", + "id": "9605f30870c8aa1a", + "type": "link out", "z": "92165c72.a5f948", - "g": "adca6b9d.7ef678", - "name": "", - "active": false, - "tosidebar": true, - "console": false, - "tostatus": false, - "complete": "false", - "statusVal": "", - "statusType": "auto", - "x": 1010, - "y": 2160, + "g": "9924f98f.a9ee4", + "name": "PV1 Out OpenWB", + "mode": "link", + "links": [ + "426f1381e1bed357" + ], + "x": 915, + "y": 840, "wires": [] }, { - "id": "e854990fb4f9fab2", - "type": "inject", + "id": "7a4711d4a689d6d4", + "type": "link out", "z": "92165c72.a5f948", - "g": "ba86e05e.3eb518", - "name": "Netzfrequenz 50Hz", - "props": [ - { - "p": "payload" - }, - { - "p": "topic", - "vt": "str" - } + "g": "c8376289.15bc1", + "name": "Bat Out OpenWB", + "mode": "link", + "links": [ + "426f1381e1bed357" ], - "repeat": "", - "crontab": "", - "once": true, - "onceDelay": "1", - "topic": "/frequency", - "payload": "50", - "payloadType": "num", - "x": 150, - "y": 340, - "wires": [ - [ - "b46365f7d8aa13b6" - ] - ] + "x": 915, + "y": 1080, + "wires": [] }, { - "id": "b46365f7d8aa13b6", + "id": "dc8f75f240dcf3b8", "type": "ui_slider", "z": "92165c72.a5f948", "g": "ba86e05e.3eb518", - "name": "EVU Netzfrequenz", - "label": "Netzfrequenz", + "name": "", + "label": "Hausverbrauch L1", "tooltip": "", "group": "9b18f281.ca979", - "order": 9, + "order": 2, "width": 0, "height": 0, "passthru": true, "outs": "end", - "topic": "/frequency", + "topic": "/Hausverbrauch_p1", "topicType": "str", - "min": "40", - "max": "55", - "step": "0.1", + "min": 0, + "max": "10000", + "step": "50", "className": "", "x": 370, - "y": 340, + "y": 560, "wires": [ [ "90812723.7b3678" ] - ] - }, - { - "id": "9e477905.67cf68", - "type": "ui_text", - "z": "92165c72.a5f948", - "g": "4ffeb8f2.88e97", - "group": "3fdb380f.aba898", - "order": 2, - "width": 0, - "height": 0, - "name": "Lp2 Sollstrom", - "label": "Soll-Strom", - "format": "{{msg.payload}} A", - "layout": "row-spread", - "x": 1020, - "y": 1980, - "wires": [] - }, - { - "id": "30584a7c.88a996", - "type": "ui_dropdown", - "z": "92165c72.a5f948", - "g": "4ffeb8f2.88e97", - "name": "EV2 max. Phasen", - "label": "EV max. Phasen", - "tooltip": "", - "place": "Select option", - "group": "3fdb380f.aba898", - "order": 8, - "width": 0, - "height": 0, - "passthru": false, - "multiple": false, - "options": [ - { - "label": "1 Phase", - "value": 1, - "type": "num" - }, - { - "label": "2 Phasen", - "value": 2, - "type": "num" - }, - { - "label": "3 Phasen", - "value": 3, - "type": "num" - } - ], - "payload": "", - "topic": "/max_phases", + ] + }, + { + "id": "80ec81072842f306", + "type": "ui_slider", + "z": "92165c72.a5f948", + "g": "ba86e05e.3eb518", + "name": "", + "label": "Hausverbrauch L2", + "tooltip": "", + "group": "9b18f281.ca979", + "order": 3, + "width": 0, + "height": 0, + "passthru": true, + "outs": "end", + "topic": "/Hausverbrauch_p2", "topicType": "str", + "min": 0, + "max": "10000", + "step": "50", "className": "", - "x": 590, - "y": 1860, + "x": 370, + "y": 600, "wires": [ [ - "bd2575a0.0cbce" + "90812723.7b3678" ] ] }, { - "id": "ea8feee.389911", - "type": "ui_switch", + "id": "7e693d583a244143", + "type": "ui_slider", "z": "92165c72.a5f948", - "g": "4ffeb8f2.88e97", - "name": "Lp2 Stecker", - "label": "Stecker", + "g": "ba86e05e.3eb518", + "name": "", + "label": "Hausverbrauch L3", "tooltip": "", - "group": "3fdb380f.aba898", - "order": 7, + "group": "9b18f281.ca979", + "order": 4, "width": 0, "height": 0, - "passthru": false, - "decouple": "true", - "topic": "/plug_state", + "passthru": true, + "outs": "end", + "topic": "/Hausverbrauch_p3", "topicType": "str", - "style": "", - "onvalue": "1", - "onvalueType": "num", - "onicon": "", - "oncolor": "", - "offvalue": "0", - "offvalueType": "num", - "officon": "", - "offcolor": "", - "animate": true, + "min": 0, + "max": "10000", + "step": "50", "className": "", - "x": 570, - "y": 1920, + "x": 370, + "y": 640, "wires": [ [ - "bd2575a0.0cbce" + "90812723.7b3678" ] ] }, { - "id": "1b06aa0d.461b36", + "id": "50edc6fb6d78740a", "type": "inject", "z": "92165c72.a5f948", - "g": "4ffeb8f2.88e97", - "name": "max. 2 Phasen", + "g": "ba86e05e.3eb518", + "name": "150 W", "props": [ { "p": "payload" @@ -6370,23 +9707,23 @@ "crontab": "", "once": true, "onceDelay": "1", - "topic": "/max_phases", - "payload": "2", + "topic": "/Hausverbrauch_p1", + "payload": "150", "payloadType": "num", - "x": 140, - "y": 1760, + "x": 110, + "y": 560, "wires": [ [ - "bd2575a0.0cbce" + "dc8f75f240dcf3b8" ] ] }, { - "id": "ce8b41fa.71b588", + "id": "9145b76c44a9c929", "type": "inject", "z": "92165c72.a5f948", - "g": "4ffeb8f2.88e97", - "name": "Abgesteckt", + "g": "ba86e05e.3eb518", + "name": "150 W", "props": [ { "p": "payload" @@ -6400,252 +9737,153 @@ "crontab": "", "once": true, "onceDelay": "1", - "topic": "/plug_state", - "payload": "0", + "topic": "/Hausverbrauch_p2", + "payload": "150", "payloadType": "num", - "x": 130, - "y": 1800, + "x": 110, + "y": 600, "wires": [ [ - "bd2575a0.0cbce" + "80ec81072842f306" ] ] }, { - "id": "bd2575a0.0cbce", - "type": "subflow:5c4ac285.afe6e4", + "id": "3d8e2d3b4ee89e76", + "type": "inject", "z": "92165c72.a5f948", - "g": "4ffeb8f2.88e97", - "name": "LP2", - "env": [ - { - "name": "Component-ID", - "value": "4", - "type": "num" - }, - { - "name": "Phase1", - "value": "2", - "type": "num" - }, + "g": "ba86e05e.3eb518", + "name": "150 W", + "props": [ { - "name": "Chargepoint-ID", - "value": "2", - "type": "num" + "p": "payload" }, { - "name": "LPNumber", - "value": "2", - "type": "num" + "p": "topic", + "vt": "str" } ], - "x": 630, - "y": 1700, + "repeat": "", + "crontab": "", + "once": true, + "onceDelay": "1", + "topic": "/Hausverbrauch_p3", + "payload": "150", + "payloadType": "num", + "x": 110, + "y": 640, "wires": [ [ - "266b0231.f4db36", - "43a92dd0.39da44", - "0b69966b365c4536" - ], - [ - "73ffea7f.199e1c" - ], - [ - "5316d2315b34de5a" - ], - [] + "7e693d583a244143" + ] ] }, { - "id": "f1d863d5.a29c18", - "type": "ui_gauge", - "z": "92165c72.a5f948", - "g": "4ffeb8f2.88e97", - "name": "Lp2 Leistung", - "group": "3fdb380f.aba898", - "order": 5, - "width": 0, - "height": 0, - "gtype": "gage", - "title": "Leistung", - "label": "kW", - "format": "{{value/1000 | number:2}}", - "min": 0, - "max": "22080", - "colors": [ - "#00b500", - "#00ff00", - "#00b500" - ], - "seg1": "4140", - "seg2": "7360", - "className": "", - "x": 1010, - "y": 1860, - "wires": [] - }, - { - "id": "b5d70a0.77f3e78", + "id": "3c77c4ed766b07a5", "type": "ui_text", "z": "92165c72.a5f948", - "g": "4ffeb8f2.88e97", - "group": "3fdb380f.aba898", + "g": "10c935e7.d81c6a", + "group": "703fdeb2.7ab84", "order": 6, "width": 0, "height": 0, - "name": "Lp2 Zähler Ladung", - "label": "Zählerstand laden", + "name": "Lp1 Zähler Entladung", + "label": "Zählerstand entladen", "format": "{{value/1000 | number:3}} kWh", "layout": "row-spread", "className": "", - "x": 1030, - "y": 1780, - "wires": [] - }, - { - "id": "73ffea7f.199e1c", - "type": "link out", - "z": "92165c72.a5f948", - "g": "4ffeb8f2.88e97", - "name": "LP2 out", - "links": [ - "3e1bb28f.704a8e" - ], - "x": 775, - "y": 1740, - "wires": [] - }, - { - "id": "f3d097a6.b80d18", - "type": "ui_text", - "z": "92165c72.a5f948", - "g": "4ffeb8f2.88e97", - "group": "3fdb380f.aba898", - "order": 3, - "width": 0, - "height": 0, - "name": "Lp2 Sollphasen", - "label": "Soll-Phasen", - "format": "{{msg.payload}}", - "layout": "row-spread", - "x": 1020, - "y": 2020, + "x": 1040, + "y": 1540, "wires": [] }, { - "id": "89dc41d2.e8c018", + "id": "cbdca721f944522a", "type": "ui_text", "z": "92165c72.a5f948", "g": "4ffeb8f2.88e97", "group": "3fdb380f.aba898", - "order": 4, + "order": 6, "width": 0, "height": 0, - "name": "Lp2 Phasen", - "label": "Ist-Phasen", - "format": "{{msg.payload}}", + "name": "Lp2 Zähler Entladung", + "label": "Zählerstand entladen", + "format": "{{value/1000 | number:3}} kWh", "layout": "row-spread", - "x": 1010, - "y": 1900, + "className": "", + "x": 1040, + "y": 2000, "wires": [] }, - { - "id": "266b0231.f4db36", - "type": "switch", - "z": "92165c72.a5f948", - "g": "4ffeb8f2.88e97", - "name": "", - "property": "topic", - "propertyType": "msg", - "rules": [ - { - "t": "regex", - "v": "\\/get\\/imported$", - "vt": "str", - "case": false - }, - { - "t": "regex", - "v": "\\/get\\/exported$", - "vt": "str", - "case": false - }, - { - "t": "regex", - "v": "\\/get\\/power$", - "vt": "str", - "case": false - }, + { + "id": "2397a2d2e13d5c0a", + "type": "ui_text", + "z": "92165c72.a5f948", + "g": "adca6b9d.7ef678", + "group": "77ebf297.439d3c", + "order": 6, + "width": 0, + "height": 0, + "name": "Lp3 Zähler Entladung", + "label": "Zählerstand entladen", + "format": "{{value/1000 | number:3}} kWh", + "layout": "row-spread", + "className": "", + "x": 1040, + "y": 2460, + "wires": [] + }, + { + "id": "ac0a42a5e9a6a1d8", + "type": "inject", + "z": "92165c72.a5f948", + "g": "10c935e7.d81c6a", + "name": "50Hz", + "props": [ { - "t": "regex", - "v": "\\/get\\/phases_in_use$", - "vt": "str", - "case": false + "p": "payload" }, { - "t": "regex", - "v": "\\/get\\/currents$", - "vt": "str", - "case": false + "p": "topic", + "vt": "str" } ], - "checkall": "true", - "repair": false, - "outputs": 5, - "x": 810, - "y": 1800, + "repeat": "", + "crontab": "", + "once": true, + "onceDelay": "1", + "topic": "/frequency", + "payload": "50", + "payloadType": "num", + "x": 110, + "y": 1560, "wires": [ [ - "b5d70a0.77f3e78" - ], - [ - "cbdca721f944522a" - ], - [ - "f1d863d5.a29c18" - ], - [ - "89dc41d2.e8c018" - ], - [ - "25f6934e60f9b4d6" + "dab0d3d1144c2cc4" ] - ], - "outputLabels": [ - "Zählerstand laden", - "Zählerstand entladen", - "Leistung", - "aktive Phasen", - "Ströme" ] }, { - "id": "f8fb4ebc3ad90445", - "type": "link out", - "z": "92165c72.a5f948", - "g": "3e039a5092696f5f", - "name": "Set Chargepoint", - "mode": "link", - "links": [ - "1ef6368267acccec", - "4a41415e440b1304", - "5aa1d8c69080891b" - ], - "x": 475, - "y": 60, - "wires": [] - }, - { - "id": "5aa1d8c69080891b", - "type": "link in", + "id": "dab0d3d1144c2cc4", + "type": "ui_slider", "z": "92165c72.a5f948", "g": "10c935e7.d81c6a", - "name": "LP1 Set Current", - "links": [ - "f8fb4ebc3ad90445" - ], - "x": 155, - "y": 1240, + "name": "LP1 Netzfrequenz", + "label": "Netzfrequenz", + "tooltip": "", + "group": "703fdeb2.7ab84", + "order": 9, + "width": 0, + "height": 0, + "passthru": true, + "outs": "end", + "topic": "/frequency", + "topicType": "str", + "min": "40", + "max": "55", + "step": "0.1", + "className": "", + "x": 290, + "y": 1560, "wires": [ [ "bca07e3a.16ff08" @@ -6653,282 +9891,475 @@ ] }, { - "id": "4a41415e440b1304", - "type": "link in", + "id": "e648cfa22c2cd2ec", + "type": "inject", "z": "92165c72.a5f948", "g": "4ffeb8f2.88e97", - "name": "LP2 Set", - "links": [ - "f8fb4ebc3ad90445" + "name": "50Hz", + "props": [ + { + "p": "payload" + }, + { + "p": "topic", + "vt": "str" + } ], - "x": 155, - "y": 1700, + "repeat": "", + "crontab": "", + "once": true, + "onceDelay": "1", + "topic": "/frequency", + "payload": "50", + "payloadType": "num", + "x": 110, + "y": 2020, "wires": [ [ - "bd2575a0.0cbce" + "347e9bc401e0eddd" ] ] }, { - "id": "1ef6368267acccec", - "type": "link in", + "id": "347e9bc401e0eddd", + "type": "ui_slider", "z": "92165c72.a5f948", - "g": "adca6b9d.7ef678", - "name": "LP3 Set", - "links": [ - "f8fb4ebc3ad90445" - ], - "x": 155, - "y": 2160, + "g": "4ffeb8f2.88e97", + "name": "LP2 Netzfrequenz", + "label": "Netzfrequenz", + "tooltip": "", + "group": "3fdb380f.aba898", + "order": 9, + "width": 0, + "height": 0, + "passthru": true, + "outs": "end", + "topic": "/frequency", + "topicType": "str", + "min": "40", + "max": "55", + "step": "0.1", + "className": "", + "x": 270, + "y": 2020, "wires": [ [ - "7e5d3fc0.81f4f8" + "bd2575a0.0cbce" ] ] }, { - "id": "426f1381e1bed357", - "type": "link in", + "id": "4ea0f783b9ca324e", + "type": "inject", "z": "92165c72.a5f948", - "g": "3e039a5092696f5f", - "name": "Out OpenWB", - "links": [ - "0b69966b365c4536", - "e6650f13b3cc695a", - "ab6610e58dd3eb1c", - "cde7317bc368b6b3", - "9605f30870c8aa1a", - "7a4711d4a689d6d4" + "g": "adca6b9d.7ef678", + "name": "50Hz", + "props": [ + { + "p": "payload" + }, + { + "p": "topic", + "vt": "str" + } ], - "x": 775, - "y": 60, + "repeat": "", + "crontab": "", + "once": true, + "onceDelay": "1", + "topic": "/frequency", + "payload": "50", + "payloadType": "num", + "x": 110, + "y": 2480, "wires": [ [ - "529ef24e.47a72c" + "fd0bd4a773502e77" ] ] }, { - "id": "e6650f13b3cc695a", - "type": "link out", + "id": "fd0bd4a773502e77", + "type": "ui_slider", "z": "92165c72.a5f948", - "g": "10c935e7.d81c6a", - "name": "LP1 Out OpenWB", - "mode": "link", - "links": [ - "426f1381e1bed357" - ], - "x": 955, - "y": 1280, - "wires": [] + "g": "adca6b9d.7ef678", + "name": "LP3 Netzfrequenz", + "label": "Netzfrequenz", + "tooltip": "", + "group": "77ebf297.439d3c", + "order": 9, + "width": 0, + "height": 0, + "passthru": true, + "outs": "end", + "topic": "/frequency", + "topicType": "str", + "min": "40", + "max": "55", + "step": "0.1", + "className": "", + "x": 270, + "y": 2480, + "wires": [ + [ + "7e5d3fc0.81f4f8" + ] + ] }, { - "id": "0b69966b365c4536", - "type": "link out", - "z": "92165c72.a5f948", - "g": "4ffeb8f2.88e97", - "name": "LP2 Out OpenWB", - "mode": "link", - "links": [ - "426f1381e1bed357" - ], - "x": 955, - "y": 1740, - "wires": [] + "id": "d81e2c4a9ea1ce1d", + "type": "mqtt in", + "z": "92165c72.a5f948", + "g": "3e039a5092696f5f", + "name": "", + "topic": "openWB/mqtt/bat/+/set/power_limit", + "qos": "0", + "datatype": "json", + "broker": "5c48b79a.d6b918", + "nl": false, + "rap": false, + "inputs": 0, + "x": 200, + "y": 180, + "wires": [ + [ + "b05ac649dc15c76c" + ] + ] }, { - "id": "ab6610e58dd3eb1c", + "id": "b05ac649dc15c76c", "type": "link out", "z": "92165c72.a5f948", - "g": "adca6b9d.7ef678", - "name": "LP3 Out OpenWB", + "g": "3e039a5092696f5f", + "name": "Set Bat", "mode": "link", "links": [ - "426f1381e1bed357" + "cf0bcd92.6fbe48" ], - "x": 955, - "y": 2200, + "x": 495, + "y": 180, "wires": [] }, { - "id": "8c206019dae8c4f0", + "id": "426f7138f5a76fbd", "type": "ui_text", "z": "92165c72.a5f948", - "g": "10c935e7.d81c6a", - "group": "703fdeb2.7ab84", - "order": 9, + "g": "c8376289.15bc1", + "group": "bda74558.0d74e8", + "order": 4, "width": 0, "height": 0, "name": "", - "label": "Lp1 Ströme", - "format": "{{msg.payload[0] | number:2}} / {{msg.payload[1] | number:2}} / {{msg.payload[2] | number:2}}", + "label": "dyn. Limit", + "format": "{{payload}}", "layout": "row-spread", "className": "", - "x": 1010, - "y": 1480, + "x": 800, + "y": 1280, "wires": [] }, { - "id": "25f6934e60f9b4d6", - "type": "ui_text", + "id": "f79cda2c7665fad2", + "type": "change", "z": "92165c72.a5f948", - "g": "4ffeb8f2.88e97", - "group": "3fdb380f.aba898", - "order": 9, - "width": 0, - "height": 0, + "g": "c8376289.15bc1", "name": "", - "label": "Lp2 Ströme", - "format": "{{msg.payload[0] | number:2}} / {{msg.payload[1] | number:2}} / {{msg.payload[2] | number:2}}", - "layout": "row-spread", - "className": "", - "x": 1010, - "y": 1940, - "wires": [] + "rules": [ + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "payload = null ? \"- kW\" : $formatNumber(payload / 1000, \"0.000 kW\")\t", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 610, + "y": 1280, + "wires": [ + [ + "426f7138f5a76fbd" + ] + ] }, { - "id": "0a303aeb4727c810", + "id": "f6984bc71f81fea2", "type": "ui_text", "z": "92165c72.a5f948", - "g": "adca6b9d.7ef678", - "group": "77ebf297.439d3c", - "order": 9, + "g": "3444dcfc9d2aa675", + "group": "0360fe6d7d9bc018", + "order": 2, "width": 0, "height": 0, - "name": "", - "label": "Lp3 Ströme", - "format": "{{msg.payload[0] | number:2}} / {{msg.payload[1] | number:2}} / {{msg.payload[2] | number:2}}", + "name": "Verbraucher 4 Soll-Leistung", + "label": "Soll-Leistung", + "format": "{{msg.payload}} W", "layout": "row-spread", "className": "", - "x": 1010, - "y": 2400, + "x": 1060, + "y": 3000, "wires": [] }, { - "id": "44f4fcadd171fe6d", - "type": "switch", + "id": "cd21d82c8438791e", + "type": "ui_dropdown", "z": "92165c72.a5f948", - "g": "10c935e7.d81c6a", - "name": "", - "property": "topic", - "propertyType": "msg", - "rules": [ + "g": "3444dcfc9d2aa675", + "name": "Phasen", + "label": "Phasen", + "tooltip": "", + "place": "Select option", + "group": "0360fe6d7d9bc018", + "order": 8, + "width": 0, + "height": 0, + "passthru": false, + "multiple": false, + "options": [ { - "t": "regex", - "v": "\\/max_phases$", - "vt": "str", - "case": false + "label": "1 Phase", + "value": 1, + "type": "num" }, { - "t": "regex", - "v": "\\/plug_state$", - "vt": "str", - "case": false + "label": "2 Phasen", + "value": 2, + "type": "num" }, { - "t": "regex", - "v": "\\/current$", - "vt": "str", - "case": false + "label": "3 Phasen", + "value": 3, + "type": "num" + } + ], + "payload": "", + "topic": "/max_phases", + "topicType": "str", + "className": "", + "x": 500, + "y": 2940, + "wires": [ + [ + "1d10f97883bb139a" + ] + ] + }, + { + "id": "da3b73029a8aecc5", + "type": "inject", + "z": "92165c72.a5f948", + "g": "3444dcfc9d2aa675", + "name": "angeschlossene Phasen", + "props": [ + { + "p": "payload" }, { - "t": "regex", - "v": "\\/phases_to_use$", - "vt": "str", - "case": false + "p": "topic", + "vt": "str" } ], - "checkall": "true", - "repair": false, - "outputs": 4, - "x": 370, - "y": 1500, + "repeat": "", + "crontab": "", + "once": true, + "onceDelay": "1", + "topic": "/max_phases", + "payload": "1", + "payloadType": "num", + "x": 170, + "y": 2860, "wires": [ [ - "66502428.6bc2ec" - ], - [ - "4efd69fa.600b1" - ], - [ - "b4c0b8e7.95301" - ], - [ - "aa2ce19d.eaf1e8" + "1d10f97883bb139a" ] + ] + }, + { + "id": "2f8a6b8232b5e44b", + "type": "ui_gauge", + "z": "92165c72.a5f948", + "g": "3444dcfc9d2aa675", + "name": "Verbraucher 4 Leistung", + "group": "0360fe6d7d9bc018", + "order": 5, + "width": 0, + "height": 0, + "gtype": "gage", + "title": "Leistung", + "label": "kW", + "format": "{{value/1000 | number:2}}", + "min": 0, + "max": "22080", + "colors": [ + "#00b500", + "#00ff00", + "#00b500" ], - "outputLabels": [ - "", - "", - "Sollstrom", - "Sollphasen" + "seg1": "4140", + "seg2": "7360", + "className": "", + "x": 1050, + "y": 2920, + "wires": [] + }, + { + "id": "197ed74550f85c9d", + "type": "ui_text", + "z": "92165c72.a5f948", + "g": "3444dcfc9d2aa675", + "group": "0360fe6d7d9bc018", + "order": 6, + "width": 0, + "height": 0, + "name": "Verbraucher 4 Zähler Ladung", + "label": "Zählerstand laden", + "format": "{{value/1000 | number:3}} kWh", + "layout": "row-spread", + "className": "", + "x": 1060, + "y": 2880, + "wires": [] + }, + { + "id": "5ffbd11579ac50d7", + "type": "link out", + "z": "92165c72.a5f948", + "g": "3444dcfc9d2aa675", + "name": "Consumer 4 out", + "mode": "link", + "links": [ + "3e1bb28f.704a8e" + ], + "x": 835, + "y": 2840, + "wires": [] + }, + { + "id": "cf3743e585085543", + "type": "link in", + "z": "92165c72.a5f948", + "g": "3444dcfc9d2aa675", + "name": "Consumer4 Set", + "links": [ + "893e8cb8939049e1" + ], + "x": 155, + "y": 2800, + "wires": [ + [ + "1d10f97883bb139a" + ] ] }, { - "id": "5316d2315b34de5a", + "id": "baf911e204a9816b", + "type": "link out", + "z": "92165c72.a5f948", + "g": "3444dcfc9d2aa675", + "name": "Consumer 4 Out OpenWB", + "mode": "link", + "links": [ + "426f1381e1bed357" + ], + "x": 955, + "y": 2840, + "wires": [] + }, + { + "id": "b6b215bf96743aea", "type": "switch", "z": "92165c72.a5f948", - "g": "4ffeb8f2.88e97", + "g": "3444dcfc9d2aa675", "name": "", "property": "topic", "propertyType": "msg", "rules": [ { "t": "regex", - "v": "\\/max_phases$", - "vt": "str", - "case": false - }, - { - "t": "regex", - "v": "\\/plug_state$", + "v": "\\/get\\/imported$", "vt": "str", "case": false }, { "t": "regex", - "v": "\\/current$", + "v": "\\/get\\/power$", "vt": "str", "case": false }, { "t": "regex", - "v": "\\/phases_to_use$", + "v": "\\/get\\/currents$", "vt": "str", "case": false } ], "checkall": "true", "repair": false, - "outputs": 4, - "x": 370, - "y": 1960, + "outputs": 3, + "x": 810, + "y": 2900, "wires": [ [ - "30584a7c.88a996" - ], - [ - "ea8feee.389911" + "197ed74550f85c9d" ], [ - "9e477905.67cf68" + "2f8a6b8232b5e44b" ], [ - "f3d097a6.b80d18" + "e89a3cfb4a4c3fd5" ] ], "outputLabels": [ - "", - "", - "Sollstrom", - "Sollphasen" + "Zählerstand laden", + "Leistung", + "Ströme" ] }, { - "id": "61501fd2e18b0ed9", + "id": "8479e1c35f076052", + "type": "debug", + "z": "92165c72.a5f948", + "g": "3444dcfc9d2aa675", + "name": "", + "active": false, + "tosidebar": true, + "console": false, + "tostatus": false, + "complete": "false", + "statusVal": "", + "statusType": "auto", + "x": 1010, + "y": 2800, + "wires": [] + }, + { + "id": "e89a3cfb4a4c3fd5", + "type": "ui_text", + "z": "92165c72.a5f948", + "g": "3444dcfc9d2aa675", + "group": "0360fe6d7d9bc018", + "order": 9, + "width": 0, + "height": 0, + "name": "", + "label": "Ströme", + "format": "{{msg.payload[0] | number:2}} / {{msg.payload[1] | number:2}} / {{msg.payload[2] | number:2}}", + "layout": "row-spread", + "className": "", + "x": 1000, + "y": 2960, + "wires": [] + }, + { + "id": "c9c4291fce70b5e3", "type": "switch", "z": "92165c72.a5f948", - "g": "adca6b9d.7ef678", + "g": "3444dcfc9d2aa675", "name": "", "property": "topic", "propertyType": "msg", @@ -6941,259 +10372,151 @@ }, { "t": "regex", - "v": "\\/plug_state$", - "vt": "str", - "case": false - }, - { - "t": "regex", - "v": "\\/current$", - "vt": "str", - "case": false - }, - { - "t": "regex", - "v": "\\/phases_to_use$", + "v": "\\/set\\/power$", "vt": "str", "case": false } ], "checkall": "true", "repair": false, - "outputs": 4, - "x": 370, - "y": 2420, + "outputs": 2, + "x": 350, + "y": 2960, "wires": [ [ - "db2cd204.7325b8" - ], - [ - "bb9a80f3.6ed8d" - ], - [ - "f63b330f.c096e" + "cd21d82c8438791e" ], [ - "b2b4e4a9.e78cd8" + "f6984bc71f81fea2" ] ], "outputLabels": [ "", - "", - "Sollstrom", - "Sollphasen" + "Sollstrom" ] }, { - "id": "524bd7697f7a306c", - "type": "ui_text", + "id": "1d10f97883bb139a", + "type": "subflow:052d304dc9163933", "z": "92165c72.a5f948", - "g": "ba86e05e.3eb518", - "group": "9b18f281.ca979", - "order": 8, - "width": 0, - "height": 0, + "g": "3444dcfc9d2aa675", "name": "", - "label": "EVU Ströme", - "format": "{{msg.payload[0] | number:2}} / {{msg.payload[1] | number:2}} / {{msg.payload[2] | number:2}}", - "layout": "row-spread", - "className": "", - "x": 970, - "y": 500, - "wires": [] - }, - { - "id": "cde7317bc368b6b3", - "type": "link out", - "z": "92165c72.a5f948", - "g": "ba86e05e.3eb518", - "name": "EVU Out OpenWB", - "mode": "link", - "links": [ - "426f1381e1bed357" - ], - "x": 915, - "y": 340, - "wires": [] - }, - { - "id": "9605f30870c8aa1a", - "type": "link out", - "z": "92165c72.a5f948", - "g": "9924f98f.a9ee4", - "name": "PV1 Out OpenWB", - "mode": "link", - "links": [ - "426f1381e1bed357" - ], - "x": 915, - "y": 660, - "wires": [] - }, - { - "id": "7a4711d4a689d6d4", - "type": "link out", - "z": "92165c72.a5f948", - "g": "c8376289.15bc1", - "name": "Bat Out OpenWB", - "mode": "link", - "links": [ - "426f1381e1bed357" + "env": [ + { + "name": "Component-ID", + "value": "6", + "type": "num" + }, + { + "name": "Verbraucher-ID", + "value": "4", + "type": "str" + } ], - "x": 915, - "y": 900, - "wires": [] - }, - { - "id": "dc8f75f240dcf3b8", - "type": "ui_slider", - "z": "92165c72.a5f948", - "g": "ba86e05e.3eb518", - "name": "", - "label": "Hausverbrauch L1", - "tooltip": "", - "group": "9b18f281.ca979", - "order": 2, - "width": 0, - "height": 0, - "passthru": true, - "outs": "end", - "topic": "/Hausverbrauch_p1", - "topicType": "str", - "min": 0, - "max": "10000", - "step": "50", - "className": "", - "x": 370, - "y": 380, + "x": 580, + "y": 2800, "wires": [ [ - "90812723.7b3678" - ] - ] - }, - { - "id": "80ec81072842f306", - "type": "ui_slider", - "z": "92165c72.a5f948", - "g": "ba86e05e.3eb518", - "name": "", - "label": "Hausverbrauch L2", - "tooltip": "", - "group": "9b18f281.ca979", - "order": 3, - "width": 0, - "height": 0, - "passthru": true, - "outs": "end", - "topic": "/Hausverbrauch_p2", - "topicType": "str", - "min": 0, - "max": "10000", - "step": "50", - "className": "", - "x": 370, - "y": 420, - "wires": [ + "8479e1c35f076052", + "baf911e204a9816b", + "b6b215bf96743aea" + ], [ - "90812723.7b3678" - ] + "5ffbd11579ac50d7" + ], + [ + "c9c4291fce70b5e3" + ], + [] ] }, { - "id": "7e693d583a244143", - "type": "ui_slider", + "id": "44c4f45ac0baaebf", + "type": "mqtt in", "z": "92165c72.a5f948", - "g": "ba86e05e.3eb518", + "g": "3e039a5092696f5f", "name": "", - "label": "Hausverbrauch L3", - "tooltip": "", - "group": "9b18f281.ca979", - "order": 4, - "width": 0, - "height": 0, - "passthru": true, - "outs": "end", - "topic": "/Hausverbrauch_p3", - "topicType": "str", - "min": 0, - "max": "10000", - "step": "50", - "className": "", - "x": 370, - "y": 460, + "topic": "openWB/mqtt/consumer/+/set/power", + "qos": "0", + "datatype": "json", + "broker": "5c48b79a.d6b918", + "nl": false, + "rap": true, + "rh": 0, + "inputs": 0, + "x": 210, + "y": 240, "wires": [ [ - "90812723.7b3678" + "893e8cb8939049e1" ] ] }, { - "id": "50edc6fb6d78740a", - "type": "inject", - "z": "92165c72.a5f948", - "g": "ba86e05e.3eb518", - "name": "150 W", - "props": [ - { - "p": "payload" - }, - { - "p": "topic", - "vt": "str" - } - ], - "repeat": "", - "crontab": "", - "once": true, - "onceDelay": "1", - "topic": "/Hausverbrauch_p1", - "payload": "150", - "payloadType": "num", - "x": 110, - "y": 380, - "wires": [ - [ - "dc8f75f240dcf3b8" - ] - ] + "id": "893e8cb8939049e1", + "type": "link out", + "z": "92165c72.a5f948", + "g": "3e039a5092696f5f", + "name": "Consumer set power limit", + "mode": "link", + "links": [ + "cf3743e585085543", + "838438ec9c35e07b" + ], + "x": 495, + "y": 240, + "wires": [] }, { - "id": "9145b76c44a9c929", - "type": "inject", + "id": "ff5dd392f78b2d8f", + "type": "ui_dropdown", "z": "92165c72.a5f948", - "g": "ba86e05e.3eb518", - "name": "150 W", - "props": [ + "g": "52f077e1e1db7ab5", + "name": "Phasen", + "label": "Phasen", + "tooltip": "", + "place": "Select option", + "group": "0757fad41b9a9fcd", + "order": 8, + "width": 0, + "height": 0, + "passthru": false, + "multiple": false, + "options": [ { - "p": "payload" + "label": "1 Phase", + "value": 1, + "type": "num" }, { - "p": "topic", - "vt": "str" + "label": "2 Phasen", + "value": 2, + "type": "num" + }, + { + "label": "3 Phasen", + "value": 3, + "type": "num" } ], - "repeat": "", - "crontab": "", - "once": true, - "onceDelay": "1", - "topic": "/Hausverbrauch_p2", - "payload": "150", - "payloadType": "num", - "x": 110, - "y": 420, + "payload": "", + "topic": "/max_phases", + "topicType": "str", + "className": "", + "x": 600, + "y": 3300, "wires": [ [ - "80ec81072842f306" + "9c32231b50f615ef" ] ] }, { - "id": "3d8e2d3b4ee89e76", + "id": "81ab1a3af019de85", "type": "inject", "z": "92165c72.a5f948", - "g": "ba86e05e.3eb518", - "name": "150 W", + "g": "52f077e1e1db7ab5", + "name": "angeschlossene Phasen", "props": [ { "p": "payload" @@ -7207,428 +10530,390 @@ "crontab": "", "once": true, "onceDelay": "1", - "topic": "/Hausverbrauch_p3", - "payload": "150", + "topic": "/max_phases", + "payload": "1", "payloadType": "num", - "x": 110, - "y": 460, + "x": 170, + "y": 3200, "wires": [ [ - "7e693d583a244143" + "9c32231b50f615ef" ] ] }, { - "id": "3c77c4ed766b07a5", - "type": "ui_text", + "id": "ef0b4f386d197401", + "type": "ui_gauge", "z": "92165c72.a5f948", - "g": "10c935e7.d81c6a", - "group": "703fdeb2.7ab84", - "order": 6, + "g": "52f077e1e1db7ab5", + "name": "Verbraucher 5 Leistung", + "group": "0757fad41b9a9fcd", + "order": 5, "width": 0, "height": 0, - "name": "Lp1 Zähler Entladung", - "label": "Zählerstand entladen", - "format": "{{value/1000 | number:3}} kWh", - "layout": "row-spread", + "gtype": "gage", + "title": "Leistung", + "label": "kW", + "format": "{{value/1000 | number:2}}", + "min": 0, + "max": "22080", + "colors": [ + "#00b500", + "#00ff00", + "#00b500" + ], + "seg1": "4140", + "seg2": "7360", "className": "", - "x": 1040, - "y": 1360, + "x": 1050, + "y": 3260, "wires": [] }, { - "id": "cbdca721f944522a", + "id": "74b0bdb72a62f98b", "type": "ui_text", "z": "92165c72.a5f948", - "g": "4ffeb8f2.88e97", - "group": "3fdb380f.aba898", + "g": "52f077e1e1db7ab5", + "group": "0757fad41b9a9fcd", "order": 6, "width": 0, "height": 0, - "name": "Lp2 Zähler Entladung", - "label": "Zählerstand entladen", + "name": "Verbraucher 5 Zähler Ladung", + "label": "Zählerstand laden", "format": "{{value/1000 | number:3}} kWh", "layout": "row-spread", "className": "", - "x": 1040, - "y": 1820, + "x": 1060, + "y": 3220, "wires": [] }, { - "id": "2397a2d2e13d5c0a", - "type": "ui_text", + "id": "87f445e673cc518d", + "type": "link out", "z": "92165c72.a5f948", - "g": "adca6b9d.7ef678", - "group": "77ebf297.439d3c", - "order": 6, - "width": 0, - "height": 0, - "name": "Lp3 Zähler Entladung", - "label": "Zählerstand entladen", - "format": "{{value/1000 | number:3}} kWh", - "layout": "row-spread", - "className": "", - "x": 1040, - "y": 2280, + "g": "52f077e1e1db7ab5", + "name": "Consumer 4 out", + "mode": "link", + "links": [ + "3e1bb28f.704a8e" + ], + "x": 835, + "y": 3180, "wires": [] }, { - "id": "ac0a42a5e9a6a1d8", - "type": "inject", + "id": "838438ec9c35e07b", + "type": "link in", "z": "92165c72.a5f948", - "g": "10c935e7.d81c6a", - "name": "50Hz", - "props": [ - { - "p": "payload" - }, - { - "p": "topic", - "vt": "str" - } + "g": "52f077e1e1db7ab5", + "name": "Consumer4 Set", + "links": [ + "893e8cb8939049e1", + "74218e8a39137399" ], - "repeat": "", - "crontab": "", - "once": true, - "onceDelay": "1", - "topic": "/frequency", - "payload": "50", - "payloadType": "num", - "x": 110, - "y": 1380, + "x": 155, + "y": 3140, "wires": [ [ - "dab0d3d1144c2cc4" + "9c32231b50f615ef" ] ] }, { - "id": "dab0d3d1144c2cc4", - "type": "ui_slider", + "id": "d3d2fcdd8e890908", + "type": "link out", "z": "92165c72.a5f948", - "g": "10c935e7.d81c6a", - "name": "LP1 Netzfrequenz", - "label": "Netzfrequenz", - "tooltip": "", - "group": "703fdeb2.7ab84", - "order": 9, - "width": 0, - "height": 0, - "passthru": true, - "outs": "end", - "topic": "/frequency", - "topicType": "str", - "min": "40", - "max": "55", - "step": "0.1", - "className": "", - "x": 290, - "y": 1380, - "wires": [ - [ - "bca07e3a.16ff08" - ] - ] + "g": "52f077e1e1db7ab5", + "name": "Consumer 4 Out OpenWB", + "mode": "link", + "links": [ + "426f1381e1bed357" + ], + "x": 955, + "y": 3180, + "wires": [] }, { - "id": "e648cfa22c2cd2ec", - "type": "inject", + "id": "6942229fffd2fd78", + "type": "switch", "z": "92165c72.a5f948", - "g": "4ffeb8f2.88e97", - "name": "50Hz", - "props": [ + "g": "52f077e1e1db7ab5", + "name": "", + "property": "topic", + "propertyType": "msg", + "rules": [ { - "p": "payload" + "t": "regex", + "v": "\\/get\\/imported$", + "vt": "str", + "case": false }, { - "p": "topic", - "vt": "str" + "t": "regex", + "v": "\\/get\\/power$", + "vt": "str", + "case": false + }, + { + "t": "regex", + "v": "\\/get\\/currents$", + "vt": "str", + "case": false } ], - "repeat": "", - "crontab": "", - "once": true, - "onceDelay": "1", - "topic": "/frequency", - "payload": "50", - "payloadType": "num", - "x": 110, - "y": 1840, + "checkall": "true", + "repair": false, + "outputs": 3, + "x": 810, + "y": 3240, "wires": [ [ - "347e9bc401e0eddd" + "74b0bdb72a62f98b" + ], + [ + "ef0b4f386d197401" + ], + [ + "c60d53f962472948" ] + ], + "outputLabels": [ + "Zählerstand laden", + "Leistung", + "Ströme" ] }, { - "id": "347e9bc401e0eddd", - "type": "ui_slider", + "id": "35c18cbd1d408e5f", + "type": "debug", "z": "92165c72.a5f948", - "g": "4ffeb8f2.88e97", - "name": "LP2 Netzfrequenz", - "label": "Netzfrequenz", - "tooltip": "", - "group": "3fdb380f.aba898", + "g": "52f077e1e1db7ab5", + "name": "", + "active": false, + "tosidebar": true, + "console": false, + "tostatus": false, + "complete": "false", + "statusVal": "", + "statusType": "auto", + "x": 1010, + "y": 3140, + "wires": [] + }, + { + "id": "c60d53f962472948", + "type": "ui_text", + "z": "92165c72.a5f948", + "g": "52f077e1e1db7ab5", + "group": "0757fad41b9a9fcd", "order": 9, "width": 0, "height": 0, - "passthru": true, - "outs": "end", - "topic": "/frequency", - "topicType": "str", - "min": "40", - "max": "55", - "step": "0.1", + "name": "", + "label": "Ströme", + "format": "{{msg.payload[0] | number:2}} / {{msg.payload[1] | number:2}} / {{msg.payload[2] | number:2}}", + "layout": "row-spread", "className": "", - "x": 270, - "y": 1840, - "wires": [ - [ - "bd2575a0.0cbce" - ] - ] + "x": 1000, + "y": 3300, + "wires": [] }, { - "id": "4ea0f783b9ca324e", - "type": "inject", + "id": "8c58f3c90106e5a2", + "type": "switch", "z": "92165c72.a5f948", - "g": "adca6b9d.7ef678", - "name": "50Hz", - "props": [ + "g": "52f077e1e1db7ab5", + "name": "", + "property": "topic", + "propertyType": "msg", + "rules": [ { - "p": "payload" + "t": "regex", + "v": "\\/max_phases$", + "vt": "str", + "case": false }, { - "p": "topic", - "vt": "str" + "t": "regex", + "v": "\\/set\\/power$", + "vt": "str", + "case": false + }, + { + "t": "regex", + "v": "\\/min_current$", + "vt": "str", + "case": false } ], - "repeat": "", - "crontab": "", - "once": true, - "onceDelay": "1", - "topic": "/frequency", - "payload": "50", - "payloadType": "num", - "x": 110, - "y": 2300, + "checkall": "true", + "repair": false, + "outputs": 3, + "x": 410, + "y": 3320, "wires": [ [ - "fd0bd4a773502e77" + "ff5dd392f78b2d8f" + ], + [ + "46dc9a5ce83fdf2d" + ], + [ + "eb6fe5a064b91460" ] + ], + "outputLabels": [ + "", + "Sollstrom", + "" ] }, { - "id": "fd0bd4a773502e77", - "type": "ui_slider", + "id": "9c32231b50f615ef", + "type": "subflow:a9e11c55be21f50a", "z": "92165c72.a5f948", - "g": "adca6b9d.7ef678", - "name": "LP3 Netzfrequenz", - "label": "Netzfrequenz", - "tooltip": "", - "group": "77ebf297.439d3c", - "order": 9, - "width": 0, - "height": 0, - "passthru": true, - "outs": "end", - "topic": "/frequency", - "topicType": "str", - "min": "40", - "max": "55", - "step": "0.1", - "className": "", - "x": 270, - "y": 2300, + "g": "52f077e1e1db7ab5", + "name": "", + "env": [ + { + "name": "Component-ID", + "value": "7", + "type": "str" + }, + { + "name": "Verbraucher-ID", + "value": "5", + "type": "str" + } + ], + "x": 540, + "y": 3160, "wires": [ [ - "7e5d3fc0.81f4f8" - ] + "35c18cbd1d408e5f", + "d3d2fcdd8e890908", + "6942229fffd2fd78" + ], + [ + "87f445e673cc518d" + ], + [ + "8c58f3c90106e5a2" + ], + [] ] }, { - "id": "d81e2c4a9ea1ce1d", + "id": "340744fb3ea1d989", "type": "mqtt in", "z": "92165c72.a5f948", "g": "3e039a5092696f5f", "name": "", - "topic": "openWB/mqtt/bat/+/set/power_limit", + "topic": "openWB/mqtt/consumer/+/set/switch", "qos": "0", "datatype": "json", "broker": "5c48b79a.d6b918", "nl": false, - "rap": false, + "rap": true, + "rh": 0, "inputs": 0, - "x": 170, - "y": 180, + "x": 210, + "y": 300, "wires": [ [ - "b05ac649dc15c76c" + "74218e8a39137399" ] ] }, { - "id": "b05ac649dc15c76c", + "id": "74218e8a39137399", "type": "link out", "z": "92165c72.a5f948", "g": "3e039a5092696f5f", - "name": "Set Bat", + "name": "link out 1", "mode": "link", "links": [ - "cf0bcd92.6fbe48" + "838438ec9c35e07b" ], - "x": 475, - "y": 180, + "x": 495, + "y": 300, "wires": [] }, { - "id": "426f7138f5a76fbd", + "id": "46dc9a5ce83fdf2d", "type": "ui_text", "z": "92165c72.a5f948", - "g": "c8376289.15bc1", - "group": "bda74558.0d74e8", - "order": 4, + "g": "52f077e1e1db7ab5", + "group": "0360fe6d7d9bc018", + "order": 2, "width": 0, "height": 0, - "name": "", - "label": "dyn. Limit", - "format": "{{payload}}", + "name": "Verbraucher 5 Aktiv", + "label": "", + "format": "{{msg.payload}} ", "layout": "row-spread", "className": "", - "x": 800, - "y": 1100, + "x": 1030, + "y": 3340, "wires": [] }, { - "id": "f79cda2c7665fad2", - "type": "change", + "id": "e1aa322b025a934d", + "type": "inject", "z": "92165c72.a5f948", - "g": "c8376289.15bc1", - "name": "", - "rules": [ + "g": "52f077e1e1db7ab5", + "name": "Min Betriebsstrom", + "props": [ { - "t": "set", - "p": "payload", - "pt": "msg", - "to": "payload = null ? \"- kW\" : $formatNumber(payload / 1000, \"0.000 kW\")\t", - "tot": "jsonata" + "p": "payload" + }, + { + "p": "topic", + "vt": "str" } ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 610, - "y": 1100, + "repeat": "", + "crontab": "", + "once": true, + "onceDelay": "1", + "topic": "/min_current", + "payload": "5", + "payloadType": "num", + "x": 150, + "y": 3260, "wires": [ [ - "426f7138f5a76fbd" + "9c32231b50f615ef" ] ] }, { - "id": "5c48b79a.d6b918", - "type": "mqtt-broker", - "name": "openWB-20", - "broker": "localhost", - "port": "1883", - "clientid": "node-red-simulator", - "autoConnect": true, - "usetls": false, - "compatmode": false, - "protocolVersion": "4", - "keepalive": "60", - "cleansession": true, - "autoUnsubscribe": true, - "birthTopic": "", - "birthQos": "0", - "birthPayload": "", - "birthMsg": {}, - "closeTopic": "", - "closeQos": "0", - "closePayload": "", - "closeMsg": {}, - "willTopic": "", - "willQos": "0", - "willPayload": "", - "willMsg": {}, - "userProps": "", - "sessionExpiry": "" - }, - { - "id": "703fdeb2.7ab84", - "type": "ui_group", - "name": "Lp 1", - "tab": "940b8055.1139f", + "id": "eb6fe5a064b91460", + "type": "ui_numeric", + "z": "92165c72.a5f948", + "g": "52f077e1e1db7ab5", + "name": "Min Betriebsstrom", + "label": "Min Betriebsstrom", + "tooltip": "", + "group": "0757fad41b9a9fcd", "order": 4, - "disp": true, - "width": "6", - "collapse": true, - "className": "" - }, - { - "id": "77ebf297.439d3c", - "type": "ui_group", - "name": "Lp 3", - "tab": "940b8055.1139f", - "order": 6, - "disp": true, - "width": "6", - "collapse": false, - "className": "" - }, - { - "id": "9b18f281.ca979", - "type": "ui_group", - "name": "EVU Zähler", - "tab": "940b8055.1139f", - "order": 1, - "disp": true, - "width": "6", - "collapse": false, - "className": "" - }, - { - "id": "bda74558.0d74e8", - "type": "ui_group", - "name": "Speicher 1", - "tab": "940b8055.1139f", - "order": 3, - "disp": true, - "width": "6", - "collapse": false, - "className": "" - }, - { - "id": "1690fa25.a7c9a6", - "type": "ui_group", - "name": "PV 1", - "tab": "940b8055.1139f", - "order": 2, - "disp": true, - "width": "6", - "collapse": false, - "className": "" - }, - { - "id": "3fdb380f.aba898", - "type": "ui_group", - "name": "Lp 2", - "tab": "940b8055.1139f", - "order": 5, - "disp": true, - "width": "6", - "collapse": false, - "className": "" - }, - { - "id": "940b8055.1139f", - "type": "ui_tab", - "name": "Simulator 2.0", - "icon": "fa-car ", - "order": 1, - "disabled": false, - "hidden": false + "width": 0, + "height": 0, + "wrap": false, + "passthru": false, + "topic": "/min_current", + "topicType": "str", + "format": "{{value}}", + "min": 0, + "max": 10, + "step": 1, + "className": "", + "x": 610, + "y": 3360, + "wires": [ + [ + "9c32231b50f615ef" + ] + ] } ]