Prerequisites
TheVictron BMV battery monitor needs to be setup correctly according to the installation manual and receiving data and displaying data view-able on the on-board display.Hardware needed:
- Victron BMV-700 battery monitor(702 and 60x should also work, not tested)
- Victron VE.Direct to USB interface cable
- A computer with Linux installed with internet access (Windows could be used with small adjustments)
- I use a Raspberry Pi (1b+) with Raspbian Linux installed
- It should work with anything that can run Python scripts but I have only tested it on Rasbian.
- A battery to monitor :-)
Software needed
- Python-serial
- sudo apt-get install python3-serial
- This Python script https://github.com/kogant/vedirect/blob/master/vedirect.py
- Thanks to
Go to https://emoncms.org/ and click register. (free)
Get the read & write API key
Create dir
#mkdir /opt/vedirect/
#cd /opt/vedirect
copy script there
#/opt/vedirect# wget https://raw.githubusercontent.com/kogant/vedirect/master/vedirect.py
make it executable
# chmod +x /opt/vedirect/vedirect.py
Edit the file and insert Emoncms readwrite API key using your favorite editor (Vim/Pico whatever)
setup cronjob
# Crontab -e
insert a new line that will make the script run every minute and log the output to syslog (/var/log/syslog)
* * * * * /opt/vedirect/vedirect.py 2>&1 | /usr/bin/logger -t veDirectStats
Check if it runs ok
Syslog (tail /var/log/syslog)
The "name" will be missing. You can edit the "Names" by looking at the image above or taking a look at the "VE.Direct Text Protocol" documentation here: https://www.victronenergy.com/support-and-downloads/whitepapers
Setup feeds from the input to store the data.
Result