Hi All,
I have been using this in my Truck and it's been working well thanks
@BradCagle for the project.
I built a new PI for a friend for his truck and tested it against one of my batteries and it worked fine.
His JBD 4s works ok with the APP on his iPhone but when it connects from the PI it pauses for a few seconds and then reports the following error:
root@raspberrypi2:/opt/victronenergy/dbus-btbattery# ./dbus-btbattery.py A4:C1:37:23:45:21
INFO:BluetoothBattery:Starting dbus-btbattery
INFO:BluetoothBattery:dbus-btbattery v0.1.3
INFO:BluetoothBattery:Connecting A4:C1:37:23:45:21
INFO:BluetoothBattery:0.0017201560000046356
INFO:BluetoothBattery:0.002624010000005228
INFO:BluetoothBattery:Connected A4:C1:37:23:45:21
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "/opt/victronenergy/dbus-btbattery/jbdbt.py", line 105, in run
while self.bt.waitForNotifications(0.5):
File "/usr/lib/python3.8/site-packages/bluepy/btle.py", line 560, in waitForNotifications
resp = self._getResp(['ntfy','ind'], timeout)
File "/usr/lib/python3.8/site-packages/bluepy/btle.py", line 416, in _getResp
self.delegate.handleNotification(hnd, data)
File "/opt/victronenergy/dbus-btbattery/jbdbt.py", line 159, in handleNotification
self.cellData = self.cellData + data
TypeError: unsupported operand type(s) for +: 'NoneType' and 'bytes'
^[[B^[[INFO:BluetoothBattery:60.07307914399999
Any suggestions are gratefully received.
Thanks, Rich