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
miflora plant sensors breaks after single error #12153
Comments
Found a pull request on miflora, it is however unclear to me if this PR resolves the issues above. |
Issue is not related to the amount of sensors, also with 2 sensors the polling is stopped after an error has occurred. The behaviour does occur earlier with more sensors. |
Bought a couple of these and awaiting for delivery, if no one else fixes this you have my word I will ;) |
Fix is ready, waiting for an upstream release: |
Issue fixed after update. Thanks @ChristianKuehnel |
Hi I believe this issue (or something with similar symptoms) may have returned. I'm on 0.69.1 and find daily log entries "updating miflora.. took longer than... update interval 0:00:30" and loss of sensor data. Anyone else with this issue? Any workarounds? |
I do have same problem. It works after reboot for a cuppel of hours, and then stops updating :( |
The slow updates usually come from a bad Bluetooth connection to the sensors, either the sensors are too far from the bluetooth device or there is just some random noise in the air disturbing the communication. I can't really reproduce the issue. In my setup the miflora sensors are working fine. Can you provide more information? How many plants? logger:
default: info
logs:
miflora: debug
btlewrap: debug |
It's not that there are missing polls, they all work fine for hours, then stop working and will not poll until my daily reboot. I have 8 sensors at the moment. Most are within 2-3m. 2 are about 6-7m away. Will do the debug log next week when I'm back home. |
I to have thos problem, and did turn ondebug. The log shows it is working fine for up to 7 hours, and then it stops updating - i am not the best at reading ths log, but it looks like it stops getting data - seems like the bluetooth just stops connecting to the devises.
|
Yes, it seems like we can't connect to the device anymore using the underlying bluepy library. It get us a bit closer to the root cause. I probably need to add more logging output to see why it failed to connect... |
well - it has been working pritty well and stable for last few days |
Had Mi Flora running fine for weeks. Installed it yesterday at a friend, and it could'n get any values. Since I restart my hass today, my values are gone too. Log get's flooded with "Updating miflora sensor took longer than the scheduled update interval 0:00:30". My debug shows the same output like @andlo
|
Home Assistant release (
hass --version
):0.62.1
Python release (
python3 --version
):Python 3.6.3
Component/platform:
miflora component
Bluetooth BCM43xx - version 1.1
Xiaomi version: v3.1.8
Description of problem:
The miflora component breaks after an error has occurred for one of the sensors, the speed at which this occurs depends on the amount of sensors.
Sensors are polled every 30 seconds (regardless of cache_value setting), polling is not sequenced but (pratically) simultaneously, possibly causing errors.
Whenever an error has occured all sensors stop working and report the WARNING message in the log:
Updating miflora sensor took longer than the scheduled update interval 0:00:30
Expected:
Expected behaviour is to be able to recover from a single failed poll. When there are limits in the amount of sensors that can be polled simultaneously, some mitigation is expected (e.g. queue).
Problem-relevant
configuration.yaml
entries and steps to reproduce:Traceback (if applicable):
Traceback generated by activating the debug mode on sensors:
Example of a regular log entry log:
2018-02-03 14:52:41 DEBUG (SyncWorker_3) [homeassistant.components.sensor.miflora] Polling data for flower_4 Conductivity 2018-02-03 14:52:41 DEBUG (SyncWorker_3) [homeassistant.components.sensor.miflora] flower_4 Conductivity = 317 2018-02-03 14:52:41 DEBUG (SyncWorker_3) [homeassistant.components.sensor.miflora] Data collected: [317] 2018-02-03 14:52:41 DEBUG (SyncWorker_3) [homeassistant.components.sensor.miflora] Median is: 317
After an error has occurred every 30 seconds the logbook shows:
Additional info:
I've read and tried to apply tips and solutions in the following threads:
home-assistant/supervisor#307
https://community.home-assistant.io/t/hass-io-xiaomi-sensor-show-nothing/34695
#10790
The following checks have been performed:
hcitool lescan
lists all 4 sensors I havebluetoothctl
and thenscan on
shows all 4 sensorsAny help is much appreciated!
The text was updated successfully, but these errors were encountered: