u/Bassel_Fathy

I know this project has been made like 3 billion times before, but it's my first and I'm excited to share and need your feedback 😁

I know this project has been made like 3 billion times before, but it's my first and I'm excited to share and need your feedback 😁

I built a self-hosted soil moisture monitor with automated irrigation on an ESP32

Been working on this for a while and finally got it to a state I'm happy with. It's a fully self-contained smart irrigation system that runs on an ESP32 with no cloud, just a browser on your local network.

Components

  • ESP32 WROOM-32 (4 MB flash)
  • Capacitive soil moisture sensor (analog output on GPIO 34)
  • 5V relay module (GPIO 26)
  • Submersible mini pump
  • 3.7V li-ion battery

What it does

The ESP32 reads the soil moisture every 60 seconds (adjustable), saves the readings to its internal flash storage, and automatically runs the pump when moisture drops below a configurable threshold.

The automation cycle works like this:

  1. Moisture drops below threshold → pump runs for a set duration
  2. Soak period — waits for water to absorb before re-checking
  3. Cooldown — prevents rapid re-cycling
  4. Re-evaluate and repeat if still dry

All timings and thresholds are adjustable live from the dashboard.

The dashboard

Accessible from any browser on the local network. No app needed.

  • Overview tab — live moisture gauge + 48-hour history chart with date/time labels
  • Pump tab — real-time pump status (ON / OFF / SOAKING / COOLDOWN) with progress bars, manual ON/OFF controls, auto mode toggle, and last run timestamp
  • Settings tab — adjust low threshold, run duration, soak time, cooldown, and sample interval — all saved to flash and survive reboots
  • Logs tab — live serial monitor pushed over WebSocket so you can watch the device in real time

The whole UI updates in real time via WebSocket — no polling.

Other features

  • Supports 2 Wi-Fi networks with automatic fallback
  • Over-the-air firmware updates — both via the web UI and Arduino IDE
  • HTTP Basic Auth on all endpoints + token-based WebSocket auth
  • Watchdog timer to recover from hangs
  • Offline buffering — saves readings locally if Wi-Fi drops and flushes them when reconnected

Source code on GitHub: https://github.com/Basselfathy/esp32-soil-monitor-system

github.com
u/Bassel_Fathy — 3 days ago

tested the transformer and the coil after the RJ and they seems have no issues.

but I noticed that this chip ( ECONET EN7556N ) when I touched getting very hot after few seconds from powering up the router even without connecting the landline wire to it, I have tried to search for a datasheet for it but I failed.

any suggestions what can I do in this situation?

u/Bassel_Fathy — 14 days ago