SDG #287 LoRa Relay with the Seeed Wio-E5
This project episode tackles a practical problem: switching selected garden lights independently from a single armoured cable run, using a wireless relay rather than adding photocells and timers at every fitting. Commercial kinetic wireless switches were ruled out because they cannot pass local loads at the switch end, so a custom board built around the Seeed Wio-E5 LoRa module became the starting point.
The key finding is a protocol decision that matters to anyone shopping for these modules. The Wio-E5 ships with LoRaWAN firmware driven over AT commands, but LoRaWAN routes traffic through a gateway and out to the internet, adding tens of seconds of latency and requiring server-side handling. That is unusable for a light switch. The workaround is the module’s built-in TEST mode, which strips the WAN stack and exposes raw LoRa transmit and continuous receive commands, giving genuine point-to-point (and point-to-multipoint) operation. The trade-off is honest: no encryption at all, so packets can be sniffed and replayed unless you add rolling codes yourself.
A custom two layer board pairs a PIC microcontroller with the module over one UART while echoing traffic to a PC on a second UART, making the AT exchange visible during development. Configured for 868MHz, SF12 and 125kHz bandwidth at minimum transmit power, the link held with zero dropped packets at roughly 250 to 300 metres, far beyond the 10 to 20 metres actually needed, which is a useful reminder about duty cycle etiquette on a shared band. Switch state mirroring works, with a deliberate delay to avoid spamming the band. Next steps: reflashing the module’s STM32 with custom firmware to delete the PIC entirely, and designing a mains supply capable of around 150mA peak at 3.3V.


