Here’s a very very basic flow that does the trick ish.
There’s far more that can/should/could be set in the flow, like switching to grid or generator in case of an overload.
That’s all not there yet and parameters are still pretty much hardcoded in the nodes.
“When I have some spare time” (read: not in the coming weeks or months) I’ll pick this back up.
The “cute” part of this flow are the two switches it creates in GUIv2.
If not for that you could just as simple use the Virtual Switch option in the MP2.
[
{
"id": "19c88759b5c3d21a",
"type": "victron-virtual-switch",
"z": "5097d071e5c6b8d8",
"name": "Ignore AC In",
"outputs": 2,
"switch_1_type": "1",
"switch_1_initial": 0,
"switch_1_label": "",
"switch_1_customname": "Ignore AC In",
"switch_1_group": "Custom Controls",
"switch_1_include_measurement": false,
"switch_1_rgb_color_wheel": false,
"switch_1_cct_wheel": false,
"switch_1_rgb_white_dimmer": false,
"x": 770,
"y": 220,
"wires": [
[],
[
"16fe82bb1d8b5c6c",
"710bb7091e8cafb0"
]
]
},
{
"id": "ea6f59a39e61fdf8",
"type": "victron-input-vebus",
"z": "5097d071e5c6b8d8",
"service": "com.victronenergy.vebus/276",
"path": "/Dc/0/Voltage",
"serviceObj": {
"service": "com.victronenergy.vebus/276",
"name": "MultiPlus-II 24/3000/70-32",
"communityTag": "vebus"
},
"pathObj": {
"path": "/Dc/0/Voltage",
"type": "float",
"name": "Battery voltage (V)"
},
"name": "",
"onlyChanges": true,
"roundValues": "2",
"outputs": 2,
"conditionalMode": true,
"condition1Operator": ">=",
"condition1Threshold": 24,
"condition2Enabled": false,
"outputTrue": "",
"outputFalse": "{\"SwitchableOutput/output_1/State\":0}",
"debounce": 2000,
"x": 280,
"y": 100,
"wires": [
[
"a055f87eaa8f0c51"
],
[
"c6aa16916ed68b6f"
]
]
},
{
"id": "fe4e3a5749f355a8",
"type": "victron-input-vebus",
"z": "5097d071e5c6b8d8",
"service": "com.victronenergy.vebus/276",
"path": "/Ac/State/IgnoreAcIn1",
"serviceObj": {
"service": "com.victronenergy.vebus/276",
"name": "MultiPlus-II 24/3000/70-32",
"communityTag": "vebus"
},
"pathObj": {
"path": "/Ac/State/IgnoreAcIn1",
"type": "enum",
"name": "AC input 1 ignored",
"enum": {
"0": "AC input not ignored",
"1": "AC input ignored"
}
},
"name": "",
"onlyChanges": true,
"roundValues": "2",
"outputs": 1,
"conditionalMode": false,
"outputTrue": "",
"outputFalse": "",
"debounce": "",
"x": 280,
"y": 220,
"wires": [
[
"61701b7543955754"
]
]
},
{
"id": "4b15e2d8e83d8e1f",
"type": "change",
"z": "5097d071e5c6b8d8",
"name": "",
"rules": [
{
"t": "set",
"p": "topic",
"pt": "msg",
"to": "SoC",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 390,
"y": 280,
"wires": [
[
"fccb0f057564db69"
]
]
},
{
"id": "5f6c579571b14ee2",
"type": "victron-input-vebus",
"z": "5097d071e5c6b8d8",
"service": "com.victronenergy.vebus/276",
"path": "/Soc",
"serviceObj": {
"service": "com.victronenergy.vebus/276",
"name": "MultiPlus-II 24/3000/70-32",
"communityTag": "vebus"
},
"pathObj": {
"path": "/Soc",
"type": "float",
"name": "VE.Bus state of charge (%)"
},
"name": "",
"onlyChanges": true,
"roundValues": "2",
"outputs": 2,
"conditionalMode": true,
"condition1Operator": ">",
"condition1Threshold": 30,
"condition2Enabled": false,
"outputTrue": "",
"outputFalse": "{\"SwitchableOutput/output_1/State\":0}",
"debounce": 0,
"x": 260,
"y": 320,
"wires": [
[
"0d0c033be179e0a6",
"4b15e2d8e83d8e1f"
],
[
"0761f40e9803793f"
]
]
},
{
"id": "a7e1312e.5108a",
"type": "victron-input-battery",
"z": "5097d071e5c6b8d8",
"service": "com.victronenergy.battery/277",
"path": "/Soc",
"serviceObj": {
"service": "com.victronenergy.battery/277",
"name": "BATTERY PACK1",
"communityTag": "battery"
},
"pathObj": {
"path": "/Soc",
"type": "float",
"name": "State of charge (%)"
},
"initial": "",
"name": "",
"onlyChanges": true,
"roundValues": "2",
"outputs": 2,
"conditionalMode": true,
"condition1Operator": ">=",
"condition1Threshold": 30,
"condition2Enabled": false,
"outputTrue": "",
"outputFalse": "{\"SwitchableOutput/output_1/State\":0}",
"debounce": 2000,
"x": 310,
"y": 400,
"wires": [
[
"0d0c033be179e0a6",
"4b15e2d8e83d8e1f"
],
[
"0761f40e9803793f"
]
]
},
{
"id": "0761f40e9803793f",
"type": "switch",
"z": "5097d071e5c6b8d8",
"name": "",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "true"
},
{
"t": "else"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 570,
"y": 360,
"wires": [
[
"3ffb1de914876bd4"
],
[
"19c88759b5c3d21a",
"027de7f88b700c2b"
]
]
},
{
"id": "56ea3ef821a7223d",
"type": "inject",
"z": "5097d071e5c6b8d8",
"name": "Init On",
"props": [
{
"p": "payload"
}
],
"repeat": "",
"crontab": "",
"once": true,
"onceDelay": "1",
"topic": "",
"payload": "{\"SwitchableOutput/output_1/State\":1}",
"payloadType": "json",
"x": 570,
"y": 320,
"wires": [
[
"3cf477ce41aef3e1"
]
]
},
{
"id": "2cce6416bef03b2e",
"type": "inject",
"z": "5097d071e5c6b8d8",
"name": "0",
"props": [
{
"p": "payload"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "{\"SwitchableOutput/output_1/State\":0}",
"payloadType": "json",
"x": 570,
"y": 260,
"wires": [
[
"19c88759b5c3d21a",
"3a5a84c72165c9a8"
]
]
},
{
"id": "61701b7543955754",
"type": "function",
"z": "5097d071e5c6b8d8",
"name": "Init",
"func": "msg.payload = {\n \"SwitchableOutput/output_1/State\": msg.payload\n};\nreturn msg;\n",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 570,
"y": 220,
"wires": [
[
"19c88759b5c3d21a"
]
]
},
{
"id": "db49ed4276e1e9ac",
"type": "inject",
"z": "5097d071e5c6b8d8",
"name": "1",
"props": [
{
"p": "payload"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "{\"SwitchableOutput/output_1/State\":1}",
"payloadType": "json",
"x": 570,
"y": 180,
"wires": [
[
"19c88759b5c3d21a",
"3a5a84c72165c9a8"
]
]
},
{
"id": "c6aa16916ed68b6f",
"type": "switch",
"z": "5097d071e5c6b8d8",
"name": "",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "true"
},
{
"t": "else"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 570,
"y": 100,
"wires": [
[],
[
"a1c64ed32475b050",
"19c88759b5c3d21a"
]
]
},
{
"id": "16fe82bb1d8b5c6c",
"type": "rbe",
"z": "5097d071e5c6b8d8",
"name": "",
"func": "rbe",
"gap": "",
"start": "",
"inout": "out",
"septopics": false,
"property": "payload",
"topi": "topic",
"x": 930,
"y": 220,
"wires": [
[
"5c1bb5b7a7ad66d9"
]
]
},
{
"id": "5c1bb5b7a7ad66d9",
"type": "victron-output-custom",
"z": "5097d071e5c6b8d8",
"service": "com.victronenergy.vebus/276",
"path": "/Ac/Control/IgnoreAcIn1",
"serviceObj": {
"service": "com.victronenergy.vebus/276",
"name": "MultiPlus-II 24/3000/70-32 (276)"
},
"pathObj": {
"path": "/Ac/Control/IgnoreAcIn1",
"name": "/Ac/Control/IgnoreAcIn1",
"type": "number",
"value": 0
},
"name": "Ignore AC In",
"onlyChanges": false,
"roundValues": "no",
"rateLimit": 0,
"outputs": 0,
"conditionalMode": false,
"condition1Operator": ">",
"condition2Enabled": false,
"condition2Service": "",
"condition2Path": "",
"condition2Operator": ">",
"logicOperator": "AND",
"outputTrue": "true",
"outputFalse": "false",
"outputOnChange": false,
"debounce": 2000,
"x": 1070,
"y": 220,
"wires": []
},
{
"id": "fccb0f057564db69",
"type": "join",
"z": "5097d071e5c6b8d8",
"name": "",
"mode": "custom",
"build": "object",
"property": "payload",
"propertyType": "msg",
"key": "topic",
"joiner": "\\n",
"joinerType": "str",
"useparts": false,
"accumulate": true,
"timeout": "",
"count": "2",
"reduceRight": false,
"reduceExp": "",
"reduceInit": "",
"reduceInitType": "",
"reduceFixup": "",
"x": 750,
"y": 280,
"wires": [
[
"ff16b4c50b87a9fb"
]
]
},
{
"id": "ff16b4c50b87a9fb",
"type": "function",
"z": "5097d071e5c6b8d8",
"name": "Ignore AC @ 100% SoC",
"func": "const BATT_SOC = msg.payload.SoC || 50;\nconst AutoIgnoreSwitch = msg.payload.AutoIgnoreSwitch || 0;\n\nif (( BATT_SOC == 100 && AutoIgnoreSwitch == 1 )) {\n const AcIgnore = {\n payload: {\n \"SwitchableOutput/output_1/State\": 1\n }\n };\n\nreturn AcIgnore;\n}\n\nreturn null;\n",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 990,
"y": 280,
"wires": [
[
"19c88759b5c3d21a"
]
]
},
{
"id": "3cf477ce41aef3e1",
"type": "victron-virtual-switch",
"z": "5097d071e5c6b8d8",
"name": "Ignore AC In @ 100% SoC",
"outputs": 2,
"switch_1_type": 1,
"switch_1_initial": 0,
"switch_1_label": "",
"switch_1_customname": "Ignore AC In @ 100% SoC",
"switch_1_group": "Custom Controls",
"switch_1_include_measurement": false,
"switch_1_rgb_color_wheel": false,
"switch_1_cct_wheel": false,
"switch_1_rgb_white_dimmer": false,
"x": 820,
"y": 320,
"wires": [
[],
[
"bcec8fdfa6831c8f"
]
]
},
{
"id": "bcec8fdfa6831c8f",
"type": "change",
"z": "5097d071e5c6b8d8",
"name": "",
"rules": [
{
"t": "set",
"p": "topic",
"pt": "msg",
"to": "AutoIgnoreSwitch",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1030,
"y": 320,
"wires": [
[
"fccb0f057564db69"
]
]
},
{
"id": "02aa57aa69b06ae9",
"type": "global-config",
"env": [],
"modules": {
"@victronenergy/node-red-contrib-victron": "1.6.63"
}
}
]