Xiaomi Mi Flora [Temp/Light/Moisture] BLE Sensor

Others (MiLight, Hue, Toon etc...)

Moderator: leecollings

IDANIT
Posts: 73
Joined: Saturday 07 November 2015 10:01
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Poland
Contact:

Re: Xiaomi Mi Flora [Temp/Light/Moisture] BLE Sensor

Post by IDANIT »

joostnl wrote: Sunday 14 January 2018 7:37 The present Xiaomi Gateway does not handle Bluetooth so it is not possible. The reason you see the Flower sensors in the Xiaomi app is because your phone or pad has a direct connection to it (try turning off BT and you will find out).

However I heard there was a new Xiaomi Gateway coming supporting BT so maybe with that one.
Well I have Yeelight Ceiling Light wich after last firmware update become BlueTooth bridge. Same thing with Xiaomi Yeelight Bedside Lamp v2.
My problem with Flower Sensors is more complex. I've got RPi3 with RaZberry Daughter card. So if I switch on BT on Raspberry my Z-wave network stops working, if I want to use z-wave devices I have to switch off BT on RPi (well known problem), so no more Flower Care support.
Maybe this is the way to add BT devices to Domoticz.
Torin42
Posts: 2
Joined: Sunday 18 February 2018 10:19
Target OS: -
Domoticz version:
Contact:

Re: Xiaomi Mi Flora [Temp/Light/Moisture] BLE Sensor

Post by Torin42 »

Hey all,

I have create an Android app that helps you register your Chinese Flower Care Monitor worldwide. The app adds the device to your account through a Chinese proxy, so that afterwards you can use it with the official Flower Care app. Check out the app on Google Play: https://play.google.com/store/apps/deta ... reregister

Here is how it works:

User avatar
Mediacj
Posts: 74
Joined: Wednesday 11 February 2015 16:09
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Netherlands
Contact:

Re: Xiaomi Mi Flora [Temp/Light/Moisture] BLE Sensor

Post by Mediacj »

Torin42 wrote: Sunday 18 February 2018 10:35 Hey all,

I have create an Android app that helps you register your Chinese Flower Care Monitor worldwide. The app adds the device to your account through a Chinese proxy, so that afterwards you can use it with the official Flower Care app. Check out the app on Google Play: https://play.google.com/store/apps/deta ... reregister

Here is how it works:

Thanks this works perfect!
pavelbor
Posts: 35
Joined: Sunday 18 December 2016 12:18
Target OS: Raspberry Pi / ODroid
Domoticz version: LastBeta
Location: Tallinn / Estonia
Contact:

Re: Xiaomi Mi Flora [Temp/Light/Moisture] BLE Sensor

Post by pavelbor »

Hello,
cant login to proxy
photo_2018-02-27_14-28-57.jpg
photo_2018-02-27_14-28-57.jpg (121.78 KiB) Viewed 6061 times
Torin42
Posts: 2
Joined: Sunday 18 February 2018 10:19
Target OS: -
Domoticz version:
Contact:

Re: Xiaomi Mi Flora [Temp/Light/Moisture] BLE Sensor

Post by Torin42 »

pavelbor wrote: Tuesday 27 February 2018 13:29 Hello,
cant login to proxy
That's might be because proxies sometimes are not working correctly. Can you retry a few times, as it will get a random proxy on each trial?
molnaratti
Posts: 34
Joined: Friday 02 February 2018 16:21
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Xiaomi Mi Flora [Temp/Light/Moisture] BLE Sensor

Post by molnaratti »

EBOOZ wrote: Monday 25 December 2017 8:56 I got my first Mi Flora yesterday and thanks to the Wiki, installation went (almost) flaweless!

My dummy sensor for logging moisture didn't update to the correct value (was always 0), and when I looked in the domoticz.py script, I noticed the URL was formatted incorrect. I modified the script so it also supports changing the status to Normal, Dry or Wet. Reading through the previous pages I assumed 20 is the right trigger for setting the status to Dry.

Original code:

Code: Select all

    # Update moisture
    val_moist = "{}".format(poller.parameter_value(MI_MOISTURE))
    domoticzrequest("http://" + domoticzserver + "/json.htm?type=command&param=udevice&idx=" + idx_moist + "&svalue=" + val_moist + "&battery=" + val_bat)
Modified to (where svalue 3 is Wet and svalue 2 is Dry):

