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

by Slim · 1 month ago 53 views 4 replies
Slim
Slim
Active Member
25 posts
thumb_up 9 likes
Joined May 2024
1 month ago
#26075

Been running a Pi 4 (the 2GB one I had gathering dust) connected to my Cerbo GX via USB for a few months now and it's been rock solid for logging locally. Using VictronConnect data pulled through Venus OS and storing it in InfluxDB with Grafana dashboards — genuinely satisfying to see the shepherd's hut's power history laid out properly rather than squinting at the Victron app.

Few questions for anyone else doing this:

  • Is anyone running the Pi off the system itself? Mine's powered from a small USB tap on the 12V bus but I'm a bit paranoid about it brown-out rebooting during a low battery event and corrupting the SD card. Running off a decent quality card (Samsung Endurance series) but still.
  • Has anyone switched to an SSD boot drive? I've seen people swapping out SD cards for USB SSDs on the Pi to avoid the whole write-wear problem. Worth the faff?
  • What retention periods are you keeping data at? I'm logging every 30 seconds which feels excessive but I wanted decent granularity during cloudy weeks when the system's working hardest.

The Grafana dashboards are genuinely addictive once you get them set up — I've caught two separate issues just by spotting weird patterns in the graphs that I'd never have noticed otherwise. One was a dodgy connection on a Fogstar battery cable causing intermittent voltage drops.

Anyone using Node-RED as part of the stack as well, or is that overkill for a simple cabin/hut setup?

Devon Dweller
Devon Dweller
Senior Member
129 posts
thumb_up 28 likes
Joined Mar 2024
1 month ago
#26095

@Slim yes, been doing something very similar on my narrowboat for the past 18 months or so. One thing worth noting — if you're pulling data via the VRM local API rather than Modbus TCP, you'll occasionally get gaps during Cerbo firmware updates. I switched to Modbus TCP polling with a Python script writing to InfluxDB, then Grafana on top, and it's been utterly reliable.

Worth setting your Pi's /tmp to a tmpfs ramdisk if you're writing frequently — SD cards hate constant small writes and you'll thank yourself later when it doesn't corrupt at an inconvenient moment. I run mine off a cheap USB SSD now, which eliminated that concern entirely.

Fogstar batteries integrate beautifully once you've got proper SoC trending visible — you really start to appreciate the cycle data over weeks rather than snapshots.

Cleggy
Cleggy
Regular
71 posts
thumb_up 24 likes
Joined Aug 2023
1 month ago
#26129

Really interested in this thread — been thinking about doing exactly this with my setup but hadn't taken the plunge yet.

@Slim what are you actually doing with the logged data? Just viewing historical charts, or have you got any automation triggered off the readings? I'm wondering whether it's worth setting up something like InfluxDB + Grafana on top, or if that's overkill for a basic home system.

Also — does the Pi need to stay powered 24/7 for this to work properly, or can it spin up on a schedule? Conscious of the parasitic draw given I'm already watching every watt with EV charging in the mix.

Anyone had issues with the Pi's SD card failing after extended use? I've heard that's a common weak point and wondered if booting from USB SSD is worth the extra faff.

RetiredNurse22
RetiredNurse22
Member
4 posts
Joined Oct 2024
1 month ago
#26139

Really useful thread, this one! I'm not technical enough to have set it up myself, but my nephew helped me get a similar thing running on my Pi 3B+ back in the autumn. One thing I'd add from a practical standpoint — having that local logging has been an absolute godsend for spotting patterns in my battery health over time. As a retired nurse I'm used to monitoring trends rather than just snapshots, and it's the same principle here really. @Cleggy if you're on the fence I'd say go for it, especially if you know anyone who can lend a hand with the initial setup. The peace of mind knowing your data isn't dependent on cloud services staying up is worth it alone. How are you finding storage management, @Slim — are you writing to an external drive or just an SD card?

John Dixon
John Dixon
Regular
64 posts
thumb_up 40 likes
Joined May 2023
1 month ago
#26157

@Slim funny you should mention this — I've got almost the exact same setup running on my van, except I went a bit mad and ended up with two Pis because I forgot I'd already ordered one. Classic.

What I'd add that nobody's mentioned yet: stick a decent UPS hat on the Pi itself. Lost a week of logging data once when the van's 12V supply got a bit wobbly during a particularly ambitious EV charging session off my Fogstar batteries. Pi didn't like that one bit. Few quid on a Pisugar or similar hat and you'll never lose data mid-write again.

Also worth setting up logrotate properly from the start — learned that the hard way when my SD card quietly filled up over about three months and I hadn't noticed until everything just... stopped.

Log in to join the discussion.

Log In to Reply