Overview
Victron GX devices (Cerbo GX, Ekrano GX, Venus GX and other Venus OS devices) upload data from inverters/chargers, MPPT solar chargers, battery monitors, meters and EV chargers to the VRM Portal. The VRM API v2 (https://vrmapi.victronenergy.com/v2) gives programmatic access to the same data. Victron publishes it as an OpenAPI 3.1 document on vrm-api-docs.victronenergy.com.
The VictronVrmApi connector maps 20 MQTT topics onto that API: 13 read events (12 GET plus one read-only POST lookup) and 7 write events. Typical uses are putting PV yield, battery state of charge and consumption from remote Victron sites (off-grid cabins, telecom shelters, boats, ESS systems) on the broker next to plant data, and turning VRM alarms into broker alarms. Each event publishes the VRM reply on <topic>/response.
Prerequisites
- A VRM Portal account (vrm.victronenergy.com) with access to at least one installation. A GX device must upload data to VRM.
- A personal access token. In VRM, open Preferences > Integrations > Access tokens, create a token, and copy it. VRM shows it only once.
- Your user id (
idUser) for the user-level events.user/getreturns it asuser.id. - The installation id (
idSite) of each site.installation/listreturns it asrecords[].idSite. It is a number, such as219742. It is not the VRM portal ID (identifier, for examplec0619ab27f32).site-id/getconverts a portal ID toidSite. - Full access (admin rights) to the site for the alarm rules, diagnostics, tags and write events. Users with read-only access get
403. - Outbound HTTPS from the broker to
vrmapi.victronenergy.com.
Authentication
Every event sendsX-Authorization: {value.json.authorization}. Store the full header value as a Hub secret, for example VRM_AUTHORIZATION = Token <access_token>, and read it with GET SECRET in the action that publishes to the connector.
Configuration
Query parameters:
Maximum
GetStats window for each interval:
Stats series come back as
{"success": true, "records": {"<code>": [[timestamp_ms, value, ...], ...]}, "totals": {"<code>": value}}. The timestamps are in milliseconds. Codes include Pdc (PV DC power), bs (battery SoC), bv (battery voltage), kwh and grid / consumption codes. Other responses use {"success": true, "records": ...}, and errors use {"success": false, "errors", "error_code"}.
Basic Syntax
Examples
Publish directly to a connector topic:energy/victron/stats/get, then read energy/victron/stats/get/response for daily energy (Pc, Pb, Pg, Bc, Bg, kwh) for that window.
Clear an active alarm (take idAlarm from alarm-log/get):
energy/victron/alarm/clear.
Actions that poll the connector for one site:
energy/victron/# with a rule, because these payloads carry the access token.
Rate limits and polling
VRM rate-limits most endpoints with a rolling window of 200 requests. One request leaves the window every 0.33 seconds, so about 3 requests per second never hit the limit. A429 with a JSON body has a Retry-After header with the seconds to wait. The GX device logs to VRM every 1 to 15 minutes (its logging interval), so polling stats faster than every 15 minutes rarely returns new data. Use one GetStats call with type=custom and several attributeCodes[] instead of many separate calls.
Notes
- Demo account: VRM has a public demo account (user 22) with several sample installations, such as ESS System (
219742), 35ft Yacht (151734) and Off-grid (209689). The demo is read-only. It answers403for alarm rules, diagnostics, tags, the site id lookup and every write. - Alarms:
alarm/listreturns the alarm rules configured on a site.alarm-log/getreturns the alarms that fired, withstartedandclearedtimestamps. When a site has no log entries, it returns200with{"success": false, "error_code": "no_results_found"}. - Alarm rule bodies: float alarms use PascalCase
AlarmEnabledandNotifyAfterSeconds; enum alarms use camelCasealarmEnabledandnotifyAfterSecondswithenumValues. VRM returns a warning if the case is wrong. - DELETE with a body:
DeleteAlarmRuleandRemoveTagsend a JSON body withDELETE, as the VRM spec requires. - Support: Victron does not offer direct support for the VRM API. Use the Modifications section of the Victron Community.
- Reports and CSV / XLSX exports moved to a separate VRM Reports API and are not covered here.
Testing
Static checks compare all 20 events with the official VRM OpenAPI 3.1 document, and a local contract mock covers all of them. Against the real API, 9 read events returned200 with the public demo account: user, installation list and search, system overview, stats (live feed, kWh, custom SoC, forecast), overall stats, alarm log, Dynamic ESS settings and GPS track. The 4 read events that need full rights (alarm rules, diagnostics, tags, site id lookup) and 5 write probes with no-op payloads returned 403 forbidden on the demo, as expected. The Token access-token format was checked only by its 401 invalid_token response, because the demo gives a Bearer JWT. A run with your own access token is still needed (see the factory TEST.md).
Not covered
Dynamic ESS writes, reset forecasts, custom widgets, data and installation-overview downloads, user, invite, group and access-token management, admin endpoints, the deprecatedwidgets/* endpoints, and the login call itself.

