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

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

Moderator: leecollings

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 »

Nice but not working (anymore
JoannaMel wrote:I joined purely to post this. :)
While i do not have/use Domoticz at the moment, it does look like something right up my street...
If any other unfortunate souls end up here trying to make their China-only Xiaomi Mi Flora Smart Plants monitor work with Flower Care app, here's my guide.

The error shown on the screen when trying to pair the sensor is: "The device is for China Mainland user only, please contact the reseller for international version"
Screenshot_20170623-170727.png
I have followed some advice earlier in this thread, but found the advice lacking in detail.

It seems that you only need to convince the app you are in china when first linking the device. Once you have done so it shall remain accessible in the app, even when no longer spoofing location.

To make it work, on my android phone i did the following:
1) turn off mobile network totally (for me: settings - sim cards - sim1- disable) - this prevents your mobile using mobile network masts to approximate location.
2) enable developer mode (settings - about phone - tap "build number" 10 or so times)
3) get a location spoofing app. I chose the first one i found : https://play.google.com/store/apps/deta ... akegps.fre
4)Select it under settings- developer - select mock location app
5) open the app, tap a location in china and start "faking" location
6) get free vpn with chinese servers. I had to try a couple. One that worked was: https://play.google.com/store/apps/deta ... .flyclient (3 x 20mins free daily)
7) connect to Chinese server via vpn. For me this was shanghai.
8) open the Flower care app and connect the new sensor as normal. (i have taken the battery out of the sensor immediately prior to this, in case it somehow "remembered" the previous failed pairing, but i expect this was not necessary)
I also set my timezone to manual and chose a location in china, but have a feeling this was not necessary either.
It should now allow you to connect.
9) return back to normal settings, remove the no-longer-needed apps, and enjoy your now-working sensor!

Hope this helps somebody.
Jo
Nice but not working (anymore

Verstuurd vanaf mijn SM-T813 met Tapatalk
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 »

Problem is there are foro july first almost no (free) vpn available in China. With VPN Hongkong 30 and 35 I got still the Mainland error. Has somebody any solution?
tonbor wrote:Nice but not working (anymore
JoannaMel wrote:I joined purely to post this. :)
While i do not have/use Domoticz at the moment, it does look like something right up my street...
If any other unfortunate souls end up here trying to make their China-only Xiaomi Mi Flora Smart Plants monitor work with Flower Care app, here's my guide.

The error shown on the screen when trying to pair the sensor is: "The device is for China Mainland user only, please contact the reseller for international version"
Screenshot_20170623-170727.png
I have followed some advice earlier in this thread, but found the advice lacking in detail.

It seems that you only need to convince the app you are in china when first linking the device. Once you have done so it shall remain accessible in the app, even when no longer spoofing location.

To make it work, on my android phone i did the following:
1) turn off mobile network totally (for me: settings - sim cards - sim1- disable) - this prevents your mobile using mobile network masts to approximate location.
2) enable developer mode (settings - about phone - tap "build number" 10 or so times)
3) get a location spoofing app. I chose the first one i found : https://play.google.com/store/apps/deta ... akegps.fre
4)Select it under settings- developer - select mock location app
5) open the app, tap a location in china and start "faking" location
6) get free vpn with chinese servers. I had to try a couple. One that worked was: https://play.google.com/store/apps/deta ... .flyclient (3 x 20mins free daily)
7) connect to Chinese server via vpn. For me this was shanghai.
8) open the Flower care app and connect the new sensor as normal. (i have taken the battery out of the sensor immediately prior to this, in case it somehow "remembered" the previous failed pairing, but i expect this was not necessary)
I also set my timezone to manual and chose a location in china, but have a feeling this was not necessary either.
It should now allow you to connect.
9) return back to normal settings, remove the no-longer-needed apps, and enjoy your now-working sensor!

