Victron MQTT question

by Rob Jones · 1 week ago 23 views 4 replies
Rob Jones
Rob Jones
Active Member
15 posts
thumb_up 1 likes
Joined Mar 2024
1 week ago
#19911

Been messing about with exactly this kind of setup in my motorhome recently — Cerbo GX pushing data over MQTT into Node-RED on a Pi 4.

Voltage and current came through dead easy, but SoC was a nightmare to pull reliably. Took me ages to figure out the topic path was slightly different to what I expected. For anyone else struggling, the Victron MQTT topic for SoC on the Cerbo is:

N/{portal_id}/system/0/Dc/Battery/Soc

Key thing I missed — you have to keep alive the MQTT connection by publishing to the keepalive topic every 60 seconds or the Cerbo stops broadcasting. That tripped me up completely and I thought the setup was broken for about two days 😅

R/{portal_id}/keepalive

There's a Victron GitHub repo with all the topic paths documented which is worth bookmarking.

Also worth noting — I'm running a Fogstar Drift 100Ah with a Victron SmartShunt feeding the Cerbo, and the SoC accuracy is spot on once it's all talking properly. Much better than trying to infer SoC from voltage alone.

Anyone else running a similar Pi/Node-RED dashboard? Curious whether people are pulling data direct from the Cerbo over local MQTT or going via the VRM portal API instead. Local feels more reliable for van life where signal can be dodgy, but the VRM route has its own advantages I suppose.

Would love to see what dashboards people have built — mine's pretty basic still but functional.

NaeClue13
NaeClue13
Active Member
20 posts
thumb_up 16 likes
Joined Apr 2023
1 week ago
#19925

@RobJones85 Worth checking whether your BMS is actually publishing SoC to the Cerbo or whether the Cerbo is calculating it internally — they're not the same thing and the MQTT topic path differs. On my setup (Cerbo GX with Fogstar Drift cells and a Daly BMS), the SoC comes through on com.victronenergy.battery/{id}/Soc rather than the system summary path a lot of tutorials point you at.

Also, are you using keepalive on your MQTT broker config in Node-RED? The Cerbo can drop the connection silently if it doesn't see regular pings, which causes exactly the kind of intermittent SoC dropouts people mistake for a data parsing issue.

What BMS are you running? That'll narrow it down considerably.

Moor Lee
Moor Lee
Regular
53 posts
thumb_up 27 likes
Joined Jul 2023
1 week ago
#19957

@RobJones85 Classic Victron — voltage and current turn up on time like good lads, but SoC rocks in three hours late smelling of kebab and claiming it was "calculating" 😄

Seriously though, check your MQTT topic path — on the Cerbo it's usually something like:

`N/{portal_id}/battery

LK_Solar
LK_Solar
Active Member
19 posts
thumb_up 4 likes
Joined Oct 2024
1 week ago
#19969

@RobJones85 had exactly this with my garden office setup — SoC was sat at N/A for ages and I nearly lost my mind. Turned out I hadn't properly configured the battery monitor as the "main" device in Cerbo settings. Once I set that, SoC started flowing through MQTT like a dream.

Worth checking Settings > System Setup > Battery monitor on the Cerbo — make sure it's pointing at your actual BMV or smart shunt rather than left on Automatic. Automatic likes to pick the wrong thing at the worst possible moment, classic.

Also double-check your MQTT topic path — SoC lives at battery/0/Soc (capital S, lowercase oc) which caught me out for an embarrassing amount of time. 🙃

John Dixon
John Dixon
Active Member
44 posts
thumb_up 40 likes
Joined May 2023
1 week ago
#20018

@RobJones85 had almost this exact saga on the boat last summer — spent an afternoon convinced my Fogstar batteries were haunted because SoC just refused to show up in Node-RED. Turns out the Cerbo needs enough charge/discharge cycles before its internal calculator actually commits to an SoC figure. It's like it wants to see your credentials first.

Worth also double-checking your MQTT topic path — the full string wants to be something like N/<portal_id>/battery/276/<instance>/Soc with capital S. Caught me out badly, that did. Case sensitive and the Cerbo doesn't complain, just silently serves you nothing.

@LK_Solar's point about patience is valid too — mine sorted itself after about 24 hours of normal cycling.

Log in to join the discussion.

Log In to Reply