Anyone else using a Raspberry Pi to log their battery data, or is there a simpler way?

by Crafter Wanderer · 3 weeks ago 31 views 8 replies
Crafter Wanderer
Crafter Wanderer
Active Member
14 posts
thumb_up 1 likes
Joined Mar 2025
3 weeks ago
#32534

Been running a Pi 4 for about 18 months now logging data from my Victron SmartShunt via the VE.Direct interface. It feeds into InfluxDB with Grafana on top, and honestly the dashboards are brilliant once you've got it dialled in — you can see exactly what your batteries are doing across days, weeks, months.

That said, it's not a trivial setup. Took me a solid weekend to get the whole stack stable, and you need to be reasonably comfortable on the command line. For my static caravan it made sense because I'm often not on site and I wanted remote monitoring via Tailscale.

Simpler alternatives worth considering:

  • Victron Cerbo GX — does most of this out of the box and feeds into VRM portal. Pricey but polished.
  • Victron GlobalLink 520 — dead simple if you're already in the Victron ecosystem, no Pi needed at all.
  • Fogstar battery BMS apps — if you're on a Fogstar Drift or similar, the built-in Bluetooth monitoring is surprisingly capable for basic state-of-charge tracking.

The Pi route gives you total flexibility and costs almost nothing if you've already got one lying around, but you're maintaining it yourself. Had one SD card failure which wiped 6 months of data before I moved to an SSD boot — lesson learned the hard way.

What's your current battery setup and inverter situation? That'll probably determine which route makes most sense. Some systems have decent monitoring baked in already and adding a Pi is just doubling up unnecessarily.

EcoFlow_Queen
EcoFlow_Queen
Active Member
26 posts
Joined Feb 2025
3 weeks ago
#32547

@CrafterWanderer solid setup — the VE.Direct to InfluxDB pipeline is genuinely hard to beat once it's running.

One thing worth adding: if you're not already, run your Pi off a small dedicated LiFePO4 cell rather than mains. I've got a Fogstar Drift 12V feeding mine through a small DC-DC converter, so the monitoring itself stays online during grid outages — which is precisely when you actually want your data.

Also consider telegraf as your collection agent rather than writing custom scripts; it handles VE.Direct parsing cleanly and has native InfluxDB output.

For anyone wanting something simpler, Victron's own Cerbo GX does most of this out-of-the-box with VRM portal access, though you lose the local customisation flexibility and it's considerably pricier than a Pi 4 + shunt combo.

Jim Wilson
Jim Wilson
Active Member
45 posts
thumb_up 14 likes
Joined Dec 2023
3 weeks ago
#32582

Great thread for anyone just getting into this rabbit hole! 🐇

If the Pi setup feels a bit daunting at first, worth knowing that Victron's own VRM portal gets you decent logging for free with zero faff — just plug in a Cerbo GX or even a cheap Raspberry Pi running Venus OS and you're essentially done.

I ran vanilla VRM on my boat setup for ages before going down the InfluxDB/Grafana route. Honestly VRM held up brilliantly until I wanted those custom dashboards.

For anyone lurking who's new here — don't be put off by the technical chat. Start simple, upgrade later. You don't need to boil the ocean on day one. The community here will help you get sorted regardless of where you're starting from. 👍

Andy Graham
Andy Graham
Active Member
12 posts
Joined Mar 2025
3 weeks ago
#32613

Been running almost identical stack to @CrafterWanderer on my shepherds hut setup — SmartShunt into Pi Zero 2W via VE.Direct, pushing to InfluxDB. One thing worth adding: set your InfluxDB retention policy sensibly early on. I made the mistake of keeping full 10-second resolution data indefinitely and the SD card started showing write wear within 8 months. Now I downsample anything older than 7 days to 1-minute averages using a continuous query. SD card health has been stable since.

Also worth considering a read-only root filesystem with a small RAM disk for the write-heavy InfluxDB temp files — dramatically extends card life.

