I’m using Node Red, VRM API, Widget, Battery Summary data
It successfully accesses my VRM site and returns an object but I don’t know how to unpack the object.
According to the metadata, Voltage is a ‘47’ and 12 in attribute order;
SOC is a ‘51’ and 15 in attribute order.
However, I can’t figure out the Javascript code to access either of the values. I assume it’s something like msg.payload = msg.payload.records.(…more code here…). Can anyone provide some coding advice?
[context: the aim is to extract the data and send it via Wifi to a Raspberry Pi Pico for display.]
To answer my own question:
The Battery summary data widget doesn’t have data values.
The SOC and Voltage can be found in VRM API, Installations, Diagnostic data for a site.
voltage is found in msg.payload.records[71].rawValue
SOC is in msg.payload.records[75].rawValue
I couldn’t find any documentation showing which of the 196 array elements was which, so searched the Node Red debug display of the returned object till I found the grouping then looked for voltage and SOC.
Also, VRM API, Installations, Installation Stats has Battery SoC, but doesn’t seem to have an option to get battery voltage. It would be useful to have Battery voltage under this heading.