Back to Smartcitizen.me

End-to-End LoRaWAN Smart Irrigation System

Hello everyone, this is my first time posting on the forum!

I am an engineering student and I will be submitting my Bachelor’s Thesis in just one month (Telecommunications and Telematics Engineering at the Universitat Politècnica de Catalunya - UPC EETAC). I wanted to share my project with this community: a fully autonomous, data-driven LoRaWAN irrigation system. Since Smart Citizen is such a great reference for open environmental monitoring, I thought this architecture might interest some of you.

The project consists of a complete hardware and software pipeline:

  • Edge Sensors: An Arduino MKR WAN 1310 gathering soil moisture, wind, rain, ambient temperature, ambient humidity and atmospheric pressure.
  • Edge Actuator: An ESP32 controlling a motorized ball valve.
  • Backend & Routing: Uplinks are routed through TTN via OTAA, captured by a local Mosquitto MQTT broker, and processed by a custom Node.js state machine that triggers downlink watering orders based on soil moisture deficits.
  • Observability: All time-series data is persisted in InfluxDB 3 and visualized in real-time through Grafana.

I have published the entire C++ firmware, Node.js backend, and the Grafana Dashboard (JSON export) on GitHub so anyone can dive into the details:

Since I am finalizing the project for my final defense next month and it is still a work in progress, I would love to hear your thoughts. I will upload the full academic thesis document once it is finished. If anyone has any recommendations, tips for improvement, or feedback on the architecture, I would greatly appreciate it!