If the whole stack still feels like overkill, Victron's own VRM portal handles basic logging adequately via the GX devices, though you lose the flexibility of custom Grafana dashboards.

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

Ran this exact stack on my narrowboat for two years before the Pi died mid-winter somewhere near Braunston — dramatic timing, as the bilge pump was playing up simultaneously. Replaced it with a Victron Cerbo GX and genuinely haven't looked back. Yes, it costs more than a Pi Zero, but it speaks native VE.Bus, handles my MPPT and SmartShunt simultaneously, and the VRM portal gives you remote access without fiddling with dynamic DNS nonsense.

That said, if you enjoy the tinkering — and clearly @CrafterWanderer does — the Pi/InfluxDB/Grafana combo produces much prettier dashboards than VRM ever will. It's the difference between a bespoke suit and off-the-rack.

For anyone who wants reliability over flexibility, Cerbo wins. For anyone who wants to spend a rainy Sunday down a rabbit hole, Pi wins. Both are legitimate life choices.

CE_Builds
CE_Builds
Senior Member
140 posts
thumb_up 40 likes
Joined Oct 2023
3 weeks ago
#32649

Running this on my garden office and boat both — one thing worth adding is don't skimp on the SD card. Constant DB writes will kill a cheap card within months. Use a proper endurance card (Samsung Pro Endurance, SanDisk MAX Endurance) or better yet, boot from a USB SSD.

@BoxerCamper's point about mid-winter failure is real — I lost a card in January, not ideal when you're trying to monitor battery state remotely.

Also worth considering: redirect InfluxDB writes to a USB stick at minimum, keeps wear off the boot card entirely.

For anyone nervous about the full stack, VictronConnect via Bluetooth gets you surprisingly far for basic logging — but once you've seen a Grafana dashboard showing your solar yield vs consumption over 6 months, there's no going back really.

Expert Wanderer
Expert Wanderer
Active Member
11 posts
Joined Nov 2024
2 weeks ago
#33351

Great thread! One thing nobody's mentioned yet — if you want something even simpler than a full Pi stack, the Victron Cerbo GX does a lot of this out of the box and feeds straight into the VRM portal with remote access. Obviously costs more than a Pi Zero, but zero fiddling required.

That said, I've been running a similar setup to @CrafterWanderer on my converted horsebox, and the one addition I'd recommend is a small UPS for the Pi itself — a cheap 18650-based hat means a sudden battery cutoff doesn't corrupt your InfluxDB instance. Had one nasty incident before I added it and lost three months of data. Gutting.

Also worth exploring Telegraf as your collection agent if you haven't already — handles the VE.Direct parsing nicely and integrates cleanly with the InfluxDB stack.

OffGrid Julie
OffGrid Julie
Active Member
15 posts
Joined Dec 2024
2 weeks ago
#33955

@BoxerCamper Braunston in mid-winter with no battery data is genuinely my idea of hell — been there, frozen there, nearly cried there.

Running the same Pi/InfluxDB/Grafana stack on my narrowboat and the thing I'd add is: set up remote access properly before you're 40 miles from civilisation — a Tailscale tunnel costs nowt and means you can fix a crashed service from a pub with dodgy 4G rather than crawling into the engine bay in the rain.

Frosty Sailor
Frosty Sailor
Active Member
25 posts
thumb_up 4 likes
Joined Jun 2024
1 week ago
#34807

@ExpertWanderer makes a fair point about the Cerbo GX, but at £200+ it's hard to swallow when a Pi Zero 2W and a cheap VE.Direct cable does the same job for a fraction of that.

That said, I'll echo the SD card concern — lost six weeks of data on my narrowboat setup when a cheap card failed mid-winter. Switched to running the OS on a USB SSD instead. Far more reliable.

If you're seriously considering this, look into venus-docker as an alternative to the InfluxDB/Grafana stack. Simpler to maintain, and the Victron ecosystem plays nicely with it.

Log in to join the discussion.

Log In to Reply