This project consists of two ESP32-based nodes communicating via LoRa.
The client node reads temperature and humidity from a sensor, sends it every 5 seconds to the server node, and listens for commands (relay_on, relay_off).
The server node connects to WiFi & Blynk, forwards data to Blynk, and relays control commands back to the client node.
β Client node:
- Reads temperature & humidity
- Sends data over LoRa every 5 seconds
- Receives relay control commands (
relay_on,relay_off) over LoRa
β Server node:
- Connects to WiFi & Blynk cloud
- Receives data from client over LoRa
- Sends data to Blynk every 15 minutes
- Receives commands from Blynk and forwards them to client over LoRa
- 2 Γ ESP32 Dev Boards
- 2 Γ LoRa SX1278 modules
- 1 Γ DHT11 or similar temperature & humidity sensor
- 1 Γ Relay module
- Jumper wires, breadboard or PCB
.
βββ lora_client/lora_client.ino # LoRa client (sensor) code
βββ lora_server/lora_server.ino # LoRa server (WiFi & Blynk) code
βββ lora_server/secret.h # WiFi & Blynk credentials (not tracked in git)
βββ .gitignore # ignores secret.h and build artifacts
βββ README.md # this file
βββ LICENSE # license fileCreate a secret.h file in the lora server project folder (excluded from git) with:
#define BLYNK_TEMPLATE_ID "YourTemplateId"
#define BLYNK_TEMPLATE_NAME "YourBlynkTemplateName"
#define BLYNK_AUTH_TOKEN "YourBlynkToken"
#define WIFI_SSID "YourWifiSSID"
#define WIFI_PASSWORD "YourWifiPassword"On the client node:
Flash client.ino to ESP32 #1.
Connect LoRa module & sensor.
Power it on.
On the server node:
Flash server.ino to ESP32 #2.
Connect LoRa module.
Make sure secret.h is configured with your WiFi & Blynk credentials.
Power it on.
On Blynk:
Create a new project.
Add widgets for temperature, humidity, and buttons to control relay.
Use the auth token in secret.h.
π License MIT License Β© uugan


