Long-range, low-power sensing over LoRaWAN and The Things Network — the companion to the WiFi nodes, for sites WiFi can't reach. This page documents the architecture, hardware options and the TTN → MQTT bridge so it can be rebuilt on any stack. The first node on this track — WellBouy — is deployed and streaming live.
The track is defined, the integration path is documented, and the WellBouy node has validated it end-to-end. Additional node firmware is a working scaffold being filled out per sensor type.
WiFi is fine where a router reaches. LoRaWAN covers everything beyond it, on power budgets WiFi can't touch.
ESP32 / Arduino + LoRa radio, OTAA-joined.
Any TTN-registered LoRa gateway, EU868.
The Things Network v3 → MQTT bridge.
Mosquitto → Node-RED → InfluxDB → Grafana.
Discrete build, OTAA. Most control, most wiring.
Compact, deep-sleep friendly, RadioLib. The stack the WellBouy node runs.
Built-in LoRa module, official toolchain.
The firmware in the repo drives a Grove Wio-E5 (LoRa-E5) module over UART with AT commands — an OTAA join then a hex uplink. It is distinct from the WellBouy V3 path, which talks to a Wio-SX1262 directly through RadioLib; both reach the same TTN application.
src/main.cpp — OTAA join + hex uplink over the Wio-E5 AT interface
// OTAA join
at_send_check_response("+MODE: LWOTAA", 1000, "AT+MODE=LWOTAA\r\n");
at_send_check_response("+DR: EU868", 1000, "AT+DR=EU868\r\n");
at_send_check_response("+CH: NUM", 1000, "AT+CH=NUM,0-2\r\n");
at_send_check_response("+CLASS: A", 1000, "AT+CLASS=A\r\n");
// pack temp + humidity, send as a hex uplink
char cmd[128];
sprintf(cmd, "AT+CMSGHEX=\"%04X%04X\"\r\n", (int)temp, (int)humi);
ret = at_send_check_response("Done", 5000, cmd);
| Part | Role | Source |
|---|---|---|
| XIAO ESP32-C3 | MCU driving the radio + sensors | — |
| Grove Wio-E5 (LoRa-E5) | LoRa radio — UART AT, OTAA, EU868 | — |
| Sensirion SHT4x | Temperature + humidity (I²C) | — |
| SSD1306 OLED 128×64 | Local status display (I²C) | — |
| LoRa gateway + TTN | The uplink path off-site | The Things Network |
Subscribe to v3/{app}/devices/{dev}/up using TTN's MQTT integration, parse the decoded payload in a function node, write to InfluxDB.
A connection block in mosquitto.conf bridges eu1.cloud.thethings.network:8883 into local topics.
Typical node types the design targets — a menu to compose from, not a fixed system.
Shallow + deep moisture per tree, weather station
TDS, turbidity, pH, temperature — the WellBouy node
Soil moisture and temperature, far from any router
Climate, light, moisture — when WiFi is insufficient