Mi Flora plant sensor

Thanks for your work on this :slight_smile:

1 Like

Is fix now live, since 0.56.2 was released 23rd of this month?

They work for me again on 56.2. Think on 56.1 also already!

Thank you! Now I can have the test and production systems in HASS.IO

yes seems to work now =) just loving it.

Followup guestion can I use a external Bluetooth device for better coverage or I’m i stuck using the one on the raspberry 3?

My system was missing gatttool. So I compiled it:

  1. Download bluez wget https://www.kernel.org/pub/linux/bluetooth/bluez-5.9.tar.gz
  2. Untar the archive: tar xvf bluez-5.9.tar.gz
  3. Go to the new directory cd bluez-5.9
  4. Install dependencies: sudo apt-get update && sudo apt-get install -y gcc make libusb-dev libdbus-1-dev libglib2.0-dev libudev-dev libical-dev libreadline-dev
  5. Execute ./configure
  6. Run the command make
  7. Copy gatttool sudo cp attrib/gatttool /usr/bin/

Now Mi Flora works.

1 Like

you are obviously not using hass.io
but that’s basically how the temporary fix works until the host OS is being released in a new version

1 Like

No, I am not. I am using osmc.

well on hass.io you can’t compile bluez yourself, and this happens to be the hass.io subforum :wink:

1 Like

hi, could you explain how to add the mi flora sensor in the config?

  • “hcitool lescan” via SSH is not working (command not found)
  • “devicetracker.bluetoothle_tracker” is still not working on hass.io
    running 56.2. including @sharukins fix

thanks :grinning:

1 Like

you have to connect to the host, not the home assistant docker.
use the debugging access

Concerning the le tracker component: I don’t know, I don’t use it and no one provided logs

1 Like

perfect, thanks a lot! this worked for me :blush:

After update 0.57 again not correct work

directly after reboot HASS has to collect values before it shows anything, I suppose it’s working right now, because for me 0.57 works absolutely fine

Agreed. Working for me.
plants

1 Like

Hello !

It seems not working for me neither in v0.57.2, still ‘unknown’ status a day after reboot.
Have you guys enable BLE tracker to get it working ? Or should the following conf be enough ?

- platform: miflora
  mac: 'my:MAC;address:here'
  name: Orchidée

Is your Mi Flora far from your RPi ? Bluetooth plugin is installed but I don’t know if BLE range could reach ~10m

Thanks

I’ve enabled the bluetooth bit from Hassio and am running Home Assistant 0.57.2 and they all seem to be working. My sensors are all within ~10m with the furthest out being around 9 or 10m away from my pi. The rest of them are fairly close. Might want to move the sensor closer just for testing.

1 Like

The Bluetooth Tracker component is still broken, but Mi Flora should work. For me, I have my Mi Floras within 3m of range around my RasPi, except for one which is located ~4m through a thick wall. The latter one fails reasonably often to update.
Have you checked your logs for errors?

I went a different route to solve this, and put hassbian on a Pi Zero.

I didn’t run any special code versions, just checked that the MiFlora mac addresses were detected with

sudo hcitool lescan

Which they were without any extra settings on my part.

Setup the miflora as normal on the pi zero hassbian:

  - platform: miflora
    mac: 'c4:7c:8a:6c:3b:69'
    force_update: true
    cache_value: 600
    name: miflora_1

Then in my main hassio install, I used the rest sensor to get the data via the Hass api on the Pi Zero: e.g.

  - platform: rest
    resource: http://192.168.135.27:8123/api/states/sensor.miflora_1_moisture
    name: miflora_1_soil_moisture
    value_template: '{{ value_json.state }}'
    unit_of_measurement: "%"

I’ve no dropouts, and haven’t had to maintain anything on the Pi Zero - half the time I forget that’s how I’m connecting to the MiFloras.

Anyone else connect to them this way?

1 Like

anyone got any answer to this ?
External USB or just the internal on the RPi3?