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 components
This is a driver for VenusOS devices.
The driver will communicate with PIP/Axpert/Infinisolar/Voltronic/PowLand/OutBack and other compatible solar inverters via Bluetooth
and publish this data to the VenusOS system.
!!! System needs to have a Bluetooth-supported panel in range!
see images
You need to setup some dependencies on your VenusOS first:
-
SSH to IP assigned to VenusOS 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 bluepy
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 the SetupHelper method. Install manually but skip the install script. After that you can proceed with the 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 the victronenergy directory
cd /opt/victronenergy
- Clone OutbackSPC repo
git clone https://github.com/DonDavici/OutbackSPC.git
- 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 has implemented notify 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 address of your device you have to make the device connectable.
replace xx:xx:xx:xx:xx:xx with the Bluetooth address of your Inverter
- 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 optionally 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-btoutback.py
/opt/victronenergy/OutbackSPC/dbus-btoutback.py xx:xx:xx:xx:xx:xx
/var/log/OutbackSPC