ThomDietrich / miflora-mqtt-daemon

Linux service to collect and transfer Xiaomi Mi Flora plant sensor data via MQTT to your smart home system, with cluster support 🌱🌼πŸ₯€πŸ‘🌳
MIT License
606 stars 141 forks source link

Bluepy error after apt update && upgrade #146

Open yayitazale opened 2 years ago

yayitazale commented 2 years ago

I updated and upgraded the RPI and now I get this error after launching the daemon:

Xiaomi Mi Flora Plant Sensor MQTT Client/Daemon
Source: https://github.com/ThomDietrich/miflora-mqtt-daemon

[2021-08-13 11:10:00] Connecting to MQTT broker ...
[2021-08-13 11:10:00] MQTT connection established

Adding sensor to device list and testing connection ...
Name:          "olea"
Internal name: "olea"
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/btlewrap/bluepy.py", line 27, in _func_wrapper
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/btlewrap/bluepy.py", line 75, in read_handle
    return self._peripheral.readCharacteristic(handle)
  File "/usr/local/lib/python3.7/dist-packages/bluepy/btle.py", line 529, in readCharacteristic
    self._writeCmd("rd %X\n" % handle)
  File "/usr/local/lib/python3.7/dist-packages/bluepy/btle.py", line 302, in _writeCmd
    raise BTLEInternalError("Helper not started (did you call connect()?)")
bluepy.btle.BTLEInternalError: Helper not started (did you call connect()?)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/miflora-mqtt-daemon/miflora-mqtt-daemon.py", line 213, in <module>
    print('Device name:   "{}"'.format(flora_poller.name()))
  File "/usr/local/lib/python3.7/dist-packages/miflora/miflora_poller.py", line 77, in name
    _HANDLE_READ_NAME
  File "/usr/local/lib/python3.7/dist-packages/btlewrap/bluepy.py", line 33, in _func_wrapper
    raise BluetoothBackendException() from last_error
btlewrap.base.BluetoothBackendException
tuomastielinen commented 11 months ago

I'm having the same issue.