question

falkon avatar image
falkon asked

victron-vrm-api node - invalid API token (401) for DESS, works well for other API types

Hello,

I am not sure I hit some bug in the VRP API implementation, but I am experiencing some strange behavior.

I am using `victron-vrm-api` (https://flows.nodered.org/node/victron-vrm-api) implementation to access VRM API. I configured the API token successfully, which works for 3 out of 4 API types -- for API Type = "Dynamic ESS", the response returns: 401 / "Unauthorized" / "Invalid VRM token".


The configuration is the same for these 2 'clones' of flows:

1721142721962.png


API Type: "Installations" -- this works well

1721142832396.png


API Type: Dynamic ESS -- this returns "Unauthorized" / "Invalid VRM token" error:

1721142908005.png


I have tested the API calls both when DESS was enabled and also disabled on the VRM portal -- it always returned 401 "Unauthorized"


Am I doing something wrong, or is this a problem on the VRM side?

VRMDESSvrm-api
1721142721962.png (13.1 KiB)
1721142832396.png (27.9 KiB)
1721142908005.png (40.4 KiB)
2 |3000

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

1 Answer
falkon avatar image
falkon answered ·

OK, I found the quirk a minute after I submitted the question...

So, for anyone possibly hitting this same issue:

- the problem was that "Dynamic ESS" requires the "VRM Portal ID" (= string in the form of, e.g., "c06......b1b") labeled as "VRM id"; while the other API types ("Installations", "Widgets") require an "Installation id" labeled as "VRM site id" (= a number you see in the URL when you look at the Dashboard of your installation in the browser).


See:

1721144078627.png


vs.

1721144083580.png




1721144078627.png (14.3 KiB)
1721144083580.png (13.9 KiB)
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

VRM login page

VRM documentation

VRM API documentation

How to change the Owner of a VRM installation

Dynamic ESS - manual

Additional resources still need to be added for this topic

Additional resources still need to be added for this topic