I was wondering if I could bury it, I have to say based on the photos I thought the probe was longer.
I have been trying your code and I am getting and incorrect readout of the “Lawn moisture” it just says 64% when fully submerged and voltage is reading around 3.0v-2.995. I am getting a reading of the voltage correctly af far as I can tell. Looking at the calibration code shouldn’t 3.0v be 71%? I would think that should be 100% if 3v is the peak voltage. I’m a beginner so IDK im kinda lost.
I see in the logs it says update every 60 sec but I don’t see anything that relates to that in your code?? What am I missing? Id like to update at least every 10 sec. I changed the voltage update interval, just not sure about moisture.
UPDATE
Now lawn moisture is showing 72% so I guess that is equal to the 3.0v in the calibration settings. Except how do I get lawn moisture to read the correct 100% seems your code calibrates it to a max of 72% if I am understanding it. Do I need to change the calibration?
If you don’t want the voltage you can skip the template sensor and apply the filters and unit directly to the ADC sensor.
There are two things that affect the update rate, the ADC update interval (10s) and the sliding window moving average (12 samples) so 12 x 10s = 2 minutes. Feel free to adjust either or both as you see fit. Though honestly even that is faster than needed. Soil moisture does not change that quickly unless you get a sudden tropical storm after weeks of dry.
In Home Assistant I convert this to soil saturation (soil can not hold 100% water like your glass because it is partly dirt).
This too could be implemented in ESPHome. However I chose to do it in home assistant as it is easier to change (though again that could be done with an input_number brought into ESPHome as a sensor).
Note the number “63” was found by experimentation. It is the maximum reading I ever saw of sensor.lawn_moisture after very heavy soaking rain. I had to update it a few times as the soil settled around the sensor. This value is highly dependant on soil type and compaction and you will have to change it depending on your soil. You could get a good start by soaking the sensor installed in the lawn with a hose.
There are videos on the probe website about the moisture holding capacity of soils vs absolute % moisture.
This sensor will read 100% (or very near to it) when the soil holds as much water as it can.
Ah ok thanks I’ll check that out with the templet. I am using the sensors to turn on/ off water to my potted plants and some of them are small so an extra minute in the update might mean water is draining out.
How did you figure you the percentage with the voltage calibration?
That “63” setting is basically the max water holding capability of the soil…for me I plant in mostly potting soil(at least the ones I want to use the moisture sensor for), so I guess I can drench a test pot filled with potting soil and see what the value is.
I do want to add that templet into ESPhome so I guess I’ll look into the input_number.
Thanks again
Also what do you think of these, I might test them out if I could figure out the wiring. It says it’s water proof and at only $15 each is a lot cheaper if I adds up as I want to use a bunch. I’d think programming should be similar, not sure if there is much difference between the capacitive boards or not.
Does anyone have experience using this Tuya-based soil moisture sensor? It uses three probes, so not sure if it’s capacitive or resistive measurement. Currently $27 after checkbox coupon.
They’re awful… horribly inaccurate and ones with older firmware can drain the batteries in a day. They also can’t be updated over the air, so if you get a bad firmware version you might as well just chuck it in the bin.
@dgaust Thank you for helping me dodge that bullet. I’ve purchased so many disappointing zigbee devices lately. I’m reluctant to buy another without some real user feedback. The large number of obviously fake Amazon reviews in this segment is daunting.
Perhaps, do you have an opinion on this Bluetooth version? It’s been around forever, and it has an integration available. But similar looking devices are offered by dozens of vendors, so who knows if any work as promised. Some call in Mi Flora, but goes by many other names.
If they have two or more sensor legs, then they are almost for certain resistive sensors.
Resistive sensors will decay and pollute the soil.
A capacitativ sensor will not, because it requires no direct contact with the soil.
A resistiv sensor might offer extra values, like nutrition value and acidity, but those are varying depending on the moisture in the soil, so they are extremely imprecise due to the fluctuations. In other words not worth looking at.
If distance/reach is an issue, one may consider a LoRa based Soil Sensor.
There is a community using these. I have only recently been trying these out, so can not yet attest to how well they can hold up to weather, water, etc. but they have been sprayed with a waterproof coating, which I believe is the manufacturer’s own special sauce.
Question (if youre still around) - my computer recognizes it on ESPhome web, but everytime I try to flash it with ESPhome I get the error:
Failed to initialize. Try resetting your device or holding the BOOT button while selecting your serial port until it starts preparing the installation.
I tried to put it in Download mode (not sure how to tell if Im doing it correctly) but no luck. For Download mode I follow these steps:
Press and hold IO0 Plug USB cable. Wait seconds for boot Release IO0
And for further context, I have the battery unplugged and removed the board from the case so the USB cable is secured into the port. Also made sure Im using a data cable and can see it as a USB serial device.
And for further context, I have the battery unplugged and removed the board from the case so the USB cable is secured into the port. Also made sure Im using a data cable and can see it as a USB serial device.
EDIT: Okay turns out ESPHome web doesnt work well with this board so I’m going to use Adafruit ESPTool to flash a bin. I will try to use ESPHome manual download to create the BIN file.
Any good projects for ESPHome I can reference for this sensor?
I used ESP flasher when I flashed mine, but it was ages ago, before the ESPHome web flasher became available.
I will see what is possible when I get back home next weekend.