Raspberry Pi: Flower Care (aka MI Flower) sensor

Environment
  • Raspberry Pi 3 Model B
Flower Care sensor

See http://www.huahuacaocao.com/product.

Looks and feels very nice:

Be aware that there are two versions of the sensor – Chinese and  international. I saw complains on internet about chinese sensor that were bricked after software upgrade when used outside of China. It is not quite clear what exactly was bricked – mobile phone app or the sensor itself.

FIGURE out the flower care MAC Address
### Check if bluetooth service running
$ service bluetooth status
● bluetooth.service - Bluetooth service
Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled)
Active: active (running) since Sun 2019-04-07 08:16:38 UTC; 5 days ago
Docs: man:bluetoothd(8)
Main PID: 1068 (bluetoothd)
Status: "Running"
CGroup: /system.slice/bluetooth.service
└─1068 /usr/lib/bluetooth/bluetoothd

### Start the service if it's not running
$ service bluetooth start

### Start bluetoothctl
$ bluetoothctl 
[NEW] Controller B8:27:EB:8A:A0:E6 raspberrypi [default]
[bluetooth]# scan on
Discovery started
[CHG] Controller B8:27:EB:xx:xx:xx Discovering: yes
[NEW] Device C4:7C:8D:xx:xx:xx0 Flower care

Python demo on Raspbery Pi

Details see on GitHub.

$ git clone https://github.com/open-homeautomation/miflora.git
$ cd miflora/
$ . ./build.sh 
$ python3 setup.py build
$ sudo python3 setup.py install
$ python3 demo.py C4:7C:8D:xx:xx:xx
Getting data from Mi Flora
FW: 2.7.0
Name: Flower care
Temperature: 18.3
Moisture: 27
Light: 105
Conductivity: 59
Battery: 100

Leave a Reply

Your email address will not be published. Required fields are marked *