A plant watering system using the ESP-8266 D1 Mini microcontroller and ESPHome / Home Assistant for controlling featuring water flow measurement, a water level sensor and a soil moisture sensor
This repository contains the configuration used for programming the D1 Mini using ESPHome as well as well as the corresponding electric plan and the configuration used for Home Assistant integration. As MQTT is used for communication with Home Assistant, you need to set up a MQTT broker of your choice in advance.
- D1 Mini
- 12V (or something else) water pump I used this one
- Flow meter I used this one
- Water proof housing
- 5.0 V and 3.3 V voltage regulator (for example L7805CV and L7833)
- Relais board KY-019 I used this one
- Counter IC CD4040B
- Ultrasonic sensor HC-SR04: I used this one
- Capacitive soil moisture sensor: I used this one
The electric layout is pretty simple for this project. You can find the electric plan in the following image.
An ESPHome installation is required for flashing the D1 Mini. Follow this guide to set things up. In order to integrate the system into your WiFi, you need to rename the file secrets_template.yaml
to secrets.yaml
and fill your passwords in. Afterwards just run esphome plant_watering.yaml run
and you're good to go.
In newer Home-Assistant installations, your plant watering system will be automatically detected. If not, you can use the ESPHome-Integration to integrate it into Home-Assistant