Code: Select all

    # Update moisture
    val_moist = "{}".format(poller.parameter_value(MI_MOISTURE))
    if int(val_moist) >= 60:
        domoticzrequest("http://" + domoticzserver + "/json.htm?type=command&param=udevice&idx=" + idx_moist + "&nvalue=" + val_moist + "&svalue=3")
    elif int(val_moist) <= 20:
        domoticzrequest("http://" + domoticzserver + "/json.htm?type=command&param=udevice&idx=" + idx_moist + "&nvalue=" + val_moist + "&svalue=2")
    else:
        domoticzrequest("http://" + domoticzserver + "/json.htm?type=command&param=udevice&idx=" + idx_moist + "&nvalue=" + val_moist + "&svalue=0")
Thank you, I was wrong with you too, your solution was good. !
reisub
Posts: 1
Joined: Saturday 21 April 2018 22:48
Target OS: -
Domoticz version:
Contact:

Re: Xiaomi Mi Flora [Temp/Light/Moisture] BLE Sensor

Post by reisub »

Hi everybody

Hi have received a new flower care device.
I can't pair in any way the device, the only moment when it communicate is when I put on the battery

I tried the app by Torin42 (thanks) , putting on the battery when the app is searching let me register the device, so I can see it in the flower care app, but there is now way to sync data with it...

It's the device faulty?
bramski
Posts: 45
Joined: Thursday 20 July 2017 16:26
Target OS: -
Domoticz version:
Contact:

Re: Xiaomi Mi Flora [Temp/Light/Moisture] BLE Sensor

Post by bramski »

I have 6 Mi Flora sensors right now, and I wanted to get notified when they need water. Otherwise I still have dead plants ;-). I can share a dzVents scripts with you which makes this a breeze: https://github.com/domoticz/domoticz/pull/2385/files. Have fun!
manjh
Posts: 708
Joined: Saturday 27 February 2016 12:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: NL
Contact:

Re: Xiaomi Mi Flora [Temp/Light/Moisture] BLE Sensor

Post by manjh »

IDANIT wrote: Monday 09 October 2017 19:16 RaspberryPi 3, Raspbian Stretch.
I follow the wiki, all installation, coping, making etc went fine, but I stuck on "Finding the sensor's Bluetooth Address". Got this error messages:

Code: Select all

pi@raspberrypi:~/bluez-5.44 $ sudo tools/btmgmt le on
Set Low Energy for hci0 failed with status 0x11 (Invalid Index)
Can anyone help me please?
I have the exact same problem. Checked everything twice but made no mistakes.
Is there a simple solution to this?
Hans
manjh
Posts: 708
Joined: Saturday 27 February 2016 12:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: NL
Contact:

Re: Xiaomi Mi Flora [Temp/Light/Moisture] BLE Sensor

Post by manjh »

I'm lost. Tried everything, no progress.
Although this is not really a Domoticz problem, chances are there are people here that know what is wrong.
In trying to get the Mi Flora plugin working, I can't get Bluetooth to work on my Pi-3 (yes, I am sure it is a model 3).
Tried Bluetoothctl, but on "scan on" it comes back with "no default controller available".
I searched the web and tried a number of suggested solutions, nothing helps.

Is there someone here that has the golden hint?
Hans
manjh
Posts: 708
Joined: Saturday 27 February 2016 12:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: NL
Contact:

Re: Xiaomi Mi Flora [Temp/Light/Moisture] BLE Sensor

Post by manjh »

Anyone? Please...? :?
Hans
terrorsource
Posts: 67
Joined: Wednesday 10 May 2017 17:57
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Xiaomi Mi Flora [Temp/Light/Moisture] BLE Sensor

Post by terrorsource »

Does anyone have this miflora python working with domoticz right now?

https://github.com/Tristan79/miflora hasn't been updated in 2yrs.
running it now causes connecton errors between my pi 3b+ and the miflora sensor.

Tried downloading the latest MiFlora 0.4 frm https://github.com/open-homeautomation/miflora and used the domoticz.py from the Tristan79 github page.
Edited the script a bit with the info from the MiFlora github but it is still not working.
gropi
Posts: 13
Joined: Thursday 26 April 2018 20:03
Target OS: Linux
Domoticz version: 4.11786
Location: Germany
Contact:

Re: Xiaomi Mi Flora [Temp/Light/Moisture] BLE Sensor

