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