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
610 stars 140 forks source link

first run poller error #40

Closed alexeinz closed 6 years ago

alexeinz commented 6 years ago

My miflora is working with ios app and detected with lescan When I try running the miflora-mqtt-daemon.py I get following error:

Any ideas where my problem might be?

alexroot@openhabserver /opt/miflora-mqtt-daemon (git)-[master] # python3 /opt/miflora-mqtt-daemon/miflora-mqtt-daemon.py

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

[2018-05-02 11:39:34] Connecting to MQTT broker ... [2018-05-02 11:39:34] MQTT connection established

Adding sensor to device list and testing connection ...
Name: "Tomato"
Traceback (most recent call last):
File "/opt/miflora-mqtt-daemon/miflora-mqtt-daemon.py", line 218, in
flora_poller.fill_cache()
File "/usr/local/lib/python3.6/dist-packages/miflora/miflora_poller.py", line 61, in fill_cache
firmware_version = self.firmware_version()
File "/usr/local/lib/python3.6/dist-packages/miflora/miflora_poller.py", line 104, in firmware_version
res = connection.read_handle(_HANDLE_READ_VERSION_BATTERY) # pylint: disable=no-member
File "/usr/local/lib/python3.6/dist-packages/btlewrap/gatttool.py", line 23, in _func_wrapper
return func(*args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/btlewrap/gatttool.py", line 253, in read_handle
raise BluetoothBackendException("Exit read_ble, no data ({})".format(current_thread()))
btlewrap.base.BluetoothBackendException: Exit read_ble, no data (<_MainThread(MainThread, started -1225293296)>)

ThomDietrich commented 6 years ago

Duplicate of #39

Please apply the fix manually. It will soon be added here.