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

by Oak Soul · 1 week ago 10 views 4 replies
Oak Soul
Oak Soul
Active Member
10 posts
Joined Feb 2025
1 week ago
#20078

Been doing this for about 18 months now with a Pi 4 and it's honestly been one of the better decisions I've made with my setup. Running VenusOS on it to pull data from my Victron kit, then pushing everything into InfluxDB with Grafana dashboards on top.

The long-term data has been genuinely useful — spotted that my Fogstar batteries were consistently underperforming in cold snaps before I'd have otherwise noticed. Would have missed that completely without the historical graphs.

A few questions for anyone else doing something similar though:

  • How are you handling SD card wear? I've read about cards dying after a year or two of constant writes. Currently running off a USB SSD instead but wondering if there's a better approach
  • Are you logging to the cloud as well, or keeping it all local? I'm a bit wary of sending my energy data off-site but local-only means I can't check in remotely
  • What retention period are you keeping data at full resolution? I'm keeping 1-minute intervals for 90 days then downsampling, but not sure if that's overkill

Also curious whether anyone's gone further and used the historical data to actually tune their system — like adjusting charge profiles seasonally or predicting when you'll run low based on weather forecasts. Feels like there's a lot of potential there that I'm barely scratching the surface of.

Running a tiny house setup with EV charging thrown in, so the load patterns are pretty chaotic and I feel like there's proper insight buried in the data somewhere if I knew how to dig for it.

Suffolk OffGrid
Suffolk OffGrid
Member
5 posts
Joined Dec 2024
1 week ago
#20101

Really glad you posted this @OakSoul. I've had a Pi 3B+ doing something similar for about two years now, though I went a slightly different route — using a Pylontech battery and pulling data via the RS485 port into a Python script that writes to InfluxDB, then visualising in Grafana. The long-term trending has been genuinely eye-opening. I can see exactly how my battery's capacity has drifted seasonally and correlate it with temperature data from a cheap DS18B20 sensor I taped to the battery casing.

One thing I'd flag for anyone starting out — make sure you're writing to an external SSD rather than an SD card. Lost about four months of data when a card failed last winter. Painful lesson but an easy fix.

Sussex VanLifer
Sussex VanLifer
Active Member
22 posts
thumb_up 14 likes
Joined Jun 2024
1 week ago
#20145

Been running a Pi Zero 2W tucked behind my Victron MPPT in the van for about eight months now. Originally set it up just to catch a weird overnight drain I couldn't explain — turned out my Fogstar battery's BMS was doing something odd during balancing cycles. Never would've spotted it without the logged data showing that 3am dip pattern repeating.

One thing I'd flag that neither of you mentioned: SD card reliability is the real enemy here. Lost six weeks of data to a corrupted card last winter. Now I log to a USB stick and push to a cheap VPS nightly. Belt and braces.

The van environment doesn't help either — temperature swings kill cards faster than a static install would.

@OakSoul what retention period are you keeping your historical data for? Wondering if 18 months of granular readings is getting unwieldy.

Battery Tim
Battery Tim
Active Member
26 posts
thumb_up 12 likes
Joined Dec 2023
1 week ago
#20166

Been doing this in the shepherd's hut for about three years. Few things nobody mentions:

  • SD cards will die eventually. Run your OS from a USB SSD if you're serious about long-term logging. Lost months of data learning that lesson.
  • Power the Pi from a stable 5V supply — not directly off your 12V bus with a cheap converter. Undervoltage corrupts more installs than anything else.
  • If you're on VenusOS, just use the official Cerbo GX and be done with it. Pricey but it's purpose-built and doesn't need babysitting.

@SussexVanLifer a Zero 2W will struggle if you're pushing data anywhere remotely complex. Fine for basic MQTT logging, not much else.

Data retention is where most people get lazy. Decide upfront how long you actually need and configure InfluxDB retention policies accordingly, otherwise your storage fills up quietly.

Boxer Project
Boxer Project
Active Member
28 posts
thumb_up 8 likes
Joined Jan 2024
6 days ago
#20303

Great thread. Running a Pi 4 in my garden office, been at it about a year. @BatteryTim's SD card point is painfully real — lost six months of data when mine gave up the ghost. Now running from a small SSD via USB, absolute game changer.

One thing I'd add: watch the Pi's own power consumption if

Log in to join the discussion.

Log In to Reply