How to automatically Update MaxCurrentCharge

Dear All, I’m trying to automatic change the “MaxCurrentCharge” value of my system, just to be extremely clear this parameter:

I’ve already tried with MQTT without success (I’m not a MQTT expert anyway).

When I change it, the value get back to the previous value, it is overwritten every 30 seconds, seems to be something that should be modified somewhere else.

(I do not mask my serial, I don’t care if you see it… no problem)

You can do that with Node-Red.

Ciao Diederik, thanks a lot for your hint, it means I can only do that with Node-Red?

I do that with Node-Red but I’m sure there are other ways to do that.

thanks

is it possible you share your setup?

Sure, which part? The complete flow?
I’m a bad Node-Red user. I mainly use the function node. :grinning_face:

1 Like

Yes, so I can take some hints, I’m a complete newbie on Node-Red :slight_smile:

at least I let him work… so far

You are trying to manipulate the charger’s static configuration in the Multiplus. You can set that value to the max you want the MultiPlus’ charger to contribute.

If you have a GX and use DVCC, I would recommend you change this:

This will limit the total charge that goes to the battery from all sources, if that is what you want.

Can also be manipulated from Node-Red using Settings Control/Venus Settings/DVCC system max charge current (A DC)

1 Like

Ciao Deon, yes, this is exactly what I want to do.

I’ve not enabled DVCC, but I can do that.
Do you know if it possible to tune this parameter with MQTT? (btw I’m learning Nore-Red)

I’m quite sure there are command to be used via command line directly on OS, that would be the best solution for me, but I’ve not found any useful info on the net.

I’m pretty sure you can reach all these items via MQTT. See this list:

I generally prefer not to mess in the Victron MQTT namespace directly. I publish and subscribe the relevant items from Node Red to my own broker and use the Node-Red nodes to commit the settings if I want. That’s just my preference, though.

1 Like

Some code snippets:

The calculation:

var setpoint = (maxGrid-acLoad+pvLoad+dcLoad)/batteryVoltage; // Calculate DC current to battery
if (setpoint < 0){
setpoint = 0; // setpoint should never be negative
}

From my control unit:

function onGrid (setpoint){
essModus = 1;
flow.set(‘essModus’,1);
msg.payload = setpoint;
}

DVCC controller: (does nothing :slight_smile: )

msg.payload = msg.payload;
return msg;

And then push the number to DVCC.

1 Like

these are really useful info, I see Diederik is tweaking exactly the same parameter Deon mentioned, that obviously is not the one I was trying to tune :slight_smile:

I have fuel to continue my exercise…

1 Like

Just to let you know and to document something could be useful for others who want to clone totally or partially what I’m doing

…if someone have advise… please :slight_smile:

I can do the entire setup in 10 minutes with command and shell.

I’m not getting the info regarding the Solar Production from Fronius, that is visible but not connected to Victron Multi II GX. (or at least I have not found info on Node-Red out-of-the-box).

I use this api-call:
http://192.168.1.39/solar_api/v1/GetMeterRealtimeData.cgi?Scope=System
(I do not care regarding IP, I do not mask it)

it give me the “Export to grid” value, that is what is interesting to me, the same Diederik is calculating on the first stage.

Result:
{
“Body” : {
“Data” : {
“0” : {
“Current_AC_Phase_1” : 6.3849999999999998,
“Current_AC_Phase_2” : 6.1100000000000003,
“Current_AC_Phase_3” : 8.7330000000000005,
“Details” : {
“Manufacturer” : “Fronius”,
“Model” : “Smart Meter 63A”,
“Serial” : “17390033”
},
“Enable” : 1,
“EnergyReactive_VArAC_Sum_Consumed” : 99950,
“EnergyReactive_VArAC_Sum_Produced” : 386209160,
“EnergyReal_WAC_Minus_Absolute” : 21421969,
“EnergyReal_WAC_Plus_Absolute” : 99573461,
“EnergyReal_WAC_Sum_Consumed” : 99573461,
“EnergyReal_WAC_Sum_Produced” : 21421969,
“Frequency_Phase_Average” : 50,
“Meter_Location_Current” : 0,
“PowerApparent_S_Phase_1” : 1561.771,
“PowerApparent_S_Phase_2” : 1470.066,
“PowerApparent_S_Phase_3” : 2056.6215000000002,
“PowerApparent_S_Sum” : 1204,
“PowerFactor_Phase_1” : -0.98999999999999999,
“PowerFactor_Phase_2” : -0.98999999999999999,
“PowerFactor_Phase_3” : 0.96999999999999997,
“PowerFactor_Sum” : -0.81000000000000005,
“PowerReactive_Q_Phase_1” : -48.460000000000001,
“PowerReactive_Q_Phase_2” : -191.27000000000001,
“PowerReactive_Q_Phase_3” : -463.50999999999999,
“PowerReactive_Q_Sum” : -703.24000000000001,
“PowerReal_P_Phase_1” : -1527.02,
“PowerReal_P_Phase_2” : -1428.55,
“PowerReal_P_Phase_3” : 1977.4000000000001,
“PowerReal_P_Sum” : -978.16999999999996,
“TimeStamp” : 1745402138,
“Visible” : 1,
“Voltage_AC_PhaseToPhase_12” : 420.19999999999999,
“Voltage_AC_PhaseToPhase_23” : 412.30000000000001,
“Voltage_AC_PhaseToPhase_31” : 415.80000000000001,
“Voltage_AC_Phase_1” : 244.59999999999999,
“Voltage_AC_Phase_2” : 240.59999999999999,
“Voltage_AC_Phase_3” : 235.5
}
}
},
“Head” : {
“RequestArguments” : {
“DeviceClass” : “Meter”,
“Scope” : “System”
},
“Status” : {
“Code” : 0,
“Reason” : “”,
“UserMessage” : “”
},
“Timestamp” : “2025-04-23T11:55:38+02:00”
}
}

I need this:
PowerReal_P_Sum (+ positive) consuming from grid producing power
PowerReal_P_Sum (- negative) feeding in to grid normal consumption

The “negative” value will drive the Power, as lower (in negative) it is, as higher the Power will be, value in Watt.

Consider I have used Node-Red today for the first time… I’m at this stage, let’s say… I’m on the starting block…

Update will follow. (or maybe requests?)

here we are

You can add a function or template and have use a single line of code to get the value of “PowerReal_P_Sum” with help of: ({ payload. PowerReal_P_Sum })

Use value / -1 to get a positive value. Divide the outcome by 51.2 to get the amps.

Edit. Oh there you are already. Had my cup of tea and missed the uodate.

I did something like this Chief, I’ve used 55volt to be safe, I will change to the actual voltage later on

1 Like

as far you have done something similar, which command do you use to tell the Inverter:
“STOP CHARGING → USE THE BATTERY”

The best way, for you, is???

Looks nice :clap: Nothing really bad to say about it, but since I worked with Brendan Eich… I would change the two if {} statements into if {} else {} and use .. (-watt / voltage); But that’s just me nitpicking :grimacing: Never mind. Great job!

Actually. I never want it to stop charging. I need every little bit of energy for the batteries. Barely made enough today, but we’re into the state of discharging again already.

:slight_smile:

it will be an: if / then / else / if :slight_smile:

but I understand you, at the end I will beautify everithing