Anyone else using a Raspberry Pi to log their battery data long term?

by Clive · 4 days ago 12 views 5 replies
Clive
Clive
Active Member
13 posts
Joined Dec 2024
4 days ago
#25059

Been running a Pi 4 for about eight months now logging data from my Victron SmartShunt via the VE.Direct interface. Using InfluxDB and Grafana which seems to be the standard setup most people end up with — the dashboards you can build are genuinely impressive once you get your head around the query language.

My main use case is emergency backup so I'm particularly interested in tracking how my battery capacity degrades over time. I've got a couple of Fogstar Drift 100Ah lithiums and I want solid historical data before I commit to expanding the bank.

A few things I've found useful:

  • Running the Pi off a small dedicated 18650 UPS hat so the logger itself stays up during an outage (defeats the point otherwise)
  • Setting data retention policies in InfluxDB so the SD card doesn't fill up — learned that one the hard way
  • Exporting weekly CSV summaries as a backup because I don't entirely trust SD card longevity for multi-year data

One thing I'm still not happy with is the temperature logging side. I've got a DS18B20 sensor taped to the battery casing but I'm not convinced it's giving me accurate core readings.

Is anyone else pulling VE.Direct data directly rather than going through a Cerbo GX? Curious whether the Cerbo route gives noticeably cleaner data or whether it's essentially the same once you're in InfluxDB. Also wondering if anyone has moved away from SD cards entirely onto an SSD — seems like the sensible long-term approach but adds cost and complexity.

Happy to share my Grafana dashboard config if there's any interest.

Quiet Maker
Quiet Maker
Active Member
22 posts
thumb_up 8 likes
Joined Feb 2024
3 days ago
#25093

@Clive1978 snap! Though I came at it slightly differently — my Pi 4 sits in the shepherds hut and pulls data from both a SmartShunt and a SmartSolar via VE.Direct to USB adaptors. Been running about fourteen months now without a hiccup.

One thing worth adding to the InfluxDB/Grafana setup that genuinely changed how I manage the system: I created a custom alert that pings my phone when state of charge drops below 20% overnight. Caught a parasitic drain I'd completely missed otherwise — turned out to be a faulty relay on the EV charging circuit drawing 400mA constantly.

The long-term data patterns are where it gets really interesting though. You start spotting seasonal trends across months that you'd never notice from daily checks. Wouldn't be without it now.

ExJoiner
ExJoiner
Active Member
17 posts
thumb_up 5 likes
Joined Sep 2023
3 days ago
#25105

Really interested in this thread — I've been wondering whether to go down this route for my narrowboat setup.

Quick question for @Clive1978 and @QuietMaker: how are you both handling power to the Pi itself? On the boat I'm conscious that a Pi 4 can draw a fair bit continuously, and when the batteries are low that's the last thing I want pulling them down further.

Also, has anyone experimented with a Pi Zero 2 W instead? I'd imagine the lower power draw makes it more suitable for off-grid use, though I'm not sure whether VE.Direct works as smoothly on the Zero's single USB port without a powered hub.

The Grafana dashboards look brilliant from what I've seen online — would love to see what metrics people are actually tracking beyond the basics. SoC over time is obvious, but what else are you logging?

Wonky Ranger
Wonky Ranger
Member
4 posts
Joined Feb 2025
3 days ago
#25109

Great thread @Clive1978 — I've been doing something similar for about fourteen months now with a Pi 3B+ and it's been rock solid. One thing worth adding for @ExJoiner considering the narrowboat setup: vibration and the damp environment can be murder on SD cards over time. I lost two before switching to booting from a USB SSD instead, which has been far more reliable. Also worth looking at setting InfluxDB's write frequency so you're not hammering the storage constantly — I log every 30 seconds which seems a decent balance between granularity and wear. The historical data you build up becomes genuinely useful after a few months; I can now see exactly how my battery bank copes across different seasons which has been really handy for planning longer trips off-hook.

Volt Barry
Volt Barry
Active Member
39 posts
thumb_up 13 likes
Joined Nov 2023
2 days ago
#25224

Got a Pi Zero 2W tucked behind my Fogstar batteries in the garden office doing exactly this — turns out watching a Grafana dashboard is significantly more entertaining than actual work, which rather defeats the purpose of having an office out there.

Peak Nomad
Peak Nomad
Active Member
14 posts
Joined Aug 2025
2 days ago
#25269

My van's Pi has logged so many dramatic voltage dips that Grafana's basically become a horror film I watch whilst eating my tea.

Log in to join the discussion.

Log In to Reply