question

victronvalhowell6283 avatar image
victronvalhowell6283 asked

Node Red flow to control Multiplus charging

I have a Multiplus, BMV 712, Victron mppt solar controllers (4), Cerbo with connection to NMEA 2000 bus, GX50


i am trying to give priotity to solar and inverter unless the battery gets below x percent SOC. At this time I want the battery charger to come on (or connect multi to ac1 in) and charge the batteries to say 95% the revert to solar priority (turn ac1 off).

has anyone done a flow similar to this? I have seen the example for charging via Node red but if I read the logic correctly it cuts off at 50% SOC and will not charge beyond that.

help is much appreciated.

Node-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.

6 Answers
Alexandra avatar image
Alexandra answered ·

@victronvalhowell6283

You can manipulate the switch state based on SOC from the BMV.

You know the switch state under the Multiplus on the GX? So inverter only or on. The same switch state is available In node red.


1705086631837.png



1705086631837.png (49.7 KiB)
1 comment
2 |3000

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

Alexandra avatar image Alexandra ♦ commented ·

You can copy and edit the flow you looked at though.

You have mentioned when you want to disconnect, but when would you like it to reconnect to charge?

0 Likes 0 ·
victronvalhowell6283 avatar image
victronvalhowell6283 answered ·

I want the inverter to handle all AC loads until the SOC drops below 70%. At that point I want the AC in to come on and the charger to charge the batteries until they complete an absorb phase, or until the SOC is greater than 90% (either measure works for me).


2 |3000

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

rmarsh3309 avatar image
rmarsh3309 answered ·

Your question, which hasn't been answered, is a good one. I just logged on to ask the exact same question. I spend 2 months of the year on shore power. It kills me to see the Multiplus maintain my batteries at 100% using shore power - while my 2400W solar array is unused. I turn on the coffee pot and the shore power usage jumps up rather than pulling from the full batteries. It seems like this is just the sort of problem Node Red is meant to solve.

After I've developed and tested a flow to solve the problem, I'll publish it here or send it to you directly.

Rich on Pogeyan

2 |3000

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

rmarsh3309 avatar image
rmarsh3309 answered ·

I have developed and tested a flow that puts the Multiplus in Inverter-only mode when the batteries are full and shore power is available. It switches back to "On" mode when the state of charge falls to 50%. I also made a crude dashboard interface.

I don't know how to share the flow on this forum. I attempted to paste the compact JSON export in a post, but the Admins didn't allow it to publish. If anyone wants the code, send an email to rich (at) pogeyan (dot) net.

1 comment
2 |3000

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

vbrunink avatar image vbrunink commented ·
I would like the code :D
0 Likes 0 ·
rmarsh3309 avatar image
rmarsh3309 answered ·

