VRM API doesn't return edited consumption forecast

,

Hi,

for some time now, it’s been possible to edit the consumption forecast in VRM. I edited it yesterday afternoon, reducing the EV charging forecast to 0 W during the night and morning hours. However, when I retrieve the consumption forecast in Node-RED, it still returns the original, unedited forecast.

This issue occurs with both Venus OS v3.37 and the latest beta v3.80~39.

How can I get the edited forecast in Node-RED?

Do you use DESS? You can pull from a different attribute and get the adjusted forecast. See this link too, where I try to outline some of my own learnings in using the API: Adjusting forecast via VRM API

I configured DESS, but didn’t activate it. I’ll try your way anyway!

Sounds good. I’m curious to hear if it works.

perfect, with this attribute and this code I get an array with the adjusted consumption forecast!

const fcArray = msg.payload.records.vrm_consumption_fc || [];
const adjArray = msg.payload.records.vrm_consumption_fc_adj || [];

const adjLookup = new Map(adjArray);

var i;
var h = [];
var c_fc = [];

const reserve = 5;

for (i = 0; i < fcArray.length; i++) {
   h = fcArray[i];
   const timestamp = h[0];
   const normalValue = h[1];

   const valueToUse = adjLookup.has(timestamp) ? adjLookup.get(timestamp) : normalValue;

   c_fc[i] = valueToUse / 1000 * (1 + reserve / 100);
}

return { payload: c_fc, topic: "c_fc" };