question

Padraig Lennon avatar image
Padraig Lennon asked

NodeRed Overload switch advice

Hi,

I've just began using the NodeRed tool. With no prior experience I'm finding it difficult to understand the processes.

I managed to create a simple flow to set up scheduled charging for night tariffs which works perfectly. Next i'd like to create a flow to switch inverter position to "On" when there is an overload warning, and to switch back to "Inverter" mode once the load is reduced after a set duration.

Can anyone help direct me to do this?

Multiplus-IINode-RED
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

1 Answer
Padraig Lennon avatar image
Padraig Lennon answered ·

Got a flow that works quite well. Switches over a set watts used to the "On" mode, and back to "Inverter" mode when the watts used is below a set point. Here is the code i used if anyone faces a similar issue.

My only problem is that my two flows seem to conflict with one another, the timed schedule for charging on the "On" mode no longer functions, seems to be overridden by the excess watt flow.


[

{

"id": "31ccf44f11e25887",

"type": "group",

"z": "0e8103957be99955",

"style": {

"stroke": "#999999",

"stroke-opacity": "1",

"fill": "none",

"fill-opacity": "1",

"label": true,

"label-position": "nw",

"color": "#a4a4a4"

},

"nodes": [

"edf538acac111718",

"4b26ae4750557ffc",

"d2cd5d5c2eabb9da",

"df90eed2bd410633",

"5119bdfd278bb81b"

],

"x": 54,

"y": 139,

"w": 1332,

"h": 182

},

{

"id": "edf538acac111718",

"type": "change",

"z": "0e8103957be99955",

"g": "31ccf44f11e25887",

"name": "",

"rules": [

{

"t": "set",

"p": "payload",

"pt": "msg",

"to": "3",

"tot": "num"

}

],

"action": "",

"property": "",

"from": "",

"to": "",

"reg": false,

"x": 880,

"y": 180,

"wires": [

[

"5119bdfd278bb81b"

]

]

},

{

"id": "4b26ae4750557ffc",

"type": "switch",

"z": "0e8103957be99955",

"g": "31ccf44f11e25887",

"name": "Switch",

"property": "payload",

"propertyType": "msg",

"rules": [

{

"t": "gt",

"v": "4000",

"vt": "str"

},

{

"t": "lt",

"v": "1500",

"vt": "str"

}

],

"checkall": "true",

"repair": false,

"outputs": 2,

"x": 670,

"y": 220,

"wires": [

[

"edf538acac111718"

],

[

"df90eed2bd410633"

]

]

},

{

"id": "d2cd5d5c2eabb9da",

"type": "victron-input-custom",

"z": "0e8103957be99955",

"g": "31ccf44f11e25887",

"service": "com.victronenergy.vebus/276",

"path": "/Ac/Out/P",

"serviceObj": {

"service": "com.victronenergy.vebus/276",

"name": "MultiPlus-II 48/5000/70-50 (276)"

},

"pathObj": {

"path": "/Ac/Out/P",

"name": "/Ac/Out/P",

"type": "number"

},

"name": "",

"onlyChanges": false,

"roundValues": "no",

"x": 250,

"y": 220,

"wires": [

[

"4b26ae4750557ffc"

]

]

},

{

"id": "df90eed2bd410633",

"type": "change",

"z": "0e8103957be99955",

"g": "31ccf44f11e25887",

"name": "",

"rules": [

{

"t": "set",

"p": "payload",

"pt": "msg",

"to": "2",

"tot": "num"

}

],

"action": "",

"property": "",

"from": "",

"to": "",

"reg": false,

"x": 880,

"y": 280,

"wires": [

[

"5119bdfd278bb81b"

]

]

},

{

"id": "5119bdfd278bb81b",

"type": "victron-output-vebus",

"z": "0e8103957be99955",

"g": "31ccf44f11e25887",

"service": "com.victronenergy.vebus/276",

"path": "/Mode",

"serviceObj": {

"service": "com.victronenergy.vebus/276",

"name": "MultiPlus-II 48/5000/70-50"

},

"pathObj": {

"path": "/Mode",

"type": "enum",

"name": "Switch Position",

"remarks": "<p>Note that <tt>/ModeIsAdjustable</tt> needs to be set to 1.</p> ",

"enum": {

"1": "Charger Only",

"2": "Inverter Only",

"3": "On",

"4": "Off"

},

"writable": true

},

"initial": "2",

"name": "",

"onlyChanges": false,

"x": 1190,

"y": 240,

"wires": []

}

]

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.