Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exit if no data because of sensor not in range #99

Closed
JoanMCD opened this issue Apr 24, 2018 · 1 comment
Closed

Exit if no data because of sensor not in range #99

JoanMCD opened this issue Apr 24, 2018 · 1 comment

Comments

@JoanMCD
Copy link

JoanMCD commented Apr 24, 2018

Hello, I use ver 0.4 with miflora-mqtt-daemon from ThomDietrich.
If a miFlora sensor is out of range I get a error in the miflora-mqtt-daemon.py -> miflora_poller.py -> gatttool.py

I don't can find out where exact is the problem, but I suppose it's in the backend support.
Because python is not my primary language maybe someone can see the problem !?


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

Adding sensor to device list and testing connection ...
Name:          "FloraCare01"
Traceback (most recent call last):
  File "/opt/miflora-mqtt-daemon/miflora-mqtt-daemon.py", line 218, in <module>
    flora_poller.fill_cache()
  File "/usr/local/lib/python3.5/dist-packages/miflora/miflora_poller.py", line 61, in fill_cache
    firmware_version = self.firmware_version()
  File "/usr/local/lib/python3.5/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.5/dist-packages/btlewrap/gatttool.py", line 23, in _func_wrapper
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.5/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 -1225092352)>)
@ThomDietrich
Copy link
Collaborator

An exception is thrown, hence I'd say this issue is not a problem with the library and we should solve it in ThomDietrich/miflora-mqtt-daemon#39

As I said, PRs welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants