How i can read/export historical data (15min wise) via nodered like export in advanced mode on Cerbo? can i read that data in nodered?
This site is now in read-only archive mode. Please move all discussion, and create a new account at the new Victron Community site.
const VRM_ID = "XXXXXX"; const VRM_ACCESS_TOKEN = "XXXXXXXXXXXXXXXX"; let today = new Date(); let startDate = new Date(today.getFullYear(), today.getMonth(), today.getDate(), 0, 0, 0, 0); let endDate = new Date(today.getFullYear(), today.getMonth(), today.getDate(), 23, 59, 59, 999); let start = Math.floor(startDate.getTime() / 1000); let end = Math.floor(endDate.getTime() / 1000); return [ { 'url': "https://vrmapi.victronenergy.com/v2/installations/" + VRM_ID + "/stats?type=custom&attributeCodes[]=Gb&interval=15mins&start=" + start + "&end=" + end, 'headers': { 'x-authorization': "Token " + VRM_ACCESS_TOKEN } } ];
Use http request node.
attributeCodes
Gb = Grid to battery
Bc = Battery direct use
Pb = Solar to battery
and so on. Didn't find an overview of all avail values in the docs, yet.
victron-vrm-api 0.0.11 now allows to select 15 mins interval.
83 People are following this question.