How nagatarafi/iot-power-monitoring-lorawan works
This repository implements an ESP32-based, three-phase electrical monitoring system. Its principal workflow reads PZEM measurements, encodes them for LoRaWAN OTAA, and sends them through a gateway to a backend for storage, dashboards, and notifications. The README documents the wider gateway and backend architecture; their implementation is not present in the sampled source, so those components are shown as documented external services. The firmware path is supported by the tree, but its sketch source was not sampled.
Main entry points: power_monitoring_3phase_lora__5_.ino ESP32 monitoring node · lmic_project_config.h LMIC radio config
Components 15
Sensor firmware
- ESP32 monitoring node
power_monitoring_3phase_lora__5_/power_monitoring_3phase_lora__5_.ino - LMIC radio config
lmic_project_config.h - Payload encoding
power_monitoring_3phase_lora__5_/power_monitoring_3phase_lora__5_.ino - LMIC OTAA
power_monitoring_3phase_lora__5_/power_monitoring_3phase_lora__5_.ino
LoRaWAN transport
- WM1302 gateway
- ChirpStack
- Mosquitto MQTT
Data processing
- Node-RED processing
- InfluxDB
Monitoring outputs
- Apps Script integration
- Google Sheets
- Grafana dashboards
- Web dashboard
- Telegram bot
Other components
- PZEM sensors
Connections 14
- PZEM sensors → ESP32 monitoring node: provides readings
- ESP32 monitoring node → Payload encoding: encodes measurements
- ESP32 monitoring node → LMIC OTAA: queues uplink
- LMIC radio config → LMIC OTAA: configures radio
- LMIC OTAA → WM1302 gateway: sends LoRaWAN
- WM1302 gateway → ChirpStack: forwards packets
- ChirpStack → Mosquitto MQTT: publishes events
- Mosquitto MQTT → Node-RED processing: dispatches events
- Node-RED processing → InfluxDB: writes measurements
- InfluxDB → Grafana dashboards: serves queries
- Grafana dashboards → Web dashboard: renders dashboards
- Mosquitto MQTT → Apps Script integration: dispatches events
- Apps Script integration → Google Sheets: writes rows
- Mosquitto MQTT → Telegram bot: dispatches alerts