Victron Victron Energy (grid) Modbus TCP template

Victron Energy (grid)

Victron Energy (grid) is a system-level Modbus TCP data source exposed by Victron GX devices, such as the Cerbo GX and Venus GX, in residential and commercial energy installations. The template reads three registers from the com.victronenergy.system service: grid power on phases L1 (820), L2 (821), and L3 (822), each as a signed watt value. Positive values indicate power drawn from the grid; negative values indicate export. Connecting the ModbusCloud Gateway to your GX device over LAN gives you live, per-phase grid power visibility without any additional hardware.

Protocol
Modbus TCP
Connection
Ethernet, Modbus TCP
Registers
3, read only
Brand
Victron
Last updated

Registers (3)

3 read, 0 write

NameUnitAccessAddress (Hidden until you enter your email)Function (hidden)Type (hidden)
power_aWRead
power_bWRead
power_cWRead

Loading registers…

Send your device list

If a device is not in the library yet, we build the template for free as soon as we have the register data.

Use cases

  • Monitor per-phase grid import and export in real time to verify energy balance across L1, L2, and L3.
  • Alert on sustained grid import above a threshold to detect unexpectedly high loads or a failed PV system.
  • Track phase imbalance over time by comparing power_a, power_b, and power_c readings in the ModbusCloud portal.
  • Report daily grid import and export patterns to building owners for energy cost analysis and reporting.
  • Verify that an ESS or off-grid system is holding the expected grid setpoint by watching all three phase registers simultaneously.

Installation

  1. Enable Modbus TCP on the Victron GX device by navigating to Settings, then Services, then Modbus-TCP, and toggling the service on.

  2. Connect the ModbusCloud Gateway to the same LAN segment as the Victron GX device, confirming IP reachability on TCP port 502.

  3. In the ModbusCloud portal, add the Gateway, import the Victron Energy (grid) template, and set the unit ID to 100, which maps to the com.victronenergy.system service.

  4. Spot-check the connection by reading register 820 and confirming the returned watt value matches the live grid reading shown on the GX device display or VRM portal.

Things to watch for

All three registers return zero or no response. What is wrong?

Modbus TCP is disabled by default on Victron GX devices. Go to Settings, then Services, then Modbus-TCP on the GX device and confirm the service is enabled. Also verify the GX device is reachable on TCP port 502 from the ModbusCloud Gateway before retrying.

I get a gateway path unavailable error on all registers. Why?

This error typically means the unit ID is incorrect. Grid system registers 820 to 822 belong to com.victronenergy.system, which must be queried with unit ID 100. Unit ID 0 also maps to the same service but many Modbus clients reject it; always use 100.

Phase L1 reads a large negative value unexpectedly. Is the scaling wrong?

No scaling factor applies: these registers are raw int16 watts with a scale of 1. A large negative value on power_a simply means the installation is exporting power to the grid on L1. Confirm with the GX device display that the sign matches the expected grid direction.

The GX device shows three-phase data but only one phase returns valid readings.

Each phase maps to a separate register: 820 for L1, 821 for L2, and 822 for L3. Confirm the Modbus poll requests all three addresses individually. Querying a contiguous block starting at 820 with a count of 3 is the most reliable approach and avoids gaps caused by non-existent registers between them.

Want to see how it works?

Electrician working in an open distribution board