How to turn off battery with Node-red

Hi all,

For a year or more I have been using a scheduled charge to turn off my battery dependant on either SoC or wattage so if I use certain high-current things especially at night when I can have low-rate mains electricity, it will turn off the battery for the duration of that activity or if the SoC is low enough then it will turn off battery discharging at 10pm when the cheap rate starts hopefully leaving enough battery for the morning until there is some solar production.
Lately I have installed a second multiplus in parallel and although it seems to be configured correctly a scheduled charge does not completely stop the battery from discharging so I am looking for a different Node-red means of stopping battery discharge which will work with my new system.

How do you stop battery discharge via Node-red ?

I am surprised nobody else tries to control their battery via Node-red !

Thanks to @dfaber and a node he furnished me with:

[{“id”:“8ab0d7a8455af41c”,“type”:“victron-output-ess”,“z”:“1dd0a75c02dce780”,“service”:“com.victronenergy.settings”,“path”:“/Settings/CGwacs/BatteryLife/Schedule/Charge/2/Day”,“serviceObj”:{“service”:“com.victronenergy.settings”,“name”:“Venus settings”},“pathObj”:{“path”:“/Settings/CGwacs/BatteryLife/Schedule/Charge/2/Day”,“type”:“enum”,“name”:“Schedule 3: Day”,“enum”:{“0”:“Sunday”,“1”:“Monday”,“2”:“Tuesday”,“3”:“Wednesday”,“4”:“Thursday”,“5”:“Friday”,“6”:“Saturday”,“7”:“Every day”,“8”:“Weekdays”,“9”:“Weekends”},“writable”:true,“remarks”:“

Writing a negative value to the path will de-activate the schedule.

”},“initial”:“”,“name”:“”,“onlyChanges”:false,“x”:1254.203857421875,“y”:200.02701568603516,“wires”:}]

a simple scheduled charge can be set with a target SoC of some very low figure, like 10%. The battery doesn’t actually charge as it’s already above 10% but it cannot be discharged as it is technically “charging only”. This can also be done via the settings menu by changing the position of the “switch” on the Multi to charging only but I don’t know if that method could be automated.

Does anybody have another method for stopping battery discharge ?

Pretty much anything can be automated with node red. Yes the switch state is easy since you can control it through the venus/gx node.
Do you want your system to passthrough power when not discharging?
Do you have ESS?

But you have two inverters, are they one system (actually a parrallel) or just a second one plugged in wit the mk3?

Inverters in parallel, running ESS. Yes, I would like to passthrough power when batteries are “off”.
Also, if possible I would like to display the state of the Multi’s on/off switch and also the state of the Venus settings scheduled charge node.

The state would should show on the GX normally when the software and hardware switch is used.
It will only pass through when switched to charger mode (off means off.)

The solar still contributes to loads if you have ny on the system when in charger only mode as well. Ot it least it does on the onensystem we have where the customer is doing something similar.

The simplest way for you would be to either shuft the soc to the level you to what want to keep or change the ess to 100% or keep batteries charged on your preferred schedule.

I use Node-red to start a scheduled charge actually to stop the batteries being used when they are too low SoC or overnight for example. I just set the desired SoC to 10% which means they don’t actually charge but aren’t allowed to discharge either.

I would like to be able to see the state on the Node-red screen rather than have to open Remote console. Is there a way to make the ESS control node show the ESS state ?

What version are you on the newer ones show the values automatically

Summary

Do definitely have agm batteries?

Node-red V3.1.10

No, LiFePo batteries Pylontech us2000c

Will fix the post tags then.

Problem with managed batteries is if you set the DCL to 0A the system can switch off.

??? I didn’t set an AGM tag…but thanks for changing it.

I am able to stop discharge with Node-red by using a scheduled charge (10%) but there are a couple of issues now and then and I want to see the real-time “state” of this in the Node-red browser basically so I can more easily monitor the operation of my flow so I can iron out the bugs.

Or maybe there is a better way to stop battery discharge via Node-red ?

In my system when the Multi is set to “Charge Only” it sends all solar to battery charging, loads are supplied from the grid. That can be less ideal except when I really want the battery to charge.

That is how charge only works. Ac out is on passthrough so grid powered, solar will power the battery. The inverter is shut down so no DC can go to AC loads.

From the manual:

When the switch is switched to ‘charger only’, only the battery charger of the inverter/charger will operate (if mains voltage is present). The input voltage is also switched through to the ‘AC out’ terminal in this mode.

Here’s a thing that happened only last night. I woke up and there must have been a power cut as clocks were wrong etc. but the battery should have taken over during a power cut.

Maybe this is a daft question but does the “charge only” setting (activated via Node-red) explain this ? as in, even during a power cut, no inverting allowed ?

If so I will have to change my flow to allow inverting in the event of a power cut somehow.

Yes, that is a footnote underneath the quote I pasted above.
The inverter is disabled, so in the event of grid loss batteries will not discharge.

NOTE: When only the charger function is required, ensure that the switch is switched to ‘charger only’. This prevents the inverter from being switched on if the mains voltage is lost, thus preventing your batteries from running flat.

Right, so I’m back to thinking that a scheduled charge is the best way of turning off battery usage as it will allow battery usage in a power cut whereas “charge only” does not.

Affirm. And all possible via nodered.