Presence detection, BLE, mi flora, RF gateway with ESP32, OpenMQTTGateway is now compatible

OpenMQTTGateway is now compatible with the cheap ESP32, here is the working functionnalities:

  • Presence detection of BLE devices
  • Mi flora (flower care) sensor readings
  • RF 433mhz/315mhz bidirectional gateway

More info here:

And on the github


Two weeks ago I suggested the ESP32 as a possible solution, instead of a dedicated raspberry pi + plantgateway (Xiaomi Mi Plants Monitor Flower). And now you have already fixed it, great job! I will soon do some testing, thanks!


Thanks, cool project, looks very interesting.

I’m starting to look at a ESP32 for BLE detection of cars, to trigger our garage doors, but from reading through your documentation it sounds like the 10 second scan time means there would be a fairly noticeable delay?

1 Like


10 seconds is the scan duration, you have also TimeBtw_Read wich give the time between two scans, these settings are the ones that I have tested, feel free to modify them and give feedback. Regarding the scna duration I will not go down below 5s

1 Like

I’ll build it and give it a shot, thank you.

Got this up and running today, working well so far in test, will tie into automations for car detection via BT beacons and see how it works in the real world.

Thanks for all your hard work, great project and great documentation, was very easy to get up and running.

1 Like

Actually had the ESP32 board fall off the wireless, and just being spit out the column of periods on the serial monitor.

I have a handful of ESP8266s that are happy, and pretty stable wireless (Netgear Orbi) – Anything I can do or check? Can I add the equivalent of ESP.Reset to the WiFi loop somehow?


Dug around a bit more, I should mention I’m running 0.6.2 – it looks like I should switch to the latest master branch from github to get this patch?

Yes you are right please switch to the master branch which automaticaly reconnect wifi.

Once with the master If you could say us how much time the BLE scans remains active in your setup it would be great. Some users are experiencing BLE not returning results after some days.

Thank you, I will report back if I get reliable BLE over four or five days as that seems the threshold in the open BLE issue.

I put the master branch on the board yesterday and it’s currently working for almost a day now without any issues.

Really awesome that this supports MiFlora now, I am trying to get it set up.

On my ESP32 it goes into a loop rebooting itself - I submitted an issue on github.

I did get it working with esp8266 and a HM-10 but realized the firmware on the BLE module is 545, so no reading of the MiFlora data.

I do not have access to any PCs with Windows to upgrade it - can anyone recommend a vendor that sells HM-10 with a >601 firmware? Or know of an alternative method?

Here is a new device compatible with OMG on ESP32 and other boards + HM10

1 Like

Does the gateway read the results from the xiaomi scale?

I don’t think so, if Xiaomi or other reseller gives one to me I can try to integrate it

1 Like

Hi all.

I currently have a bunch of Mi Flora sensors working that talk to a pi running home assistant. I planned to replace the pi with an esp32 running openmqttgateway however can not get it to read the miflora values.

openmqttgateway can see the miflora sensors and publishes their device type as flower care along with their signal strength on mqtt, however does not ever publish their sensor values. I have tried with the raspberry pi turned off and have confirmed the mi flora devices are runnign the latest firmware.

Does anyone have any suggestions of what i could try to get it working?



Could you point us the version of OpenMQTTGateway you are using and the version of mi flora firmware?


openmqttgateway is version 0.7
mi flora is version 2.7.0

Thanks for your help

strange your version of mi flora, I’m having 3.1.8, could you try to update it with flower care app again maybe

That is strange the flower care app tells me 2.7.0 is the latest version.

If you want we can continue the conversation in the gitter tchat to see with others what version they are using