Outdoor soil moisture sensor

Jan,

  1. Thanks for the ESPhome analog config. That is very helpful and useful!!

  2. How are those AliExpress capacitive sensors doing 6months later? Are they corroded? The AliExpress website says “Capacitive Soil Moisture Sensor Corrosion Resistant”

  3. Would you buy them again?

Thx!
VoltVisionFrenchy

  1. You are welcome, it is a little bit outdated already. Nowadays we have the moisture device class and I also expose the raw voltage value for debugging purposes. See the updated code below.
  2. I did not pull the sensors out of the soil for some time (moving the sensors can wildly change the measurements), but they still work fine and looked ok the last time I had one out of the soil. I also did not observe any big shift in the measured values over time.
  3. Depends on the use case. It is a little bit inconvenient to run cables to your planters, but if you have them in one place, it is quite cheap and you do not have to replace any batteries. I do not regret buying them and would buy them again for the right use case.
substitutions:
  sampling_period: 5s
  samples: '60'
  decimals: '1'

sensor:
  - platform: adc
    pin: GPIO33
    name: "Soil Surface Moisture Voltage"
    id: soil_surface_moisture_voltage
    update_interval: ${sampling_period}
    state_class: measurement
    accuracy_decimals: 3
    attenuation: auto
    filters:
    - sliding_window_moving_average:
        window_size: ${samples}
        send_every: ${samples}
        send_first_at: ${samples}
  - platform: template
    name: "Soil Surface Moisture"
    unit_of_measurement: "%"
    device_class: moisture
    state_class: measurement
    accuracy_decimals: ${decimals}
    icon: mdi:water-percent
    lambda: |-
      return id(soil_surface_moisture_voltage).state;
    filters:
    - calibrate_linear:
        - 2.48 -> 0.00
        - 0.95 -> 100.00
    - lambda: |
        if (x < 0) return 0; 
        else if (x > 100) return 100;
        else return (x);

Are there any issues with the response time, I read(Amazon) that the eccobee sensors have a 70 second response time. That long of a response time could be and issue if watering thing like smaller pots(something I want to do)

Lora is good for lower power and longer distance

1 Like

Hi @hubikj,

Do you still use these? I’m looking for an affordable outdoor soil moisture sensor, and your solution looks interesting!

Is the sensor connected to the ESP32 directly, without any additional resistors or something like that?

(By the way, is ‘v2.0’ really a thing? I mostly find ‘v1.2’ when searching online. Which makes me wonder ‘v2.0’ is just a marketing trick? :stuck_out_tongue:)

I still used them and it works great. I do not have the wiring diagrams of my devices on hand, but I think the connection was straightforward. I am not sure about the versions, but I do remember an article pointing out some design flaws in the early versions, so I would rather buy the v2 just to be sure.

FWIW i have a number of miflora sensors scattered throughout garden beds.
At first they were very flakey, using esphome and an esp32 board to bring them into HA. They just wouldnt stay connected.

On a whim, i swapped to an esp32poe, and its been light and day difference. A couple of them are 20m away from the esp32 and still connect. The esp32 wifi board woudlnt connect if more than 5m or so away,