- Email[email protected]
- Phone+962 797 166 177
- Birthday1982-09-25
- LocationAmman, Jordan
Green Thumbs & Smart Homes: DIY Soil Moisture Nodes
G'day! Most of our projects focus on server racks and networking, but today we are bringing the home lab directly into the living room to keep your houseplants alive!
-
Store-bought smart plant monitors can be ridiculously expensive and often rely on annoying cloud apps.
-
We can build a localized, hyper-accurate soil moisture node using an ESP32 and a cheap capacitive soil sensor.
-
By pushing this data into Home Assistant via ESPHome, we can automate a Zigbee lamp to flash red when a plant needs watering!
The Build You will need a Capacitive Soil Moisture Sensor v1.2. Unlike cheap resistive sensors that corrode in the dirt after a few weeks, capacitive sensors measure dielectric changes and last for ages.
Wire the sensor's Analog pin straight into GPIO32 on your ESP32.
The ESPHome YAML We are going to use the adc (Analog to Digital Converter) platform to read the voltage and translate it into a clean percentage.
YAML
esphome:
name: plant-monitor-1
esp32:
board: esp32dev
sensor:
- platform: adc
pin: GPIO32
id: soil_moisture_v
name: "Living Room Ficus Moisture"
update_interval: 60s
filters:
- calibrate_linear:
# Map your voltage readings here!
# Dry air voltage -> 0%
# Submerged in water voltage -> 100%
- 3.14 -> 0.0
- 1.20 -> 100.0
- sliding_window_moving_average:
window_size: 5
send_every: 1
unit_of_measurement: "%"
Once flashed, this node will provide ultra-precise, localized moisture data straight to your dashboard. Tie it into an automation, and you'll never have a dry ficus again!
"If you've got any questions or need a hand wrangling your own setup, don't hesitate to reach out at [email protected] or connect with me via www.yazan.me. I'm always keen to help out!"