Suddenly no connection to miflora sensor

Hello

I bought 2 months ago a miflora international sensor. It worked very fine.
So now I bought a second one and since then, the old and the new are not avaible in home assistant.
In the miflora flower app I had no problem to setup the new sensor. I still see both sensors and I could connect to this two sensors with the app and read the data.

  • I went back to an old home assistant vesion -> no changes
  • I went back to an old working backup with the first sensor -> no changes
  • I moved the old sensor next home assistant (distance <1m) -> no changes
  • I removed the battery of the new sensor and deleted everything in home assistant config with the new sensor -> no changes.

I changed the log level to info:

2019-06-23 09:17:22 INFO (SyncWorker_5) [homeassistant.loader] Loaded miflora from homeassistant.components.miflora
2019-06-23 09:17:24 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.miflora
2019-06-23 09:17:25 DEBUG (MainThread) [homeassistant.components.miflora.sensor] Miflora is using BluepyBackend backend.
2019-06-23 09:17:26 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.pflanze_1_battery, old_state=None, new_state=<state sensor.pflanze_1_battery=unknown; unit_of_measurement=%, friendly_name=Pflanze 1 Battery, icon=mdi:battery-charging @ 2019-06-23T09:17:26.296362+02:00>>
2019-06-23 09:17:26 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.pflanze_1_light_intensity, old_state=None, new_state=<state sensor.pflanze_1_light_intensity=unknown; unit_of_measurement=lx, friendly_name=Pflanze 1 Light intensity, icon=mdi:white-balance-sunny @ 2019-06-23T09:17:26.309122+02:00>>
2019-06-23 09:17:26 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.pflanze_1_temperature, old_state=None, new_state=<state sensor.pflanze_1_temperature=unknown; unit_of_measurement=°C, friendly_name=Pflanze 1 Temperature, icon=mdi:thermometer @ 2019-06-23T09:17:26.332806+02:00>>
2019-06-23 09:17:26 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.pflanze_1_moisture, old_state=None, new_state=<state sensor.pflanze_1_moisture=unknown; unit_of_measurement=%, friendly_name=Pflanze 1 Moisture, icon=mdi:water-percent @ 2019-06-23T09:17:26.354875+02:00>>
2019-06-23 09:17:26 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.pflanze_1_conductivity, old_state=None, new_state=<state sensor.pflanze_1_conductivity=unknown; unit_of_measurement=µS/cm, friendly_name=Pflanze 1 Conductivity, icon=mdi:flash-circle @ 2019-06-23T09:17:26.366155+02:00>>
2019-06-23 09:17:26 DEBUG (MainThread) [homeassistant.components.plant] Received callback from sensor.pflanze_1_battery with value unknown
2019-06-23 09:17:26 DEBUG (MainThread) [homeassistant.components.plant] Received callback from sensor.pflanze_1_light_intensity with value unknown
2019-06-23 09:17:26 DEBUG (MainThread) [homeassistant.components.plant] Received callback from sensor.pflanze_1_temperature with value unknown
2019-06-23 09:17:26 DEBUG (MainThread) [homeassistant.components.plant] Received callback from sensor.pflanze_1_moisture with value unknown
2019-06-23 09:17:26 DEBUG (MainThread) [homeassistant.components.plant] Received callback from sensor.pflanze_1_conductivity with value unknown
2019-06-23 09:18:17 DEBUG (SyncWorker_3) [homeassistant.components.miflora.sensor] Polling data for Pflanze 1 Battery
2019-06-23 09:18:17 DEBUG (SyncWorker_3) [btlewrap.bluepy] Call to <function BluepyBackend.connect at 0x70dee618> failed, try 3 of 3
2019-06-23 09:18:17 INFO (SyncWorker_3) [homeassistant.components.miflora.sensor] Polling error 
2019-06-23 09:18:17 DEBUG (SyncWorker_13) [homeassistant.components.miflora.sensor] Polling data for Pflanze 1 Light intensity
2019-06-23 09:18:17 DEBUG (SyncWorker_13) [miflora.miflora_poller] Filling cache with new sensor data.
2019-06-23 09:18:18 DEBUG (SyncWorker_13) [btlewrap.bluepy] Call to <function BluepyBackend.connect at 0x70dee618> failed, try 1 of 3
2019-06-23 09:18:18 DEBUG (SyncWorker_13) [btlewrap.bluepy] Call to <function BluepyBackend.connect at 0x70dee618> failed, try 1 of 3
2019-06-23 09:18:18 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.scrape
2019-06-23 09:18:18 DEBUG (SyncWorker_13) [btlewrap.bluepy] Call to <function BluepyBackend.connect at 0x70dee618> failed, try 2 of 3
2019-06-23 09:18:18 DEBUG (SyncWorker_13) [btlewrap.bluepy] Call to <function BluepyBackend.connect at 0x70dee618> failed, try 3 of 3
2019-06-23 09:18:18 INFO (SyncWorker_13) [homeassistant.components.miflora.sensor] Polling error 
2019-06-23 09:18:19 DEBUG (SyncWorker_3) [homeassistant.components.miflora.sensor] Polling data for Pflanze 1 Temperature
2019-06-23 09:18:19 DEBUG (SyncWorker_3) [miflora.miflora_poller] Using cache (-1 day, 23:56:01.458771 < 0:01:00)
2019-06-23 09:18:19 INFO (SyncWorker_3) [homeassistant.components.miflora.sensor] Polling error Could not read data from Mi Flora sensor c4:7c:8d:67:26:8a
2019-06-23 09:18:20 DEBUG (SyncWorker_9) [homeassistant.components.miflora.sensor] Polling data for Pflanze 1 Moisture
2019-06-23 09:18:20 DEBUG (SyncWorker_9) [miflora.miflora_poller] Using cache (-1 day, 23:56:01.749840 < 0:01:00)
2019-06-23 09:18:20 INFO (SyncWorker_9) [homeassistant.components.miflora.sensor] Polling error Could not read data from Mi Flora sensor c4:7c:8d:67:26:8a
2019-06-23 09:18:20 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=switch.keller_kuhlbox, old_state=<state switch.keller_kuhlbox=on; current_power_w=7.56, friendly_name=Keller Kühlbox @ 2019-06-23T09:17:19.334410+02:00>, new_state=<state switch.keller_kuhlbox=on; current_power_w=7.57, friendly_name=Keller Kühlbox @ 2019-06-23T09:17:19.334410+02:00>>
2019-06-23 09:18:20 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.power7, old_state=<state sensor.power7=7.56; unit_of_measurement=W, friendly_name=Keller Kühlbox @ 2019-06-23T09:18:17.020204+02:00>, new_state=<state sensor.power7=7.57; unit_of_measurement=W, friendly_name=Keller Kühlbox @ 2019-06-23T09:18:20.470716+02:00>>
2019-06-23 09:18:20 DEBUG (SyncWorker_6) [homeassistant.components.miflora.sensor] Polling data for Pflanze 1 Conductivity
2019-06-23 09:18:20 DEBUG (SyncWorker_6) [miflora.miflora_poller] Using cache (-1 day, 23:56:01.995595 < 0:01:00)
2019-06-23 09:18:20 INFO (SyncWorker_6) [homeassistant.components.miflora.sensor] Polling error Could not read data from Mi Flora sensor c4:7c:8d:67:26:8a
2019-06-23 09:18:28 DEBUG (SyncWorker_16) [miflora.miflora_poller] Using cache (-1 day, 23:56:10.426205 < 0:01:00)
2019-06-23 09:18:29 INFO (SyncWorker_16) [homeassistant.components.miflora.sensor] Polling error Could not read data from Mi Flora sensor c4:7c:8d:67:26:8a
2019-06-23 09:18:29 DEBUG (SyncWorker_6) [homeassistant.components.miflora.sensor] Polling data for Pflanze 1 Light intensity
2019-06-23 09:18:29 DEBUG (SyncWorker_6) [miflora.miflora_poller] Using cache (-1 day, 23:56:11.172790 < 0:01:00)
2019-06-23 09:19:28 DEBUG (SyncWorker_16) [btlewrap.bluepy] Call to <function BluepyBackend.connect at 0x70dee618> failed, try 1 of 3
2019-06-23 09:19:28 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection.1848758736] Sending {'id': 2, 'type': 'event', 'event': <Event state_changed[L]: entity_id=sensor.cpu_temperature, old_state=<state sensor.cpu_temperature=58.5; unit_of_measurement=°C, friendly_name=CPU Temperature @ 2019-06-23T09:18:29.848034+02:00>, new_state=<state sensor.cpu_temperature=58.0; unit_of_measurement=°C, friendly_name=CPU Temperature @ 2019-06-23T09:19:28.145045+02:00>>}
2019-06-23 09:19:28 ERROR (SyncWorker_2) [homeassistant.components.scrape.sensor] Unable to extract data from HTML
2019-06-23 09:19:28 DEBUG (SyncWorker_15) [homeassistant.components.rest.sensor] Updating from https://measurements.mobile-alerts.eu/Home/MeasurementDetails?deviceid=1013E97A6B4C&vendorid=61ab37d0-852a-46d9-9d0e-9134db4f8e1a&appbundle=eu.mobile_alerts.mobilealerts
2019-06-23 09:19:28 DEBUG (SyncWorker_16) [btlewrap.bluepy] Call to <function BluepyBackend.connect at 0x70dee618> failed, try 2 of 3
2019-06-23 09:19:28 DEBUG (SyncWorker_16) [btlewrap.bluepy] Call to <function BluepyBackend.connect at 0x70dee618> failed, try 3 of 3
2019-06-23 09:19:28 INFO (SyncWorker_16) [homeassistant.components.miflora.sensor] Polling error 
2019-06-23 09:19:28 DEBUG (SyncWorker_3) [homeassistant.components.miflora.sensor] Polling data for Pflanze 1 Conductivity
2019-06-23 09:19:28 DEBUG (SyncWorker_3) [miflora.miflora_poller] Using cache (-1 day, 23:57:10.302832 < 0:01:00)
2019-06-23 09:19:28 INFO (SyncWorker_3) [homeassistant.components.miflora.sensor] Polling error Could not read data from Mi Flora sensor c4:7c:8d:67:26:8a
2019-06-23 09:19:28 DEBUG (SyncWorker_17) [homeassistant.components.miflora.sensor] Polling data for Pflanze 1 Moisture
2019-06-23 09:19:28 DEBUG (SyncWorker_17) [miflora.miflora_poller] Using cache (-1 day, 23:57:10.320269 < 0:01:00)
2019-06-23 09:19:28 INFO (SyncWorker_17) [homeassistant.components.miflora.sensor] Polling error Could not read data from Mi Flora sensor c4:7c:8d:67:26:8a
2019-06-23 09:19:28 DEBUG (SyncWorker_1) [homeassistant.components.miflora.sensor] Polling data for Pflanze 1 Temperature
2019-06-23 09:19:28 DEBUG (SyncWorker_1) [miflora.miflora_poller] Using cache (-1 day, 23:57:10.333958 < 0:01:00)
2019-06-23 09:19:28 INFO (SyncWorker_1) [homeassistant.components.miflora.sensor] Polling error Could not read data from Mi Flora sensor c4:7c:8d:67:26:8a
2019-06-23 09:19:28 DEBUG (SyncWorker_12) [homeassistant.components.miflora.sensor] Polling data for Pflanze 1 Light intensity
2019-06-23 09:19:28 DEBUG (SyncWorker_12) [miflora.miflora_poller] Using cache (-1 day, 23:57:10.344229 < 0:01:00)
2019-06-23 09:19:28 INFO (SyncWorker_12) [homeassistant.components.miflora.sensor] Polling error Could not read data from Mi Flora sensor c4:7c:8d:67:26:8a

I hope somebody has an idea. Thanks for all your tips.
Gilbert

Hello

If somebody has the same problem. Here my solution how I fixed it:
Just reinstalled a clean Home Assistant installation. Copied all the config files back, installed all plugins again and both miflora sensors suddenly worked again.

Gilbert

Just a little information. After some months, bloothooth is not working again and so my miflora sensors has no data.

If I install the terminal plugin and then do:

bluetoothctl
[bluetooth]# scan on

I got the error message:

bluetoothctl failed to connect org.bluez.error.failed

After some more tests I found out:
Do a restart at Configuration->Server Control -> Restart does not help.
But a restart at Hass.io -> System -> Restart helps. Suddenly bluetooth is working again.

Maybe somebody with the same problem helps this.

Gilbert

2 Likes

Hey guys,

I’m running home assistant on top of raspbian 10 (buster) and I noticed that in the system logging (not HA) the bluetooth adapter gave an TX timeout. So it seemed to me that either the adapter or the driver (module) was at fault here. As I’m not a developer I opted to not debug the issue and go for a simpler option. Since a week and a half I’m restarting the bluetooth daemon twice each day through a cronjob and this fixes the issue. I’ve only once seen the sensors disapear (grey icons) since, and this fixed itself after the bluetooth daemon restarted.

Hope this helps :slight_smile:

Thank you very much Rebooting the host fixed the miflora sensors. Working again!