[{"id":"9dcfcfb3a65c9637","type":"tab","label":"Multiplus Mode Control","disabled":false,"info":"","env":[]},{"id":"7f2916f521f81a6f","type":"victron-input-battery","z":"9dcfcfb3a65c9637","service":"com.victronenergy.battery/512","path":"/Soc","serviceObj":{"service":"com.victronenergy.battery/512","name":"REC-BMS battery"},"pathObj":{"path":"/Soc","type":"float","name":"State of charge (%)"},"name":"Read state of charge from BMS","onlyChanges":false,"roundValues":"1","x":250,"y":340,"wires":[["1ded2d6144067cfa"]]},{"id":"f0244bbb81601888","type":"change","z":"9dcfcfb3a65c9637","name":"Convert to Strings and Set MultiplusMode Variable","rules":[{"t":"set","p":"MultiplusModeEnum","pt":"global","to":"payload","tot":"msg"},{"t":"change","p":"payload","pt":"msg","from":"1","fromt":"num","to":"Charger Only","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"2","fromt":"num","to":"Inverter Only","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"3","fromt":"num","to":"On","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"4","fromt":"num","to":"Off","tot":"str"},{"t":"set","p":"MultiplusMode","pt":"global","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":870,"y":280,"wires":[["69affd1c3e81a65e"]]},{"id":"cd6c3f69add6adc7","type":"victron-input-vebus","z":"9dcfcfb3a65c9637","service":"com.victronenergy.vebus/276","path":"/Mode","serviceObj":{"service":"com.victronenergy.vebus/276","name":"MultiPlus-II 12/3000/120-32"},"pathObj":{"path":"/Mode","type":"enum","name":"Switch Position","enum":{"1":"Charger Only","2":"Inverter Only","3":"On","4":"Off"}},"initial":"","name":"Read Multiplus Mode Enumerated State","onlyChanges":false,"x":270,"y":280,"wires":[["f0244bbb81601888"]]},{"id":"69affd1c3e81a65e","type":"ui_text","z":"9dcfcfb3a65c9637","group":"6f1a0792dd604b76","order":3,"width":0,"height":0,"name":"Multiplus Mode Indication on Dashboard","label":"Multiplus Mode","format":"{ {msg.payload}}","layout":"col-center","className":"","style":false,"font":"","fontSize":16,"color":"#000000","x":1720,"y":280,"wires":[]},{"id":"6cea40e850b3bfdd","type":"victron-input-vebus","z":"9dcfcfb3a65c9637","service":"com.victronenergy.vebus/276","path":"/Ac/ActiveIn/L1/V","serviceObj":{"service":"com.victronenergy.vebus/276","name":"MultiPlus-II 12/3000/120-32"},"pathObj":{"path":"/Ac/ActiveIn/L1/V","type":"float","name":"Input voltage phase 1 (VAC)"},"initial":"","name":"Read Input phase 1 VAC","onlyChanges":false,"x":230,"y":20,"wires":[["d4814fef4e23fa86"]]},{"id":"d4814fef4e23fa86","type":"rbe","z":"9dcfcfb3a65c9637","name":"5V Deadband","func":"deadband","gap":".1","start":"","inout":"in","septopics":true,"property":"payload","topi":"topic","x":480,"y":20,"wires":[["1f90b47e139cd526","71644e4ed8cc9193"]]},{"id":"493b511c5368212a","type":"ui_button","z":"9dcfcfb3a65c9637","name":"Auto Button on Dashboard","group":"6f1a0792dd604b76","order":3,"width":"2","height":"2","passthru":false,"label":"Auto","tooltip":"","color":"","bgcolor":"","className":"","icon":"","payload":"true","payloadType":"bool","topic":"Enabled","topicType":"msg","x":240,"y":480,"wires":[["f805b7ebfea08b4a"]]},{"id":"512956c6bed159f0","type":"ui_button","z":"9dcfcfb3a65c9637","name":"Manual Button on Dashboard","group":"6f1a0792dd604b76","order":4,"width":"2","height":"2","passthru":false,"label":"Manual","tooltip":"","color":"","bgcolor":"","className":"","icon":"","payload":"false","payloadType":"bool","topic":"Enabled","topicType":"msg","x":240,"y":540,"wires":[["8e75d32339d8f1bf"]]},{"id":"f805b7ebfea08b4a","type":"change","z":"9dcfcfb3a65c9637","name":"Set MultiplusModeControl to Auto","rules":[{"t":"set","p":"MultiplusModeControl","pt":"global","to":"Auto","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"Auto","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1160,"y":480,"wires":[["dc31a7fab2db85f4"]]},{"id":"8e75d32339d8f1bf","type":"change","z":"9dcfcfb3a65c9637","name":"Set MultiplusModeControl to Manual","rules":[{"t":"set","p":"MultiplusModeControl","pt":"global","to":"Manual","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"Manual","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1170,"y":540,"wires":[["dc31a7fab2db85f4"]]},{"id":"dc31a7fab2db85f4","type":"ui_text","z":"9dcfcfb3a65c9637","group":"6f1a0792dd604b76","order":5,"width":0,"height":0,"name":"Auto/Manual Indication on Dashboard","label":"Multiplus Mode Control","format":"{ {msg.payload}}","layout":"col-center","className":"","style":false,"font":"","fontSize":16,"color":"#000000","x":1710,"y":480,"wires":[]},{"id":"1ded2d6144067cfa","type":"change","z":"9dcfcfb3a65c9637","name":"Set SOC Global Variable","rules":[{"t":"set","p":"SOC","pt":"global","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":790,"y":340,"wires":[["3c0436b919368cc9"]]},{"id":"3c0436b919368cc9","type":"ui_text","z":"9dcfcfb3a65c9637","group":"6f1a0792dd604b76","order":5,"width":0,"height":0,"name":"SOC Indication on Dashboard","label":"State of Charge from BMS","format":"{ {msg.payload}}","layout":"row-center","className":"","style":false,"font":"","fontSize":16,"color":"#000000","x":1690,"y":340,"wires":[]},{"id":"1f90b47e139cd526","type":"change","z":"9dcfcfb3a65c9637","name":"Set ShorePowerVoltage Global Variable","rules":[{"t":"set","p":"ShorePowerVoltage","pt":"global","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":840,"y":20,"wires":[["f89f1d6ab88d45b8"]]},{"id":"f89f1d6ab88d45b8","type":"ui_text","z":"9dcfcfb3a65c9637","group":"6f1a0792dd604b76","order":6,"width":0,"height":0,"name":"ShorePowerVoltage Indication on Dashboard","label":"Shore Power Voltage","format":"{ {msg.payload}}","layout":"row-center","className":"","style":false,"font":"","fontSize":16,"color":"#000000","x":1730,"y":20,"wires":[]},{"id":"f1e1f1d6fb45cbef","type":"change","z":"9dcfcfb3a65c9637","name":"Set ShorePowerAvailable Variable to \"Available\"","rules":[{"t":"set","p":"ShorePowerAvailable","pt":"global","to":"Available","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"Available","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1200,"y":80,"wires":[["51e0845891f4297c"]]},{"id":"71644e4ed8cc9193","type":"switch","z":"9dcfcfb3a65c9637","name":"Shore Voltage GT 220","property":"payload","propertyType":"msg","rules":[{"t":"gte","v":"220","vt":"str"},{"t":"lt","v":"220","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":780,"y":80,"wires":[["f1e1f1d6fb45cbef"],["dc22a90aed87388e"]]},{"id":"dc22a90aed87388e","type":"change","z":"9dcfcfb3a65c9637","name":"Set ShorePowerAvailable Variable to \"Unavailable\"","rules":[{"t":"set","p":"ShorePowerAvailable","pt":"global","to":"Unavailable","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"Available","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1210,"y":140,"wires":[["51e0845891f4297c"]]},{"id":"51e0845891f4297c","type":"ui_text","z":"9dcfcfb3a65c9637","group":"6f1a0792dd604b76","order":6,"width":0,"height":0,"name":"ShorePowerAvailable Indication on Dashboard","label":"Shore Power","format":"{ {msg.payload}}","layout":"row-center","className":"","style":false,"font":"","fontSize":16,"color":"#000000","x":1740,"y":80,"wires":[]},{"id":"27a77163947f4805","type":"function","z":"9dcfcfb3a65c9637","name":"Automation Logic","func":"var SOC = global.get(\"SOC\");\nvar MPMode = global.get(\"MultiplusMode\");\nvar SPAvail = global.get(\"ShorePowerAvailable\");\nvar MPCtl = global.get(\"MultiplusModeControl\");\n\n\nif (SOC >= 95 && MPCtl == \"Auto\" && SPAvail == \"Available\" && MPMode != \"Inverter Only\") {\n msg.payload = 2;\n}\n\nelse if (SOC <= 50 && MPCtl == \"Auto\" && SPAvail == \"Available\" && MPMode != \"On\") {\n msg.payload = 3; \n}\n\nelse {\n \n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":850,"y":640,"wires":[["faf665df1f03eb3e"]]},{"id":"faf665df1f03eb3e","type":"victron-output-vebus","z":"9dcfcfb3a65c9637","service":"com.victronenergy.vebus/276","path":"/Mode","serviceObj":{"service":"com.victronenergy.vebus/276","name":"MultiPlus-II 12/3000/120-32"},"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":"","name":"Write the Mode (AKA \"Switch Position\") to the Multiplus","onlyChanges":false,"x":1760,"y":640,"wires":[]},{"id":"d28ae852d583edfd","type":"inject","z":"9dcfcfb3a65c9637","name":"Triggers the Automation Logic Every Second","props":[{"p":"payload"}],"repeat":"1","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"5","payloadType":"num","x":300,"y":640,"wires":[["27a77163947f4805"]]},{"id":"ac263cddfbc61f74","type":"comment","z":"9dcfcfb3a65c9637","name":"Automation Logic Narrative","info":"# Set the Multiplus Mode to Inverter-Only if:\n\n - The batteries are full and\n - This mode control scheme is enabled using the dashboard and\n - The shore power is available and\n - The Multiplus isn't already in Inverter-Only mode\n\n# Set the Multiplus Mode to \"On\" if:\n\n - The battery charge drops below 50% and\n - This mode control scheme is enabled using the dashboard and\n - The shore power is available and\n - The Multiplus isn't already in \"On\" mode\n\n","x":850,"y":600,"wires":[]},{"id":"6f1a0792dd604b76","type":"ui_group","name":"Multiplus Mode Control","tab":"c5516b35d65c2712","order":1,"disp":true,"width":"6","collapse":false,"className":""},{"id":"c5516b35d65c2712","type":"ui_tab","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]

2 |3000

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

thomasw-1 avatar image
thomasw-1 answered ·

I think, an easy solution would be just the tempory adaptation of the SOC min value in ESS configuration.
In case the SOC defnition is 5% larger than current SOC, MultPlus's start the charging process by themselves. Btw. SOC definition in GX can be defined with a 1% granularity by ModBus.

2 |3000

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