I wanted a small, portable watering controller that was more flexible than a simple timer. The goal was to make something that could run by itself, but also report status over MQTT for dashboards, Home Assistant, Node-RED, or a phone MQTT panel.
The controller is designed around an ESP32 and a small pump/relay setup. It includes two daily schedules, manual pump controls, tank tracking, and a simple web interface.
- Morning and evening watering schedules
- Manual pump ON/OFF
- “Run now” buttons for scheduled watering cycles
- Tank reset
- Pump safety timeout
- Low tank protection
- Web-based setup and control page
- MQTT status publishing
- MQTT command topics
- Soft clock with NTP update
- WiFi setup portal on first boot
- Browser-based firmware installer
On first boot, the ESP32 starts a WiFi setup portal if no saved WiFi connection is available. Once connected to the network, the web interface becomes available from a browser.
The controller keeps track of the current time for schedule operation. When WiFi is available, it updates from NTP. It also keeps enough stored time information to continue operating more sensibly after a restart.
The pump is controlled through a relay output. The firmware always starts with the pump OFF, uses a safety timeout for manual operation, and can refuse a run if the tank level is too low.
Web interfaceThe local web page shows:
The firmware also exposes JSON status endpoints, which makes it easy to integrate with other dashboards.
MQTTThe controller publishes status values to MQTT so it can be monitored by Home Assistant, Node-RED, or a simple MQTT phone dashboard.
Example topics:
- `watering/<device>/state/online`
- `watering/<device>/state/ip`
- `watering/<device>/state/pump_on`
- `watering/<device>/state/tank_ml`
- `watering/<device>/state/voltage_v`
- `watering/<device>/state/time_valid`
- `watering/<device>/event`
Example command topics:
- `watering/<device>/cmd/pump`
- `watering/<device>/cmd/run_now`
- `watering/<device>/cmd/reboot`
The release firmware is available as a combined ESP32 image and can be installed from a browser.
Installer page:
A Full image is available to flash here
Source code:
https://github.com/codenquilts/Portable-Watering-Controller
## First boot
After flashing:
1. Restart the ESP32.
2. Connect to the setup WiFi portal.
3. Open `http://192.168.4.1`.
4. Enter WiFi details.
5. Open the controller UI from the assigned IP address or local hostname.
Mechanical InstallationThe actual mechanics of this project is going to vary a lot depending on how it is to be used. For a general guide the prototype is based around a 60ltr Wheelie Bin. Hopefully these images will be help full as a general guide.
This is a hobby/project controller, not a certified irrigation controller. Use suitable waterproofing, fusing, cable strain relief, and power supply protection. Keep mains voltage away from the controller unless the enclosure and wiring are designed for it.








Comments