Basically, this is an "Automated Watering how-to Guide for Dummies" - as simple as technically possible. 

You still require some basic command line expertise, but the steps have been proven and I provide links to the gear I used AND the Node Red code, making this EASIER than anything else I've seen online.

I'm leaving in the problems I encountered in this project because you may encounter similar issues. 

DO NOT use the Home Automation HAOS images ( or use the IOTstack procedure ( to install NodeRED on the Rhaspberry Pi as these BOTH lack python3-rpi.gpio library needed for node-red-node-pi-gpio to function in NodeRED.

Here are my Pi Install instructions that have a WORKING gpio. 

[START HERE] Use bullseye to get a working GPIO.

MY preference is the 64 bit version:

IMPORTANT: Use balenaEtcher to image 2022-09-22-raspios-bullseye-armhf-full.img

UPDATE TIP: Don't use a micro SD card, they are too slow and burn out with multiple writing. I used a fast USB thumb drive for a while, but realized a SSD is best for speed. Refer to this:

Here's what I used:

To Install NodeRED, just follow the instructions here:

Now install Bluetooth stuff you will need:

sudo apt install bluetooth pi-bluetooth bluez blueman bluez-hcidump

sudo apt-get install python3-pip libglib2.0-dev

sudo pip3 install bluepy

Status: Pump control is working. My NodeRED code for pump control is linked in the files.

There is a dependency with my Node RED pump flow in that the Pump ON/OFF 'switch' uses node-red-contrib-ui_j to be installed in Node RED. Pump is wired to the NO1 ans COM1 connectors on the relay HAT. See photo above. 

I started with a Wanfei BLE moisture sensor. It is detectable by Rhaspberry Pi4, but I had issues reading values and parsing info.

The firmware is old on my Wanfei BLE moisture sensor and it doesn't communicate with the Xiaomi BLE Node, as old Mi Flora devices need a firmware update to work with Xiaomi BLE: 

I can see the Wanfei BLE monitor is indeed sending data, but it is not being read/parsed by the Xiaomi BLE Node in NodeRED. BUY the right Xiaomi BLE plant monitor sensor! I found one here

I've ordered a 2022 Xiaomi Mi Bluetooth Monitor Flower Plants Care Smart Tester Flora Sensor. If the "Flower Care" app on iOS cannot detect your Wanfei BLE moisture sensor, it's because the firmware is too old on it and needs updating. Flower Care does not bind or detect with firmware v 2.7.0 on your moisture sensor.

If the 'Flower Care" app could detect the Wanfei Moisture sensor, it could update it's firmware, but sadly it cannnot detect it. 

[UPDATE Dec 19, 2022]:  2022 Xiaomi Mi Bluetooth Monitor arrived. It can connect to the "Flower Care" app. 

Was hoping I could use a simple flow like this to read the data from my "Flower care" but the Xiaomi node isn't working. Others are having issues too, it may be due to Xiaomi is sending encrypted data or the MiFlora isn't fully supported.

To find your bluetooth device:

$ bluetoothctl

[bluetooth]# agent  on

Default agent request successful

[bluetooth]# scan on

... Read more »