Manual control for ESS

Not relevant anymore

I have node-red doing a lot of things but specifically to get 2 ESS working on the same meter I needed to disable the internal chargers overnight. I have a mix of solar and use excess grid-tied PV to charge the batteries. This flow sets DVCC to 0 from 5pm to 7am so they don’t charge from each other overnight.

Flow

[
{
“id”: “07b85bf4d24aed70”,
“type”: “victron-input-ess”,
“z”: “01ee52a626bbef83”,
“service”: “com.victronenergy.settings”,
“path”: “/Settings/SystemSetup/MaxChargeCurrent”,
“serviceObj”: {
“service”: “com.victronenergy.settings”,
“name”: “Venus settings”
},
“pathObj”: {
“path”: “/Settings/SystemSetup/MaxChargeCurrent”,
“type”: “float”,
“name”: “DVCC Charge current limit (A)”
},
“name”: “”,
“onlyChanges”: false,
“x”: 1500,
“y”: 620,
“wires”: [

]
},
{
“id”: “5711b23639c1d4fa”,
“type”: “victron-output-settings”,
“z”: “01ee52a626bbef83”,
“service”: “com.victronenergy.settings”,
“path”: “/Settings/SystemSetup/MaxChargeCurrent”,
“serviceObj”: {
“service”: “com.victronenergy.settings”,
“name”: “Venus settings”
},
“pathObj”: {
“path”: “/Settings/SystemSetup/MaxChargeCurrent”,
“type”: “float”,
“name”: “DVCC system max charge current (A DC)”,
“writable”: true
},
“name”: “”,
“onlyChanges”: false,
“x”: 1530,
“y”: 560,
“wires”:
},
{
“id”: “93de6af69f0f6765”,
“type”: “debug”,
“z”: “01ee52a626bbef83”,
“name”: “debug 3”,
“active”: false,
“tosidebar”: true,
“console”: false,
“tostatus”: false,
“complete”: “false”,
“statusVal”: “”,
“statusType”: “auto”,
“x”: 1380,
“y”: 520,
“wires”:
},
{
“id”: “69ec4d2465dc08bd”,
“type”: “inject”,
“z”: “01ee52a626bbef83”,
“name”: “EVERY 5 SEC SEND 1”,
“props”: [
{
“p”: “payload”
},
{
“p”: “topic”,
“vt”: “str”
}
],
“repeat”: “5”,
“crontab”: “”,
“once”: false,
“onceDelay”: 0.1,
“topic”: “”,
“payload”: “1”,
“payloadType”: “num”,
“x”: 830,
“y”: 560,
“wires”: [
[
“49c58fca4c0aa9c1”
]
]
},
{
“id”: “d25579ab932674ff”,
“type”: “inject”,
“z”: “01ee52a626bbef83”,
“name”: “”,
“props”: [
{
“p”: “payload”
},
{
“p”: “topic”,
“vt”: “str”
}
],
“repeat”: “”,
“crontab”: “”,
“once”: false,
“onceDelay”: 0.1,
“topic”: “”,
“payload”: “0”,
“payloadType”: “num”,
“x”: 1230,
“y”: 620,
“wires”: [
[
“5711b23639c1d4fa”
]
]
},
{
“id”: “49c58fca4c0aa9c1”,
“type”: “function”,
“z”: “01ee52a626bbef83”,
“name”: “Send charge current for the day”,
“func”: “// Get the current timestamp\nvar now = new Date();\nvar localTime = new Date(now.getTime()); // Adjust if needed\n\n// Get the current local hour and minute\nvar currentHour = localTime.getHours();\nvar currentMinute = localTime.getMinutes();\n\n// Define the start and end times (7:00 AM to 5:00 PM)\nvar startTime = { hour: 7, minute: 0 }; // Starts at 7:00 AM\nvar endTime = { hour: 17, minute: 0 }; // Ends at 5:00 PM\n\n// Convert times to total minutes\nvar startTotalMinutes = startTime.hour * 60 + startTime.minute;\nvar endTotalMinutes = endTime.hour * 60 + endTime.minute;\nvar currentTotalMinutes = currentHour * 60 + currentMinute;\n\n// Check conditions: if time is between 7:00 AM and 5:00 PM\nif (currentTotalMinutes >= startTotalMinutes && currentTotalMinutes < endTotalMinutes) {\n msg.payload = 50; // Send 25 within the time range\n} else {\n msg.payload = 0; // Send 0 outside the time range\n}\n\nreturn msg;\n”,
“outputs”: 1,
“timeout”: 0,
“noerr”: 0,
“initialize”: “”,
“finalize”: “”,
“libs”: ,
“x”: 1110,
“y”: 560,
“wires”: [
[
“93de6af69f0f6765”,
“5711b23639c1d4fa”
]
]
}
]

I have split this off to a new topic in modifications. Please change the title accordingly.

Not relevant anymore

Not relevant anymore

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.