i try to use the VRM-API (latest V. 0.3.11 and Venus-OS 3.72) with Node Red. Connectivity and data retrieval work perfectly, but some data collection and responses are confusing and incomprehensible. In particular, the use of the API types “Installations” and “Installation stats” with the attributes “Consumption” and “Total kWh” generates data without meaningful mapping. The data values are approximately 1.6 times larger than in VRM itself. In my opinion, the node VRM-API itself is fine, but the API values are wrong. When using the “verbose” option of the node, the entire syntax makes sense and the correct time window is retrieved. So i get 13 records of month and range of 1 year for “Total kWh” and 7 records for “consumption”. This is okay and expected but the values, as i mentioned before, not.
I also tried other tests and found that using the attribute “Dynamic ESS” retrieves a value named total_consumption with the right value.
Latest node is 0.4.3
It is embedded in the build unless you installed it manually which creates problems.
Update to the beta and it will update and remove the self-installed node.
Hi Nick,
thanks for your answer.
I can rule out the Node Red API as the cause through bypass (curl etc.) testing. For me it’s the VRM API itself. Both values of the attributes consumption and Total kWh makes no sense and i can’t find any match in my VRM statistics. The question is, what do these attributes indicate? It would be nice if someone else could test this and share their results.
After further testing and in-depth study of the VRM API and Node Red VRM-API, i deduced that a custom call using the attribute total_consumption also works. This leads to the next question: where are the custom attributes documented, and is there any newer documentation of the VRM API?
I have struggled a bit with the api node. Using a conventional https node and calling what you need might be a better choice.
Will revisit it tomorrow.
I struggled as well, with chances of the VRM-API (node) quite a bit before. What helped (a lot) was to take good note of the request URLs that the node sends when using (any of it’s many drop-down selection options), and then fully reconstruct the API request with an inject(or function) node, linked to the VRM-API node.
that’s what I end up doing. But that’s similar to reverse engineering. It’s much better if the Node-RED plugin works and not least if the documentation of the VRM API is correct and complete. However, for the moment i have a solution.
I gave up hope on correct and complete API documentation (on the official API website but at least the Node-RED helpfiles seem to improve over time a bit. Nowadays I default to search GitHub for changes, commits and open/closed issues (directly if I know where to look or instructing grok to figure out first where the relevant code snippets are . Shouldn’t have to be that way though. Indeed reverse engineering has been the only way to get to the information I needed on pretty much every topic that went even a tiny bit deeper than the marketing notes. I’m afraid for some topics and in some areas I know the codebase better than some of Victron’s own people, pretty wild really.
If I look at mine the numbers seem to stack up.
There is a limit on how much data is kept and to what resolution.
(there is a topic about it somewhere).
Typically detailed data is 6 months to a year iirc.
High-level data is kept much longer.
Querying consumption data per hour for the current day (seems to default to UTC).
For me yours looks somehow strange = array[10]. i think, consumption is an attribute with detail statistics and as far as i know this data should last 6 months. So, the array should result in 6 or 7 fields (month overlap). But this is not my problem. My question is, what are the attributes consumption and kwh for. As mentioned above actually i used the custom attribute total_consumption with the right value. But this is not documented in the offical VRM API and i deduced this via tests. In addition i figured out many other undocumented custom atttributes. Seems that the documentation of the (public) VRM API is old or uncomplete.