Xiaomi Mi Flora [Temp/Light/Moisture] BLE Sensor
Moderator: leecollings
-
- Posts: 784
- Joined: Wednesday 10 December 2014 13:06
- Target OS: Linux
- Domoticz version: beta
- Location: Bordeaux France
- Contact:
Re: Xiaomi Mi Flora [Temp/Light/Moisture] BLE Sensor
Update to last stable @lepetitnicolas
Domoticz stable 3.5877 for real & Domoticz beta for test
Rfxtrxe / RFLink / Milight / Yeelight / Tasmota / MQTT / BLE / Zigate
http://domo-attitude.fr
Rfxtrxe / RFLink / Milight / Yeelight / Tasmota / MQTT / BLE / Zigate
http://domo-attitude.fr
-
- Posts: 550
- Joined: Tuesday 17 June 2014 22:14
- Target OS: NAS (Synology & others)
- Domoticz version: 4.10538
- Location: NL
- Contact:
Re: Xiaomi Mi Flora [Temp/Light/Moisture] BLE Sensor
Add hardware type dummy and after that the switches
Synology NAS, slave PI3, ZWave (Fibaro), Xiaomi zigbee devices, BTLE plant sensor, DzVents, Dashticz on tablet, Logitech Media Server
-
- Posts: 12
- Joined: Wednesday 02 November 2016 22:22
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.5877
- Location: South West of France
- Contact:
Re: Xiaomi Mi Flora [Temp/Light/Moisture] BLE Sensor
Thanks
I found it.... in french "Custom sensor" is translate in "texte"
I'm waiting tomorrow to see if my crontab works.
I found it.... in french "Custom sensor" is translate in "texte"
I'm waiting tomorrow to see if my crontab works.
Raspberry Pi 3 - RFLink and Homewizard
-
- Posts: 784
- Joined: Wednesday 10 December 2014 13:06
- Target OS: Linux
- Domoticz version: beta
- Location: Bordeaux France
- Contact:
Re: Xiaomi Mi Flora [Temp/Light/Moisture] BLE Sensor
No lepetitnicolas, his name on french is :lepetitnicolas wrote:Thanks
I found it.... in french "Custom sensor" is translate in "texte"
I'm waiting tomorrow to see if my crontab works.
Domoticz stable 3.5877 for real & Domoticz beta for test
Rfxtrxe / RFLink / Milight / Yeelight / Tasmota / MQTT / BLE / Zigate
http://domo-attitude.fr
Rfxtrxe / RFLink / Milight / Yeelight / Tasmota / MQTT / BLE / Zigate
http://domo-attitude.fr
-
- Posts: 12
- Joined: Wednesday 02 November 2016 22:22
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.5877
- Location: South West of France
- Contact:
Re: Xiaomi Mi Flora [Temp/Light/Moisture] BLE Sensor
Thanks Deennoo.
Now, i see it....i don't know why it don't see it yesterday.... tiredness
but it seems working with a text sensor.
I would try this tonight to see the difference
Now, i see it....i don't know why it don't see it yesterday.... tiredness
but it seems working with a text sensor.
I would try this tonight to see the difference
Raspberry Pi 3 - RFLink and Homewizard
-
- Posts: 784
- Joined: Wednesday 10 December 2014 13:06
- Target OS: Linux
- Domoticz version: beta
- Location: Bordeaux France
- Contact:
Re: Xiaomi Mi Flora [Temp/Light/Moisture] BLE Sensor
advantage of a custom sensor is that you can have a graphique to show value (text doesn't do this)
Domoticz stable 3.5877 for real & Domoticz beta for test
Rfxtrxe / RFLink / Milight / Yeelight / Tasmota / MQTT / BLE / Zigate
http://domo-attitude.fr
Rfxtrxe / RFLink / Milight / Yeelight / Tasmota / MQTT / BLE / Zigate
http://domo-attitude.fr
- jadon
- Posts: 7
- Joined: Monday 07 November 2016 14:59
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Tiel, Netherlands
- Contact:
Re: Xiaomi Mi Flora [Temp/Light/Moisture] BLE Sensor
I'm using it since nov 20, so almost a month, and I'm polling the sensor every hour. The battery reports 79%. So I'm guessing it could last a year, maybe by polling it every 2 hours.LouiS22 wrote:The users manual promises a year, but IMHO it really depends on your using habits: i.e. if you poll the data every minute, it will suck the battery really fast.trixwood wrote:yes! as many as you like.
Does anybody has some info on how long the battery will last?
-
- Posts: 5
- Joined: Sunday 01 February 2015 17:42
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: sthlm, sweden
- Contact:
Re: Xiaomi Mi Flora [Temp/Light/Moisture] BLE Sensor
Impressive small devices! Ordered four of them and they arrived this friday. Got it all working yesterday after installing Jessie on my RPi B2 and then following the guide @ http://www.elinux.org/RPi_Bluetooth_LE .
Thanks for the script posted here...
Thanks for the script posted here...

-
- Posts: 129
- Joined: Monday 25 November 2013 17:51
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2021.1
- Location: Mallorca
- Contact:
Re: Xiaomi Mi Flora [Temp/Light/Moisture] BLE Sensor
Running the modified script I get
What I'm missing?
Code: Select all
pTraceback (most recent call last):
File "flora.py", line 1, in <module>
import urllib.request
ImportError: No module named request
Rfxcom
Raspi 4
Raspi 4
Re: Xiaomi Mi Flora [Temp/Light/Moisture] BLE Sensor
Code: Select all
pip install requests
-
- Posts: 129
- Joined: Monday 25 November 2013 17:51
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2021.1
- Location: Mallorca
- Contact:
Re: Xiaomi Mi Flora [Temp/Light/Moisture] BLE Sensor
I don't get the script running, I'm completely new to Phyton.
Please what has to be installed to run it?
Please what has to be installed to run it?
Rfxcom
Raspi 4
Raspi 4
Re: Xiaomi Mi Flora [Temp/Light/Moisture] BLE Sensor
Yes so install the missing module with the command
Code: Select all
pip install requests
- LouiS22
- Posts: 433
- Joined: Friday 27 February 2015 13:21
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Budapest, Hungary
- Contact:
Re: Xiaomi Mi Flora [Temp/Light/Moisture] BLE Sensor
So I got mine today. Paired with my phone, downloaded the app, so far so good.
But...
I'm having hard time working with Domoticz. I followed the above guides, compiled bluez, my dongle is ok, lescan shows the MAC, etc. I've changed the MAC address in demo.py, but all I got in return is the following:
I have no Idea what's wrong. Maybe worth mentoning that the android app downloaded a firmware upgrade so the device runs a 2.7.0 firmware.
Any ideas?
But...
I'm having hard time working with Domoticz. I followed the above guides, compiled bluez, my dongle is ok, lescan shows the MAC, etc. I've changed the MAC address in demo.py, but all I got in return is the following:
Code: Select all
FW: None
File "demo.py", line 7, in <module>
print("Name: {}".format(poller.name()))
File "/home/pi/miflora/miflora/miflora_poller.py", line 172, in name
timeout=self.ble_timeout)
File "/home/pi/miflora/miflora/miflora_poller.py", line 139, in read_ble
time.sleep(delay)
Any ideas?
-
- Posts: 784
- Joined: Wednesday 10 December 2014 13:06
- Target OS: Linux
- Domoticz version: beta
- Location: Bordeaux France
- Contact:
Re: Xiaomi Mi Flora [Temp/Light/Moisture] BLE Sensor
Mine works on 2.7.0 fw and script is still working, fw isn't the key
Domoticz stable 3.5877 for real & Domoticz beta for test
Rfxtrxe / RFLink / Milight / Yeelight / Tasmota / MQTT / BLE / Zigate
http://domo-attitude.fr
Rfxtrxe / RFLink / Milight / Yeelight / Tasmota / MQTT / BLE / Zigate
http://domo-attitude.fr
Re: Xiaomi Mi Flora [Temp/Light/Moisture] BLE Sensor
It relies on gatttool... are you sure it's installed in /usr/local/bin/?
Further make sure you enable low energy:
Follow this guide to compile:
https://urbanjack.wordpress.com/?s=Bluez+into+BLE
Further make sure you enable low energy:
Code: Select all
sudo btmgmt le on
https://urbanjack.wordpress.com/?s=Bluez+into+BLE
- LouiS22
- Posts: 433
- Joined: Friday 27 February 2015 13:21
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Budapest, Hungary
- Contact:
Re: Xiaomi Mi Flora [Temp/Light/Moisture] BLE Sensor
Had a quick look on this morning, seems i screwed something, thanks for the info, will look into this later, and will do another compile, just to make sure.trixwood wrote:It relies on gatttool... are you sure it's installed in /usr/local/bin/?
Further make sure you enable low energy:
Follow this guide to compile:Code: Select all
sudo btmgmt le on
https://urbanjack.wordpress.com/?s=Bluez+into+BLE
- LouiS22
- Posts: 433
- Joined: Friday 27 February 2015 13:21
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Budapest, Hungary
- Contact:
Re: Xiaomi Mi Flora [Temp/Light/Moisture] BLE Sensor
Thanks, It's working now. Don't know what missed before, nevertheless I recompiled everything again and it's ok now.trixwood wrote:It relies on gatttool... are you sure it's installed in /usr/local/bin/?
Further make sure you enable low energy:
Follow this guide to compile:Code: Select all
sudo btmgmt le on
https://urbanjack.wordpress.com/?s=Bluez+into+BLE
Re: Xiaomi Mi Flora [Temp/Light/Moisture] BLE Sensor
If you get more mi floras make sure you put 1 second sleep delay between readings... it seems to help with keeping the failed and retry connections to a minimum (none in my case), which happened a lot if executed directly after each other..
See: https://github.com/Tristan79/miflora/bl ... omoticz.py
See: https://github.com/Tristan79/miflora/bl ... omoticz.py
- LouiS22
- Posts: 433
- Joined: Friday 27 February 2015 13:21
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Budapest, Hungary
- Contact:
Re: Xiaomi Mi Flora [Temp/Light/Moisture] BLE Sensor
Thanks I only had time to test with the demo.pytrixwood wrote:If you get more mi floras make sure you put 1 second sleep delay between readings... it seems to help with keeping the failed and retry connections to a minimum (none in my case), which happened a lot if executed directly after each other..
See: https://github.com/Tristan79/miflora/bl ... omoticz.py

Who is online
Users browsing this forum: No registered users and 0 guests