Victron Victron Battery-Inverter Modbus TCP template

Victron Battery-Inverter

The Victron Battery-Inverter template targets Victron Energy ESS systems monitored through a GX device (Cerbo GX or Venus GX) running Modbus TCP. The template reads the full system picture exposed by the com.victronenergy.system service: per-phase AC consumption, grid power, AC- and DC-coupled PV production, battery state of charge, voltage, current, time-to-go, and VE.Bus charger output. ESS Mode 2 control registers covering the grid setpoint, charge and discharge current limits, max feed-in power, and the PV power limiter flag are also captured. This gives installers a single, structured data source for energy-flow visibility across the entire Victron installation.

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

Registers (43)

43 read, 0 write

NameUnitAccessAddress (Hidden until you enter your email)Function (hidden)Type (hidden)
serial_numberRead
ccgx_relay1_stateRead
ccgx_relay2_stateRead
ac_pv_on_output_power_l1WRead
ac_pv_on_output_power_l2WRead
ac_pv_on_output_power_l3WRead
ac_pv_on_input_power_l1WRead
ac_pv_on_input_power_l2WRead
ac_pv_on_input_power_l3WRead
ac_consumption_power_l1WRead
ac_consumption_power_l2WRead
ac_consumption_power_l3WRead
grid_power_l1WRead
grid_power_l2WRead
grid_power_l3WRead
ac_genset_power_l1WRead
ac_genset_power_l2WRead
ac_genset_power_l3WRead
active_input_sourceRead
dc_battery_voltageVRead
dc_battery_currentARead
active_powerWRead
battery_soc%Read
battery_stateRead
battery_consumed_amphoursRead
battery_time_to_gosRead
dc_pv_powerWRead
dc_pv_currentARead
charger_powerWRead
dc_system_powerWRead
ve_bus_charge_currentARead
ve_bus_charge_powerWRead
ess_control_loop_setpointWRead
ess_max_charge_current_percentage%Read
ess_max_discharge_current_percentage%Read
ess_control_loop_setpoint_scale_factor_2WRead
ess_max_discharge_powerWRead
system_max_charge_currentARead
max_feed_in_powerWRead
feed_excess_dcRead
dont_feed_excess_acRead
pv_power_limiter_activeRead
max_charge_voltageVRead

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 battery state of charge and time-to-go to detect unexpected overnight discharge patterns early.
  • Track per-phase grid power on L1, L2, and L3 to verify feed-in compliance with local grid operator limits.
  • Compare DC-coupled PV power against AC-coupled PV output to verify MPPT and inverter performance across seasons.
  • Alert on active_input_source changes to catch unplanned generator or grid switchover events during mains outages.
  • Report ESS max discharge power and max feed-in power readings to confirm ESS configuration matches site energy agreements.

Installation

  1. Enable Modbus TCP on your GX device by navigating to Settings, then Services, and switching the Modbus TCP toggle to enabled.

  2. Connect the ModbusCloud Gateway to the same LAN as your GX device, ensuring both can reach each other on TCP port 502.

  3. In the ModbusCloud portal, add your Gateway, import the Victron Battery-Inverter template, and set the Unit ID to 100, which maps to the com.victronenergy.system service for system-wide registers.

  4. Verify the connection by spot-checking register 843 (battery_soc): a value between 0 and 100 confirms the Gateway is polling the correct service and Unit ID.

Things to watch for

Battery voltage reads ten times too high. What is wrong?

Register 840 (dc_battery_voltage) uses a scale factor of 10 in the official Victron register list. If your integration applies raw uint16 values without dividing by 10, the voltage will appear ten times larger than the actual DC bus voltage. Divide the raw register value by 10 to obtain volts.

Grid power registers return large positive numbers instead of negative feed-in. Why?

Registers 820 to 822 are signed int16 types. Many Modbus clients default to reading registers as unsigned 16-bit integers. A negative value such as -500 W is encoded as 65036 when treated as unsigned. Configure your client to interpret these registers as signed 16-bit integers to read feed-in power correctly.

The Gateway connects but all registers return zero or unavailable. What now?

Modbus TCP is disabled by default on Victron GX devices. Confirm it is enabled under Settings, then Services, then Modbus TCP on the GX device. Also verify you are polling Unit ID 100. Unit ID 0 maps to the same service but many clients reject it; use 100 as recommended by Victron.

Is it safe to write to the ESS setpoint and limit registers from the portal?

The ESS control registers (addresses 2700 to 2710) are read-only in this template, but treat any external ESS setpoint writes with care. ESS Mode 2 has no automatic passthrough fallback if a controlling script stops updating values, meaning the inverter can continue acting on the last written setpoint until manually overridden. Always test setpoint changes in a controlled environment first.

Want to see how it works?

Electrician working in an open distribution board