Ich habe für mein JK BMS entsprechend den Cerbo Raspi mit der Bluetooth Funktionalität erweitert. Anleitung ist ja wie folgt:
BLUETOOTH battery connection: There are a few more steps to complete installation.
1. Please add the Bluetooth BMS to the config file "/data/etc/dbus-serialbattery/config.ini" by adding "BLUETOOTH_BMS":
Example with 1 BMS: BLUETOOTH_BMS = Jkbms_Ble C8:47:8C:00:00:00
Example with 3 BMS: BLUETOOTH_BMS = Jkbms_Ble C8:47:8C:00:00:00,
Jkbms_Ble C8:47:8C:00:00:11, Jkbms_Ble C8:47:8C:00:00:22
If your Bluetooth BMS are nearby you can show the MAC address with "bluetoothctl devices".
2. Make sure to disable Settings -> Bluetooth in the remote console/GUI to prevent reconnects every minute.
3. Re-run "/data/etc/dbus-serialbattery/reinstall-local.sh", if the Bluetooth BMS were not added to the "config.ini " before.
Die Mac Adresse habe ich in der config.ini ergänzt und das Script nochmals laufen lassen.
root@raspberrypi2:~# /data/etc/dbus-serialbattery/reinstall-local.sh
Found 1 Bluetooth BMS in the config file!
Installing required packages...
Downloading https://updates.victronenergy.com/feeds/venus/release/packages/dunfell/all/Packages.gz.
Downloading https://updates.victronenergy.com/feeds/venus/release/packages/dunfell/cortexa7hf-neon-vfpv4/Packages.gz.
Downloading https://updates.victronenergy.com/feeds/venus/release/packages/dunfell/raspberrypi2/Packages.gz.
Collected errors:
* opkg_download_backend: Failed to download https://updates.victronenergy.com/feeds/venus/release/packages/dunfell/all/Packages.gz, wget returned 4.
* opkg_download_backend: Failed to download https://updates.victronenergy.com/feeds/venus/release/packages/dunfell/cortexa7hf-neon-vfpv4/Packages.gz, wget returned 4.
* opkg_download_backend: Failed to download https://updates.victronenergy.com/feeds/venus/release/packages/dunfell/raspberrypi2/Packages.gz, wget returned 4.
Collected errors:
* opkg_prepare_url_for_install: Couldn't find anything to satisfy 'python3-misc'.
/data/etc/dbus-serialbattery/reinstall-local.sh: line 163: pip3: command not found
grep: /var/spool/cron/root: No such file or directory
Packages installed.
In der GUI wird aber leider das BMS nicht angezeigt, ein Test brachte folgenden Fehler:
https://github.com/Louisvdw/dbus-serialbattery/issues/13
root@raspberrypi2:~# tail -F -n 100 /data/log/dbus-blebattery.*/current | tai64nlocal
2023-08-04 17:06:52.523899500 ModuleNotFoundError: No module named 'bleak'
2023-08-04 17:06:52.721230500 Missing device address argument
2023-08-04 17:06:53.869522500 INFO:SerialBattery:Starting dbus-serialbattery
2023-08-04 17:06:53.870435500 INFO:SerialBattery:dbus-serialbattery v1.0.20230531
2023-08-04 17:06:54.089166500
2023-08-04 17:06:54.092230500 Traceback (most recent call last):
2023-08-04 17:06:54.092236500 File "/opt/victronenergy/dbus-serialbattery/dbus-serialbattery.py", line 163, in <module>
2023-08-04 17:06:54.092242500 main()
2023-08-04 17:06:54.092243500 File "/opt/victronenergy/dbus-serialbattery/dbus-serialbattery.py", line 120, in main
2023-08-04 17:06:54.092248500 from bms.jkbms_ble import Jkbms_Ble # noqa: F401
2023-08-04 17:06:54.092252500 File "/opt/victronenergy/dbus-serialbattery/bms/jkbms_ble.py", line 4, in <module>
2023-08-04 17:06:54.092315500 from bms.jkbms_brn import Jkbms_Brn
2023-08-04 17:06:54.092319500 File "/opt/victronenergy/dbus-serialbattery/bms/jkbms_brn.py", line 2, in <module>
2023-08-04 17:06:54.092324500 from bleak import BleakScanner, BleakClient
2023-08-04 17:06:54.092327500 ModuleNotFoundError: No module named 'bleak'
2023-08-04 17:06:54.278746500 Missing device address argument
2023-08-04 17:06:55.329222500 INFO:SerialBattery:Starting dbus-serialbattery
Offensichtlich scheint das Python Modul Bleak zu fehlen.
Ich habe hier eine Lösungsmöglichkeit gefunden:
https://github.com/Louisvdw/dbus-serialbattery/issues/13
Bevor ich anfange, alle Befehle einzugeben wollte ich mal fragen, ob ihr schon diesen Fehler hattet?
Leider ist die serielle Schnittstelle vom JKBMS defekt, drum bin ich auf Bluetooth angewiesen