Assuming you run DESS:
This flow allows to set a delta soc% that gets applied automatically on the incomming VRM DESS schedules. Investigate the nodes to adjust for your own needs. The top group sets the delta as a flow context, the bottom group ensures it gets applied. Do check your global context for actual values.
[
{
"id": "e93a0fa19b4e94ef",
"type": "tab",
"label": "Flow 2",
"disabled": false,
"info": "",
"env": []
},
{
"id": "27fed8e81887d874",
"type": "group",
"z": "e93a0fa19b4e94ef",
"style": {
"stroke": "#999999",
"stroke-opacity": "1",
"fill": "none",
"fill-opacity": "1",
"label": true,
"label-position": "nw",
"color": "#a4a4a4"
},
"nodes": [
"43fa078f81e6fa6f",
"4aae368ab867b8f6",
"71e664fe7182c8f2",
"dbfdaf7da41ef7bb"
],
"x": 34,
"y": 59,
"w": 312,
"h": 202
},
{
"id": "9504f31c551cc3a9",
"type": "group",
"z": "e93a0fa19b4e94ef",
"name": "",
"style": {
"label": true
},
"nodes": [
"c9baf80caa93fa03",
"aca4b11c7ac18285",
"5cb62589afec2953",
"3acb6ac480a02760",
"8af1075a74576018",
"9490322c533ea958",
"50af02f13e7b8112",
"b375a024a1a9ef7d",
"66e15f194b62a720",
"0ce74f090bd7de6e",
"6eb949b72c34414c",
"2e8474e9f6751c08",
"42c0403e761125cd",
"953c4fc7d001b890",
"d6bd73e5a2728fbd",
"e0139ce044c9a926",
"29cea0d1812b449c",
"bd98a337fb0bf49d",
"20e8af3527a9cbb5",
"505a3c60e984f7ff",
"7bd9f7a9b6ad90a3",
"95e48bc77caa556c",
"82479aa49217f710",
"43e94cdf4fbd1c62",
"431282b8c7c140e8",
"ccb5188ea1274b5b",
"3b2333787a589d86",
"3fe61940029e593b",
"4cc42e925cacff6d",
"e651a6db5d649b4c",
"a964039ac341f40e",
"5bfc79b4c9c9c3aa",
"209aed5e4690e8fc",
"c898bd869e1e680b"
],
"x": 34,
"y": 299,
"w": 1452,
"h": 242
},
{
"id": "29cea0d1812b449c",
"type": "junction",
"z": "e93a0fa19b4e94ef",
"g": "9504f31c551cc3a9",
"x": 1460,
"y": 340,
"wires": [
[]
]
},
{
"id": "c898bd869e1e680b",
"type": "junction",
"z": "e93a0fa19b4e94ef",
"g": "9504f31c551cc3a9",
"x": 1460,
"y": 440,
"wires": [
[]
]
},
{
"id": "43fa078f81e6fa6f",
"type": "inject",
"z": "e93a0fa19b4e94ef",
"g": "27fed8e81887d874",
"name": "+0.50",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "delta",
"payload": "0.50",
"payloadType": "num",
"x": 130,
"y": 100,
"wires": [
[
"dbfdaf7da41ef7bb"
]
]
},
{
"id": "4aae368ab867b8f6",
"type": "inject",
"z": "e93a0fa19b4e94ef",
"g": "27fed8e81887d874",
"name": "+0.00",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "delta",
"payload": "0.00",
"payloadType": "num",
"x": 130,
"y": 160,
"wires": [
[
"dbfdaf7da41ef7bb"
]
]
},
{
"id": "71e664fe7182c8f2",
"type": "inject",
"z": "e93a0fa19b4e94ef",
"g": "27fed8e81887d874",
"name": "-0.50",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "delta",
"payload": "-0.50",
"payloadType": "num",
"x": 130,
"y": 220,
"wires": [
[
"dbfdaf7da41ef7bb"
]
]
},
{
"id": "dbfdaf7da41ef7bb",
"type": "function",
"z": "e93a0fa19b4e94ef",
"g": "27fed8e81887d874",
"name": "dsoc",
"func": "let ts = Date.now();\n\nlet dsoc = msg.payload;\nflow.set( 'dsoc', dsoc );\n\nlet fill = 'grey';\nif ( dsoc > 0 ) { fill = 'green'; }\nif ( dsoc < 0 ) { fill = 'blue'; }\nlet shape = 'dot';\nlet text = ( dsoc + ' @ ' + ts );\nnode.status( { fill, shape, text } );\n\nmsg.topic = 'dsoc';\nmsg.ts = ts;\n//msg.payload = dsoc;\n\nreturn msg;",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 270,
"y": 160,
"wires": [
[]
]
},
{
"id": "c9baf80caa93fa03",
"type": "victron-input-custom",
"z": "e93a0fa19b4e94ef",
"g": "9504f31c551cc3a9",
"service": "com.victronenergy.settings",
"path": "/Settings/DynamicEss/Schedule/0/TargetSoc",
"serviceObj": {
"service": "com.victronenergy.settings",
"name": "com.victronenergy.settings"
},
"pathObj": {
"path": "/Settings/DynamicEss/Schedule/0/TargetSoc",
"name": "/Settings/DynamicEss/Schedule/0/TargetSoc",
"type": "number",
"value": 27.53
},
"name": "dbsTSoC0",
"onlyChanges": true,
"roundValues": "no",
"rateLimit": "0",
"x": 120,
"y": 340,
"wires": [
[
"29cea0d1812b449c",
"ccb5188ea1274b5b"
]
]
},
{
"id": "aca4b11c7ac18285",
"type": "victron-input-custom",
"z": "e93a0fa19b4e94ef",
"g": "9504f31c551cc3a9",
"service": "com.victronenergy.settings",
"path": "/Settings/DynamicEss/Schedule/1/TargetSoc",
"serviceObj": {
"service": "com.victronenergy.settings",
"name": "com.victronenergy.settings"
},
"pathObj": {
"path": "/Settings/DynamicEss/Schedule/1/TargetSoc",
"name": "/Settings/DynamicEss/Schedule/1/TargetSoc",
"type": "number",
"value": 25.95
},
"name": "dbsTSoC1",
"onlyChanges": true,
"roundValues": "no",
"rateLimit": "0",
"x": 300,
"y": 340,
"wires": [
[
"29cea0d1812b449c",
"3b2333787a589d86"
]
]
},
{
"id": "5cb62589afec2953",
"type": "victron-input-custom",
"z": "e93a0fa19b4e94ef",
"g": "9504f31c551cc3a9",
"service": "com.victronenergy.settings",
"path": "/Settings/DynamicEss/Schedule/2/TargetSoc",
"serviceObj": {
"service": "com.victronenergy.settings",
"name": "com.victronenergy.settings"
},
"pathObj": {
"path": "/Settings/DynamicEss/Schedule/2/TargetSoc",
"name": "/Settings/DynamicEss/Schedule/2/TargetSoc",
"type": "number",
"value": 24.36
},
"name": "dbsTSoC2",
"onlyChanges": true,
"roundValues": "no",
"rateLimit": "0",
"x": 480,
"y": 340,
"wires": [
[
"29cea0d1812b449c",
"3fe61940029e593b"
]
]
},
{
"id": "3acb6ac480a02760",
"type": "victron-input-custom",
"z": "e93a0fa19b4e94ef",
"g": "9504f31c551cc3a9",
"service": "com.victronenergy.settings",
"path": "/Settings/DynamicEss/Schedule/3/TargetSoc",
"serviceObj": {
"service": "com.victronenergy.settings",
"name": "com.victronenergy.settings"
},
"pathObj": {
"path": "/Settings/DynamicEss/Schedule/3/TargetSoc",
"name": "/Settings/DynamicEss/Schedule/3/TargetSoc",
"type": "number",
"value": 22.78
},
"name": "dbsTSoC3",
"onlyChanges": true,
"roundValues": "no",
"rateLimit": "0",
"x": 660,
"y": 340,
"wires": [
[
"29cea0d1812b449c",
"4cc42e925cacff6d"
]
]
},
{
"id": "8af1075a74576018",
"type": "victron-input-custom",
"z": "e93a0fa19b4e94ef",
"g": "9504f31c551cc3a9",
"service": "com.victronenergy.settings",
"path": "/Settings/DynamicEss/Schedule/4/TargetSoc",
"serviceObj": {
"service": "com.victronenergy.settings",
"name": "com.victronenergy.settings"
},
"pathObj": {
"path": "/Settings/DynamicEss/Schedule/4/TargetSoc",
"name": "/Settings/DynamicEss/Schedule/4/TargetSoc",
"type": "number",
"value": 21.2
},
"name": "dbsTSoC4",
"onlyChanges": true,
"roundValues": "no",
"rateLimit": "0",
"x": 840,
"y": 340,
"wires": [
[
"29cea0d1812b449c",
"e651a6db5d649b4c"
]
]
},
{
"id": "9490322c533ea958",
"type": "victron-input-custom",
"z": "e93a0fa19b4e94ef",
"g": "9504f31c551cc3a9",
"service": "com.victronenergy.settings",
"path": "/Settings/DynamicEss/Schedule/5/TargetSoc",
"serviceObj": {
"service": "com.victronenergy.settings",
"name": "com.victronenergy.settings"
},
"pathObj": {
"path": "/Settings/DynamicEss/Schedule/5/TargetSoc",
"name": "/Settings/DynamicEss/Schedule/5/TargetSoc",
"type": "number",
"value": 20.65
},
"name": "dbsTSoC5",
"onlyChanges": true,
"roundValues": "no",
"rateLimit": "0",
"x": 1020,
"y": 340,
"wires": [
[
"29cea0d1812b449c",
"a964039ac341f40e"
]
]
},
{
"id": "50af02f13e7b8112",
"type": "victron-input-custom",
"z": "e93a0fa19b4e94ef",
"g": "9504f31c551cc3a9",
"service": "com.victronenergy.settings",
"path": "/Settings/DynamicEss/Schedule/6/TargetSoc",
"serviceObj": {
"service": "com.victronenergy.settings",
"name": "com.victronenergy.settings"
},
"pathObj": {
"path": "/Settings/DynamicEss/Schedule/6/TargetSoc",
"name": "/Settings/DynamicEss/Schedule/6/TargetSoc",
"type": "number",
"value": 20.1
},
"name": "dbsTSoC6",
"onlyChanges": true,
"roundValues": "no",
"rateLimit": "0",
"x": 1200,
"y": 340,
"wires": [
[
"29cea0d1812b449c",
"5bfc79b4c9c9c3aa"
]
]
},
{
"id": "b375a024a1a9ef7d",
"type": "victron-input-custom",
"z": "e93a0fa19b4e94ef",
"g": "9504f31c551cc3a9",
"service": "com.victronenergy.settings",
"path": "/Settings/DynamicEss/Schedule/7/TargetSoc",
"serviceObj": {
"service": "com.victronenergy.settings",
"name": "com.victronenergy.settings"
},
"pathObj": {
"path": "/Settings/DynamicEss/Schedule/7/TargetSoc",
"name": "/Settings/DynamicEss/Schedule/7/TargetSoc",
"type": "number",
"value": 19.55
},
"name": "dbsTSoC7",
"onlyChanges": true,
"roundValues": "no",
"rateLimit": "0",
"x": 1380,
"y": 340,
"wires": [
[
"29cea0d1812b449c",
"209aed5e4690e8fc"
]
]
},
{
"id": "66e15f194b62a720",
"type": "victron-output-custom",
"z": "e93a0fa19b4e94ef",
"g": "9504f31c551cc3a9",
"service": "com.victronenergy.settings",
"path": "/Settings/DynamicEss/Schedule/4/TargetSoc",
"serviceObj": {
"service": "com.victronenergy.settings",
"name": "com.victronenergy.settings"
},
"pathObj": {
"path": "/Settings/DynamicEss/Schedule/4/TargetSoc",
"name": "/Settings/DynamicEss/Schedule/4/TargetSoc",
"type": "number",
"value": 47.79
},
"name": "dbsTSoC4",
"onlyChanges": false,
"x": 850,
"y": 500,
"wires": []
},
{
"id": "0ce74f090bd7de6e",
"type": "victron-output-custom",
"z": "e93a0fa19b4e94ef",
"g": "9504f31c551cc3a9",
"service": "com.victronenergy.settings",
"path": "/Settings/DynamicEss/Schedule/5/TargetSoc",
"serviceObj": {
"service": "com.victronenergy.settings",
"name": "com.victronenergy.settings"
},
"pathObj": {
"path": "/Settings/DynamicEss/Schedule/5/TargetSoc",
"name": "/Settings/DynamicEss/Schedule/5/TargetSoc",
"type": "number",
"value": 49.56
},
"name": "dbsTSoC5",
"onlyChanges": false,
"x": 1030,
"y": 500,
"wires": []
},
{
"id": "6eb949b72c34414c",
"type": "victron-output-custom",
"z": "e93a0fa19b4e94ef",
"g": "9504f31c551cc3a9",
"service": "com.victronenergy.settings",
"path": "/Settings/DynamicEss/Schedule/6/TargetSoc",
"serviceObj": {
"service": "com.victronenergy.settings",
"name": "com.victronenergy.settings"
},
"pathObj": {
"path": "/Settings/DynamicEss/Schedule/6/TargetSoc",
"name": "/Settings/DynamicEss/Schedule/6/TargetSoc",
"type": "number",
"value": 51.33
},
"name": "dbsTSoC6",
"onlyChanges": false,
"x": 1210,
"y": 500,
"wires": []
},
{
"id": "2e8474e9f6751c08",
"type": "victron-output-custom",
"z": "e93a0fa19b4e94ef",
"g": "9504f31c551cc3a9",
"service": "com.victronenergy.settings",
"path": "/Settings/DynamicEss/Schedule/7/TargetSoc",
"serviceObj": {
"service": "com.victronenergy.settings",
"name": "com.victronenergy.settings"
},
"pathObj": {
"path": "/Settings/DynamicEss/Schedule/7/TargetSoc",
"name": "/Settings/DynamicEss/Schedule/7/TargetSoc",
"type": "number",
"value": 53.1
},
"name": "dbsTSoC7",
"onlyChanges": false,
"x": 1390,
"y": 500,
"wires": []
},
{
"id": "42c0403e761125cd",
"type": "victron-output-custom",
"z": "e93a0fa19b4e94ef",
"g": "9504f31c551cc3a9",
"service": "com.victronenergy.settings",
"path": "/Settings/DynamicEss/Schedule/0/TargetSoc",
"serviceObj": {
"service": "com.victronenergy.settings",
"name": "com.victronenergy.settings"
},
"pathObj": {
"path": "/Settings/DynamicEss/Schedule/0/TargetSoc",
"name": "/Settings/DynamicEss/Schedule/0/TargetSoc",
"type": "number",
"value": 40.15
},
"name": "dbsTSoC0",
"onlyChanges": false,
"x": 130,
"y": 500,
"wires": []
},
{
"id": "953c4fc7d001b890",
"type": "victron-output-custom",
"z": "e93a0fa19b4e94ef",
"g": "9504f31c551cc3a9",
"service": "com.victronenergy.settings",
"path": "/Settings/DynamicEss/Schedule/1/TargetSoc",
"serviceObj": {
"service": "com.victronenergy.settings",
"name": "com.victronenergy.settings"
},
"pathObj": {
"path": "/Settings/DynamicEss/Schedule/1/TargetSoc",
"name": "/Settings/DynamicEss/Schedule/1/TargetSoc",
"type": "number",
"value": 42.11
},
"name": "dbsTSoC1",
"onlyChanges": false,
"x": 310,
"y": 500,
"wires": []
},
{
"id": "d6bd73e5a2728fbd",
"type": "victron-output-custom",
"z": "e93a0fa19b4e94ef",
"g": "9504f31c551cc3a9",
"service": "com.victronenergy.settings",
"path": "/Settings/DynamicEss/Schedule/2/TargetSoc",
"serviceObj": {
"service": "com.victronenergy.settings",
"name": "com.victronenergy.settings"
},
"pathObj": {
"path": "/Settings/DynamicEss/Schedule/2/TargetSoc",
"name": "/Settings/DynamicEss/Schedule/2/TargetSoc",
"type": "number",
"value": 44.06
},
"name": "dbsTSoC2",
"onlyChanges": false,
"x": 490,
"y": 500,
"wires": []
},
{
"id": "e0139ce044c9a926",
"type": "victron-output-custom",
"z": "e93a0fa19b4e94ef",
"g": "9504f31c551cc3a9",
"service": "com.victronenergy.settings",
"path": "/Settings/DynamicEss/Schedule/3/TargetSoc",
"serviceObj": {
"service": "com.victronenergy.settings",
"name": "com.victronenergy.settings"
},
"pathObj": {
"path": "/Settings/DynamicEss/Schedule/3/TargetSoc",
"name": "/Settings/DynamicEss/Schedule/3/TargetSoc",
"type": "number",
"value": 46.02
},
"name": "dbsTSoC3",
"onlyChanges": false,
"x": 670,
"y": 500,
"wires": []
},
{
"id": "bd98a337fb0bf49d",
"type": "function",
"z": "e93a0fa19b4e94ef",
"g": "9504f31c551cc3a9",
"name": "dsoc",
"func": "let ts = Date.now();\nmsg.ts = ts;\n\nlet dsoc = flow.get( 'dsoc' );\nlet soc = msg.payload + dsoc;\n\nif ( soc > 100 ) {\n soc = 100;\n} else if ( soc < 0 ) {\n soc = 0;\n}\n\nlet fill = 'grey';\nif ( dsoc > 0 ) { fill = 'green'; }\nif ( dsoc < 0 ) { fill = 'blue'; }\nlet shape = 'dot';\nlet text = ( dsoc + ' @ ' + ts );\nnode.status( { fill, shape, text } );\n\nmsg.topic = 'soc';\nmsg.payload = soc;\n\nreturn msg;",
"outputs": 1,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 1370,
"y": 440,
"wires": [
[
"2e8474e9f6751c08",
"c898bd869e1e680b"
]
]
},
{
"id": "20e8af3527a9cbb5",
"type": "function",
"z": "e93a0fa19b4e94ef",
"g": "9504f31c551cc3a9",
"name": "dsoc",
"func": "let ts = Date.now();\nmsg.ts = ts;\n\nlet dsoc = flow.get( 'dsoc' );\nlet soc = msg.payload + dsoc;\n\nif ( soc > 100 ) {\n soc = 100;\n} else if ( soc < 0 ) {\n soc = 0;\n}\n\nlet fill = 'grey';\nif ( dsoc > 0 ) { fill = 'green'; }\nif ( dsoc < 0 ) { fill = 'blue'; }\nlet shape = 'dot';\nlet text = ( dsoc + ' @ ' + ts );\nnode.status( { fill, shape, text } );\n\nmsg.topic = 'soc';\nmsg.payload = soc;\n\nreturn msg;",
"outputs": 1,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 110,
"y": 440,
"wires": [
[
"42c0403e761125cd",
"c898bd869e1e680b"
]
]
},
{
"id": "505a3c60e984f7ff",
"type": "function",
"z": "e93a0fa19b4e94ef",
"g": "9504f31c551cc3a9",
"name": "dsoc",
"func": "let ts = Date.now();\nmsg.ts = ts;\n\nlet dsoc = flow.get( 'dsoc' );\nlet soc = msg.payload + dsoc;\n\nif ( soc > 100 ) {\n soc = 100;\n} else if ( soc < 0 ) {\n soc = 0;\n}\n\nlet fill = 'grey';\nif ( dsoc > 0 ) { fill = 'green'; }\nif ( dsoc < 0 ) { fill = 'blue'; }\nlet shape = 'dot';\nlet text = ( dsoc + ' @ ' + ts );\nnode.status( { fill, shape, text } );\n\nmsg.topic = 'soc';\nmsg.payload = soc;\n\nreturn msg;",
"outputs": 1,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 290,
"y": 440,
"wires": [
[
"953c4fc7d001b890",
"c898bd869e1e680b"
]
]
},
{
"id": "7bd9f7a9b6ad90a3",
"type": "function",
"z": "e93a0fa19b4e94ef",
"g": "9504f31c551cc3a9",
"name": "dsoc",
"func": "let ts = Date.now();\nmsg.ts = ts;\n\nlet dsoc = flow.get( 'dsoc' );\nlet soc = msg.payload + dsoc;\n\nif ( soc > 100 ) {\n soc = 100;\n} else if ( soc < 0 ) {\n soc = 0;\n}\n\nlet fill = 'grey';\nif ( dsoc > 0 ) { fill = 'green'; }\nif ( dsoc < 0 ) { fill = 'blue'; }\nlet shape = 'dot';\nlet text = ( dsoc + ' @ ' + ts );\nnode.status( { fill, shape, text } );\n\nmsg.topic = 'soc';\nmsg.payload = soc;\n\nreturn msg;",
"outputs": 1,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 470,
"y": 440,
"wires": [
[
"d6bd73e5a2728fbd",
"c898bd869e1e680b"
]
]
},
{
"id": "95e48bc77caa556c",
"type": "function",
"z": "e93a0fa19b4e94ef",
"g": "9504f31c551cc3a9",
"name": "dsoc",
"func": "let ts = Date.now();\nmsg.ts = ts;\n\nlet dsoc = flow.get( 'dsoc' );\nlet soc = msg.payload + dsoc;\n\nif ( soc > 100 ) {\n soc = 100;\n} else if ( soc < 0 ) {\n soc = 0;\n}\n\nlet fill = 'grey';\nif ( dsoc > 0 ) { fill = 'green'; }\nif ( dsoc < 0 ) { fill = 'blue'; }\nlet shape = 'dot';\nlet text = ( dsoc + ' @ ' + ts );\nnode.status( { fill, shape, text } );\n\nmsg.topic = 'soc';\nmsg.payload = soc;\n\nreturn msg;",
"outputs": 1,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 650,
"y": 440,
"wires": [
[
"e0139ce044c9a926",
"c898bd869e1e680b"
]
]
},
{
"id": "82479aa49217f710",
"type": "function",
"z": "e93a0fa19b4e94ef",
"g": "9504f31c551cc3a9",
"name": "dsoc",
"func": "let ts = Date.now();\nmsg.ts = ts;\n\nlet dsoc = flow.get( 'dsoc' );\nlet soc = msg.payload + dsoc;\n\nif ( soc > 100 ) {\n soc = 100;\n} else if ( soc < 0 ) {\n soc = 0;\n}\n\nlet fill = 'grey';\nif ( dsoc > 0 ) { fill = 'green'; }\nif ( dsoc < 0 ) { fill = 'blue'; }\nlet shape = 'dot';\nlet text = ( dsoc + ' @ ' + ts );\nnode.status( { fill, shape, text } );\n\nmsg.topic = 'soc';\nmsg.payload = soc;\n\nreturn msg;",
"outputs": 1,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 830,
"y": 440,
"wires": [
[
"66e15f194b62a720",
"c898bd869e1e680b"
]
]
},
{
"id": "43e94cdf4fbd1c62",
"type": "function",
"z": "e93a0fa19b4e94ef",
"g": "9504f31c551cc3a9",
"name": "dsoc",
"func": "let ts = Date.now();\nmsg.ts = ts;\n\nlet dsoc = flow.get( 'dsoc' );\nlet soc = msg.payload + dsoc;\n\nif ( soc > 100 ) {\n soc = 100;\n} else if ( soc < 0 ) {\n soc = 0;\n}\n\nlet fill = 'grey';\nif ( dsoc > 0 ) { fill = 'green'; }\nif ( dsoc < 0 ) { fill = 'blue'; }\nlet shape = 'dot';\nlet text = ( dsoc + ' @ ' + ts );\nnode.status( { fill, shape, text } );\n\nmsg.topic = 'soc';\nmsg.payload = soc;\n\nreturn msg;",
"outputs": 1,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 1010,
"y": 440,
"wires": [
[
"0ce74f090bd7de6e",
"c898bd869e1e680b"
]
]
},
{
"id": "431282b8c7c140e8",
"type": "function",
"z": "e93a0fa19b4e94ef",
"g": "9504f31c551cc3a9",
"name": "dsoc",
"func": "let ts = Date.now();\nmsg.ts = ts;\n\nlet dsoc = flow.get( 'dsoc' );\nlet soc = msg.payload + dsoc;\n\nif ( soc > 100 ) {\n soc = 100;\n} else if ( soc < 0 ) {\n soc = 0;\n}\n\nlet fill = 'grey';\nif ( dsoc > 0 ) { fill = 'green'; }\nif ( dsoc < 0 ) { fill = 'blue'; }\nlet shape = 'dot';\nlet text = ( dsoc + ' @ ' + ts );\nnode.status( { fill, shape, text } );\n\nmsg.topic = 'soc';\nmsg.payload = soc;\n\nreturn msg;",
"outputs": 1,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 1190,
"y": 440,
"wires": [
[
"6eb949b72c34414c",
"c898bd869e1e680b"
]
]
},
{
"id": "ccb5188ea1274b5b",
"type": "delay",
"z": "e93a0fa19b4e94ef",
"g": "9504f31c551cc3a9",
"name": "1/s",
"pauseType": "rate",
"timeout": "1",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": true,
"allowrate": false,
"outputs": 1,
"x": 110,
"y": 400,
"wires": [
[
"20e8af3527a9cbb5"
]
]
},
{
"id": "3b2333787a589d86",
"type": "delay",
"z": "e93a0fa19b4e94ef",
"g": "9504f31c551cc3a9",
"name": "1/s",
"pauseType": "rate",
"timeout": "1",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": true,
"allowrate": false,
"outputs": 1,
"x": 290,
"y": 400,
"wires": [
[
"505a3c60e984f7ff"
]
]
},
{
"id": "3fe61940029e593b",
"type": "delay",
"z": "e93a0fa19b4e94ef",
"g": "9504f31c551cc3a9",
"name": "1/s",
"pauseType": "rate",
"timeout": "1",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": true,
"allowrate": false,
"outputs": 1,
"x": 470,
"y": 400,
"wires": [
[
"7bd9f7a9b6ad90a3"
]
]
},
{
"id": "4cc42e925cacff6d",
"type": "delay",
"z": "e93a0fa19b4e94ef",
"g": "9504f31c551cc3a9",
"name": "1/s",
"pauseType": "rate",
"timeout": "1",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": true,
"allowrate": false,
"outputs": 1,
"x": 650,
"y": 400,
"wires": [
[
"95e48bc77caa556c"
]
]
},
{
"id": "e651a6db5d649b4c",
"type": "delay",
"z": "e93a0fa19b4e94ef",
"g": "9504f31c551cc3a9",
"name": "1/s",
"pauseType": "rate",
"timeout": "1",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": true,
"allowrate": false,
"outputs": 1,
"x": 830,
"y": 400,
"wires": [
[
"82479aa49217f710"
]
]
},
{
"id": "a964039ac341f40e",
"type": "delay",
"z": "e93a0fa19b4e94ef",
"g": "9504f31c551cc3a9",
"name": "1/s",
"pauseType": "rate",
"timeout": "1",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": true,
"allowrate": false,
"outputs": 1,
"x": 1010,
"y": 400,
"wires": [
[
"43e94cdf4fbd1c62"
]
]
},
{
"id": "5bfc79b4c9c9c3aa",
"type": "delay",
"z": "e93a0fa19b4e94ef",
"g": "9504f31c551cc3a9",
"name": "1/s",
"pauseType": "rate",
"timeout": "1",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": true,
"allowrate": false,
"outputs": 1,
"x": 1190,
"y": 400,
"wires": [
[
"431282b8c7c140e8"
]
]
},
{
"id": "209aed5e4690e8fc",
"type": "delay",
"z": "e93a0fa19b4e94ef",
"g": "9504f31c551cc3a9",
"name": "1/s",
"pauseType": "rate",
"timeout": "1",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": true,
"allowrate": false,
"outputs": 1,
"x": 1370,
"y": 400,
"wires": [
[
"bd98a337fb0bf49d"
]
]
},
{
"id": "d2e38ea93147fd68",
"type": "global-config",
"env": [],
"modules": {
"@victronenergy/node-red-contrib-victron": "1.6.58"
}
}
]