Special thanks goes to the following for the basis of this modified code:
- https://github.com/SirUli/FroniusSmartmeter
- https://github.com/bradcagle/dbus-btbattery
- https://github.com/victronenergy/velib_python
And all other authors and community members of victron which developed or helped to develop drivers, services and componentes
This is a driver for VenusOS devices.
The driver will communicate with a Outback SPC III via Bluetooth and publish this data to the VenusOS system.
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
When you install with one of these methods the system will take care of starting the service and keep it running. You might want to start things manually. IN this case do not use SetupHelper method. Install manually put skip the install script. After that you can proceed with configuration and testing manually section.
This script is meant to be installed through the SetupHelper of kwindrem. https://github.com/kwindrem/SetupHelper
Use the following details:
Package Name: OutbackSPC
GitHub User: DonDavici
Github branch or tag: main
- Install git
opkg install git
- switch to victronenergy directory
cd /opt/victronenergy/
- Clone dbus-btbattery repo
- run install script
run ./installservice.sh
- Reboot your system
reboot
Due to the fact that we have to connect to the device to read the data (I don't think it is has implemented notifiy functionality - maybe I am wrong ;-) we have to trust and pair our device manually before we can use it with our service.
- select our service directory
cd /opt/victronenergy/OutbackSPC/ or if you used SetupHelper cd /data/OutbackSPC
- scan for nearby devices
./scan.py
After you have found out the mac adress of your device you have to make the device connectable. replace xx:xx:xx:xx:xx:xx with the Bluetooth address of your BMS/Battery
- start bluetoothctl
bluetoothctl
- trust the device
trust xx:xx:xx:xx:xx:xx
- pair with the device
pair xx:xx:xx:xx:xx:xx (enter 000000 or 123456)
- connect optionaly to verify connection
connect xx:xx:xx:xx:xx:xx
- exit bluetoothctl
exit
- edit default_config.ini (set OUTBACK_ADDRESS)
nano default_config.ini
- reboot system
reboot
/opt/victronenergy/OutbackSPC/dbus-btbattery.py
/opt/victronenergy/OutbackSPC/dbus-btbattery.py xx:xx:xx:xx:xx:xx
/var/log/OutbackSPC