Indeed I did something wrong with de range requested. I corrected this.
[
{
"id": "885e4c42eae7c14a",
"type": "group",
"z": "493a25f4f755fa08",
"name": "Determine Green or Trade Mode",
"style": {
"label": true
},
"nodes": [
"e37be342ee2595f8",
"3f1854380b800af6",
"50a2bfc023e0902e",
"dacdb599bf17917d",
"34f3a9850e3ca6c4",
"3c7f6b56f7f38bb9",
"c2b24127f73b15ae",
"c226425011f448e0",
"d415af13d939da17"
],
"x": 74,
"y": 39,
"w": 1032,
"h": 262
},
{
"id": "e37be342ee2595f8",
"type": "vrm-api",
"z": "493a25f4f755fa08",
"g": "885e4c42eae7c14a",
"vrm": "19a6b69d787cf208",
"name": "Get Solar yield forecast",
"api_type": "installations",
"idUser": "",
"usersQuery": "me",
"idSite": "111111",
"installations": "stats",
"attribute": "solar_yield_forecast",
"stats_interval": "days",
"show_instance": false,
"stats_start": "0",
"stats_end": "86400",
"use_utc": false,
"gps_start": "",
"gps_end": "",
"widgets": "",
"instance": "",
"store_in_global_context": false,
"verbose": false,
"transform_price_schedule": false,
"outputs": 1,
"x": 430,
"y": 100,
"wires": [
[
"3f1854380b800af6",
"50a2bfc023e0902e",
"d415af13d939da17"
]
]
},
{
"id": "3f1854380b800af6",
"type": "change",
"z": "493a25f4f755fa08",
"g": "885e4c42eae7c14a",
"name": "",
"rules": [
{
"t": "set",
"p": "solarforecast",
"pt": "global",
"to": "payload.totals.solar_yield_forecast",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 730,
"y": 100,
"wires": [
[]
]
},
{
"id": "50a2bfc023e0902e",
"type": "vrm-api",
"z": "493a25f4f755fa08",
"g": "885e4c42eae7c14a",
"vrm": "19a6b69d787cf208",
"name": "Get Consumption forecast",
"api_type": "installations",
"idUser": "",
"usersQuery": "me",
"idSite": "111111",
"installations": "stats",
"attribute": "vrm_consumption_fc",
"stats_interval": "days",
"show_instance": false,
"stats_start": "0",
"stats_end": "86400",
"use_utc": false,
"gps_start": "",
"gps_end": "",
"widgets": "",
"instance": "",
"store_in_global_context": false,
"verbose": false,
"transform_price_schedule": false,
"outputs": 1,
"x": 430,
"y": 180,
"wires": [
[
"dacdb599bf17917d",
"3c7f6b56f7f38bb9",
"d415af13d939da17"
]
]
},
{
"id": "dacdb599bf17917d",
"type": "change",
"z": "493a25f4f755fa08",
"g": "885e4c42eae7c14a",
"name": "",
"rules": [
{
"t": "set",
"p": "consumptionforecast",
"pt": "global",
"to": "payload.totals.vrm_consumption_fc",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 750,
"y": 180,
"wires": [
[]
]
},
{
"id": "34f3a9850e3ca6c4",
"type": "function",
"z": "493a25f4f755fa08",
"g": "885e4c42eae7c14a",
"name": "Determine Green or Trade",
"func": "let solarforecast = global.get(\"solarforecast\");\nlet consumptionforecast = global.get(\"consumptionforecast\");\n\nif (solarforecast < consumptionforecast * 1.2) msg.payload = 1;\nelse msg.payload = 0;\n\nreturn msg;",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 530,
"y": 260,
"wires": [
[
"c2b24127f73b15ae"
]
]
},
{
"id": "3c7f6b56f7f38bb9",
"type": "delay",
"z": "493a25f4f755fa08",
"g": "885e4c42eae7c14a",
"name": "",
"pauseType": "delay",
"timeout": "1",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"allowrate": false,
"outputs": 1,
"x": 320,
"y": 260,
"wires": [
[
"34f3a9850e3ca6c4"
]
]
},
{
"id": "c2b24127f73b15ae",
"type": "victron-output-dess",
"z": "493a25f4f755fa08",
"g": "885e4c42eae7c14a",
"service": "com.victronenergy.settings",
"path": "/Settings/DynamicEss/OperatingMode",
"serviceObj": {
"service": "com.victronenergy.settings",
"name": "Venus settings",
"communityTag": "dess"
},
"pathObj": {
"path": "/Settings/DynamicEss/OperatingMode",
"type": "enum",
"name": "Dynamic ESS operating mode",
"enum": {
"0": "Trade mode",
"1": "Green mode"
},
"mode": "both"
},
"name": "",
"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": 900,
"y": 260,
"wires": []
},
{
"id": "c226425011f448e0",
"type": "cronplus",
"z": "493a25f4f755fa08",
"g": "885e4c42eae7c14a",
"name": "",
"outputField": "payload",
"timeZone": "",
"storeName": "",
"commandResponseMsgOutput": "output1",
"defaultLocation": "",
"defaultLocationType": "default",
"outputs": 1,
"options": [
{
"name": "schedule1",
"topic": "topic1",
"payloadType": "date",
"payload": "",
"expressionType": "cron",
"expression": "0 0 6,18 * * * *",
"location": "",
"offset": "0",
"solarType": "all",
"solarEvents": "sunrise,sunset"
}
],
"x": 180,
"y": 100,
"wires": [
[
"e37be342ee2595f8"
]
]
},
{
"id": "d415af13d939da17",
"type": "debug",
"z": "493a25f4f755fa08",
"g": "885e4c42eae7c14a",
"name": "debug 1",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 940,
"y": 80,
"wires": []
},
{
"id": "19a6b69d787cf208",
"type": "config-vrm-api",
"name": "",
"forceIpv4": false
},
{
"id": "4be6c58910dc7b68",
"type": "global-config",
"env": [],
"modules": {
"victron-vrm-api": "0.3.11",
"@victronenergy/node-red-contrib-victron": "1.6.64",
"node-red-contrib-cron-plus": "2.2.4"
}
}
]