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 (https://github.com/home-assistant/operating-system/releases/download/8.5/haos_rpi4-64-8.5.img.xz) or use the IOTstack procedure (https://sensorsiot.github.io/IOTstack/Basic_setup/) 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.
https://downloads.raspberrypi.org/raspios_full_armhf/images/
MY preference is the 64 bit version: https://downloads.raspberrypi.org/raspios_arm64/images/raspios_arm64-2022-09-26/
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: https://linuxhint.com/how-to-clone-a-raspberry-pi-sd-card/
Here's what I used: https://amzn.to/3j3u8gp
To Install NodeRED, just follow the instructions here: https://nodered.org/docs/getting-started/raspberrypi
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: https://github.com/home-assistant/core/issues/76236
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 https://www.ebay.ca/itm/143895474465
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. https://community.home-assistant.io/t/northfifteen-connected-home-plant-monitor-mi-flora-firmware-update-to-work-with-esphome/153198
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. https://github.com/eschava/node-red-contrib-xiaomi-ble/issues/32
To find your bluetooth device:
$ bluetoothctl
[bluetooth]# agent on
Default agent request successful
[bluetooth]# scan on
Discovery...
Read more »
MQTT script is working with 2022 Xiaomi "Flower Care" sensor, not Wanfei 'TY".....
Adding sensor to device list and testing connection ...
Name: "TY"
[2022-12-19 12:16:48] Initial connection to Mi Flora sensor "TY" (DC:23:4D:E4:14:4F) failed due to exception:
Adding sensor to device list and testing connection ...
Name: "Tomato"
Internal name: "Tomato"
Device name: "Flower care"
MAC address: 5C:85:7E:B0:2D:2F
Firmware: 3.3.6
[2022-12-19 12:16:54] Initial connection to Mi Flora sensor "Tomato" (5C:85:7E:B0:2D:2F) successful
[2022-12-19 12:16:54] Announcing Mi Flora devices to MQTT broker for auto-discovery ...
[2022-12-19 12:16:55] Retrieving data from sensor "TY" ...
[2022-12-19 12:18:56] Retrying ...
[2022-12-19 12:20:57] Failed to retrieve data from Mi Flora sensor "TY" (DC:23:4D:E4:14:4F), success rate: 0%
[2022-12-19 12:20:57] Retrieving data from sensor "Tomato" ...
[2022-12-19 12:21:05] Result: {"light": 3131, "temperature": 24.0, "moisture": 31, "conductivity": 691, "battery": 100}
[2022-12-19 12:21:05] Publishing to MQTT topic "miflora/Tomato"
[2022-12-19 12:21:06] Sleeping (300 seconds) ...