Venus OS on a Sailboat: DIY Energy Monitoring with Raspberry Pi, ESP32 and Victron
- Alex Montanari
- 2 days ago
- 7 min read
The Victron ecosystem is one of the most reliable and well-supported platforms in marine electrics. But a full Cerbo GX + GX Touch setup comes at a cost that not every boat owner wants to absorb. Last December, while I was on holiday near Barcelona, I received a request to build and install a complete electrical panel for Altaïr — a small sailboat running a tight budget but demanding professional results.

The entire job was hands-on and fully artisanal: no parts warehouse, every component was sourced from local electronics, hardware, and marine supply shops in the Barcelona area, and the panel was built and wired by hand following the directives of the owner, Giulia — adapting every decision to the boat's specific constraints and available space.

The heart of the system is Venus OS running on a Raspberry Pi 3, paired with a DIY dual smart shunt built around an ESP32 and two INA226 sensors. This article focuses on that system: how it works, how it was built, and why it performs on par with hardware costing three to four times as much.
Why Venus OS on Raspberry Pi?
Venus OS is the operating system that powers all of Victron's GX devices — the Cerbo GX, the CCGX, the Venus GX. What many people don't know is that Victron officially supports running Venus OS on a Raspberry Pi 2 or 3, turning a ~35€ single-board computer into a fully functional GX device.

The advantages on a boat are significant:
- Cost: a Raspberry Pi 3 + SD card costs a fraction of a Cerbo GX. The functionality is nearly identical for most use cases.
- Low power draw: the Pi 3 draws 3–5W under normal load. In a 12V system, that's under 0.5A — relevant when you're anchored and every amp-hour counts.
- Full Venus OS feature set: real-time dashboard, device list, VRM portal connectivity, MQTT broker, Node-RED support, and complete VE.Direct and VE.Can device integration.
- Extensibility: because it's a Linux system running on commodity hardware, you can add custom sensors, scripts, and integrations that Victron's closed GX hardware doesn't easily allow.
On Altaïr, the Pi 3 is housed in a hand-built enclosure fixed to the back of the main panel, powered directly from the 12V bus via a DC-DC step-down to 5V.
A 5" HDMI touchscreen (with USB touch interface) is recessed into the panel face and runs the Venus OS GUI at all times.
It's worth mentioning the panel's location: at Giulia's specific request, and due to the boat's limited available space, the panel was installed in exactly the same spot as Altaïr's original one — directly in front of the galley sink. Not the ideal home for onboard electronics, but it was the only viable location, and working within the client's constraints is part of the job. All electronic components were carefully positioned and protected, and a protective cover was subsequently fitted to shield the panel from water splashes during daily use.

Connecting Victron Devices: VE.Direct via FT232RL
The Victron BlueSolar MPPT 75/15 on Altaïr communicates via the VE.Direct protocol — a simple, reliable serial protocol that Victron uses across most of their product range.
The Raspberry Pi has no native UART exposed in a convenient way for this purpose, so the connection is made via a FT232RL USB-to-UART module — a small, inexpensive breakout board that creates a virtual serial port on the Pi. Venus OS detects the VE.Direct device automatically on boot and begins reading data within seconds.

