Last active
November 29, 2023 13:34
-
-
Save dirkjanfaber/941e34378733a668fbb4bb645f4b3fdc to your computer and use it in GitHub Desktop.
Node-Red way to "activate scheduled charge no.4 at 10pm if battery is below x% SoC" with a standard Victron node (no coding required)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"id": "13b8708c2a084ab6", | |
"type": "tab", | |
"label": "Soc based schedule activation", | |
"disabled": false, | |
"info": "", | |
"env": [] | |
}, | |
{ | |
"id": "7e599749fb7d06d3", | |
"type": "inject", | |
"z": "13b8708c2a084ab6", | |
"name": "Daily at 22.00", | |
"props": [ | |
{ | |
"p": "payload" | |
}, | |
{ | |
"p": "topic", | |
"vt": "str" | |
} | |
], | |
"repeat": "", | |
"crontab": "00 22 * * *", | |
"once": false, | |
"onceDelay": 0.1, | |
"topic": "", | |
"payload": "", | |
"payloadType": "date", | |
"x": 260, | |
"y": 240, | |
"wires": [ | |
[ | |
"f0e8d8109177b799" | |
] | |
] | |
}, | |
{ | |
"id": "1c390aa6b96753e2", | |
"type": "victron-input-vebus", | |
"z": "13b8708c2a084ab6", | |
"service": "com.victronenergy.vebus/276", | |
"path": "/Soc", | |
"serviceObj": { | |
"service": "com.victronenergy.vebus/276", | |
"name": "MultiPlus-II 48/3000/35-32" | |
}, | |
"pathObj": { | |
"path": "/Soc", | |
"type": "float", | |
"name": "VE.Bus state of charge (%)" | |
}, | |
"name": "", | |
"onlyChanges": true, | |
"roundValues": "0", | |
"x": 360, | |
"y": 160, | |
"wires": [ | |
[ | |
"64035b7a7f5c957a" | |
] | |
] | |
}, | |
{ | |
"id": "64035b7a7f5c957a", | |
"type": "change", | |
"z": "13b8708c2a084ab6", | |
"name": "Store SOC", | |
"rules": [ | |
{ | |
"t": "set", | |
"p": "SOC", | |
"pt": "global", | |
"to": "payload", | |
"tot": "msg" | |
} | |
], | |
"action": "", | |
"property": "", | |
"from": "", | |
"to": "", | |
"reg": false, | |
"x": 670, | |
"y": 160, | |
"wires": [ | |
[] | |
] | |
}, | |
{ | |
"id": "f0e8d8109177b799", | |
"type": "switch", | |
"z": "13b8708c2a084ab6", | |
"name": "Check if SOC <= 20%", | |
"property": "SOC", | |
"propertyType": "global", | |
"rules": [ | |
{ | |
"t": "lte", | |
"v": "20", | |
"vt": "num" | |
}, | |
{ | |
"t": "else" | |
} | |
], | |
"checkall": "true", | |
"repair": false, | |
"outputs": 2, | |
"x": 480, | |
"y": 240, | |
"wires": [ | |
[ | |
"85eee29bf1d89914" | |
], | |
[ | |
"224ebe807053c061" | |
] | |
], | |
"outputLabels": [ | |
"SOC too low", | |
"SOC alright" | |
] | |
}, | |
{ | |
"id": "cbc15df37ba916ff", | |
"type": "victron-output-ess", | |
"z": "13b8708c2a084ab6", | |
"service": "com.victronenergy.settings", | |
"path": "/Settings/CGwacs/BatteryLife/Schedule/Charge/3/Day", | |
"serviceObj": { | |
"service": "com.victronenergy.settings", | |
"name": "Venus settings" | |
}, | |
"pathObj": { | |
"path": "/Settings/CGwacs/BatteryLife/Schedule/Charge/3/Day", | |
"type": "enum", | |
"name": "Schedule 4: Day", | |
"enum": { | |
"0": "Sunday", | |
"1": "Monday", | |
"2": "Tuesday", | |
"3": "Wednesday", | |
"4": "Thursday", | |
"5": "Friday", | |
"6": "Saturday", | |
"7": "Every day", | |
"8": "Weekdays", | |
"9": "Weekends" | |
}, | |
"writable": true | |
}, | |
"initial": "", | |
"name": "", | |
"onlyChanges": false, | |
"x": 1040, | |
"y": 240, | |
"wires": [] | |
}, | |
{ | |
"id": "85eee29bf1d89914", | |
"type": "change", | |
"z": "13b8708c2a084ab6", | |
"name": "Activate schedule 4", | |
"rules": [ | |
{ | |
"t": "set", | |
"p": "payload", | |
"pt": "msg", | |
"to": "7", | |
"tot": "num" | |
} | |
], | |
"action": "", | |
"property": "", | |
"from": "", | |
"to": "", | |
"reg": false, | |
"x": 730, | |
"y": 220, | |
"wires": [ | |
[ | |
"cbc15df37ba916ff" | |
] | |
] | |
}, | |
{ | |
"id": "224ebe807053c061", | |
"type": "change", | |
"z": "13b8708c2a084ab6", | |
"name": "Deactivate schedule 4", | |
"rules": [ | |
{ | |
"t": "set", | |
"p": "payload", | |
"pt": "msg", | |
"to": "-7", | |
"tot": "num" | |
} | |
], | |
"action": "", | |
"property": "", | |
"from": "", | |
"to": "", | |
"reg": false, | |
"x": 740, | |
"y": 260, | |
"wires": [ | |
[ | |
"cbc15df37ba916ff" | |
] | |
] | |
} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment