How can I Subscribe GX to emonCMS MQTT

by Vito Solar · 1 month ago 64 views 5 replies
Vito Solar
Vito Solar
Active Member
11 posts
Joined Aug 2025
1 month ago
#30287

Been meaning to post about this for a while — finally getting round to it.

Running a Victron setup here (Multiplus-II + Cerbo GX) alongside a couple of third-party string inverters, and I want to get proper PV power data flowing into emonCMS via MQTT. The VRM stats are a bit patchy without the GX actually knowing total PV output, which I imagine some of you have run into.

The bit I'm stuck on: getting the Cerbo GX to publish to an external MQTT broker (running Mosquitto on a local Pi) so emonCMS can subscribe and log everything nicely.

From what I've read, the GX device publishes to its own internal broker on venus.local by default — but I want to bridge that out to my own broker without losing the VRM connection. Has anyone managed this cleanly?

A few things I'm unsure about:

  • Is the MQTT bridge config done via SSH into the GX, or is there a cleaner way?
  • Does it survive firmware updates?
  • Anyone using emonCMS specifically on the receiving end, or mostly Node-RED as a middleman?

My end goal is having all four inverters' data — plus battery state from the Fogstar cells — visible in one emonCMS dashboard rather than juggling multiple interfaces.

Would love to hear how others have tackled this. Feels like there's a clean solution somewhere but the Victron docs go a bit vague once you step outside their ecosystem. Anyone done something similar?

Del58
Del58
Active Member
12 posts
Joined Mar 2025
1 month ago
#30327

Hey @VitoSolar, good topic — the Cerbo's MQTT integration is really handy once you get it working.

Make sure you've got MQTT on LAN enabled in the Cerbo's Remote Console under Services. Then in emonCMS, you'll want to set up an MQTT input using the Cerbo's local IP. The base topic is typically N/[VRM Portal ID]/ — you can find your Portal ID in the Cerbo's Remote Console under Device List or on the VRM portal.

One thing worth noting: the Cerbo publishes in a "keep-alive" style, so you'll need to send a keepalive message to R/[Portal ID]/keepalive every 60 seconds or so, otherwise it stops broadcasting. There are a few Node-RED flows floating about that handle this nicely if you'd rather not reinvent the wheel.

What are you hoping to monitor specifically — just the Multiplus or the string inverters too?

BlownFuse
BlownFuse
Senior Member
163 posts
thumb_up 39 likes
Joined Oct 2023
1 month ago
#30342

Good question @VitoSolar — worth clarifying which direction you're pushing data.

The Cerbo GX runs its own local MQTT broker, so you can't natively subscribe it to an external broker like emonCMS. What you'd typically do instead:

  1. Enable Venus MQTT on the Cerbo (Remote Console → Services)
  2. Run a broker bridge (e.g. Mosquitto with connection directive) on a Pi to forward topics from the Cerbo's broker → emonCMS MQTT
  3. Alternatively use Node-RED (installable on Cerbo or external Pi) to subscribe to N/<VRM-ID>/# and publish to emonCMS

The topic structure follows N/<portal-id>/system/0/Ac/Consumption/L1/Power etc.

Have you confirmed emonCMS MQTT input is already accepting external publishes on your end? That's often where it stalls before even touching the Cerbo config.

LiFePO4Nerd
LiFePO4Nerd
Senior Member
203 posts
thumb_up 80 likes
Joined Apr 2023
1 month ago
#30354

Great topic — been down this rabbit hole myself with my motorhome setup.

One thing nobody's mentioned yet: the Cerbo's built-in MQTT broker publishes on a keepalive system. If you don't send a R (read) request every 60 seconds to N/{vrm_portal_id}/keepalive, the data stops flowing. Caught me out for ages.

For emonCMS specifically, you'll want Node-RED as the middleware — it handles the keepalive loop neatly and lets you remap the Victron topic structure into something emonCMS actually likes before pushing via HTTP or MQTT.

@Del58 is right that the integration is solid once running, but I'd be cautious about exposing the Cerbo's broker directly. Run everything through a local Mosquitto broker instead and bridge from there — far more stable in my experience.

Victron's venus-platform GitHub has the full topic map. Worth bookmarking.

Carl Baker
Carl Baker
Active Member
49 posts
thumb_up 23 likes
Joined Nov 2023
1 month ago
#30380

Worth noting that emonCMS MQTT expects data in a specific topic structure — emon/[nodename]/[key] — so you'll need a broker in the middle (Mosquitto works well) with a bridge or Node-RED flow to remap the Cerbo's N/[VRM-ID]/... topics into that format.

I'm running exactly this in my garden office setup, subscribing the Cerbo to a local Mosquitto instance, then using Node-RED to transform and republish to emonCMS. The keepalive message the Cerbo sends every 60 seconds on R/[VRM-ID]/keepalive is easy to miss — if you don't handle it, the Cerbo stops publishing after about 60 seconds. Send a response to W/[VRM-ID]/keepalive on the same interval to keep the feed alive.

Also double-check your emonCMS MQTT input API key is set correctly in the broker credentials — silent auth failures are a common gotcha.

Devon Dweller
Devon Dweller
Senior Member
166 posts
thumb_up 28 likes
Joined Mar 2024
1 month ago
#30450

Good points all round — @CarlBaker is absolutely right about the topic structure, and that's where most people come unstuck.

The cleanest approach I've found is running Node-RED on a Pi (or directly on the Cerbo if you're comfortable with it) as your broker bridge. Subscribe to N/[VRM_Portal_ID]/# on the Cerbo's local MQTT broker, transform the payload, then republish to emon/cerbo/[key] for emonCMS consumption.

Key gotcha: the Cerbo's MQTT broker requires you to send a keepalive request every 60 seconds to R/[Portal_ID]/keepalive otherwise it stops publishing. Caught me out badly when I first set this up on my narrowboat system.

For the third-party inverters, you'll likely need separate MQTT paths anyway, so Node-RED gives you a single place to normalise everything before it hits emonCMS. Much tidier than trying to do it another way.

Log in to join the discussion.

Log In to Reply