question

patrick-rynhart avatar image
patrick-rynhart asked

Toggling "Charger Only" to "On" via API Call ?

Via the VRM Webapp, you are able to set the mode of a device (in this case a MultiPlus II) to Charger Only/Inverter Only/On/Off (please see screenshot).

I'd like to be able to toggle the state of this programatically. But I can't find anything in the VRM API that allows values like this to be set: https://vrm-api-docs.victronenergy.com/

In fact the only things that you seem to be able to retrieve via the API are 'read-only' metrics and the like, there doesn't appear to be a way to set variables that you can get to via the WebApp (like "Charger Only", "Inverter Only" etc.....).

Is this a limitation of the VRM API - or am I missing something ?

With Thanks in Advance,

Patrick

APICall.png

Multiplus-IIVRMapi
apicall.png (627.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.

1 Answer
patrick-rynhart avatar image
patrick-rynhart answered ·

From what I can tell, there isn't a cloud based API call to change these settings. When you use the VRM Webapp, it looks like it's actually coming back on-prem (via an SSH tunnel ?) and ultimately publishing an MQTT message on a local GX Device.

After a lot of observations/debugging/use of strace and tcpdump etc (on a GX device), I found that I can publish to the MQTT service the following:

Topic: W/my_portal_id/vebus/257/Mode

Payload: {"value": X}

A value of 3 corresponds to "On" and a Value of 1 corresponds to "Charger Only"

2 |3000

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