Hope this helps somebody.
Jo
Nice but not working (anymore

Verstuurd vanaf mijn SM-T813 met Tapatalk
Problem is there are foro july first almost no (free) vpn available in China. With VPN Hongkong 30 and 35 I got still the Mainland error. Has somebody any solution?

Verstuurd vanaf mijn SM-T813 met Tapatalk
User avatar
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

Post by LouiS22 »

Hi, just tested with PureVPN (yes, it's a paid one) and they still have China based server.
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 »

two free VPN hongkong tested... Android to English, fake gps to China, time toChina VPn to hongkong still Mainland Error


LouiS22 wrote:Hi, just tested with PureVPN (yes, it's a paid one) and they still have China based server.
two free VPN hongkong tested... Android to English, fake gps to China, time toChina VPn to hongkong still Mainland Error



Image

Verstuurd vanaf mijn SM-T813 met Tapatalk
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 »

Image Image Image
tonbor wrote:two free VPN hongkong tested... Android to English, fake gps to China, time toChina VPn to hongkong still Mainland Error


LouiS22 wrote:Hi, just tested with PureVPN (yes, it's a paid one) and they still have China based server.
two free VPN hongkong tested... Android to English, fake gps to China, time toChina VPn to hongkong still Mainland Error



Image

Verstuurd vanaf mijn SM-T813 met Tapatalk
Image Image Image Image

Verstuurd vanaf mijn SM-T813 met Tapatalk
User avatar
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

Post by LouiS22 »

Dude, try a China Mainland based server. Hongkong is not China Mainland, Hongkong is a Special Administrative Region of the People's Republic of China, and an autonomous territory in East Asia.

10 USD for 1 month, 7 day money back guarentee: https://www.purevpn.com/pages/order.php But you're still trying with a server guaranteed not working (read the steps again please: China Mainland, not Hongkong).
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 »

Well to keep cost low..... What free VPN has mainland China ?
User avatar
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

Post by LouiS22 »

tonbor wrote:Well to keep cost low..... What free VPN has mainland China ?
Good luck finding that... You've spent 2 days with this task now :) Time is money, yet you still trying to find alternate ways. My two cents: next time order the international version of Flower Care.

Over and out.
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 »

I did dude....
LouiS22 wrote:
tonbor wrote:Well to keep cost low..... What free VPN has mainland China ?
Good luck finding that... You've spent 2 days with this task now :) Time is money, yet you still trying to find alternate ways. My two cents: next time order the international version of Flower Care.

Over and out.
I did dude....
Image

Verstuurd vanaf mijn SM-T813 met Tapatalk
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 »

tonbor wrote:I did dude....
LouiS22 wrote:
tonbor wrote:Well to keep cost low..... What free VPN has mainland China ?
Good luck finding that... You've spent 2 days with this task now :) Time is money, yet you still trying to find alternate ways. My two cents: next time order the international version of Flower Care.

Over and out.
I did dude....
Image

Verstuurd vanaf mijn SM-T813 met Tapatalk
but dx did senda chinese one

Verstuurd vanaf mijn SM-T813 met Tapatalk
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 »

tonbor wrote:
tonbor wrote:I did dude....
LouiS22 wrote:
Good luck finding that... You've spent 2 days with this task now :) Time is money, yet you still trying to find alternate ways. My two cents: next time order the international version of Flower Care.

Over and out.
I did dude....
Image

Verstuurd vanaf mijn SM-T813 met Tapatalk
but dx did senda chinese one

Verstuurd vanaf mijn SM-T813 met Tapatalk
At last I found a free VPN mainland China...... and I manged to get the Chinese version connected. Thank for the support Image

Verstuurd vanaf mijn SM-T813 met Tapatalk
User avatar
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

Post by LouiS22 »

tonbor wrote:
tonbor wrote:
tonbor wrote:I did dude....
I did dude....
Image

Verstuurd vanaf mijn SM-T813 met Tapatalk
but dx did senda chinese one

Verstuurd vanaf mijn SM-T813 met Tapatalk
At last I found a free VPN mainland China...... and I manged to get the Chinese version connected. Thank for the support Image

Verstuurd vanaf mijn SM-T813 met Tapatalk
Great, enjoy it. Maybe you can share the VPN here for the next generation of china mainland suckers :D
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 »

Well I have all three chinese versions running. There are three International versions comming. The biggest trick is the bluetooth connection. A lot of connect error: Transport endpoint is not connected (107) has been solved by removing the bluetooth dongle from the raspberry and use a cable between the dongle and the pi. Now it works all great. Thanx for the wiki and this forum. :D
User avatar
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

Post by LouiS22 »

tonbor wrote: Wednesday 23 August 2017 8:26 Well I have all three chinese versions running. There are three International versions comming. The biggest trick is the bluetooth connection. A lot of connect error: Transport endpoint is not connected (107) has been solved by removing the bluetooth dongle from the raspberry and use a cable between the dongle and the pi. Now it works all great. Thanx for the wiki and this forum. :D
I'm having it on cable, but transport endpoint is not connected still occurs.
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 »

Did set the reading on 15 minutes. Almost no errors.
Attachments
Screenshot_20170823-132436.png
Screenshot_20170823-132436.png (271.64 KiB) Viewed 6395 times
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 »

I extended the wait after reading the first of five sensors to 5 second in the script. Now the reading of the sensors is solid and smooth.
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 »

Screenshot_20170824-110106-1536x1152.jpg
Screenshot_20170824-110106-1536x1152.jpg (234.55 KiB) Viewed 6355 times
5 sensors in 44 seconds
Martins80
Posts: 13
Joined: Saturday 26 August 2017 21:50
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post by Martins80 »

I have configured the rp3 bt and i can run the script from command line and it executes smooth and returns me the values of the sensor. But the dummy sensors y have created within domoticz does not update :x and the idx numbers are right. What am i forgetting?

also, i have added the script execution in a switch and i get this error:
2017-08-26 21:46:26.553 Executing script: /home/pi/domoticz/scripts/python/miflora/domoticz.py
2017-08-26 21:46:26.568 Error: Error executing script command (/home/pi/domoticz/scripts/python/miflora/domoticz.py). returned: 512

so i can not execute it from domoticz....
Martins80
Posts: 13
Joined: Saturday 26 August 2017 21:50
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post by Martins80 »

Martins80 wrote: Saturday 26 August 2017 21:55 I have configured the rp3 bt and i can run the script from command line and it executes smooth and returns me the values of the sensor. But the dummy sensors y have created within domoticz does not update :x and the idx numbers are right. What am i forgetting?

also, i have added the script execution in a switch and i get this error:
2017-08-26 21:46:26.553 Executing script: /home/pi/domoticz/scripts/python/miflora/domoticz.py
2017-08-26 21:46:26.568 Error: Error executing script command (/home/pi/domoticz/scripts/python/miflora/domoticz.py). returned: 512

so i can not execute it from domoticz....
Ok, solved by myself.
The first problem was a mistake with the idx numbers in the script, you have to write the ones in the devices tab, not hardware tab ¬¬

The second is a problem in domoticz, that does not execute properly python3 scripts, so i created a test.sh that executes it as
#!/bin/bash
python3 /home/pi/domoticz/scripts/python/miflora/domoticz.py
exit 0

and it works like a charm.
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 »

So you had a productive Sunday :D
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest