question

avukat38 avatar image
avukat38 asked

How can I program DESS?

Hello, I want to configure my system but I cannot succeed. First of all, I have the right to sell 10kwh to the grid. My total PV power is 18kwh and I have 25kwh battery. I want my system to work like this: 1st, home consumption, 2nd, selling up to 10kWh to the grid, and I want the remaining PV power to charge my battery. Because when the battery is charged in the morning, more than 10kWh of production is wasted towards noon. If the PV power is sold to the grid for up to 10kWh and charges the battery when the PV production exceeds 10kWh, I will be selling approximately 5kWh more electricity to the grid per day. I think this can be done with the red node, but there is nothing in this regard I don't know. VRM portal ID c0619ab4d09f

system design
2 |3000

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

5 Answers
matt1309 avatar image
matt1309 answered ·

Hi @avukat38

Not sure how to write this in the supported DESS/ie integrating next day forecast/pricing however to achieve the more simple version of what you're looking for in node red would be something like this:


If using old venus os you need to pass data into this function (but first set topics of msg based on which data node is used). If not you can probably read vars from global context


This function will calculate grid setpoint to be the total of solar - loads. And then export the excess above 0. You might want to add more safety mechanisms for event where data nodes go offline before issuing 0W.

//if you're using old venus os you need the below. if not you can just read these varibales from the global context
var acLoad = global.get('acLoad');
var acSolar = global.get('acSolar');
var dcSolar = global.get('dcSolar');
var gridSetpoint = global.get('gridSetpoint');
var exported= global.get('exported');
 
//setting soc variable depending on inputs from flows
if (msg.topic === "acLoad") {
  soc = msg.payload; // Extract payload from input 1
  global.set('acLoad', acLoad);
}
 
//setting soc variable depending on inputs from flows
if (msg.topic === "exported") {
  exported = msg.payload; // Extract payload from input 1
  global.set('exported', exported);
}
if (msg.topic === "acSolar") {
  acSolar = msg.payload; // Extract payload from input 2
  global.set('acSolar', acSolar);
}
 
if (msg.topic === "dcSolar") {
  dcSolar = msg.payload; // Extract payload from input 3
  global.set('dcSolar', dcSolar);
}
 
//this is used to check if gridsetpoint is already 0, if it is then we won't bother updating it.
if (msg.topic === "gridSetpoint") {
  gridSetpoint = msg.payload;
  global.set('gridSetpoint', gridSetpoint);
}
 
if (msg.topic === "acLoad") {
 
  acLoad = msg.payload; // Extract payload from input 2
 
  global.set('acLoad ', acLoad);
 
}



 
//The main logic. 
if (export < 10000) { 

    gridSetpoint = acLoads - acSolar + dcSolar;

} else {
  gridSetpoint = 0;
}
 
if (gridSetpoint !== global.get('gridSetpoint')) { // Check if gridSetpoint is going to change
  global.set('gridSetpoint', Math.min(gridSetpoint, 0));
  msg.payload = Math.min(gridSetpoint, 0);
  return msg;
}


2 |3000

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

avukat38 avatar image
avukat38 answered ·

First of all, thank you, I am using Venus 3.30, my buying and selling price is fixed. Does not change according to time and date

2 |3000

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

avukat38 avatar image
avukat38 answered ·

Unfortunately, I have no knowledge of what you are talking about. You need to explain how to do it and how to add it to the system as if you were explaining it to an idiot.

7 comments
2 |3000

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

matt1309 avatar image matt1309 commented ·

I can type something up over the weekend. But this guy had a similar idea but his exporting was based on time. Have a skim through comments on here and if it's still nonsense i can type something out this weekend

Schedule grid feed back using Node red - Victron Community (victronenergy.com)

0 Likes 0 ·
avukat38 avatar image avukat38 matt1309 commented ·

I hope you will write on Sunday.

0 Likes 0 ·
avukat38 avatar image avukat38 matt1309 commented ·

I guess you didn't have time to write

0 Likes 0 ·
Show more comments
ejrossouw avatar image ejrossouw commented ·

@avukat38 Maybe this DESS manual (WIP) is a good place to start.

0 Likes 0 ·
avukat38 avatar image avukat38 ejrossouw commented ·

I reviewed all the settings there many times, but the problem was not solved. The system starts charging the battery before PV production reaches 10kWh.tempimagefrqzbn.gif

0 Likes 0 ·
avukat38 avatar image
avukat38 answered ·

I would be very grateful if you write. I think I explained exactly what I wanted

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.

nickdb avatar image nickdb ♦♦ commented ·

If you don't have a development background and what was posted above makes no sense to you, then this is likely not an option for you. Not everyone wants to heavily customise a system and take on the loss of support this often leads to.

There is a sticky topic, shown at the top of the forum, for DESS. Start by reading that and asking questions there.

DESS isn't perfect, it continues to be improved, but a lot of people are using it, and chances are your question may already have been asked elsewhere.

What you're describing is probably better achieved with regular ESS, it doesn't sound like the specific use-case DESS was intended for - buying and selling power based on variable tarifs.

1 Like 1 ·
Duivert NL avatar image
Duivert NL answered ·

Im not yet familiar with DESS but you can use ESS with scheduled charging

If DESS has scheduled charging then maybe you can combine them

2 |3000

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

Related Resources

Additional resources still need to be added for this topic