Skip to content

Yunachz/LoRaSentinel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🛰️ LoRaSentinel — Long-Range Climate Monitoring over LoRa

Monitor temperature & humidity from up to 3 remote locations over LoRa 433 MHz with Reed-Solomon error correction, visualized on a real-time web dashboard.

Python FastAPI ESP32 License

How it works

Each sensor node reads a DHT22 and transmits over LoRa in its own time slot. The ESP32 gateway receives every packet, corrects errors with Reed-Solomon FEC, and forwards clean JSON to a FastAPI server over UDP. The server validates the data and serves it through a live dashboard.

Node 1 ─┐  LoRa 433MHz     ┌──────────┐   WiFi/UDP    ┌─────────────┐
Node 2 ─┼───────────────▶  │  Gateway │──────────────▶│  FastAPI    │──▶ 🌐 Dashboard
Node 3 ─┘                  │ (RS-FEC) │               │  server.py  │
                            └──────────┘               └─────────────┘

Screenshots

Wiring Hardware build Dashboard
Wiring diagram Gateway hardware Web dashboard

Repository Structure

lora-sentinel/
├── firmware/
│   ├── gateway/gateway_esp32.ino   # LoRa RX → RS decode → UDP forward
│   └── node/node_sensor.ino        # DHT22 read → RS encode → LoRa TX
├── server
│   └──server.py                    # FastAPI server + dashboard
├── docs/                           # Wiring & hardware photos
├── requirements.txt
├── README.md
├── .gitignore
└── LICENSE

Hardware

  • ESP32 dev board ×4 (1 gateway + up to 3 nodes)
  • LoRa module 433 MHz (e.g. RA-02 / SX1278) ×4
  • DHT22 sensor, 1 per node (data pin → GPIO 4)
  • LoRa wiring: SCK→18, MISO→19, MOSI→23, NSS→5, RST→14, DIO0→26 (see docs/wiring-diagram-gateway.png)

Getting Started

1. Flash the firmware

Install Arduino libraries: LoRa (Sandeep Mistry), DHT sensor library + Adafruit Unified Sensor, RS-FEC.

  • Nodes (firmware/node/node_sensor.ino): set a unique NODE_ID (1–3) per board, then upload.
  • Gateway (firmware/gateway/gateway_esp32.ino): set your WiFi credentials and the server's IP, then upload.

LoRa & Reed-Solomon parameters must be identical across the gateway and all nodes.

2. Run the server

python -m venv .venv
.venv\Scripts\Activate.ps1
pip install -r requirements.txt
python server/server.py

Open http://localhost:8000 for the dashboard. UDP data is received on port 5005.

📄 License

See the LICENSE file for details.

🙋 Contributors

About

Monitor temperature & humidity from up to 3 remote locations over LoRa 433 MHz with Reed-Solomon error correction, visualized on a real-time web dashboard.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages