question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Deamon stopps working if Sensor not found

See original GitHub issue

Hi ! The demon works fine if the miflora sensor is in range. If not the deamon (or the underlaying library) stops working with the message:

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)>)

I test this by simply add a not existing mac in the config.ini I have installed miflora v0.4. Any ideas ?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:16 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
insertjokeherecommented, May 15, 2018

I’m running into this (one of my sensors ‘drifts’ in and out of Bluetooth range, so I’m seeing this pretty often) - will try out the fix @jboeddeker and @JoanMCD over the next few days and put up a PR unless someone beats me to it

1reaction
kanedcommented, Jun 27, 2018

Thomas, thanks for adding this in and maintaining this daemon. It works great and makes it much easier to work with the MiFlora!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Manually Start and Stop Linux Sensor Daemon
For troubleshooting purposes, you can manually start and stop the Linux sensor daemon. Procedure. To restart the service, open a terminal and ...
Read more >
Error when I active nr.managed daemon on the IDS sensor
To see if managed is running, type nrstatus on the sensor. If managed is not running then see if it is in the...
Read more >
Troubleshooting the CrowdStrike Falcon Sensor for Linux
If the sensor is not running, verify that the sensor's application files exist on your host: $ sudo ls -al /opt/CrowdStrike /opt/CrowdStrike/falcon-sensor.
Read more >
Nvargus-daemon fails when using multiple sensors on ...
From the log looks like it could be the sensor board HW or cable problem due to there have i2c no ack message....
Read more >
Sensors Off
When Sensors off is enabled, the sensors stop reporting any data to the system or apps. An app can still request a sensor...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found