0x53A

I have a balcony and wanted to go on vacation. Many people before me have built automatic sprinkler systems, this one is mine.


Spec:

I have a ~1 meter by ~4 meter wide balcony with one bigger tomato plant, a few chilis and other assorted small stuff. Between spring and fall I can put a power cable through the window; for winter, I'll have to think of something else, but I'll need to put most of my plants indoors anyway.

Hardware:

TODO

Software:

Since I wanted to integrate the whole thing into Home Assistant anyway, I used ESPHome instead of a custom firmware:
esphome:
  name: esphome-web-140d54
  friendly_name: Sprinkler
  min_version: 2025.5.0
  name_add_mac_suffix: false

esp32:
  board: esp32-s3-devkitc-1
  framework:
    type: esp-idf

# Enable logging
logger:

# Enable Home Assistant API
api:

# Allow Over-The-Air updates
ota:
- platform: esphome

wifi:
  networks:
  - ssid: "SSID"
    password: "PASSWORD"

button:
  - platform: template
    name: "Button Pump 1"
    on_press:
      - output.turn_on: pump_1
      - delay: 20s
      - output.turn_off: pump_1

  - platform: template
    name: "Button Pump 2"
    on_press:
      - output.turn_on: pump_2
      - delay: 20s
      - output.turn_off: pump_2

output:
  - platform: gpio
    pin: GPIO4
    id: pump_1

  - platform: gpio
    pin: GPIO5
    id: pump_2
        

One thing that was important to me, was that the timer, and disabling the pump, is handled on the MCU itself, and not by homeassistant. Otherwise, if Home Assistant crashed or lost connection after enabling the pumps but before disabling them again, they might run "forever" and flood my neighbors.