New 3.80 virtual EVCS node: how do I enter the kWh value in the tile?

After the long-awaited update to 3.80, we now have a virtual EVCS. I want to populate it with the values I retrieve from a Shelly EM50.

This works fine for the power value, which I retrieve from the Shelly via a function to /Ac/Power. It then displays it neatly in the tile and among the device values in the console.

However, there are more values on this tile and in the console as well. In particular, I can’t populate the kWh value; it currently shows --KWH.

Retrieving the values from the Shelly is not a problem either; it supplies them correctly. I have tried the following in the virtual charger:

/Ac/L1/Energy/Forward — it accepts this, but does not update the value.

/Ac/Energy/Forward — it accepts this too, but again does not update the value.

/ChargedEnergy — it does not accept this; I immediately get a debounced value

/Session/Energy gives the same error.

Does anyone have any idea which value I need to feed into the virtual charger to get the kWh value moving? I can’t get any further with the Dbus spec overview.

PS. The EVCS is currently a self-built Stegen EVCS; I’m waiting for the MID meter version of the Victron unit.

I too am experiencing the same issue. Power per phase is working and visible in the virtual device, however current per phase and energy forwarded per phase are not updated. The Virtual EVCS does accept the values.

I configured the following in a function node before the virtual device, and the VRM shows me the kWh… but not the individual phase currents.

var E_Lade =global.get(“Ladung_heute_kWh”)

var L1=flow.get(“L1”)
var L2=flow.get(“L2”)
var L3=flow.get(“L3”)

L3 =Math.round(L3*10)/10
var P_Lade=flow.get(‘P_Lade’)

msg.payload=
{
“/Ac/L1/Current”:L1,
“/Ac/Power”:P_Lade,
“/Ac/Energy/Forward”:E_Lade
}
return msg;

As you can see below the Virtual EVCS accepts the values. I didn’t know you could send the total energy (/Ac/Energy/Forward), this isn’t described in the description of the virtual EVCS. However the values are not shown in the remote console. In VRM I do see the total energy. I’m guessing there are still some bugs?

I can see exactly the same thing: “Total energy” in VRM, but “Power” in the console (tile) and all the other figures for the device are blank.

In the meantime, I’ve made a bit more progress. Quite a few things are being added in the upcoming release:

The current 3.80 release includes node-red-contrib-victron release v1.7.27, but quite a few fields have been added in the next release, v1.7.28.

I’ll wait for the next official release. Updating separately via NPM is strongly discouraged; I want to stick with the version they provide in Venus OS itself.

In particular, the charging status, displaying the number of kWh charged (I think I’d have to calculate that myself from the power in a function?) and the connection to the AC load in the console should all be possible soon.

At the same time, I’d like to move to an ERE solution. Does anyone have any idea when the EVSE with MID will be available?

I’d like to display the kWh charged for each charging session.

Is there now a way to pass this value via Node-RED somehow?

The virtual mode doesn’t really seem to support this?

thanks for moving my topic to a similar one

So in my understanding, at the moment nothing could be done, wait for an update?

Quick question, how did you get that link between the virtual EVCS and the AC load to work? Mine has the tile floating with no connection.

That’s just how it was—probably because I have a system with MP2?

Hmm, I don’t quite understand that. I do use a MultiRS rather than a Multiplus, though.

Anyway, position has been announced for the .28 release, so it should be fine; a simple /position: 1 should be enough, if I’ve read it correctly.

Here’s the code for calculating the charging session:

Thanks to an AI for creating it. I only had to tweak it a bit, but now it displays the session nicely in Node-RED!

var vermogen = Number(msg.payload);
var nu = Date.now();

// Instellingen
var START_WATT = 100;
var STOP_WATT = 100;

// Huidige status
var actief = context.get(“sessieActief”) || false;
var energieWh = context.get(“energieWh”) || 0;
var vorigeTijd = context.get(“vorigeTijd”) || nu;

// Tijd sinds vorige meting in uren
var deltaUur = (nu - vorigeTijd) / 3600000;

// Energie toevoegen zolang de sessie actief is
if (actief) {
energieWh += vermogen * deltaUur;
}

// Start nieuwe sessie
if (!actief && vermogen > START_WATT) {
actief = true;
energieWh = 0;
node.status({fill:“green”, shape:“dot”, text:“Laadsessie gestart”});
}

// Stop sessie
if (actief && vermogen < STOP_WATT) {
actief = false;

node.status({
    fill:"blue",
    shape:"dot",
    text:"Sessie: " + (energieWh / 1000).toFixed(2) + " kWh"
});

}

// Waarden bewaren

context.set(“sessieActief”, actief);
context.set(“energieWh”, energieWh);
context.set(“vorigeTijd”, nu);

I’m now seeing this displayed correctly:

Can you see it in the tile in the GUI / Remote Console as well?

Would you mind posting the flow here?

No, this value is already calculated perfectly well in Node-RED, but I haven’t found a way to display it in VRM and/or the console yet.

That should be possible in the .28 release of node-red-contrib-victron.

For info, I calculate the charging session by starting the count when the power value exceeds 100 watts (I can’t see any other way to tell when the car is plugged in) and stopping it again when it drops below that same 100 watts. My meter (a Shelly EM50) only measures the current going to the car charger. I also use the EM50 as a relay to switch the car charger on and off, so I can avoid expensive periods while charging.

3.81 is out. Unfortunately, though, it doesn’t include the next release of node-red-contrib-victron yet.

This is to be expected, they are typically backports of important core system fixes and don’t include nodered etc as those are often packaged with a larger nodered version update and related dependencies.

Hmm, I didn’t know that. So we have to wait for a 3.90 release? I think the EVCS 2.0 will be here sooner.. I learnt in another topic that it’s already included in the November price list.