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

by OffGrid Max · 1 month ago 47 views 4 replies
OffGrid Max
OffGrid Max
Regular
64 posts
thumb_up 31 likes
Joined Jun 2023
1 month ago
#26686

Been running a Pi 4 on my motorhome setup for about 8 months now pulling data from a Victron Cerbo GX via MQTT. Honestly it's been rock solid — logs everything to InfluxDB and I've got Grafana dashboards showing me SOC, PV yield, load consumption, the lot.

Main reason I went local rather than VRM portal is the data retention. VRM throttles your historical resolution after a while and I wanted granular 10-second intervals kept indefinitely. Fills up a decent SD card faster than you'd think mind you — switched to a proper SSD via USB3 after my third failed card. Do not cheap out on the SD card situation, learned that the hard way somewhere in a field in Wales.

The ModbusTCP route is another option if anyone wants to poke around — slightly more reliable than MQTT in my experience but both work fine with a Cerbo.

Few things worth mentioning:

  • Node-RED sits between the Pi and InfluxDB in my stack, makes transformation way easier
  • Set your Pi to read-only filesystem mode when you're not actively developing — kills the corruption issues
  • Grafana alerting via Telegram has saved me twice when something went wonky overnight

Running this alongside a Fogstar 200Ah LiFePO4 bank and 400W of panels on the roof. The visibility into what's actually happening with your system is genuinely brilliant once it's all talking properly.

Anyone else gone down this rabbit hole? Curious whether people are using the official Victron Venus OS large image on the Cerbo instead — apparently that runs InfluxDB natively but I've not tried it myself.

Panel Matt
Panel Matt
Active Member
18 posts
Joined Jan 2025
1 month ago
#26715

@OffGridMax yeah doing almost the same on my tiny house setup. Pi Zero 2W actually — massively overkill for just MQTT → InfluxDB → Grafana but it barely sips power which matters when you're off-grid.

One thing I'd add: set up Telegraf as the middleman rather than writing custom scripts. Much cleaner and handles reconnects automatically if your Cerbo reboots.

Also worth enabling the VRM local dashboard as a backup — saved me once when the Pi's SD card corrupted. Learned my lesson, now running the OS off a small USB SSD instead. SD cards and constant writes don't mix well long-term.

What retention period are you using in InfluxDB? I dropped mine to 90 days and the database stays tiny.

Les Wood
Les Wood
Active Member
37 posts
thumb_up 9 likes
Joined Dec 2023
1 month ago
#26732

Been running a similar stack on my shepherd's hut setup for about a year now, though I went down the VRM local API route rather than MQTT initially — found it more straightforward to poll the Cerbo directly over the local network without fiddling with broker config.

One thing worth flagging that neither of you have mentioned: SD card longevity. InfluxDB writes are brutal on cheap cards. Lost six months of data when a SanDisk Ultra died on me. Now running the OS from a proper industrial-grade card and redirecting the InfluxDB data directory to a small USB SSD. Been solid ever since.

@PanelMatt the Zero 2W concern I'd raise is thermal throttling if it's in an enclosed space — saw mine drop query performance noticeably on warm days. Small heatsink sorted it mostly.

Anglia OffGrid
Anglia OffGrid
Regular
61 posts
thumb_up 30 likes
Joined Aug 2023
1 month ago
#26754

Great thread. I've got a Pi 4 doing exactly this on the narrowboat — Cerbo GX via MQTT into InfluxDB, Grafana on top, and I've added Node-RED in the middle to do some basic automation (dump load control, that sort of thing).

One thing worth mentioning that nobody's touched on yet: local MQTT retention. If the Pi reboots, you lose anything that wasn't written to InfluxDB in time. Worth setting up a persistent MQTT broker (Mosquitto handles this fine) rather than treating it as fire-and-forget.

@OffGridMax — eight months rock solid is encouraging. I was sceptical at first but it's genuinely become the most useful part of my monitoring setup.

Anyone just getting into this, don't be put off by the stack — it sounds complex but there are some decent step-by-step guides out there specific to Victron/Pi setups.

OffGridFreak
OffGridFreak
Active Member
22 posts
thumb_up 8 likes
Joined Jul 2024
1 month ago
#26784

Really interested in this thread — just getting my cabin setup sorted with a Victron MultiPlus-II and a Cerbo GX and I've been wondering whether to go down the local logging route rather than relying on VRM cloud.

Couple of questions for the group:

  • How are you handling data retention? Does InfluxDB start eating up the Pi's SD card after a few months, or have you moved storage to an SSD?
  • @LesWood78 — curious why you went VRM local API over MQTT? Any particular advantage there?

Also wondering if anyone's pulling EV charging data into the same dashboard. I'm planning to add a charger at the cabin and it'd be brilliant to see solar generation vs. charge sessions in one Grafana view rather than juggling separate apps.

Might just pick up a Pi 4 and have a proper go at this before winter.

Log in to join the discussion.

Log In to Reply