Need help with reading data via Modbus TCP

by Solar Col · 1 month ago 28 views 4 replies
Solar Col
Solar Col
Active Member
10 posts
Joined Oct 2024
1 month ago
#22092

Been down this rabbit hole myself recently with my cabin setup — pulling data from the Cerbo GX via Modbus TCP to feed into a Home Assistant dashboard, and the register values were consistently showing nonsense compared to what VRM and the Victron Connect app were displaying.

The issue I kept hitting was around scaling factors. A lot of the Victron registers return values in tenths or hundredths — so if you're reading a raw value of 2450 for battery voltage, that's actually 245.0V once you apply the /10 scaling. Easy to miss if you're just grabbing the raw integer.

The other gotcha is signed vs unsigned integers. Some registers — particularly around grid power (registers in the 820s range for the Multi/Quattro) — use signed 16-bit integers to represent import/export direction. If your code is treating them as unsigned, you'll get wildly incorrect figures, especially when the system is exporting.

Worth double-checking:

  • The Victron Modbus TCP register list PDF — make sure you're on the latest version, they do update it
  • The unit ID for each device on the Cerbo — the inverter, MPPT, and BMS all sit on different unit IDs, easy to accidentally cross-read
  • Whether you're summing L1/L2/L3 registers correctly for three-phase, or just single-phase

Has anyone else found the register documentation a bit inconsistent between firmware versions? I updated the Cerbo to the latest release and a couple of offsets shifted slightly, which broke my Node-RED flow for a few days before I noticed.

Devon Dweller
Devon Dweller
Senior Member
100 posts
thumb_up 28 likes
Joined Mar 2024
1 month ago
#22116

@SolarCol — classic Modbus TCP gotcha: unit ID matters enormously with the Cerbo GX. Unlike traditional Modbus where unit ID is often ignored, Victron's implementation routes to different devices depending on it.

Check your com.victronenergy.vebus service unit ID — it's not always 246 as the documentation suggests; it varies depending on how many devices are connected. Use Victron's Modbus TCP register list and cross-reference against dbus-spy on the Cerbo itself to confirm your actual unit IDs.

Also worth noting: scale factors. Battery voltage comes back as an integer — divide by 10. Power values are signed integers (negative = charging on some registers). Caught me out for days on my narrowboat setup before I realised the dashboard was reading nonsense.

Home Assistant's modbus integration handles this cleanly once you've got the right slave ID sorted.

Ducato Project
Ducato Project
Active Member
41 posts
thumb_up 24 likes
Joined Jul 2023
1 month ago
#22155

@DevonDweller makes a fair point on unit IDs — worth adding that the Victron portal publishes a full register list but it's not always obvious which instance your device is on, especially if you've got multiple MPPTs or a BMV alongside the inverter.

I spent longer than I'd like to admit querying unit ID 100 wondering why half my registers were returning zeros. Turned out my MultiPlus was on a different instance entirely.

Suggest grabbing the Victron-community Modbus TCP register spreadsheet (pinned on their GitHub) and cross-referencing device instance numbers in VRM or the Cerbo's local UI before assuming the values are wrong. The data is usually there — just not where you expect it.

Silver Captain
Silver Captain
Active Member
11 posts
Joined Apr 2025
1 month ago
#22190

Great thread — just to add something that caught me out initially: even once you've got the right unit ID sorted and the register map in hand, watch out for scaling factors. Victron encodes a lot of values as integers with an implied decimal — battery voltage for instance comes through multiplied by 100, so 5200 actually means 52.00V. Easy to miss if you're just glancing at raw values and thinking something's wildly wrong.

Also worth enabling Modbus TCP explicitly in the Cerbo's settings if you haven't already — it's off by default and buried under Services in the remote console. Took me an embarrassingly long time to find that the first time around. @SolarCol what registers are you actually targeting? Happy to compare notes if you're pulling SOC and power flow data specifically.

Van Rhys
Van Rhys
Active Member
25 posts
thumb_up 1 likes
Joined Sep 2024
1 month ago
#22229

Been through exactly this with my static caravan setup — one thing nobody's mentioned yet is byte order / endianness catching people out on multi-register values like energy totals and battery capacity figures.

Some registers return 32-bit values spread across two consecutive 16-bit registers, and if your Modbus TCP client is assembling them in the wrong order you'll get completely nonsensical readings — not obviously wrong, just... plausible-but-wrong, which is the worst kind.

In Home Assistant's modbus integration specifically, check whether you need swap: word on those registers. Took me an embarrassing amount of time staring at what appeared to be reasonable SOC figures that were subtly incorrect before I caught it.

The Victron community wiki does document which registers are 32-bit but it's easy to skim past. Cross-reference against the actual CCGX Modbus TCP register list PDF rather than any third-party summaries.

Log in to join the discussion.

Log In to Reply