One detail that's easy to overlook: the VE.Direct protocol operates with the Victron device's ground as its reference, which can differ from the Raspberry Pi's ground reference — especially in a marine installation with multiple ground paths and high currents flowing through the system. To prevent ground loops, interference, and potential damage, an ADUM1201 digital isolator was placed in the serial line between the FT232RL module and the Victron device. The ADUM1201 is a two-channel digital isolator from Analog Devices that galvanically isolates the TX and RX signals, ensuring clean communication and protecting both sides from unwanted potential differences.
What Venus OS receives from the MPPT in real time:
- Panel voltage and current
- Battery voltage and charge current
- Daily and total energy yield
- Charger state (bulk / absorption / float)
- Any fault or warning conditions
All of this appears on the Venus OS dashboard and is logged to the VRM portal (Victron's cloud platform) if an internet connection is available.
Temperature Monitoring: DS18B20 Sensors on 1-Wire
Venus OS natively supports DS18B20 digital temperature sensors connected to a GPIO pin on the Raspberry Pi via the 1-Wire protocol. This is one of the cleanest integrations available: a single data wire (plus power and ground) can carry readings from multiple sensors daisy-chained along the same bus.

On Altaïr, three sensors are installed:
- Service battery bank — monitoring for thermal stress during charge cycles
- Engine battery — same
- Engine compartment — early warning for diesel overheating or cooling system issues
Configuration in Venus OS requires enabling the 1-Wire overlay in the Pi's `config.txt` and specifying the GPIO pin. After that, Venus OS discovers the sensors automatically and adds them to the device list with their serial numbers, which can then be renamed to meaningful labels via the GUI.
The result: temperature readings visible on the touchscreen alongside all other system data, with the option to set alerts via VRM.
The DIY Dual Smart Shunt: ESP32 + 2× INA226
This is the most technically interesting part of the build. Victron's SmartShunt is an excellent product — but it monitors a single battery bank. Altaïr has two separate banks (service and engine), and the owner wanted current, power, and state of charge data on both. Two SmartShunts would have solved it commercially, but the DIY route was chosen both for cost and for the challenge.
The Hardware
The sensor of choice is the INA226 — a 16-bit precision current and voltage monitor from Texas Instruments, communicating over I²C. It's designed to work with an external shunt resistor and can measure both the shunt voltage (to derive current) and the bus voltage simultaneously. Accuracy is well within acceptable range for battery monitoring: ±0.1% for voltage, ±0.5% for current in typical configurations.
Two INA226 modules are used — one per bank — each connected to a dedicated precision shunt resistor installed in the negative line of the respective battery circuit. Both INA226s share the same I²C bus on the ESP32, differentiated by their I²C addresses (set via the A0 and A1 address pins on each module).

The ESP32 reads both sensors continuously, calculates power (V × I) and tracks accumulated charge (integrating current over time for a coulomb-counter style state of charge estimate), and publishes all values at regular intervals.
Connecting to Venus OS: MQTT
Venus OS runs a built-in MQTT broker (Mosquitto) and exposes its internal data bus — the D-Bus — via MQTT topics. More importantly, it also *accepts* data published to specific MQTT topics and integrates that data into the Venus OS device list, dashboard, and VRM portal as if it came from a native Victron device.
The ESP32 is connected to the Raspberry Pi via direct UART over GPIO — a cleaner, more direct connection than USB. The Pi 3 exposes a hardware UART on GPIO 14 (TXD) and GPIO 15 (RXD), and communication runs over these pins with the ADUM1201 placed in the serial line — the same two-channel digital isolator used for the VE.Direct connection. The ESP32 lives in the boat's 12V power domain, sharing ground with batteries, shunts, and loads; the Raspberry Pi has its own ground reference tied to its 5V supply. The galvanic isolation provided by the ADUM1201 eliminates any risk of ground loops between the two systems and protects the Pi from noise and transients coming from the power side.
One obstacle to address on this configuration: the Raspberry Pi 3 assigns the hardware UART (/dev/ttyAMA0) to the onboard Bluetooth module by default, leaving a less reliable software UART available for serial communication. To use the hardware UART for the ESP32 link, Bluetooth needs to be disabled by adding dtoverlay=disable-bt to the Pi's config.txt — after which /dev/serial0 maps to the hardware UART and communication with the ESP32 is stable and reliable. On the Pi side, a small Python script reads the serial stream from the ESP32 and publishes the data to the correct Venus OS MQTT topics.
Venus OS picks the data and displays them as two independent battery monitors in the device list — indistinguishable from native Victron battery monitors. The dashboard shows both banks with voltage, current, power, and state of charge in real time.
Calibration
The INA226 requires a calibration register to be set based on the shunt resistance value. This is done once in the ESP32 firmware using the standard formula from the datasheet. After calibration, readings are stable and consistent with a reference multimeter to within 1–2%.
The Full System at a Glance
When everything is running, the Venus OS dashboard on Altaïr shows:
- BlueSolar MPPT 75/15 — solar input power, battery charge state, charger mode
- Service battery — voltage, current, power, estimated SoC (via ESP32 shunt)
- Engine battery — same
- Engine compartment temperature — live reading
- Battery temperatures — both banks
- DC system overview — total loads, solar yield, net power flow

All from a Raspberry Pi 3, an FT232RL breakout, three DS18B20 sensors, an ESP32, and two INA226 modules. Total component cost for the monitoring system alone: under 70€.
This approach makes sense if:
- You already have Victron charge controllers or inverters and want a GX device without the Cerbo GX price tag
- You need to monitor more than one battery bank independently
- You want temperature monitoring integrated into the same dashboard
- You're comfortable with basic Linux and microcontroller work — or willing to learn
It's not a weekend project for a complete beginner, but it's well within reach for anyone with experience in Arduino/ESP32 development and basic Linux command line usage. Venus OS documentation is thorough, the Victron community forum is active, and the MQTT integration is well-documented.
Closing Notes
The full panel on Altaïr also includes 16 toggle switches with visible blade fuses, two rotary battery isolators, a Novopal inverter remote, and 12V/USB outlets — but the monitoring system described here is the part that genuinely changes how the boat's owner understands and manages her electrical system.
Building all of this by hand, with locally sourced materials, following the client's specific requests — including the awkward position in front of the sink — is exactly the kind of challenge I find rewarding. No off-the-shelf solutions, no compromises: systems designed and built from scratch around each boat and each owner.
Seeing real-time power flows, battery temperatures, and state of charge on a touchscreen mounted in the panel — all integrated, all from open and repairable hardware — is the kind of upgrade that stays with a boat for years.
If you're considering a similar build for your vessel, feel free to get in touch. I'm Alex, director of E-Boats Systems, and this is the kind of work I do.
E-Boats Systems — Share your idea, and we'll make it real!


















































Comments