Re: OpenWB als Wallbox ins die Victron-Welt einbinden
Verfasst: Mo Jan 30, 2023 7:31 am
Danke Dir für den Hinweis. Hast Du die Lösung denn so am laufen und könntest hier die notwendigen Anpassungen posten?
Die modulare Wallbox
https://forum.openwb.de/
Code: Alles auswählen
[
{
"id": "8fdecdeb81b71d1a",
"type": "tab",
"label": "OpenWB->EVCharger",
"disabled": false,
"info": "",
"env": []
},
{
"id": "28908042d1d38327",
"type": "group",
"z": "8fdecdeb81b71d1a",
"style": {
"stroke": "#999999",
"stroke-opacity": "1",
"fill": "none",
"fill-opacity": "1",
"label": true,
"label-position": "nw",
"color": "#a4a4a4"
},
"nodes": [
"e420e324306f563b",
"38154a7717fc52b7",
"f8bf19d81175b304",
"6a01d27bbccd3cf3",
"ccf8ff8d6f685b7e",
"be17803b661cc51a",
"b2ead156ac397da8",
"79e9327f1a38d7e6",
"7657252e806c9e76",
"8979393b44c7c2f2",
"21fc6dbf3302bdb6"
],
"x": 54,
"y": 1479,
"w": 812,
"h": 302
},
{
"id": "83f43cc6fda1c1f6",
"type": "mqtt in",
"z": "8fdecdeb81b71d1a",
"name": "",
"topic": "openWB/lp/1/VPhase1",
"qos": "2",
"datatype": "auto-detect",
"broker": "7a8eff5f12650455",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 160,
"y": 140,
"wires": [
[
"32448fe638132e49"
]
]
},
{
"id": "8596aa6147398073",
"type": "mqtt in",
"z": "8fdecdeb81b71d1a",
"name": "",
"topic": "openWB/lp/1/VPhase3",
"qos": "2",
"datatype": "auto-detect",
"broker": "7a8eff5f12650455",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 160,
"y": 340,
"wires": [
[
"a1fb636d3709c4f7"
]
]
},
{
"id": "7d853b2bcd6a3fcb",
"type": "mqtt in",
"z": "8fdecdeb81b71d1a",
"name": "",
"topic": "openWB/lp/1/VPhase2",
"qos": "2",
"datatype": "auto-detect",
"broker": "7a8eff5f12650455",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 160,
"y": 240,
"wires": [
[
"5c6a68b983289c4c"
]
]
},
{
"id": "6fbea3d4ddfacb65",
"type": "mqtt in",
"z": "8fdecdeb81b71d1a",
"name": "",
"topic": "openWB/lp/1/APhase1",
"qos": "2",
"datatype": "auto-detect",
"broker": "7a8eff5f12650455",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 160,
"y": 180,
"wires": [
[
"397fd160a7f9f0a2"
]
]
},
{
"id": "19d474d95b645a12",
"type": "mqtt in",
"z": "8fdecdeb81b71d1a",
"name": "",
"topic": "openWB/lp/1/APhase2",
"qos": "2",
"datatype": "auto-detect",
"broker": "7a8eff5f12650455",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 160,
"y": 280,
"wires": [
[
"a3d7e766a60a784b"
]
]
},
{
"id": "a482a75754d5b402",
"type": "mqtt in",
"z": "8fdecdeb81b71d1a",
"name": "",
"topic": "openWB/lp/1/APhase2",
"qos": "2",
"datatype": "auto-detect",
"broker": "7a8eff5f12650455",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 160,
"y": 380,
"wires": [
[
"b8373330b5d4cfd5"
]
]
},
{
"id": "1d2025f9cfb774a0",
"type": "mqtt in",
"z": "8fdecdeb81b71d1a",
"name": "",
"topic": "openWB/lp/1/W",
"qos": "2",
"datatype": "auto-detect",
"broker": "7a8eff5f12650455",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 140,
"y": 440,
"wires": [
[
"925fce28f660c3b5"
]
]
},
{
"id": "eb0984928a8fc539",
"type": "mqtt out",
"z": "8fdecdeb81b71d1a",
"name": "",
"topic": "W/<replacewithyourportalID>/evcharger/1/Current",
"qos": "",
"retain": "",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "47e105b96fc4cc38",
"x": 1090,
"y": 180,
"wires": []
},
{
"id": "b4be14652f6178e3",
"type": "mqtt in",
"z": "8fdecdeb81b71d1a",
"name": "",
"topic": "openWB/lp/1/ChargePointEnabled",
"qos": "2",
"datatype": "auto-detect",
"broker": "7a8eff5f12650455",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 200,
"y": 1020,
"wires": [
[
"33f8ea29722d734b"
]
]
},
{
"id": "e420e324306f563b",
"type": "inject",
"z": "8fdecdeb81b71d1a",
"g": "28908042d1d38327",
"name": "Disconnect EVCharger 1 from DBUS",
"props": [
{
"p": "payload"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "{\"clientId\": \"fe001\", \"connected\": 0, \"version\": \"1.9.x\", \"services\": {\"ev1\": \"evcharger\"}}",
"payloadType": "json",
"x": 240,
"y": 1560,
"wires": [
[
"7657252e806c9e76",
"21fc6dbf3302bdb6"
]
]
},
{
"id": "eca67796b164d194",
"type": "function",
"z": "8fdecdeb81b71d1a",
"name": "number to object",
"func": "var payl={value:msg.payload}\nmsg.payload=payl\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 810,
"y": 180,
"wires": [
[
"eb0984928a8fc539"
]
]
},
{
"id": "5c6a68b983289c4c",
"type": "change",
"z": "8fdecdeb81b71d1a",
"name": "",
"rules": [
{
"t": "set",
"p": "VPhase2",
"pt": "flow",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 390,
"y": 240,
"wires": [
[
"4c67dfaf5415801a"
]
]
},
{
"id": "32448fe638132e49",
"type": "change",
"z": "8fdecdeb81b71d1a",
"name": "",
"rules": [
{
"t": "set",
"p": "VPhase1",
"pt": "flow",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 390,
"y": 140,
"wires": [
[
"7eb12473cb27107c"
]
]
},
{
"id": "a1fb636d3709c4f7",
"type": "change",
"z": "8fdecdeb81b71d1a",
"name": "",
"rules": [
{
"t": "set",
"p": "VPhase3",
"pt": "flow",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 390,
"y": 340,
"wires": [
[
"760859c985699761"
]
]
},
{
"id": "397fd160a7f9f0a2",
"type": "change",
"z": "8fdecdeb81b71d1a",
"name": "",
"rules": [
{
"t": "set",
"p": "APhase1",
"pt": "flow",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 390,
"y": 180,
"wires": [
[
"eca67796b164d194",
"7eb12473cb27107c"
]
]
},
{
"id": "a3d7e766a60a784b",
"type": "change",
"z": "8fdecdeb81b71d1a",
"name": "",
"rules": [
{
"t": "set",
"p": "APhase2",
"pt": "flow",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 390,
"y": 280,
"wires": [
[
"4c67dfaf5415801a"
]
]
},
{
"id": "b8373330b5d4cfd5",
"type": "change",
"z": "8fdecdeb81b71d1a",
"name": "",
"rules": [
{
"t": "set",
"p": "APhase3",
"pt": "flow",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 390,
"y": 380,
"wires": [
[
"760859c985699761"
]
]
},
{
"id": "760859c985699761",
"type": "function",
"z": "8fdecdeb81b71d1a",
"name": "calc. PPhase3",
"func": "var VPhase3 = flow.get(\"VPhase3\")\nvar APhase3 = flow.get(\"APhase3\")\nmsg.payload = VPhase3*APhase3\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 600,
"y": 340,
"wires": [
[
"db5ca3889bf9d40a"
]
]
},
{
"id": "4c67dfaf5415801a",
"type": "function",
"z": "8fdecdeb81b71d1a",
"name": "calc. PPhase2",
"func": "var VPhase2 = flow.get(\"VPhase2\")\nvar APhase2 = flow.get(\"APhase2\")\nmsg.payload = VPhase2*APhase2\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 600,
"y": 240,
"wires": [
[
"0c2cf3922e7c9c67"
]
]
},
{
"id": "7eb12473cb27107c",
"type": "function",
"z": "8fdecdeb81b71d1a",
"name": "calc. PPhase1",
"func": "var VPhase1 = flow.get(\"VPhase1\")\nvar APhase1 = flow.get(\"APhase1\")\nmsg.payload = VPhase1*APhase1\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 600,
"y": 140,
"wires": [
[
"6a8cdc6a201ce09f"
]
]
},
{
"id": "8bd1c21b40cb86be",
"type": "mqtt out",
"z": "8fdecdeb81b71d1a",
"name": "",
"topic": "W/<replacewithyourportalID>/evcharger/1/Ac/L1/Power",
"qos": "",
"retain": "",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "47e105b96fc4cc38",
"x": 1110,
"y": 140,
"wires": []
},
{
"id": "6a8cdc6a201ce09f",
"type": "function",
"z": "8fdecdeb81b71d1a",
"name": "number to object",
"func": "var payl={value:msg.payload}\nmsg.payload=payl\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 810,
"y": 140,
"wires": [
[
"8bd1c21b40cb86be"
]
]
},
{
"id": "3f09298f502c8ae7",
"type": "mqtt out",
"z": "8fdecdeb81b71d1a",
"name": "",
"topic": "W/<replacewithyourportalID>/evcharger/1/Ac/L2/Power",
"qos": "",
"retain": "",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "47e105b96fc4cc38",
"x": 1110,
"y": 240,
"wires": []
},
{
"id": "0c2cf3922e7c9c67",
"type": "function",
"z": "8fdecdeb81b71d1a",
"name": "number to object",
"func": "var payl={value:msg.payload}\nmsg.payload=payl\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 810,
"y": 240,
"wires": [
[
"3f09298f502c8ae7"
]
]
},
{
"id": "b9f8bf9f2c3590e1",
"type": "mqtt out",
"z": "8fdecdeb81b71d1a",
"name": "",
"topic": "W/<replacewithyourportalID>/evcharger/1/Ac/L3/Power",
"qos": "",
"retain": "",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "47e105b96fc4cc38",
"x": 1110,
"y": 340,
"wires": []
},
{
"id": "db5ca3889bf9d40a",
"type": "function",
"z": "8fdecdeb81b71d1a",
"name": "number to object",
"func": "var payl={value:msg.payload}\nmsg.payload=payl\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 810,
"y": 340,
"wires": [
[
"b9f8bf9f2c3590e1"
]
]
},
{
"id": "925fce28f660c3b5",
"type": "function",
"z": "8fdecdeb81b71d1a",
"name": "number to object",
"func": "var payl={value:msg.payload}\nmsg.payload=payl\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 810,
"y": 440,
"wires": [
[
"fc969ba5f62dc8fe"
]
]
},
{
"id": "fc969ba5f62dc8fe",
"type": "mqtt out",
"z": "8fdecdeb81b71d1a",
"name": "",
"topic": "W/<replacewithyourportalID>/evcharger/1/Ac/Power",
"qos": "0",
"retain": "",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "47e105b96fc4cc38",
"x": 1100,
"y": 440,
"wires": []
},
{
"id": "73cccca2fbc087fa",
"type": "mqtt out",
"z": "8fdecdeb81b71d1a",
"name": "",
"topic": "W/<replacewithyourportalID>/evcharger/1/Status",
"qos": "0",
"retain": "",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "47e105b96fc4cc38",
"x": 1090,
"y": 1120,
"wires": []
},
{
"id": "2e37203bb3b0b269",
"type": "function",
"z": "8fdecdeb81b71d1a",
"name": "number to object",
"func": "var payl={value:msg.payload}\nmsg.payload=payl\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 830,
"y": 1020,
"wires": [
[]
]
},
{
"id": "38154a7717fc52b7",
"type": "mqtt in",
"z": "8fdecdeb81b71d1a",
"g": "28908042d1d38327",
"name": "",
"topic": "openWB/system/Version",
"qos": "2",
"datatype": "auto-detect",
"broker": "7a8eff5f12650455",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 190,
"y": 1740,
"wires": [
[
"6a01d27bbccd3cf3"
]
]
},
{
"id": "f8bf19d81175b304",
"type": "mqtt out",
"z": "8fdecdeb81b71d1a",
"g": "28908042d1d38327",
"name": "",
"topic": "W/<replacewithyourportalID>/evcharger/1/FirmwareVersion",
"qos": "0",
"retain": "",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "47e105b96fc4cc38",
"x": 660,
"y": 1740,
"wires": []
},
{
"id": "6a01d27bbccd3cf3",
"type": "function",
"z": "8fdecdeb81b71d1a",
"g": "28908042d1d38327",
"name": "",
"func": "msg.topic=\"version\"\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 380,
"y": 1740,
"wires": [
[
"f8bf19d81175b304",
"79e9327f1a38d7e6"
]
]
},
{
"id": "ccf8ff8d6f685b7e",
"type": "inject",
"z": "8fdecdeb81b71d1a",
"g": "28908042d1d38327",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "60",
"crontab": "",
"once": true,
"onceDelay": 0.1,
"topic": "clientId",
"payload": "fe001",
"payloadType": "str",
"x": 180,
"y": 1620,
"wires": [
[
"79e9327f1a38d7e6"
]
]
},
{
"id": "be17803b661cc51a",
"type": "inject",
"z": "8fdecdeb81b71d1a",
"g": "28908042d1d38327",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "60",
"crontab": "",
"once": true,
"onceDelay": "0.1",
"topic": "connected",
"payload": "1",
"payloadType": "num",
"x": 180,
"y": 1660,
"wires": [
[
"79e9327f1a38d7e6"
]
]
},
{
"id": "b2ead156ac397da8",
"type": "inject",
"z": "8fdecdeb81b71d1a",
"g": "28908042d1d38327",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "60",
"crontab": "",
"once": true,
"onceDelay": 0.1,
"topic": "services",
"payload": "{\"ev1\":\"evcharger\"}",
"payloadType": "json",
"x": 220,
"y": 1700,
"wires": [
[
"79e9327f1a38d7e6"
]
]
},
{
"id": "79e9327f1a38d7e6",
"type": "join",
"z": "8fdecdeb81b71d1a",
"g": "28908042d1d38327",
"name": "",
"mode": "custom",
"build": "object",
"property": "payload",
"propertyType": "msg",
"key": "topic",
"joiner": "\\n",
"joinerType": "str",
"accumulate": false,
"timeout": "",
"count": "4",
"reduceRight": false,
"reduceExp": "",
"reduceInit": "",
"reduceInitType": "",
"reduceFixup": "",
"x": 490,
"y": 1620,
"wires": [
[
"7657252e806c9e76",
"21fc6dbf3302bdb6"
]
]
},
{
"id": "7657252e806c9e76",
"type": "mqtt out",
"z": "8fdecdeb81b71d1a",
"g": "28908042d1d38327",
"name": "",
"topic": "device/fe001/Status",
"qos": "0",
"retain": "false",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "47e105b96fc4cc38",
"x": 750,
"y": 1560,
"wires": []
},
{
"id": "8d30bdff27fafd99",
"type": "mqtt in",
"z": "8fdecdeb81b71d1a",
"name": "",
"topic": "openWB/config/get/global/maxEVSECurrentAllowed",
"qos": "1",
"datatype": "auto-detect",
"broker": "7a8eff5f12650455",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 250,
"y": 740,
"wires": [
[
"4109291b54ae3140"
]
]
},
{
"id": "4109291b54ae3140",
"type": "function",
"z": "8fdecdeb81b71d1a",
"name": "number to object",
"func": "var payl={value:msg.payload}\nmsg.payload=payl\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 810,
"y": 740,
"wires": [
[
"c928ceb1413f51b7"
]
]
},
{
"id": "c928ceb1413f51b7",
"type": "mqtt out",
"z": "8fdecdeb81b71d1a",
"name": "",
"topic": "W/<replacewithyourportalID>/evcharger/1/MaxCurrent",
"qos": "0",
"retain": "true",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "47e105b96fc4cc38",
"x": 1110,
"y": 740,
"wires": []
},
{
"id": "6760e7ad8269bacd",
"type": "mqtt in",
"z": "8fdecdeb81b71d1a",
"name": "",
"topic": "openWB/config/get/sofort/lp/1/current",
"qos": "1",
"datatype": "auto-detect",
"broker": "7a8eff5f12650455",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 210,
"y": 800,
"wires": [
[
"4827a6343a8e50b8"
]
]
},
{
"id": "4827a6343a8e50b8",
"type": "function",
"z": "8fdecdeb81b71d1a",
"name": "number to object",
"func": "var payl={value:msg.payload}\nmsg.payload=payl\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 810,
"y": 800,
"wires": [
[
"382db75614d74ae0"
]
]
},
{
"id": "382db75614d74ae0",
"type": "mqtt out",
"z": "8fdecdeb81b71d1a",
"name": "",
"topic": "N/<replacewithyourportalID>/evcharger/1/SetCurrent",
"qos": "0",
"retain": "true",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "47e105b96fc4cc38",
"x": 1100,
"y": 800,
"wires": []
},
{
"id": "8979393b44c7c2f2",
"type": "comment",
"z": "8fdecdeb81b71d1a",
"g": "28908042d1d38327",
"name": "Device Registration on DBUS",
"info": "Setup DBUS device",
"x": 200,
"y": 1520,
"wires": []
},
{
"id": "3d95f2664bf32590",
"type": "function",
"z": "8fdecdeb81b71d1a",
"name": "function 1",
"func": "\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 660,
"y": 1020,
"wires": [
[
"2e37203bb3b0b269"
]
]
},
{
"id": "33f8ea29722d734b",
"type": "change",
"z": "8fdecdeb81b71d1a",
"name": "",
"rules": [
{
"t": "set",
"p": "Lp1Enabled",
"pt": "flow",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 480,
"y": 1020,
"wires": [
[
"3d95f2664bf32590"
]
]
},
{
"id": "95bec2a60174a05f",
"type": "mqtt in",
"z": "8fdecdeb81b71d1a",
"name": "",
"topic": "openWB/lp/1/boolPlugStat",
"qos": "2",
"datatype": "auto-detect",
"broker": "7a8eff5f12650455",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 170,
"y": 1120,
"wires": [
[
"e39843574c7b4dbe"
]
]
},
{
"id": "e39843574c7b4dbe",
"type": "function",
"z": "8fdecdeb81b71d1a",
"name": "number to object",
"func": "var payl={value:msg.payload}\nmsg.payload=payl\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 830,
"y": 1120,
"wires": [
[
"73cccca2fbc087fa"
]
]
},
{
"id": "ba2f362072d45777",
"type": "inject",
"z": "8fdecdeb81b71d1a",
"name": "",
"props": [
{
"p": "payload"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "1",
"payloadType": "num",
"x": 470,
"y": 1220,
"wires": [
[
"e39843574c7b4dbe"
]
]
},
{
"id": "8e3321269de16127",
"type": "inject",
"z": "8fdecdeb81b71d1a",
"name": "",
"props": [
{
"p": "payload"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "0",
"payloadType": "num",
"x": 470,
"y": 1180,
"wires": [
[
"e39843574c7b4dbe"
]
]
},
{
"id": "2bba203f6bf2dbea",
"type": "mqtt in",
"z": "8fdecdeb81b71d1a",
"name": "",
"topic": "openWB/global/ChargeMode",
"qos": "2",
"datatype": "auto-detect",
"broker": "7a8eff5f12650455",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 820,
"y": 1280,
"wires": [
[
"089356fed40edcb9"
]
]
},
{
"id": "e1e5d570a181ae67",
"type": "switch",
"z": "8fdecdeb81b71d1a",
"name": "",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "0",
"vt": "num"
},
{
"t": "eq",
"v": "1",
"vt": "num"
},
{
"t": "eq",
"v": "2",
"vt": "num"
},
{
"t": "eq",
"v": "3",
"vt": "num"
},
{
"t": "eq",
"v": "4",
"vt": "num"
}
],
"checkall": "true",
"repair": false,
"outputs": 5,
"x": 1230,
"y": 1280,
"wires": [
[
"ef5ece4ebaeb1c38"
],
[
"a9cf7e33ca774ef6"
],
[
"a9cf7e33ca774ef6"
],
[],
[]
]
},
{
"id": "ef5ece4ebaeb1c38",
"type": "change",
"z": "8fdecdeb81b71d1a",
"name": "",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "{\"value\":0}",
"tot": "json"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1430,
"y": 1200,
"wires": [
[
"4af1b87f489c7ff7"
]
]
},
{
"id": "a9cf7e33ca774ef6",
"type": "change",
"z": "8fdecdeb81b71d1a",
"name": "",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "{\"value\":1}",
"tot": "json"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1430,
"y": 1280,
"wires": [
[
"4af1b87f489c7ff7"
]
]
},
{
"id": "4af1b87f489c7ff7",
"type": "mqtt out",
"z": "8fdecdeb81b71d1a",
"name": "",
"topic": "W/<replacewithyourportalID>/evcharger/1/Mode",
"qos": "0",
"retain": "true",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "47e105b96fc4cc38",
"x": 1850,
"y": 1200,
"wires": []
},
{
"id": "3dd3d50c6a412a54",
"type": "mqtt in",
"z": "8fdecdeb81b71d1a",
"name": "",
"topic": "openWB/lp/1/kWhActualCharged",
"qos": "2",
"datatype": "auto-detect",
"broker": "7a8eff5f12650455",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 190,
"y": 680,
"wires": [
[
"d1c3915708b58c8b"
]
]
},
{
"id": "6cc995c2bf784eec",
"type": "mqtt out",
"z": "8fdecdeb81b71d1a",
"name": "",
"topic": "W/<replacewithyourportalID>/evcharger/1/Ac/Energy/Forward",
"qos": "0",
"retain": "true",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "47e105b96fc4cc38",
"x": 1130,
"y": 680,
"wires": []
},
{
"id": "d1c3915708b58c8b",
"type": "function",
"z": "8fdecdeb81b71d1a",
"name": "number to object",
"func": "var payl={value:msg.payload}\nmsg.payload=payl\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 810,
"y": 680,
"wires": [
[
"6cc995c2bf784eec"
]
]
},
{
"id": "8d16d11f483b2ccb",
"type": "mqtt in",
"z": "8fdecdeb81b71d1a",
"name": "",
"topic": "N/<replacewithyourportalID>/evcharger/1/Mode",
"qos": "2",
"datatype": "auto-detect",
"broker": "47e105b96fc4cc38",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 1040,
"y": 1380,
"wires": [
[
"21d6753b5aae90e3"
]
]
},
{
"id": "21d6753b5aae90e3",
"type": "switch",
"z": "8fdecdeb81b71d1a",
"name": "",
"property": "payload.value",
"propertyType": "jsonata",
"rules": [
{
"t": "eq",
"v": "0",
"vt": "num"
},
{
"t": "eq",
"v": "1",
"vt": "num"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 1310,
"y": 1380,
"wires": [
[
"c2e06dc9cd0f8f8f"
],
[
"2940fe2e4810f064"
]
]
},
{
"id": "f41f8428c86ece59",
"type": "mqtt out",
"z": "8fdecdeb81b71d1a",
"name": "",
"topic": "openWB/global/ChargeMode",
"qos": "1",
"retain": "false",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "7a8eff5f12650455",
"x": 1820,
"y": 1380,
"wires": []
},
{
"id": "c2e06dc9cd0f8f8f",
"type": "change",
"z": "8fdecdeb81b71d1a",
"name": "OpenWB Sofortladen",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "0",
"tot": "num"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1540,
"y": 1360,
"wires": [
[
"f41f8428c86ece59"
]
]
},
{
"id": "2940fe2e4810f064",
"type": "change",
"z": "8fdecdeb81b71d1a",
"name": "OpenWB PV",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "2",
"tot": "num"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1510,
"y": 1400,
"wires": [
[
"f41f8428c86ece59"
]
]
},
{
"id": "089356fed40edcb9",
"type": "delay",
"z": "8fdecdeb81b71d1a",
"name": "",
"pauseType": "rate",
"timeout": "5",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "2",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": true,
"allowrate": false,
"outputs": 1,
"x": 1060,
"y": 1280,
"wires": [
[
"e1e5d570a181ae67"
]
]
},
{
"id": "21fc6dbf3302bdb6",
"type": "debug",
"z": "8fdecdeb81b71d1a",
"g": "28908042d1d38327",
"name": "debug 21",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 720,
"y": 1620,
"wires": []
},
{
"id": "7a8eff5f12650455",
"type": "mqtt-broker",
"name": "",
"broker": "<replacewithyouropenWBBroker>",
"port": "1883",
"tls": "",
"clientid": "",
"autoConnect": true,
"usetls": false,
"protocolVersion": "4",
"keepalive": "60",
"cleansession": true,
"birthTopic": "",
"birthQos": "0",
"birthPayload": "",
"birthMsg": {},
"closeTopic": "",
"closeQos": "0",
"closePayload": "",
"closeMsg": {},
"willTopic": "",
"willQos": "0",
"willPayload": "",
"willMsg": {},
"userProps": "",
"sessionExpiry": ""
},
{
"id": "47e105b96fc4cc38",
"type": "mqtt-broker",
"name": "CerboGX",
"broker": "localhost",
"port": "1883",
"clientid": "",
"autoConnect": true,
"usetls": false,
"protocolVersion": "5",
"keepalive": "60",
"cleansession": true,
"birthTopic": "",
"birthQos": "0",
"birthPayload": "",
"birthMsg": {},
"closeTopic": "",
"closeQos": "0",
"closePayload": "",
"closeMsg": {},
"willTopic": "",
"willQos": "0",
"willPayload": "",
"willMsg": {},
"userProps": "",
"sessionExpiry": ""
}
]
Vielen Dank für den Flow.