dreadnought / python-daly-bms

Python module for Daly BMS devices
MIT License
86 stars 39 forks source link

Issues connection using the Bluetooth class #46

Closed hofmannu closed 9 months ago

hofmannu commented 9 months ago

Hi,

first of all, thanks a lot for this toolbox! Looking forward to use it to read out the battery of my cabin soon to have a bit more information how long I have before my lights here turn off ;).

So I tried something minimal like

from dalybms import DalyBMSBluetooth
import asyncio 
mac_address = "so:me:se:cr:et:11"                  
D = DalyBMSBluetooth()           
asyncio.run( D.connect(mac_address))

Nevertheless, I get an error throw from daly_bms_bluetooth.py line 45:

File "/home/xx/.local/lib/python3.9/site-packages/dalybms/daly_bms_bluetooth.py", line 45, in connect
    await self.client.start_notify(17, self._notification_callback)
  File "/home/xx/.local/lib/python3.9/site-packages/bleak/__init__.py", line 822, in start_notify
    raise BleakError(f"Characteristic {char_specifier} not found!")
bleak.exc.BleakError: Characteristic 17 not found!

Any idea where I could start debugging this? Is this bluetooth module actually tested or should I use some other library for this use case?

Thanks in advance!

hofmannu commented 9 months ago

duplicate, really sorry