There are tons of soil moisture sensors available, and tons of plans for them available on the internet.
Sadly, most of the ones intended for hobbyist use are actually rather useless.
These things need to sit outside - rain, shine, watering can, and garden hose.
So, tell me why none of the hobbyist models are water proof. Tell me why they have wires.
I compared a lot of commercially available sensors, and looked at a lot of DIY designs, and couldn't convince myself that they were any more than playthings for learning the principles of how such things work - but were not really working tools.
There's comparable equipment for professionals, but the good stuff is too expensive for hobby use - and the low end stuff is as bad as the hobbyist stuff.
After much searching, I found these sensors made by Xiaomi:
That's a waterproof, battery powered, Bluetooth connected sensor for moisture, nutrients, temperature, and light.
The hardware is pretty decent, and the software is fine if all you are doing is monitoring a couple of potted house plants.
The hardware has two things going for it:
- There's compatible hardware sold under different names that are cheaper.
- There are open source projects that provide libraries to read the data from the sensors.
I used a handful of those sensors last summer to track the soil moisture in selected spots in the garden - running around the yard with my Android phone every couple of days to collect the data from the scattered sensors.
From that data I made a few charts, including this one which shows how the soil moisture varies over the course of the day, and that the soil dried out somewhat over a period of a about a month:
I intend to space sensors in a one meter grid across the garden, and make "heat map" style charts of the moisture for every day over the coming spring and summer.
There are several companies that produce compatible hardware.
I have found similar sensors from Xiaomi, VegTrug, Royal Gardineer, and Wanfei.
They are all "four in one" (moisture, fertilizer, temperature, and light) sensors with Bluetooth.
My Royal Gardineer sensors work with the same software that I got with my Xiaomi branded sensors.
Collectively, the sensors are known as "mi flora" sensors.
There's more information about them in the miflira GitHub repository.
If you search a bit, you will find several projects (Python, ESP32, and probably others) that implement the miflora protocol.