Trying hard to achieve the Next:
Have got 4 nodes:
MPPT
AC-In
Battery SoC
Relay node.
What I want:
MPPT gives over 200W for 2 minutes: Relay turns on.
condition: Battery needs to above 80%.
If Battery gets below 70% or MPPT under 200W (for 5 minutes), relay needs to turn off.
If AC in is detected, all needs to be overwritten and relay needs to turn on.
I've got this:
[
{
"id": "c4aa7f38eacaf413",
"type": "victron-input-battery",
"z": "87ebc29a0e4cc01e",
"service": "com.victronenergy.battery/277",
"path": "/Soc",
"serviceObj": {
"service": "com.victronenergy.battery/277",
"name": "Hoofd Batterij"
},
"pathObj": {
"path": "/Soc",
"type": "float",
"name": "State of charge (%)"
},
"name": "SoC",
"onlyChanges": false,
"roundValues": "0",
"x": 70,
"y": 340,
"wires": [
[
"e136c3e354ea899d"
]
]
},
{
"id": "02361eb237892a7b",
"type": "victron-input-system",
"z": "87ebc29a0e4cc01e",
"service": "com.victronenergy.system/0",
"path": "/Dc/Pv/Power",
"serviceObj": {
"service": "com.victronenergy.system/0",
"name": "Venus system"
},
"pathObj": {
"path": "/Dc/Pv/Power",
"type": "float",
"name": "MPPTs - power (W)"
},
"name": "MPPT",
"onlyChanges": false,
"roundValues": "0",
"x": 70,
"y": 60,
"wires": [
[
"536f43f1fb9f4351"
]
]
},
{
"id": "536f43f1fb9f4351",
"type": "switch",
"z": "87ebc29a0e4cc01e",
"name": "",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "lte",
"v": "199",
"vt": "num"
},
{
"t": "gte",
"v": "200",
"vt": "num"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 270,
"y": 60,
"wires": [
[
"8d7ee1b67e05e7ca"
],
[
"3c9c63645eca3436"
]
]
},
{
"id": "8d7ee1b67e05e7ca",
"type": "change",
"z": "87ebc29a0e4cc01e",
"name": "mppt 0",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "0",
"tot": "num"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 450,
"y": 20,
"wires": [
[
"4c582424c7da6360",
"b347511a65624c59",
"3c0f9b1247cc901d"
]
]
},
{
"id": "3c9c63645eca3436",
"type": "change",
"z": "87ebc29a0e4cc01e",
"name": "mppt 1",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "1",
"tot": "num"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 450,
"y": 100,
"wires": [
[
"811d363f7da95da6"
]
]
},
{
"id": "b347511a65624c59",
"type": "debug",
"z": "87ebc29a0e4cc01e",
"name": "Boiler aan uit",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 1030,
"y": 60,
"wires": []
},
{
"id": "3c0f9b1247cc901d",
"type": "victron-output-relay",
"z": "87ebc29a0e4cc01e",
"service": "com.victronenergy.system/0",
"path": "/Relay/0/State",
"serviceObj": {
"service": "com.victronenergy.system/0",
"name": "Venus device"
},
"pathObj": {
"path": "/Relay/0/State",
"type": "enum",
"name": "Venus relay 1 state",
"enum": {
"0": "Open",
"1": "Closed"
},
"writable": true
},
"initial": "0",
"name": "Relay 1 Boiler",
"onlyChanges": false,
"x": 1280,
"y": 160,
"wires": []
},
{
"id": "a9819cbaa37c7682",
"type": "debug",
"z": "87ebc29a0e4cc01e",
"name": "SoC debug",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 490,
"y": 340,
"wires": []
},
{
"id": "2c1483741e6c7ac9",
"type": "inject",
"z": "87ebc29a0e4cc01e",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "2001",
"payloadType": "num",
"x": 70,
"y": 120,
"wires": [
[
"536f43f1fb9f4351"
]
]
},
{
"id": "811d363f7da95da6",
"type": "switch",
"z": "87ebc29a0e4cc01e",
"name": "",
"property": "SoC",
"propertyType": "flow",
"rules": [
{
"t": "gte",
"v": "80",
"vt": "str"
},
{
"t": "lte",
"v": "79",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 610,
"y": 100,
"wires": [
[
"b347511a65624c59",
"3c0f9b1247cc901d"
],
[
"55278b772cebd086"
]
]
},
{
"id": "4d2df5d0ae5a2c24",
"type": "inject",
"z": "87ebc29a0e4cc01e",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "199",
"payloadType": "num",
"x": 90,
"y": 160,
"wires": [
[
"536f43f1fb9f4351"
]
]
},
{
"id": "4c582424c7da6360",
"type": "delay",
"z": "87ebc29a0e4cc01e",
"name": "",
"pauseType": "delay",
"timeout": "120",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"allowrate": false,
"outputs": 1,
"x": 630,
"y": 20,
"wires": [
[
"b347511a65624c59",
"256a618b80425695"
]
]
},
{
"id": "9b609f1ec885755e",
"type": "inject",
"z": "87ebc29a0e4cc01e",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "79",
"payloadType": "num",
"x": 70,
"y": 400,
"wires": [
[
"e136c3e354ea899d"
]
]
},
{
"id": "2361db03bc3ca635",
"type": "inject",
"z": "87ebc29a0e4cc01e",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "81",
"payloadType": "num",
"x": 70,
"y": 460,
"wires": [
[
"e136c3e354ea899d"
]
]
},
{
"id": "e136c3e354ea899d",
"type": "change",
"z": "87ebc29a0e4cc01e",
"name": "",
"rules": [
{
"t": "set",
"p": "SoC",
"pt": "flow",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 270,
"y": 340,
"wires": [
[
"a9819cbaa37c7682"
]
]
},
{
"id": "55278b772cebd086",
"type": "change",
"z": "87ebc29a0e4cc01e",
"name": "mppt 0",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "0",
"tot": "num"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 750,
"y": 140,
"wires": [
[
"b347511a65624c59",
"3c0f9b1247cc901d"
]
]
},
{
"id": "29e3ba7f289f1da4",
"type": "victron-input-system",
"z": "87ebc29a0e4cc01e",
"service": "com.victronenergy.system/0",
"path": "/Ac/ActiveIn/Source",
"serviceObj": {
"service": "com.victronenergy.system/0",
"name": "Venus system"
},
"pathObj": {
"path": "/Ac/ActiveIn/Source",
"type": "enum",
"name": "AC-Input",
"enum": {
"0": "Not available",
"1": "Grid",
"2": "Generator",
"3": "Shore",
"240": "Inverting"
}
},
"initial": "",
"name": "",
"onlyChanges": false,
"x": 310,
"y": 180,
"wires": [
[
"2a404f90e96d8554",
"3c0f9b1247cc901d"
]
]
},
{
"id": "2a404f90e96d8554",
"type": "change",
"z": "87ebc29a0e4cc01e",
"name": "",
"rules": [
{
"t": "set",
"p": "AC-Input",
"pt": "flow",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 550,
"y": 240,
"wires": [
[]
]
},
{
"id": "256a618b80425695",
"type": "switch",
"z": "87ebc29a0e4cc01e",
"name": "",
"property": "AC-Input",
"propertyType": "flow",
"rules": [
{
"t": "eq",
"v": "0",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 1,
"x": 1010,
"y": 100,
"wires": [
[
"3c0f9b1247cc901d"
]
]
}
]
I was used to make automations with Home Assistant, but since it's only one relay I want to manage, I hope I get this done in Node-RED (implemented in Venus OS Large)
Who can help me out?