Deamon stopps working if Sensor not found
See original GitHub issueHi ! 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:
- Created 5 years ago
- Comments:16 (7 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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
Thomas, thanks for adding this in and maintaining this daemon. It works great and makes it much easier to work with the MiFlora!