Post by gropi »

Few weeks back the scripts were working fine, unfortunately last days there was no chance. I got both with the module of Domoticz as well as with the python script errors.
Now i updated bluez, some other python modules and placed my raspi closer (4 meters) to the MiFlora sensor.
Right now everything is working.
Domoticz Version: 2023.1
Platform: Openmediavault 6; Docker; HP Microserver Gen8
Plugin/Hardware: MySensors Gateway; Philips HUE Bridge; OMG; ZigBee;
terrorsource
Posts: 67
Joined: Wednesday 10 May 2017 17:57
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Xiaomi Mi Flora [Temp/Light/Moisture] BLE Sensor

Post by terrorsource »

gropi wrote: Sunday 09 September 2018 8:26 Few weeks back the scripts were working fine, unfortunately last days there was no chance. I got both with the module of Domoticz as well as with the python script errors.
Now i updated bluez, some other python modules and placed my raspi closer (4 meters) to the MiFlora sensor.
Right now everything is working.
Can you explain what you did?

I found my issue. The script is not working on a raspberry pi 3b+.
My other pi. A 3b is on the 2nd floor and the sensor on ground floor. Works great.
gropi
Posts: 13
Joined: Thursday 26 April 2018 20:03
Target OS: Linux
Domoticz version: 4.11786
Location: Germany
Contact:

Re: Xiaomi Mi Flora [Temp/Light/Moisture] BLE Sensor

Post by gropi »

That are good news. unfortunately my is not working stable.
Domoticz Version: 2023.1
Platform: Openmediavault 6; Docker; HP Microserver Gen8
Plugin/Hardware: MySensors Gateway; Philips HUE Bridge; OMG; ZigBee;
terrorsource
Posts: 67
Joined: Wednesday 10 May 2017 17:57
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Xiaomi Mi Flora [Temp/Light/Moisture] BLE Sensor

Post by terrorsource »

gropi wrote: Friday 28 September 2018 21:14 That are good news. unfortunately my is not working stable.
Well, not anymore. Stopped working now also. Same issues. Really don’t know what the issue is.

Does anyone has this plugin working right now?
tonbor
Posts: 153
Joined: Monday 17 February 2014 9:12
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Xiaomi Mi Flora [Temp/Light/Moisture] BLE Sensor

Post by tonbor »

The plugin is a problem with more sensors, but the script is working fine, even with bluetooth raspberry 3b+, I got 11 sensors all fine. Well more distance is an issue. With 3b+ and with extern bluetooth dongle too! It works for me only for one floor with two thin walls.
Last edited by tonbor on Monday 22 October 2018 9:15, edited 3 times in total.
digger
Posts: 2
Joined: Sunday 21 October 2018 14:01
Target OS: -
Domoticz version:
Contact:

Re: Xiaomi Mi Flora [Temp/Light/Moisture] BLE Sensor

Post by digger »

Same problem here
mlormans
Posts: 1
Joined: Friday 04 January 2019 22:13
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Xiaomi Mi Flora [Temp/Light/Moisture] BLE Sensor

Post by mlormans »

I just got this working on Beta V4.10311, on a raspberry pi 3 with raspbian 9.
Instaled python and bluez 5.50 on the rapsberry pi, and than installed the plugin.

With blocky I read out the data a couple of times a day, only is the measurements differents from the data i get from the flora app on my iphone,
as well that the moisture sensor keeps on 0 anyone a idea?

I would like to use domoticz instead of the app, so I can send pushmessages when I need to water the plants

Some background info:
I'm using Domoticz now for 2 months, have connected my Philips Hue, some KaKu switches with the RFXcom module,
and a couple of wemos D1 mini's with a BME280 sensor (took me 4 days, but its working)

I'm not able to write my own python / esp codes, but have some experience with php/sql and am able to combine/adjust codes and seek inside code.
vulbas
Posts: 37
Joined: Tuesday 20 February 2018 17:59
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Xiaomi Mi Flora [Temp/Light/Moisture] BLE Sensor

Post by vulbas »

Hello,
I install the beacon detection and miflora
https://www.domoticz.com/forum/viewtopi ... lit=beacon

impossible to have my miflora and beacon detection at the same time.
from the moment I run a request on my miflora it cuts the beacon and they go on off.
I even made a clean reinstall on another PI and even problem.
it's either the miflora or the beacon

I do not understand
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest