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

by Jock30 · 1 month ago 25 views 5 replies
Jock30
Jock30
Member
3 posts
Joined Oct 2024
1 month ago
#5421

Been running a Pi 4 with VictronConnect data logging for my shepherd's hut setup for about six months now and honestly it's been a game changer for understanding what's actually happening with the system.

I've got it pulling data from my Cerbo GX via the local MQTT broker and dumping everything into InfluxDB, then visualising it with Grafana. Took a bit of faffing to get the MQTT topics sorted but once it clicked it was fairly straightforward.

Main reason I went local rather than relying purely on VRM is that my hut is in a fairly remote spot and the mobile signal for the 4G dongle can be patchy. Having everything logged on the Pi means I don't lose historical data during outages.

A few things I'm still trying to work out:

  • Best retention policy for InfluxDB — currently keeping full resolution data for 30 days then downsampling, does that seem sensible?
  • Anyone found a reliable way to get alerts pushed to their phone without depending on cloud services? Looking at something like Ntfy or Gotify but not sure which is better supported
  • Is anyone logging temperature data alongside the Victron metrics? I've got a DS18B20 sensor I'd like to wire in

Currently the dashboard shows SOC, solar yield, load, and battery voltage over time. The battery voltage overnight curve has already helped me spot that my Fogstar cells aren't quite balanced as well as I'd like.

Would be good to know if others have gone down this rabbit hole and what setups they're running — Pi Zero 2W, Pi 4, something else entirely?

Peak VanLifer
Peak VanLifer
Active Member
18 posts
thumb_up 20 likes
Joined Jul 2023
1 month ago
#5448

@Jock30 yes! Running a Pi Zero 2W in my shepherd's hut pulling data via VE.Direct straight into InfluxDB → Grafana. Absolute rabbit hole but worth it.

The visualisation side is where it clicks for me — being able to see exactly when my Fogstar batteries hit absorption vs float, correlate it with cloud cover data, all that. Proper eye-opener.

One tip: stick a decent UPS hat on the Pi or power it off a separate small LiFePO4. Lost two SD cards before I realised the Pi was dying mid-write whenever the main system cycled. Corrupts everything.

Also venus-data.tar.gz if you've got a Cerbo — there's a whole community package for that already baked in, might save you reinventing the wheel.

LDV Solar
LDV Solar
Member
2 posts
Joined Apr 2025
1 month ago
#5460

Been doing something similar for my emergency backup setup — Pi 4 pulling from a Victron MPPT via VE.Direct into InfluxDB, then Grafana dashboards.

One thing worth adding that nobody's mentioned: set up alerting in Grafana so you get a notification if battery SOC drops below a threshold overnight. Saved me twice when something was quietly draining the system.

Also recommend the venus-docker approach if you haven't already — runs a lightweight Venus OS emulator locally and makes the whole data pipeline much cleaner than scraping raw VE.Direct packets yourself.

@PeakVanLifer what retention policy are you running on InfluxDB? I've got mine set to 90 days which seems a reasonable balance for a Pi's SD card.

Wez Fisher
Wez Fisher
Active Member
12 posts
thumb_up 15 likes
Joined Jul 2023
1 month ago
#5492

Been running almost exactly this setup on the narrowboat for two years now. The bit nobody mentions until it bites them: SD card rot. Running InfluxDB with frequent writes will chew through a cheap card in months. Swap it for a decent endurance-rated card (Samsung Pro Endurance is what I use now) or better yet, redirect your InfluxDB data directory to a small USB SSD hung off the back.

Also worth knowing — if you're pulling from a Victron MPPT via VE.Direct, the vedirect-to-influxdb library handles the serial framing properly. Tried three other solutions before landing on that one.

@PeakVanLifer the Zero 2W is a smart choice for power budget — my Pi 4 draws noticeably more overnight when I'm anchored up and every watt matters.

Valley Wanderer
Valley Wanderer
Active Member
10 posts
thumb_up 9 likes
Joined Oct 2023
1 month ago
#5500

Running this exact stack in my motorhome — the tip I'd add is stick a read-only filesystem on that SD card or you will be doing a roadside Pi resurrection at the worst possible moment, usually somewhere in rural Wales with no signal to Google the fix.

Also worth knowing: the VE.Direct to USB cable from Victron is plug-and-play on Raspbian with zero faff, whereas the Bluetooth route via VictronConnect API is a proper afternoon of your life you won't get back.

@WezFisher curious what you meant about the thing that bites people — SD card corruption, or something more specific to narrowboat vibration?

LiFePO4Nerd
LiFePO4Nerd
Regular
64 posts
thumb_up 80 likes
Joined Apr 2023
1 month ago
#5552

Great thread. Been running this exact stack in the motorhome for about three years now and the thing that transformed my setup was switching from polling the MPPT every 30 seconds to every 5 seconds during bulk charging — you suddenly see the texture of what's actually happening rather than a blurred average.

One thing nobody's mentioned: if you're pulling from multiple Victron devices simultaneously via VE.Direct-to-USB, serial port enumeration can shift on reboot. Your MPPT becomes /dev/ttyUSB1 instead of /dev/ttyUSB0 and suddenly your Grafana dashboard shows nothing. Fix it properly with udev rules binding each device to a persistent symlink by its USB serial number — 20 minutes of setup that saves enormous headaches.

@ValleyWanderer's read-only filesystem tip is solid, though I'd combine it with a proper tmpfs overlay rather than just basic ro mount.

Log in to join the discussion.

Log In to Reply