Monitor your farm. From far. Farm on!
LoRaWAN-based farm monitoring with long-range sensors and local data processing.
┌─────────────────┐ LoRaWAN ┌─────────────────┐
│ Heltec Sensors │ ──────────────────►│ SX1302 Gateway │
└─────────────────┘ └────────┬────────┘
│
┌────────▼────────┐
│ Raspberry Pi │
│ ┌───────────┐ │
│ │ ChirpStack│ │ LoRaWAN Server
│ │ Node-RED │ │ Data Pipeline
│ │ PostgreSQL│ │ Storage
│ └───────────┘ │
└────────┬────────┘
│ Tailscale
┌────────▼────────┐
│ Remote Access │
└─────────────────┘
→ docs/ARCHITECTURE.md — data flow, scheduler. docs/FIRMWARE_ARCHITECTURE.md — firmware layers (lib, integrations, devices).
Install the Raspberry Pi infrastructure and gateway hardware.
# On a fresh Raspberry Pi
curl -sSL https://github.com/kisinga/farmon/raw/main/pi/setup_farm_pi.sh | bash
# Then install the SX1302 HAT
sudo bash ~/farm/pi/setup_gateway.sh→ Full details: pi/README.md
Verify: Open ChirpStack at http://<pi-ip>:8080 — gateway should appear under Gateways.
Create the device profile and application (one-time setup). → Full details: pi/README.md#registering-devices
For each Heltec device:
- Get DevEUI: Flash firmware, check serial output for
DevEUI: XX:XX:... - Register in ChirpStack: Applications → farm-sensors → Add device → paste DevEUI
- Get AppKey: Device → OTAA keys → Generate → copy the hex string
- Configure & Flash:
cd heltec cp secrets.example.h secrets.h # Edit secrets.h with your AppKey ./heltec.sh flash
→ Full details: heltec/README.md
Verify: Serial shows "joined", ChirpStack shows uplink frames, Node-RED debug shows data.
| Service | URL | Login |
|---|---|---|
| ChirpStack | http://<pi>:8080 |
admin / admin |
| Node-RED | http://<pi>:1880 |
— |
farmon/
├── pi/ # Gateway stack (ChirpStack, Node-RED, PostgreSQL)
└── heltec/ # Sensor firmware (Heltec ESP32 LoRaWAN)
| Problem | Check |
|---|---|
| Gateway not appearing | sudo journalctl -fu chirpstack-concentratord |
| Device not joining | AppKey exact match? Region matches gateway? |
| No data in Node-RED | MQTT broker connected? (green status) |
| No data in database | Check Node-RED debug panel for errors |
