question

dbainbridge avatar image
dbainbridge asked

Missing actual battery data from VRM API

I'm attempting to get data for my battery when using the provided curl statement on the doc page https://vrm-api-docs.victronenergy.com/#/operations/installations/idSite/widgets/BatterySummary.


The request succeeds and returns all the formatting data like name of fields and such but nowhere do I see any of the actual battery data. What am I missing?

api dc system
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

2 Answers
dbainbridge avatar image
dbainbridge answered ·

This is my entire data section:

 "data": {
      "hasOldData": false,
      "secondsAgo": { "value": 0, "valueFormattedWithUnit": "0s" }
    },
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

dbainbridge avatar image
dbainbridge answered ·

Ok, I figured it out. The documentation for this is really poorly written and needs to be updated to indicate that the query parameter instance number is required and you must specify the VRM Instance number of the battery monitor as registered on the VRM. The documentation makes it sound like it is optional since it "defaults to 0". So go to the "Device List" section and find the "battery monitor" device. Expand that and one of the items listed there will be the "VRM Instance". You must use that number in the query parameter. So in my case it was (replaced my site instance number with XXXXX and token id, use your own)

curl --request GET \
  --url https://vrmapi.victronenergy.com/v2/installations/XXXXX/widgets/BatterySummary?instance=279 \
  --header 'Content-Type: application/json' \
  --header 'x-authorization: Token <My token id>'
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

Related Resources

Additional resources still need to be added for this topic