Wi-fi Soil Moisture Sensor with ESPHome
Description
A quick and easy solution to monitoring plant soil moisture. Integrates into Home Assistant with ESPHome. Board: Seeed Xiao ESP32-C3, I use a capacitive moisture sensor and 1200mAh battery available on Amazon. YAML (pay attention to the greater than/less than notes below): esphome: name: wifi-moisture-sensor friendly_name: WiFi Moisture Sensor on_boot: then: - switch.turn_on: sensor_power on_shutdown: then: - switch.turn_off: sensor_power esp32: board: esp32-c3-devkitm-1 framework: type: arduino # Enable logging logger: # Enable Home Assistant API api: encryption: key: "your_key" ota: password: "your_pwd" wifi: ssid: !secret wifi_ssid password: !secret wifi_password fast_connect: on power_save_mode: LIGHT manual_ip: static_ip: your.ip gateway: your.gateway subnet: your.subnet dns1: your.dns # Enable fallback hotspot (captive portal) in case wifi connection fails ap: ssid: "your_fallback" password: "fallback_pwd" captive_portal: sensor: - platform: adc pin: 3 name: "Soil Moisture" unit_of_measurement: "%" device_class: MOISTURE update_interval: 2s attenuation: 11db #required filters: - calibrate_linear: #set your own values here - 1.45 -> 100.00 #replace ">" with greater than symbol (YT doesn't allow angled brackets) - 2.821 -> 0.00 - lambda: | if (x < 0) return 0; #replace "<" with less than symbol (YT doesn't allow angled brackets) else if (x > 100) return 100; else return (x); accuracy_decimals: 0 - platform: adc pin: 4 allow_other_uses: True name: "Battery Life" unit_of_measurement: "%" device_class: BATTERY update_interval: 2s attenuation: 11db #required filters: - multiply: 2.0 - calibrate_polynomial: #set your own values here degree: 4 datapoints: # Map 0.0 (from sensor) to 0.0 (true value) - 3.4 -> 0.0 - 3.6 -> 8.43 - 3.81 -> 50.06 - 3.86 -> 57.63 - 3.92 -> 72.56 - 3.96 -> 90.96 - 4.05 -> 100 - lambda: | if (x < 0) return 0; else if (x > 100) return 100; else return (x); - platform: adc pin: 4 allow_other_uses: True name: "Battery Voltage" update_interval: 2s attenuation: 11db #required filters: - multiply: 2.0 - platform: wifi_signal name: "WiFi Signal Sensor" update_interval: 2s switch: - platform: gpio pin: GPIO10 id: sensor_power internal: true deep_sleep: run_duration: 10s sleep_duration: '5:59:50' === Timestamps === 0:00 Introduction 0:44 Commercial Products... Fail 1:10 DIY Solution 3:54 YAML Configuration Overview 7:25 Conclusion
Why it’s here
- Search: “soil moisture sensor sensors and automation”
Model note: ESPHome soil sensor build
5:56Emoncms version 11 update overviewOpenEnergyMonitor3.1K views
26:21NorCal veteran coder customizes off-grid home with sensorsKirsten Dirksen528K views
14:39ESP32-Cam on your water meter with "AI-on-the-edge" -- also for gas and power metersMakerMeik286K views
3:35Automatic Irrigation System Using Soil Moisture SensingECE SNSCE1.3K views
10:59#207 Why most Arduino Soil Moisture Sensors suck (incl. solution)Andreas Spiess483K views
12:07Automating a Greenhouse with LoRa! (Part 1) || Sensors (Temperature, Humidity, Soil Moisture)GreatScott!733K views
4:18Arduino Mega Introduction to Diversion Load ControllerDavidPoz9.5K views
7:17Ultimate Soil Moisture Sensor for Home Assistant SOILSENS-V5WPricelessToolkit72K views
16:51Long-Term Soil Monitoring InstallationModest Maker2.3K views
10:34This Zigbee Sensor Finally Stopped Me Killing My PlantsByte of Geek9.6K views
10:057. IoT🌐 Based Agriculture🍃Monitoring💻 System Using Arduino & Node MCU | WiFi📶 | 2025Elexys Best Project310K views
8:01IoT Based Soil Nutrient Monitoring & Analysis System | Soil NPK + Moisture + TemperatureHow To Electronics116K views
11:42Testing the Budget HAOZEE Zigbee Soil Moisture Sensor with Home AssistantSmart Home UK6.5K views
11:43Chapter 16 : Soil Moisture MonitoringMechatron Robotics57 views