ESPyRain – Local ESP32 Sprinkler Controller with Home Assistant and Autonomous Scheduling

Hi everyone,

I’m pleased to release ESPyRain Controller 2.8.0, an open-source ESP32-based sprinkler controller built with ESPHome and Home Assistant.

GitHub repository:

What is ESPyRain?

ESPyRain is designed to provide the convenience and visibility of Home Assistant while keeping the actual irrigation controller autonomous.

Schedules, station settings and queue execution are stored and managed directly on the ESP32. Once configured, scheduled watering can continue even when Home Assistant or Wi-Fi is temporarily unavailable.

The system is fully configurable through the Home Assistant dashboard. After the initial installation, everyday changes such as station runtimes, GPIO assignments, schedule times and watering days do not require editing YAML, restarting Home Assistant or reflashing the ESP32.

Main features

  • Up to 16 stations or irrigation zones
  • Up to 8 independently configurable schedules
  • Autonomous scheduled operation on the ESP32
  • Queue-based execution for overlapping schedules
  • Manual and scheduled runs
  • Start, stop, pause, resume and next-station controls
  • Individual station runtimes
  • Configurable GPIO assignments
  • Station enable/disable controls
  • Coupled stations that can operate together
  • Bore pump or master-valve support
  • Configurable pump/master-valve timing
  • Seasonal runtime adjustment from 50% to 150%
  • Daily, selected-day, weekday, weekend, odd/even and interval schedules
  • Soak cycles with configurable rest periods
  • Rain delay
  • Manual and automatic winter mode
  • Automatic pause-resume timer
  • Home Assistant notifications
  • Seven-day watering forecast and upcoming-run information
  • Optional soil-moisture-based schedule skipping
  • Controller status, queue progress and diagnostic information

Optional soil moisture integration

ESPyRain can use one or more soil moisture sensors already available in Home Assistant.

Available sensor values are averaged, while unavailable sensors are ignored. When the calculated moisture level is above the configured threshold, automatic scheduled watering is skipped.

This feature:

  • is completely optional
  • works with one or multiple sensors
  • does not block manual watering
  • does not interrupt watering already in progress
  • can be enabled or disabled from the dashboard
  • has an adjustable moisture threshold

Dashboards

Two Home Assistant dashboards are included:

  • A simple dashboard using standard Home Assistant cards
  • A more complete dashboard with richer controls, graphics and status information

The simple dashboard provides an easier installation path without requiring HACS custom cards. The full dashboard includes additional presentation and control features.


Full dashboard - Schedules


Simple dashboard

Why I built it

I wanted a sprinkler controller that was:

  • local and independent of cloud services
  • able to keep watering if Home Assistant was temporarily unavailable
  • easy to configure without repeatedly editing and compiling ESPHome YAML
  • flexible enough for larger installations
  • understandable and modifiable by Home Assistant users

ESPyRain uses Home Assistant as the configuration and visibility layer, while the ESP32 remains responsible for actually running the irrigation system.

Requirements

  • Home Assistant
  • ESPHome Device Builder
  • An ESP32 board
  • Suitable relay or output hardware for your valves
  • Basic familiarity with Home Assistant, ESPHome and safe irrigation wiring

The repository includes a detailed installation checklist covering the updated ESPHome Device Builder workflow, Home Assistant packages, dashboards and first-time controller configuration.

Project status

Version 2.8.0 is the first public release. It has been developed and tested on a working irrigation installation, but hardware arrangements vary considerably.

Please test GPIO assignments, relay behaviour, valve operation and pump/master-valve timing carefully before relying on the controller unattended.

Feedback, bug reports, installation experiences and contributions are very welcome.

GitHub:

Some ESPyRain screenshots


Sprinkler day selection

Very nice!
Have a question about scheduler. The municipality I live in puts restrictions on which days of the week that the irrigation system can run. They essentially have a schedule Monday..Sunday with Monday=0, Tue=1,…,Sun=6. If you live on an street with an odd address you water on odd days (1,3,5), and if you live on a street with an even address you water on even days (2,4,6) (so no one can water on Mon=0). Does this match with any of the “Selected Days” in the scheduler you show in the screenshot above?

It is very flexible, you can use any of the pre-made selections like weekdays, odd, even… or use “Selected Days” and you can select exactly the days you are allowed to run your sprinklers.