cyrils / renogy-bt

Python library to read Renogy compatible BT-1 or BT-2 bluetooth modules using Raspberry Pi.
GNU General Public License v3.0
76 stars 27 forks source link

client can not be used directly #44

Closed riker65 closed 7 months ago

riker65 commented 7 months ago

Hi running the example I faced this errors.

` INFO:root:Devices found: 4 INFO:root:Found matching device BT-TH-EAxxx => [e0:7d:ea:83xxx] INFO:root:[E0:7D:EA:83:xx] Connected INFO:root:[E0:7D:EA:83:xx] Resolved services INFO:root:subscribed to notification 0000fff1-0000-1000-8000-00805f9b34fb INFO:root:found write characteristic 0000ffd1-0000-1000-8000-00805f9b34fb INFO:root:resolved services ERROR:root:base client cannot be used directly INFO:root:characteristic_enable_notifications_succeeded ERROR:dbus.connection:Exception in handler for D-Bus signal: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/dbus/connection.py", line 232, in maybe_handle_message self._handler(*args, *kwargs) File "/home/pi/.local/lib/python3.9/site-packages/gatt/gatt_linux.py", line 539, in properties_changed self.service.device.characteristic_value_updated(characteristic=self, value=bytes(value)) File "/opt/renogy-bt/renogybt/BLE.py", line 86, in characteristic_value_updated self.data_callback(value) File "/opt/renogy-bt/renogybt/RoverClient.py", line 58, in on_data_received super().on_data_received(response) File "/opt/renogy-bt/renogybt/BaseClient.py", line 61, in on_data_received self.read_timer.cancel() AttributeError: 'NoneType' object has no attribute 'cancel' NFO:root:found write characteristic 0000ffd1-0000-1000-8000-00805f9b34fb INFO:root:resolved services ERROR:root:base client cannot be used directly INFO:root:characteristic_enable_notifications_succeeded ERROR:dbus.connection:Exception in handler for D-Bus signal: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/dbus/connection.py", line 232, in maybe_handle_message self._handler(args, **kwargs) File "/home/pi/.local/lib/python3.9/site- '

thanks T

cyrils commented 7 months ago

Please check your config.ini, looks like all config values are not provided.