Anyone else using a Raspberry Pi to log their Victron data locally?

by Anglia Camper · 1 month ago 44 views 4 replies
Anglia Camper
Anglia Camper
Active Member
32 posts
thumb_up 22 likes
Joined Dec 2023
1 month ago
#30282

Been running this exact setup on the narrowboat for about 18 months now and honestly it's transformed how I understand my system.

Got a Pi 4 tucked behind the nav panel pulling data from my Cerbo GX via MQTT every 30 seconds, feeding into InfluxDB and Grafana. The dashboard I've built shows SOC trends, solar yield by hour, and crucially — what my inverter is actually doing at 2am when I'm wondering why the batteries aren't as full as expected (answer: the sodding bilge pump, every time).

The thing that irritates me is how long it took me to actually sit down and do it. Spent months relying on the VRM portal and squinting at Victron's own graphs, which are fine but you're dependent on mobile signal. Out on some of the more remote Fenland moorings that's genuinely useless.

Local logging means I've got years of data building up regardless of connectivity. I can correlate my Fogstar lithium bank's behaviour across seasons, spot anomalies before they become expensive problems.

Few things I'd flag for anyone starting out:

  • Use a good quality SD card or, better, boot from USB/SSD — SD cards fail eventually
  • Set your MQTT broker retention sensibly or you'll fill the disk
  • Grafana's alerting can ping your phone when SOC drops below a threshold — genuinely useful

Anyone else doing this on a motorhome setup? Curious whether the vibration causes issues with the Pi over time — the narrowboat is relatively stable but I imagine a motorhome is a different story.

Bazza60
Bazza60
Active Member
47 posts
thumb_up 6 likes
Joined Mar 2024
1 month ago
#30311

@AngliaCamper — yes, running almost identical here. Pi 4 pulling from the Cerbo via MQTT, pushing into InfluxDB with Grafana dashboards on top. The real revelation for me was historical trending — you can actually see your battery's internal resistance creeping up over charge cycles before the BMS throws any warnings.

One thing worth adding if you haven't already: set up a local MQTT broker (Mosquitto) rather than relying on the Cerbo's built-in one directly. Far more stable long-term, especially if you're also pulling ESS data.

Also running a cron job to snapshot daily CSV exports to a USB drive — belt and braces if the SD card decides to give up.

What interval are you polling at? I'm on 5-second samples which is probably overkill but catches the EV charging spikes nicely.

SolarNotSure
SolarNotSure
Active Member
39 posts
thumb_up 6 likes
Joined Oct 2024
1 month ago
#30337

Running this on my shepherd's hut setup — Pi 4 pulling from the Cerbo GX via the local MQTT broker (not the VRM cloud), InfluxDB 2.x, Grafana dashboards. Couple of points nobody's mentioned yet:

Don't use VRM MQTT if you can avoid it — latency is garbage for local logging. Enable the local broker on the Cerbo under Settings > Services and point your Pi at 192.168.x.x:1883 directly.

Also worth setting InfluxDB retention policies properly from day one. I didn't, and ended up with 40GB of data on a 32GB card. Corrupted the lot.

For EV charging correlation I'm pulling the EVSE data into the same InfluxDB instance and overlaying it on solar/battery state graphs — genuinely useful for optimising charge scheduling against battery SOC thresholds rather than just time-of-day triggers.

What retention period are you running @Bazza60?

OldSailor
OldSailor
Senior Member
200 posts
thumb_up 60 likes
Joined Oct 2023
1 month ago
#30361

Been doing this for three years on my liveaboard — one thing nobody's mentioned yet: set your InfluxDB retention policy sensibly or you'll wake up one day to a dead SD card and six months of data in /dev/null.

Run your Pi off a proper UPS hat (the Waveshare ones are decent) rather than raw 12V through a converter, because a dirty shutdown mid-write is the fastest way to corrupt your database.

Also worth enabling read-only root filesystem on the Pi — saves the SD card enormously. Store only the InfluxDB data directory on a small USB SSD instead.

@SolarNotSure if you're on the local MQTT broker rather than VRM, double-check you've subscribed to N/# not just the specific device paths — you'll capture everything the Cerbo sees including connected BMVs and MPPTs.

XAC_Solar
XAC_Solar
Member
5 posts
thumb_up 3 likes
Joined Aug 2025
1 month ago
#30370

Great thread — been meaning to post about this for a while.

One thing worth adding for anyone just starting out: make sure you're running the Pi off a properly regulated 5V supply rather than tapping directly off your 12V bus through a cheap converter. Lost a Pi and three weeks of data once through voltage spikes when the inverter kicked in. Now I use a decent Meanwell PSU and haven't had a wobble since.

Also, @OldSailor makes a good point about retention policies — following on from that, I'd recommend setting up automated backups of your InfluxDB snapshots to a USB stick or network location. The Pi's SD card will fail eventually, especially in a damp narrowboat environment. Lost my first six months of data learning that lesson the hard way! 😅

What dashboard are most of you using — Grafana I assume?

Log in to join the discussion.

Log In to Reply