Good day all,
I'm running a script on my RPi Zero 2 W using Bullseye 64-bit OS using a long range bluetooth adapter (LM1010). Been running for a year now without too many issue. The script simply connects to a couple of my BT adapters in my backyard shed solar panel system, and dumps the data on my MQTT broker (for Home Assistant).
The script can be found
here
It uses python-dbus.
However, yesterday, I ran just your normal system updates 'sudo apt-get update then upgrade', now when I try to run the script, I get these errors.
Code:
INFO: Adapter status - Powered: True
INFO: Starting discovery...
Traceback (most recent call last):
File "/home/pi/.local/lib/python3.9/site-packages/gatt/gatt_linux.py", line 156, in stop_discovery
self._adapter.StopDiscovery()
File "/usr/lib/python3/dist-packages/dbus/proxies.py", line 141, in __call__
return self._connection.call_blocking(self._named_service,
File "/usr/lib/python3/dist-packages/dbus/connection.py", line 652, in call_blocking
reply_message = self.send_message_with_reply_and_block(
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.UnknownObject: Method "StopDiscovery" with signature "" on interface "org.bluez.Adapter1" doesn't exist
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/pi/solar-monitor/solar-monitor.py", line 84, in <module>
device_manager.stop_discovery()
File "/home/pi/.local/lib/python3.9/site-packages/gatt/gatt_linux.py", line 161, in stop_discovery
raise _error_from_dbus_error(e)
gatt.errors.Failed: Method "StopDiscovery" with signature "" on interface "org.bluez.Adapter1" doesn't exist
and eventually, after many attempts to try the start the script, the error message turns to this:
Code:
pi@raspberrypi:~/solar-monitor $ python3 solar-monitor.py
Traceback (most recent call last):
File "/home/pi/solar-monitor/solar-monitor.py", line 53, in <module>
[logging.info](http://logging.info/)("Adapter status - Powered: {}".format(device_manager.is_adapter_powered))
File "/home/pi/.local/lib/python3.9/site-packages/gatt/gatt_linux.py", line 53, in is_adapter_powered
return self._adapter_properties.Get('org.bluez.Adapter1', 'Powered') == 1
File "/home/pi/.local/lib/python3.9/site-packages/dbus/proxies.py", line 72, in __call__
return self._proxy_method(*args, **keywords)
File "/home/pi/.local/lib/python3.9/site-packages/dbus/proxies.py", line 141, in __call__
return self._connection.call_blocking(self._named_service,
File "/home/pi/.local/lib/python3.9/site-packages/dbus/connection.py", line 634, in call_blocking
reply_message = self.send_message_with_reply_and_block(
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.UnknownObject: Method "Get" with signature "ss" on interface "org.freedesktop.DBus.Properties" doesn't exist
I'm kind of stuck and regret updating (if that was what cause the issue).
I completely wiped my RPi and started from scratch, and installed all the libraries again in the requirements file, but same problem exists.
Any idea how to solve such a problem?
thank you