Recently I began monitoring the plants in the house using Mi Flora sensors. My wife is very fond of plants and she wanted to have a better insight on the moisture state of the potsoil.
ESPHome Bluetooth Proxy
A friend of mine suggested to use the Mi Flora sensors and link them to an ESPHome Bluetooth Proxy. Those are extremely small and affordable. They are ESP32 based, use Bluetooth Low Energy (BLE) and can be placed anywhere in the house. You can flash them right from the page above after which they get instantly recognized by Home Assistant. I use the M5 Stack.
The Mi Flora sensors have their own app from Xiaomi, which works nice and is quite well designed. You can use the app to install the Mi Flora sensors and monitor them from the app. However, after you’ve done proper integration in Home Assistant, you don’t need the app anymore. For various reasons it’s preferable to have it all in Home Assistant, instead of the app.
Setup and plant specifics
It takes some work to get everything you have in the app into Home Assistant. the Mi Flora sensor reports moisture, illuminance, temperature and soil conductivity. But important other specifics that you set in the app don’t come through, like the name of the sensor for example. Neither plant specific parameters like minimum moisture value for a specific plant, which you set in the app, don’t get written into the sensor and don’t come through to Home Assistant. So you need the app until you know which sensor you are reading in Home Assistant and also to determine the specifics that you want to have in Home Assistant.
Setting up the proper plants in the app (there are thousands to choose from), plant specific parameters like minimum and maximum values for moisture or conductivity are taken from the Xiaomi Plant database. They are stored in the app. You can use those to create separate sensors or entities in Home Assistant to use for reporting or other purposes.
The planttype parameters are also made available though in this great community, as the database got exported out of the app. You can find it in CSV here: MiFlora Sensor Plant Database . Essentially you don’t need the app at all if you use this file.
Home Habit Wall Panel
I am using HomeHabit on a Lenovo tablet, attached to the wall. Read about my other project for that setup here: Home Habit touch panel.
Complete setup in Home Asisstant
My setup contains the following:
- ESPHome BLT Proxy with 6 Mi Flora Sensors connected
- Reading out plant status, nicely laid out in Lovelace with photos (from the web) and on my wall tablet using Home Habit
- Reading moisture, conductivity. Temp and illuminance are optional for me.
- I am also having the min and max range for each plant by manually creating an Threshold sensors and using the values from the Mi Flora app. A Threshold sensor will report ON if the value (e.g. moisture) is within range, OFF if it’s outside.
- A Group sensor based on the Threshold sensors that combines the states into one, reporting ‘All good’ or ‘Needs attenting’.
- A Template sensor renaming the output of the Threshold sensor, reporting for each plant whether it’s below (‘Dry’), within (‘Good’), or above (‘Wet’) the specified range.
- An automation reporting when a plant runs dry for more than two days.
Read more about it here (you can skip the part about integrating it in HA, that’s taken care of using the Bluetooth Proxy).