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

by Marine Frank · 1 month ago 30 views 4 replies
Marine Frank
Marine Frank
Active Member
15 posts
thumb_up 2 likes
Joined Jan 2024
1 month ago
#22233

Been doing this on my motorhome for about 18 months now and curious whether anyone else has gone down this route.

I've got a Victron SmartShunt connected via a Raspberry Pi Zero 2 W, pulling data through the VE.Direct interface and logging everything to InfluxDB with Grafana dashboards on top. Works brilliantly for spotting patterns — I can see exactly how my Fogstar Drift 100Ah LiFePO4 behaves across different temperatures and usage cycles.

A few questions for those doing similar:

  • How are you handling storage? I'm writing to a local SD card at the moment which makes me nervous about corruption, especially with the vibration on the road. Has anyone moved to a USB SSD instead?
  • Data retention policies — how long are you actually keeping high-resolution data before downsampling? I'm keeping 1-minute intervals for 90 days then hourly averages indefinitely, but wondering if that's overkill.
  • Power draw — my Pi Zero pulls around 0.8W which feels acceptable, but has anyone found a lower-power alternative that still runs a proper Linux stack?

The long-term data has been genuinely useful. Last autumn I could see my solar yield dropping off in a way that helped me realise one of my Renogy panels had developed a fault before it became a bigger problem.

Would be interested to know what others are running, whether on boats, motorhomes or static setups. Is anyone integrating other data sources alongside battery stats — inverter load, temperature sensors, that sort of thing?

Vivaro Wanderer
Vivaro Wanderer
Regular
54 posts
thumb_up 12 likes
Joined Jun 2023
1 month ago
#22241

@MarineFrank yes, been running almost exactly this setup on my Vivaro-based van conversion for about two years now.

One thing worth adding to your setup — I'm piping the data into InfluxDB + Grafana rather than flat CSV files, which makes spotting long-term capacity fade much easier. You can overlay summer vs winter discharge curves on the same graph and it becomes immediately obvious when your cells are starting to drift.

My Fogstar 200Ah LiFePO4 cells showed a measurable capacity drop after about 14 months of aggressive EV charging cycles — Grafana caught it before the Victron app did.

Few things I'd flag:

  • Pi Zero thermals can be an issue in enclosed spaces — worth logging CPU temp alongside battery data
  • VRM portal is handy but you own your InfluxDB data
  • vedirect Python library on GitHub is solid for parsing the serial stream

What are you storing your data in?

Devon Dweller
Devon Dweller
Senior Member
100 posts
thumb_up 28 likes
Joined Mar 2024
1 month ago
#22256

Been running a Pi 4 (2GB) on my narrowboat for three years now, logging SmartShunt data via the Victron VE.Direct-to-USB cable. One thing worth mentioning that I don't see discussed enough: SD card wear is a real concern with constant database writes.

My solution was to move the InfluxDB data directory to a cheap USB stick, keeping the SD card as read-only-ish for the OS. Alternatively, use tmpfs for your temp writes and sync periodically.

Also worth enabling the Victron vedirect Python library rather than scraping MQTT if you want raw register-level data — gives you considerably more granularity on cell-level stuff if you're running a Fogstar Drift with a compatible BMS.

@MarineFrank what interval are you polling at? I dropped mine to 30-second samples and the storage requirements became much more manageable without losing meaningful trend data.

Carl
Carl
Member
5 posts
Joined Oct 2025
1 month ago
#22282

Great thread, this is exactly the kind of long-term data that actually tells you something useful about your system.

I've been doing something similar on my static off-grid setup for about a year using a Pi 3B+ I had lying around. One thing I'd add that nobody's mentioned yet - I pipe everything into InfluxDB and use Grafana for the dashboards, which makes spotting seasonal trends really straightforward. Being able to overlay last winter's data against this winter's has been genuinely eye-opening for understanding how my LiFePO4 bank actually behaves in cold weather.

@DevonDweller three years of narrowboat data must be fascinating given how much your usage patterns probably shift between cruising and mooring up. Have you noticed any degradation trends in your battery capacity over that period? That's what I'm most curious to see once I've got enough historical data built up.

ExPostie86
ExPostie86
Active Member
28 posts
thumb_up 6 likes
Joined Dec 2023
1 month ago
#22320

@MarineFrank running a Pi Zero 2 W on my narrowboat garden office setup (yes, both — don't ask) with a Fogstar Drift 200Ah and Victron SmartShunt, logging to InfluxDB/Grafana via VE.Direct.

The real revelation was spotting parasitic drain patterns I'd never have caught just glancing at the BMV display — turns out my 12V fridge was cycling every 23 minutes at 3am for no obvious reason, which led me down a rather expensive rabbit hole involving a faulty thermostat.

Storage Retention Query Speed
InfluxDB 18 months+ Snappy

Biggest tip: set your Pi to read-only filesystem mode — lost six weeks of data once to SD card corruption and I've never emotionally recovered.

Log in to join the discussion.

Log In to Reply