Safe Sprinkler
Master/slave irrigation system (ESP-NOW + LoRaWAN)
Loading...
Searching...
No Matches
Safe Sprinkler – API Documentation

IoT monitoring and control system for an irrigation network: tamper detection, soil moisture, battery monitoring, and automated irrigation. Slaves talk to the master via ESP-NOW; the master sends alerts and status to the cloud via LoRaWAN (The Things Network → Supabase).


Quick links to the code docs

What Link
All functions (with brief descriptions) Function index
All header files (by module) File list
Data structures (structs, enums) Data structures

Use the sidebar or the Files / Data structures tabs to open a header and see its functions and parameters.


High-level architecture

  • Slave nodes (ESP32)
    Measure soil moisture and battery, detect tampering (current loop), deep sleep between cycles. Send registration, measurements, and alarms to the master over ESP-NOW.
  • Master (ESP32 + SX1276)
    Receives ESP-NOW from slaves, keeps a registry, runs a watchdog (missing node / drought). Sends registration, periodic status, and alarms to TTN via LoRaWAN. Can drive irrigation from moisture thresholds.
  • Backend
    TTN decodes LoRa payloads and forwards to a Supabase Edge Function; data is stored for dashboards and alerts.

For full project goals, requirements, diagrams, and state charts, see the repository README.