This is a driver for VenusOS devices (As of yet only tested on Raspberry Pi running the VenusOS v2.92 image).
The driver will communicate with a Battery Management System (BMS) via Bluetooth and publish this data to the VenusOS system.
This project is derived from Louis Van Der Walt's dbus-serialbattery found here: https://github.com/Louisvdw/dbus-serialbattery
To get started you need a VenusOS device. I've only tried on Raspberry Pi, you can follow my instructions here: https://www.youtube.com/watch?v=yvGdNOZQ0Rw to set one up.
You need to setup some depenacies on your VenusOS first
-
SSH to IP assigned to venus device
-
Resize/Expand file system
/opt/victronenergy/swupdate-scripts/resize2fs.sh -
Update opkg
opkg update -
Install pip
opkg install python3-pip -
Install build essentials as bluepy has some C code that needs to be compiled
opkg install packagegroup-core-buildessential -
Install glib-dev required by bluepy
opkg install libglib-2.0-dev -
Install bluepi
pip3 install bluepy -
Install git
opkg install git -
Clone dbus-btbattery repo
cd /opt/victronenergy/
git clone https://github.com/bradcagle/dbus-btbattery.git
cd dbus-btbattery
You can now run ./dbus-btbattery.py 70:3e:97:08:00:62
replace 70:3e:97:08:00:62 with the Bluetooth address of your BMS/Battery
You can run ./scan.py to find Bluetooth devices around you
nano service/run
and replace 70:3e:97:08:00:62 with the Bluetooth address of your BMS/Battery
Save with "Ctrl O"
run ./installservice.sh
reboot
NOTES: This driver is far from complete, so some things will probably be broken. Also only JBD BMS is currenly supported