Skip to content

infinite-tree/remote-pump

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Remote Pump Controller (ESP32 / C++)

C++ Arduino port of the MicroPython pump controller in old/, built with PlatformIO for ESP32.

Features

  • Web UI with preset durations (30 min – 6 hr) and arbitrary minutes (1–1440)
  • While running: only the STOP button is shown
  • Pump on/off status from hardware sense pin
  • Elapsed and remaining time while running
  • Last run duration and calendar-relative time (today / yesterday / N days ago) via NTP
  • Last-run history persisted in NVS across reboots
  • Cron-friendly HTTP API (scripts/)

Hardware

  • ESP32 (DOIT devkit v1)
  • Pump control: GPIO 18 (active low)
  • Pump status sense: GPIO 4 (low = running)

API

Method Path Body Description
POST /pump-on {"time": 90} Run for N minutes
POST /pump-off Stop pump
GET /pump-status JSON: running, remaining, elapsed, last

Configuration

Copy src/example-config.h to src/config.h and edit your WiFi, static IP, NTP, and timezone settings. config.h is gitignored.

Build and flash

pio run
pio run --target upload
pio run --target uploadfs   # required for web UI in data/
pio device monitor

Cron scripts

Shell scripts in scripts/ call http://olcc-pump/pump-on with {"time": <minutes>}. The 2d/3d variants check /pump-status and only run if the last watering was 2 or 3 days ago.

Legacy Python firmware

Deployed MicroPython version: old/main.py with static files in old/www/. Kept for reference; new deployments should use this C++ tree.

About

esp32 pump controller

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors