Hm, also bei mir läuft das jetzt den 3. Tag, aber bei Speicher Import/Export steht immer noch 0,00 kWh. Scheinbar rechnet dann meine OpenWB (Version: 1.9.301) das nicht selbst aus. Vielleicht liegt mein Fehler ja auch an den per Node-Red gesendeten Werten, das hab ich ja auch mehr oder weniger "hingepfuscht"
Code: Alles auswählen
[
{
"id": "c6f39d8f55b734e5",
"type": "tab",
"label": "Solaranzeige zu openWB Batteriespeicher",
"disabled": false,
"info": "",
"env": []
},
{
"id": "d2a89699c8c9622a",
"type": "mqtt in",
"z": "c6f39d8f55b734e5",
"name": "",
"topic": "solaranzeige/box1/batteriekapazitaet",
"qos": "2",
"datatype": "auto-detect",
"broker": "f65eccf0983837ee",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 190,
"y": 740,
"wires": [
[
"7af5523fa17345fa"
]
]
},
{
"id": "b37beaa6a532f6c7",
"type": "mqtt out",
"z": "c6f39d8f55b734e5",
"name": "",
"topic": "openWB/set/houseBattery/%Soc",
"qos": "2",
"retain": "true",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "f65eccf0983837ee",
"x": 1100,
"y": 740,
"wires": []
},
{
"id": "cffba26676c07e9b",
"type": "mqtt in",
"z": "c6f39d8f55b734e5",
"name": "solaranzeige/box1/batterieleistung",
"topic": "solaranzeige/box1/batterieleistung",
"qos": "2",
"datatype": "auto-detect",
"broker": "f65eccf0983837ee",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 180,
"y": 900,
"wires": [
[
"661d5951458c2593"
]
]
},
{
"id": "6e8a7b821d9ee4fe",
"type": "mqtt out",
"z": "c6f39d8f55b734e5",
"name": "",
"topic": "openWB/set/houseBattery/W",
"qos": "2",
"retain": "true",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "f65eccf0983837ee",
"x": 1090,
"y": 940,
"wires": []
},
{
"id": "e284b75e4df6197e",
"type": "mqtt in",
"z": "c6f39d8f55b734e5",
"name": "solaranzeige/box1/laden_entladen",
"topic": "solaranzeige/box1/laden_entladen",
"qos": "2",
"datatype": "auto-detect",
"broker": "f65eccf0983837ee",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 180,
"y": 1040,
"wires": [
[
"3b35716383972c1b"
]
]
},
{
"id": "cd3a4257c9e36ab4",
"type": "debug",
"z": "c6f39d8f55b734e5",
"name": "SOC gerundet",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 700,
"y": 640,
"wires": []
},
{
"id": "7af5523fa17345fa",
"type": "range",
"z": "c6f39d8f55b734e5",
"minin": "000",
"maxin": "100",
"minout": "0",
"maxout": "100",
"action": "scale",
"round": true,
"property": "payload",
"name": "SOC runden",
"x": 470,
"y": 740,
"wires": [
[
"b37beaa6a532f6c7",
"cd3a4257c9e36ab4"
]
]
},
{
"id": "50cb99f50696b97e",
"type": "debug",
"z": "c6f39d8f55b734e5",
"name": "Soeicher laden/entladen W",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 1000,
"y": 840,
"wires": []
},
{
"id": "661d5951458c2593",
"type": "range",
"z": "c6f39d8f55b734e5",
"minin": "00000",
"maxin": "10000",
"minout": "0",
"maxout": "10000",
"action": "scale",
"round": true,
"property": "payload",
"name": "Leistung runden",
"x": 460,
"y": 900,
"wires": [
[
"f7a15b54a977f346"
]
]
},
{
"id": "3b35716383972c1b",
"type": "change",
"z": "c6f39d8f55b734e5",
"name": "ändere 0 zu -1",
"rules": [
{
"t": "change",
"p": "payload",
"pt": "msg",
"from": "0",
"fromt": "num",
"to": "-1",
"tot": "num"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 500,
"y": 1040,
"wires": [
[
"f7a15b54a977f346"
]
]
},
{
"id": "f7a15b54a977f346",
"type": "function",
"z": "c6f39d8f55b734e5",
"name": "Multiplikation",
"func": "if (msg.topic === \"solaranzeige/box1/batterieleistung\") context.set(\"leistung\",msg.payload);\nif (msg.topic === \"solaranzeige/box1/laden_entladen\") context.set(\"laden_entladen\",msg.payload);\n\n\nvar leistung = context.get(\"leistung\") || 0;\nvar laden_entladen = context.get(\"laden_entladen\") || 0;\n\n\nmsg.payload = leistung * laden_entladen;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 760,
"y": 940,
"wires": [
[
"6e8a7b821d9ee4fe",
"50cb99f50696b97e"
]
]
},
{
"id": "f65eccf0983837ee",
"type": "mqtt-broker",
"name": "",
"broker": "192.168.178.61",
"port": "1883",
"clientid": "",
"autoConnect": true,
"usetls": false,
"protocolVersion": "3",
"keepalive": "60",
"cleansession": true,
"birthTopic": "",
"birthQos": "0",
"birthPayload": "",
"birthMsg": {},
"closeTopic": "",
"closeQos": "0",
"closePayload": "",
"closeMsg": {},
"willTopic": "",
"willQos": "0",
"willPayload": "",
"willMsg": {},
"userProps": "",
"sessionExpiry": ""
}
]
...bin auf jedem Fall trotzdem ein bisschen stolz, dass ich es wenigstens so weit hinbekommen hab.