This project was driven by the determination to find a way of displaying an overview of significant data from the Victron equipment fitted to my campervan. My original installation included a BMV battery monitor and a MPPT Control which allowed me to obtain readings from the system but the limited display sizes meant that many button pushes were needed to get a complete overview of the system. Victron do offer the Color Control GX display unit which addresses this issue but in the context of my installation it was a very expensive solution with far greater functionality than I needed.
Inspired by Izak Burger’s successful of the porting of the Venus GX software used by the Color Control GX to a Raspberry Pi I decided to investigate Victron’s open source software and communication protocols to see what I could do to address my specific needs. After much research and patient trial & effort I came up with this recipe for victronPi – a RaspberryPi driven display showing a ‘real-time’ overview of the data from the Victron equipment installed in my campervan.
Sadly Victron where not able to provide any documentation of communication protocol used by the Buck-Boost Converter so this had to be derived by other means.
I do not have any great expertise in coding so no doubt there are many rough edges and it many not be the most efficient way for achieving this end result but it works for me. However any suggestions for improvement will be gratefully received.
A panel van conversion equipped with the following Victron products:
- 2 x 12.8v 90Ah LiFePO4 batteries with Cell Balancing and BMS interface
- 2 x 100w BlueSolar panels
- BMS 12/200 battery management system
- SmartSolar MPPT 100/30 charge controller
- 50A Buck-Boost DC-DC converter
- Blue Power IP22 12/30(1) battery charger
- BMV 702 battery monitor
- MPPT Control
- RaspberryPi 2 Model B with Adafruit PiTFT Plus 3.5” 480×320 TFT+ Touchscreen
- Raspbian Stretch and Chromium Browser
- websocketd – a Websocket daemon from www.websocketd.com
- 2 x VE.Direct cables
- 4.8m USB 2.0 A to USB B cable
- UPS PIco HV3.0B HAT Plus (optional)
- Install Raspbian Stretch and the display following the instructions at https://learn.adafruit.com/adafruit-pitft-3-dot-5-touch-screen-for-raspberry-pi?view=all
- Check settings in raspi-config to ensure SSH is enabled, localisation in correct and password set.
- Create a folder for this project:
sudo mkdir /home/pi/victronPi
- Download the project files from ftp://majora.dynu.net/Projects/victronPi/project.zip into this new folder.
- Install Chromium Browser and related utilities:
sudo apt-get install chromium-browser x11-xserver-utils unclutter
- Download and install websocketd by following instructions at https://github.com/joewalnes/websocketd/wiki/Download-and-install
- Download smoothie.js into the victronPi folder from http://github.com/joewalnes/smoothie/raw/master/smoothie.js
- Copy xbacklight.sh from the project folder into /usr/bin/X11/
- Replace autostart in /etc/xdg/lxsession/LXDE-pi with the new version of autostart from the project folder
- Edit the ports definition in vedirect.py to suit
I incorporated a UPS PIco HV3.0B HAT Plus into my setup because of its ability to power the Pi directly from the 12v system and to provide RTC, relay and ADC functionality which could be useful in future projects.
- 5 panels with data updated every 3 secs
- Battery and Load panels with background graph of history over 48 hours and 5 minutes respectively
- 10 minute display time out