Victron - Only Charge from Solar

It is part of the home automation. Running on Node Red.
But I am sure it could also be run though Python. Memory serves me the latest Venus GX has Node red running on it already so it should be fairly easy to implement.

You can have a look at the code but keep in mind I am not a programmer and this might only make sense to my self but if it helps its cool:

settings = global.get(“maxDischargeSettings”)
minEss = settings[0].Data1 // Min Battery Discharge value for ESS : 350
MaxBattDc = settings[1].Data
1 // Battery Discharge value before Activation : -350
factor = settings[2].Data1 // Factor by with the ESS vaule is set - this is to ensure that the pannels match the dischrge : 0.09
MaxBattCh = settings[3].Data
1 // Maximum Battery Charge - 50 w

if (sol <= (minEss+(minEssfactor))){
newMax = minEss;
}else{
newMax = sol; //-(sol
factor)
}

if (gridSw === 1){ // Confirm Grid is On
if(maxstatesw==“ON”){ // Check if Switch is ON
if (batw <= MaxBattDc && maxstate > minEss || maxstate < minEss ) { // Battery is Discharging and ESS is still to high
msg.payload = (newMax0.1).toFixed(0);
return msg;
} else if (batw >= MaxBattCh ){ // Solar is enough to sustain the carry of the house load
msg.payload = (newMax
0.1).toFixed(0);
return msg;
}

}

}

2 Likes