Farm Data Relay System

A system that uses ESP-NOW, LoRa, and other protocols to transport sensor data in remote areas without relying on WiFi.
Alternatives To Farm Data Relay System
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
4 years ago14January 27, 201921mitPython
Count the number of people around you :family_man_man_boy: by monitoring wifi signals :satellite:
7 years ago2gpl-3.0C
Run a script when one or more sensors fail.
Farm Data Relay System417
9 days ago5mitC
A system that uses ESP-NOW, LoRa, and other protocols to transport sensor data in remote areas without relying on WiFi.
Esp Mqtt Json Multisensor304
5 years ago39apache-2.0C++
(OBSOLETE) ESP MQTT JSON Multisensor for Home Assistant. Supported sensors include the TEMT6000 light, AM312 PIR, DHT22 temperature/humidity sensors. RGB led supports flash, fade, and transition. Over-The-Air (OTA) uploading, too!
3 months ago12mitC++
Secure sensor and gateway platform based on ESP8266 and ESP32
Esp Now209
5 years ago12C++
ESP-Now Examples
3 months ago30gpl-3.0C++
CanAirIO is a citizen science initiative. We are developing a mobile application that is able to set a PM2.5 or CO2 sensors, and other related sensors, as a fixed station using WiFi or mobile station with an smartphone by using a Bluetooth connection.
4 years agoC
ESP8266 WiFi Weather Sensor
a year ago5unlicenseC++
Code for a cheap people counter based on VL53L1X sensor and ESP32/8266
Ariadne Io65
4 years ago2JavaScript
A wireless hardware and software IoT project that monitors multiple streams of data from a sailboat. Access realtime information on any web enabled device. Built with React, Node.js, MongoDB, and Express
Alternatives To Farm Data Relay System
Select To Compare

Alternative Project Comparisons

Farm Data Relay System

***In loving memory of Gay Holman, an extraordinary woman.***

Farm Data Relay System is an easy way to communicate with remote IoT devices without relying on WiFi or LoRaWAN infrastructure. It establishes a series of inexpensive, low-power access points and repeaters to provide ESP-NOW and LoRa coverage for remote devices. FDRS can be used to transport sensor readings and control messages in situations where it would be too cumbersome to provide full WiFi/LoRaWAN coverage. While the system was designed with farming in mind, FDRS could also be beneficial in a classroom, home, or research setting.

Devices are classified into two types: Gateways and Nodes. Gateways comprise the infrastructure of the network, moving data along pre-directed routes and providing coverage to all devices. Nodes allow the user to exchange data with a gateway. Each gateway is identified with an 8-bit physical hex address (MAC), while nodes use 16-bit integers to identify datapoints as they move through the system.

If you are having fun with FDRS, please consider supporting me so that I can spend more time building it.

Getting Started

Libraries Required:


To install FDRS:

  1. Download or clone this repository and copy it into your Arduino 'libraries' folder.

  2. After installing, edit the 'src/fdrs_globals.h' file with your WiFi credentials and other global parameters.

  3. The first sketch you'll want to try is the 1_UART_Gateway.ino example. This device will listen for incoming ESP-NOW packets, then route them to the serial port (and vice versa). Next, flash the ESPNOW_Sensor.ino example to see how to send data to the gateway.

  4. To use MQTT: Connect the second gateway to the first via the Rx and Tx pins (crossed), and flash it with the 0_MQTT_Gateway.ino example. If your WiFi and MQTT configurations are correct, data will be published to the topic 'fdrs/data'.

  5. To extend your range, try the 2_ESPNOW_Repeater.ino or 3_LoRa_Repeater.ino. Just change the GTWY_MAC of your sensor to the address of your new repeater.


Node Documentation

Nodes can be described as sensors, controllers, or both:

  • A Sensor node aggregates data into a packet, then sends it to a gateway via ESP-NOW or LoRa.
  • A Controller node subscribes to one or more reading IDs. When data arrives from an ID the device is subscribed to, a callback function is called where the user can access the incoming data.


Gateway Documentation

Gateways are modular and configurable microcontroller devices that can perform a variety of useful functions including collecting, distributing, and relaying wireless data. They provide a flexible and cohesive interface between various wired and wireless protocols, and are generally arranged in a line or star topology. As a general rule, the gateway that uses MQTT always has the address 0x00, and ESP-NOW and LoRa gateways start at 0x01.

In its most common usage, an FDRS gateway is deployed as an access point for remote ESP-NOW and LoRa user nodes. If it receives a packet from an unknown ESP-NOW or LoRa address, the gateway assumes that these are sensor readings and passes them downstream towards the front-end. The gateway will also broadcast packets coming from the front-end out to any controller nodes that are registered/listening.

Gateways can also be configured as simple repeaters; passing data from one neighbor directly to another neighbor or vice versa. This can create a data wormhole that will carry packets upstream or downstream ad infinitum. You can configure your gateways to share data headed upstream with connected peers, thus providing them with any data being sent from the front-end.


The front-end is where all data is entered or consumed by another application. This could be anything from a microcontroller communicating through UART and displaying data on a screen to a server/database platform logging the data via MQTT.

My recommended method of accessing your data is using a computer, server, or Raspberry Pi linked to an FDRS Gateway device via either MQTT or UART. Node-RED is my favorite platform for accessing/manipulating data on the front-end, and InfluxDB+Grafana is the dream team for storage and visualization.

Future Plans

Upcoming goals for FDRS include:

  • A method for FDRS gateways to keep track of the time via NTP or an RTC module, then seamlessly distribute it amongst its neighbors and connected nodes.
  • More sensor and controller examples. If you are using a device or sensor that is not covered in the examples, feel free to contribute an example of its basic usage!
  • Support for cellular radios with TinyGSM.
  • Channel Activity Detection (CAD) for LoRa.

Thank you

...very much for checking out my project! I truly appreciate everyone who has reached out with contributions and assistance, especially those featured in the "Contributors" section. If you have any questions, comments, issues, or suggestions please don't hesitate to contact me at [email protected] or open a discussion here on Github.

Many thanks go to the ever-instructional Andreas Spiess. His insight and ideas took this project from a roughly-hewn stone to the "diamond" you see today.

Thanks to LilyGo for sending me new LoRa32 modules when mine were damaged. Much of this project was created using TTGO devices, and I highly recommend their products!

It is a great honor to have been featured on Hackaday and!

I started this project with instructions from Random Nerd Tutorials. If you are a beginner and trying to learn more about microcontrollers, I highly recommend starting there.

Basic - UART

Basic - MQTT

Popular Wifi Projects
Popular Sensor Projects
Popular Networking Categories
Related Searches

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
Raspberry Pi
Internet Of Things