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

by Roger Knight · 3 weeks ago 54 views 5 replies
Roger Knight
Roger Knight
Active Member
20 posts
thumb_up 3 likes
Joined Oct 2024
3 weeks ago
#32384

Been running a Pi 4 (2GB) with Venus OS Large for about eight months now on my garden office system and it's been rock solid. Pulls data from my Cerbo GX via MQTT and I've got Grafana dashboards showing everything — battery SOC, solar yield, inverter load, the lot.

A few things worth noting for anyone thinking of going down this route:

  • Storage matters — I killed two SD cards before switching to a proper SSD via USB. Don't skimp on this.
  • MQTT topics can be a bit of a rabbit hole to map initially. The Victron community documentation is decent but there are gaps.
  • InfluxDB as the time-series database works brilliantly, though I'm curious whether anyone's moved to InfluxDB 2.x yet? I'm still on 1.8 and slightly nervous about migrating.

The main reason I went local rather than relying on VRM portal is data ownership and latency. VRM is fine but I wanted sub-second updates on the dashboard in the office without depending on internet connectivity — which on a narrowboat (secondary system) is obviously unreliable.

Has anyone integrated Home Assistant alongside Grafana? I've seen some builds where people are doing automation based on SOC thresholds — cutting non-essential loads when the battery drops below a certain percentage. That's the direction I want to head next but I'm not sure whether to handle logic in Node-RED or HA natively.

What hardware are others running this on? Wondering if a Pi 5 would be worth the upgrade or whether that's overkill for essentially just MQTT brokering and time-series storage.

Russ Stevens
Russ Stevens
Active Member
10 posts
Joined Sep 2024
3 weeks ago
#32451

Hey @RogerKnight, great setup! I've gone a slightly different route — running a Pi 4 with Node-RED sitting between my Cerbo and InfluxDB, then Grafana on top. The Node-RED layer lets me do some handy transformations before the data hits the database, like calculating daily yield totals and flagging when my battery hasn't hit absorption by noon (usually means something's shading the panels).

One tip worth mentioning — I've got the whole stack writing to an SSD over USB rather than the SD card. Had two SD cards fail on me before I made the switch, and losing months of historical data is genuinely painful. The SSD has been running 18 months without a hiccup now.

What retention period are you using in InfluxDB? I'm keeping 90 days at full resolution then downsampling for anything older.

ExBrickie
ExBrickie
Regular
86 posts
thumb_up 13 likes
Joined May 2023
3 weeks ago
#32455

Been doing something similar on the boat for about 18 months. Pi 3B+ running InfluxDB and Grafana pulling from the Cerbo via MQTT — zero issues even through some fairly rough winters moored up.

One thing I'd flag: watch your SD card. I killed two before switching to booting from a USB SSD. That alone transformed reliability. InfluxDB writes are brutal on flash storage.

@RogerKnight have you set up any alerting? I've got Grafana pushing notifications to my phone when battery SOC drops below a threshold — genuinely useful when I'm not on the boat. Caught a dodgy DC load draining things overnight that I'd never have spotted otherwise.

@RussStevens curious whether Node-RED adds much latency vs direct MQTT — sceptical it matters at this timescale but interested in your experience.

Boxer Camper
Boxer Camper
Regular
96 posts
thumb_up 56 likes
Joined Jul 2023
3 weeks ago
#32462

Running almost identical to @ExBrickie on the narrowboat — except I learned the hard way that SD cards hate the damp. Lost six months of lovely Grafana data when one gave up the ghost somewhere near Braunston.

Switched to a proper industrial SD from Pimoroni and added log2ram to buffer writes in RAM first. Night and day for longevity.

One thing nobody's mentioned: if your Pi loses power during a Victron firmware update (ask me how I know 🙃), your InfluxDB can corrupt silently. Worth scheduling a influxd backup to a USB stick weekly via cron. Five minutes of setup, potentially saves your sanity.

Also running a watchdog script that pings me on Telegram if MQTT stops publishing — caught a dodgy VE.Can cable before it became a proper problem.

FormerCop
FormerCop
Senior Member
155 posts
thumb_up 44 likes
Joined Jul 2023
3 weeks ago
#32482

Switched my motorhome Pi to a Samsung 128GB USB stick booting from USB — SD card lasted three months before corruption ate my entire Influx database, never again.

Worth noting: if you're pulling from the Cerbo via MQTT, enable persistent sessions on the broker or you'll miss data every time the Pi reboots and spend a Sunday wondering why your SOC graph has mysterious gaps (ask me how I know).

Also — @BoxerCamper's point about damp is real, but heat kills these things just as dead; mine throttled itself into uselessness parked in Spain last August, shoved a tiny 5v fan on it and problem solved.

One thing nobody's mentioned: Victron's dbus-mqtt topics change occasionally between firmware updates, so pin your Cerbo firmware unless you enjoy rebuilding dashboards at midnight.

Mick Davies
Mick Davies
Active Member
11 posts
thumb_up 1 likes
Joined Jan 2024
3 weeks ago
#32507

Great thread, this. I've got a similar setup in my static caravan but went a slightly different route — running the Pi 4 headless with log2ram to reduce writes to the SD card, which has kept it going for nearly two years now without corruption issues. Might be worth trying before making the jump to USB boot, @FormerCop, though your Samsung stick solution sounds solid too.

One thing I'd add for anyone starting out: set your InfluxDB retention policies early before your database balloons out of control. Learned that the hard way when my Pi ground to a halt after six months of storing full-resolution data. Dropping to 5-minute averages for anything older than a fortnight made a massive difference. @RogerKnight, what retention are you running on yours?

Log in to join the discussion.

Log In to Reply