Bonjour
J’ai réussi a faire un Flow dans NodeRed pour éviter d’injecter le surplus en commandant une anode dans mon ballon tampon par le biais de la sortie ACOut2
J’ai créée deux condition d’activation désactivation SOC et deux pour la temperature ballon .
mais j’ai le problème que ci je ne fait pas un loop avec une node mqtt le relais 2 du GX fait du marche arrêt en permanence !
[
{
"id": "67dda7ad37b31550",
"type": "tab",
"label": "Solar Begranzung Pufferspeicher",
"disabled": false,
"info": "",
"env": []
},
{
"id": "b2db954a1ea97ed9",
"type": "junction",
"z": "67dda7ad37b31550",
"x": 420,
"y": 60,
"wires": [
[
"2e209753.9b4fb8"
]
]
},
{
"id": "2a5f0a576b0a424b",
"type": "junction",
"z": "67dda7ad37b31550",
"x": 400,
"y": 300,
"wires": [
[
"a54e7199.6374"
]
]
},
{
"id": "8d3e6c8e.8cbc9",
"type": "inject",
"z": "67dda7ad37b31550",
"name": "99%",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "Battery_SOC",
"payload": "99",
"payloadType": "num",
"x": 290,
"y": 40,
"wires": [
[
"b2db954a1ea97ed9"
]
]
},
{
"id": "d08663fb.931a3",
"type": "inject",
"z": "67dda7ad37b31550",
"name": "90%",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "Battery SOC",
"payload": "90",
"payloadType": "num",
"x": 290,
"y": 80,
"wires": [
[
"b2db954a1ea97ed9"
]
]
},
{
"id": "f249379b.160858",
"type": "debug",
"z": "67dda7ad37b31550",
"name": "Trigger the thing?",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": true,
"complete": "payload",
"targetType": "msg",
"statusVal": "payload",
"statusType": "auto",
"x": 1130,
"y": 580,
"wires": []
},
{
"id": "5e9c463a.27fc68",
"type": "inject",
"z": "67dda7ad37b31550",
"name": "78 C°",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "Pufferspeicher_Temp",
"payload": "78",
"payloadType": "num",
"x": 290,
"y": 280,
"wires": [
[
"2a5f0a576b0a424b"
]
]
},
{
"id": "37566273.473d5e",
"type": "inject",
"z": "67dda7ad37b31550",
"name": "70 C°",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "Pufferspeicher_Temp",
"payload": "70",
"payloadType": "num",
"x": 290,
"y": 320,
"wires": [
[
"2a5f0a576b0a424b"
]
]
},
{
"id": "a54e7199.6374",
"type": "change",
"z": "67dda7ad37b31550",
"name": "Pufferspeicher_Temp",
"rules": [
{
"t": "set",
"p": "Pufferspeicher_Temp",
"pt": "flow",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 620,
"y": 380,
"wires": [
[
"415e4fa7.4acc8"
]
]
},
{
"id": "415e4fa7.4acc8",
"type": "debug",
"z": "67dda7ad37b31550",
"name": "Temp",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": true,
"complete": "payload",
"targetType": "msg",
"statusVal": "payload",
"statusType": "auto",
"x": 870,
"y": 380,
"wires": []
},
{
"id": "cfb9c3af.f6f99",
"type": "debug",
"z": "67dda7ad37b31550",
"name": "Battery SOC",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": true,
"complete": "payload",
"targetType": "msg",
"statusVal": "payload",
"statusType": "auto",
"x": 890,
"y": 160,
"wires": []
},
{
"id": "49318b1c.5960f4",
"type": "function",
"z": "67dda7ad37b31550",
"name": "Check Battrery SOC and Pufferspeicher Temp",
"func": "var Pufferspeicher_Temp = flow.get('Pufferspeicher_Temp')\nvar Battery_SOC = flow.get('Battery_SOC')\n\nvar minTemp = 71;\nvar minSOC = 98;\n\n// Check Levels\nif(Pufferspeicher_Temp < minTemp && Battery_SOC > minSOC){\n msg.payload = true;\n}else{\n msg.payload = false;\n}\n\nreturn msg\n",
"outputs": 1,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 480,
"y": 660,
"wires": [
[
"ae05d5ae777de073"
]
]
},
{
"id": "2e209753.9b4fb8",
"type": "change",
"z": "67dda7ad37b31550",
"name": "set Battery SOC",
"rules": [
{
"t": "set",
"p": "Battery_SOC",
"pt": "flow",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 580,
"y": 160,
"wires": [
[
"cfb9c3af.f6f99",
"566cc94a.99f208"
]
]
},
{
"id": "a535b1aa.3022a",
"type": "link in",
"z": "67dda7ad37b31550",
"name": "Humidity Workflow",
"links": [
"566cc94a.99f208"
],
"x": 225,
"y": 660,
"wires": [
[
"49318b1c.5960f4"
]
]
},
{
"id": "566cc94a.99f208",
"type": "link out",
"z": "67dda7ad37b31550",
"name": "Humidity",
"links": [
"a535b1aa.3022a"
],
"x": 705,
"y": 200,
"wires": []
},
{
"id": "243e481a.080958",
"type": "comment",
"z": "67dda7ad37b31550",
"name": "Workflow",
"info": "",
"x": 120,
"y": 520,
"wires": []
},
{
"id": "1370c306.727e1d",
"type": "comment",
"z": "67dda7ad37b31550",
"name": "on Pufferspeicher Temp",
"info": "",
"x": 160,
"y": 580,
"wires": []
},
{
"id": "af929e90e97d568b",
"type": "comment",
"z": "67dda7ad37b31550",
"name": "Battery_SOC",
"info": "",
"x": 130,
"y": 40,
"wires": []
},
{
"id": "92414375d47ed037",
"type": "comment",
"z": "67dda7ad37b31550",
"name": "Pufferspeicher_Temp",
"info": "",
"x": 160,
"y": 240,
"wires": []
},
{
"id": "9d4ea051c90522ee",
"type": "victron-input-temperature",
"z": "67dda7ad37b31550",
"service": "com.victronenergy.temperature/20",
"path": "/Temperature",
"serviceObj": {
"service": "com.victronenergy.temperature/20",
"name": "Pufferspeicher"
},
"pathObj": {
"path": "/Temperature",
"type": "float",
"name": "Temperature (°C)"
},
"name": "Pufferspeicher",
"onlyChanges": true,
"roundValues": "0",
"x": 300,
"y": 380,
"wires": [
[
"a54e7199.6374"
]
]
},
{
"id": "5cbb7607b7529a84",
"type": "victron-input-system",
"z": "67dda7ad37b31550",
"service": "com.victronenergy.system/0",
"path": "/Dc/Battery/Soc",
"serviceObj": {
"service": "com.victronenergy.system/0",
"name": "Venus system"
},
"pathObj": {
"path": "/Dc/Battery/Soc",
"type": "float",
"name": "Battery State of Charge (%)"
},
"name": "Battery SOC",
"onlyChanges": false,
"x": 290,
"y": 160,
"wires": [
[
"2e209753.9b4fb8"
]
]
},
{
"id": "ae05d5ae777de073",
"type": "change",
"z": "67dda7ad37b31550",
"name": "",
"rules": [
{
"t": "change",
"p": "payload",
"pt": "msg",
"from": "true",
"fromt": "bool",
"to": "1",
"tot": "num"
},
{
"t": "change",
"p": "payload",
"pt": "msg",
"from": "false",
"fromt": "bool",
"to": "0",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 850,
"y": 660,
"wires": [
[
"44d175d069852852",
"f249379b.160858"
]
]
},
{
"id": "44d175d069852852",
"type": "victron-output-relay",
"z": "67dda7ad37b31550",
"service": "com.victronenergy.system/0",
"path": "/Relay/1/State",
"serviceObj": {
"service": "com.victronenergy.system/0",
"name": "Venus device"
},
"pathObj": {
"path": "/Relay/1/State",
"type": "enum",
"name": "Venus relay 2 state",
"enum": {
"0": "Open",
"1": "Closed"
},
"writable": true
},
"initial": "",
"name": "Relay 2 Water Temp heater",
"onlyChanges": true,
"x": 1180,
"y": 660,
"wires": []
},
{
"id": "4b4dd70141dc58d9",
"type": "victron-input-relay",
"z": "67dda7ad37b31550",
"service": "com.victronenergy.system/0",
"path": "/Relay/1/State",
"serviceObj": {
"service": "com.victronenergy.system/0",
"name": "Venus system"
},
"pathObj": {
"path": "/Relay/1/State",
"type": "enum",
"name": "Venus relay 2 state",
"enum": {
"0": "Open",
"1": "Closed"
}
},
"initial": "",
"name": "Relay 2 State",
"onlyChanges": false,
"x": 870,
"y": 720,
"wires": [
[
"57093b14d5f9cbb4"
]
]
},
{
"id": "c9fe904c87e463f9",
"type": "mqtt in",
"z": "67dda7ad37b31550",
"name": "",
"topic": "Relay 2 On Off",
"qos": "2",
"datatype": "auto-detect",
"broker": "bcd76438d8aaced3",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 860,
"y": 580,
"wires": [
[
"44d175d069852852"
]
]
},
{
"id": "57093b14d5f9cbb4",
"type": "mqtt out",
"z": "67dda7ad37b31550",
"name": "",
"topic": "Relay 2 On Off",
"qos": "",
"retain": "",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "bcd76438d8aaced3",
"x": 1100,
"y": 720,
"wires": []
},
{
"id": "bcd76438d8aaced3",
"type": "mqtt-broker",
"name": "SOLAR",
"broker": "192.168.188.119",
"port": "1883",
"clientid": "",
"autoConnect": true,
"usetls": false,
"protocolVersion": "4",
"keepalive": "60",
"cleansession": true,
"autoUnsubscribe": true,
"birthTopic": "",
"birthQos": "0",
"birthRetain": "false",
"birthPayload": "",
"birthMsg": {},
"closeTopic": "",
"closeQos": "0",
"closeRetain": "false",
"closePayload": "",
"closeMsg": {},
"willTopic": "",
"willQos": "0",
"willRetain": "false",
"willPayload": "",
"willMsg": {},
"userProps": "",
"sessionExpiry": ""
}
]