Farm Data Relay System: Combine LoRa And 2.4 Ghz Networks Without WiFi Routers And Cloud Dependence

Setting up a wireless sensor network over a wide area can quickly become costly, and making everything communicate smoothly can be a massive headache, especially when you’re combining short range Wi-Fi with long range LoRa. To simplify this, [Timm Bogner] created Farm Data Relay System which simplifies the process of combining LoRa, 2.4Ghz modules and serial communications in various topologies over wide areas.

The FDRS uses a combination of ESP32/8266 sensor nodes for short range, and LoRa nodes for long range. The ESP nodes use Espressif’s connectionless ESP-NOW peer-to-peer protocol on which allow multiple ESP boards to communicate directly without the need for a Wi-Fi router. The ESP modules can have one of 3 roles, nodes, repeaters or gateways, and gateways and repeaters share the same code. Nodes take sensor inputs, and are configured to each have a unique READING_ID.

Relays just retransmit ESP-NOW packets to extend the network range, while gateways convert packets between ESP-NOW, MQTT over Wi-Fi, LoRa or serial messages as required. Repeaters and gateways each have a unique UNIT_MAC for addressing. The code that handles communication for the ESP devices is simple and well documented, so you only need to set a few configuration values, and then can focus your efforts on the code required for your specific application.

The hub of the system is a Raspberry Pi running Node-RED which acts as the final MQTT gateway and connects to the ESP MQTT gateways. This means that all the action happens in the local network, without being dependent on an internet connection and cloud service. However, it can still send and receive data over the internet using MQTT or any other protocol as required. Node-RED makes it particularly easy to build custom automations and interfaces.

In the video after the break, Andreas Spiess, the man with the Swiss accent, who also has a hand in the project, goes over all the features, setup and caveats.

LoRa is an extremely useful tool for outdoor, long range networking. From monitoring birdhouses without internet, text messaging without cell networks, and even bouncing signals off the moon, there’s no shortage of uses.

24 thoughts on “Farm Data Relay System: Combine LoRa And 2.4 Ghz Networks Without WiFi Routers And Cloud Dependence

    1. The whole point of the internet is that once something is on the internet it is both accessible to any other host on the internet and can access any host on the internet. Yes there are security issues, but they are being worked on.

      This is a great project, but basically it’s re-inventing the internet, and will become obsolete as the internet continues its inexorable march across every square inch of the planet. It would be better to hasten that goal, because then a whole slew of things becomes easier.

      1. I wouldn’t expect a farmer or someone like them to foot the bill required to get internet extended to these rural areas so that all of the remote sensors can access it, that’s just an unnecessary burden.

        This project is a rather inexpensive solution to the problem they had.

      2. > This is a great project, but basically it’s re-inventing the internet, and will become obsolete as the internet continues its inexorable march across every square inch of the planet

        March? Or slow plod?

        I think the people behind this project are probably in need of a solution now, not when the local telcos are willing to provide one for a non-exhorbitant fee.

        Sure, in decades to come, Internet may truly be “everywhere”… but right now it isn’t, not even satellite.

        1. Internet is Satellite Ready today, but you just don’t know. It’s called STARLINK ;) . They have the system but it isn’t accesible for the consumers rigth now

      3. Bad take. It’s best to have things like this that don’t depend on an always on connection that could go down and render the devices useless. We need more of this sort of thing.

      4. Just because the internet might be available to use in a project doesn’t mean it should be. Internet connectivity is often a detriment to projects that need to “just work” for long periods of time because internet protocols change, or certificates get revoked, or browsers stop deciding to allow viewing of older pages (javascript and flash for example). This project will likely function for a long time without maintenance by the developer.

        In addition, internet access in rural areas costs more money and often requires more electrical power than a solution like this one does.

    1. ESP stuff is in the dollar range, and no gateway is required. Lora stuff is also in the 5$ range. A zigbee gateway is in the 100$ range and the zigbee module is more like 5$ to 10$, plus no (good) documentation. Also, development with a wifi module is done with your computer (nothing special, usual IP stuff, HTTP/MQTT/OTA). On zigbee, you have to use whatever proprietary protocol to send your code and debug it and it can become a mess if you have heterogeneous architecture of zigbee nodes.

    2. I bought a “few” XBee modules for the turkey farm, they are expensive here in Oz

      BUT

      the protocol is very robust and copes well with local electrical noise from single and 3 phase motors, our generator, the local grid which was flakey at the best of times

      the Nordic modules did not cope well inside the barns
      WiFi seemed like way too much trouble

      my XBee nodes running on my “Barnduinos” was very simple

      1. much as I’m drawn to ESP32 for price, I don’t trust wifi. I’ve done some stuff with xbee’s in a challenging industrial environment and have been super impressed with the range and stability. I guess it depends how many nodes you need to cover the area

  1. This is awesome to see a full hybrid mesh network combining all these technologies. I’d have expected the LoRa network to work directly from just about anywhere to anywhere, but using ESP-NOW is a great way to deal with not having to blast full wifi access everywhere. I work on an open high performance RC control protocol that uses LoRa as well (ExpressLRS), and the devices produced for us can also maybe make cheap nodes with more powerful LoRa output to extend the range of sensor networks like this. We use ESP8285 and ESP32 MCUs with SX1280 or SX1272 transceivers with amplifiers from 100mW to 1W.

  2. As a noob to various approaches for LoRa and mesh networks, and given LoRa has mesh capabilities or WiFi can be used, I wonder what the true value of another mesh system is?
    I’m not saying it doesn’t have additional value is but what might be a use-case for ESP-NOW over LoRa Mesh or WiFi?

    1. Cost and simplicity. It’s much simpler and cheaper to add ESP-NOW relays than building a Wi-Fi mesh. For long range, LoRa is the winner, but you can buy a couple of ESP32 modules for the price of a single LoRa module, and it still requires a microcontroller to operate.

      The main value I see in this project is that it abstracts away the networking complexity, so you can focus on the application

      1. Hi Danie,
        Thank you very much for writing this article. Your explanation is spot-on!
        It was a Hackaday article that first got me interested in Arduino back in 2016… something about the Teensy? I forget now :) Anyhow, it’s a huge honor and I really appreciate it!
        Timm

    2. Hi Martin, the only thing I want to add is that FDRS isn’t actually a mesh, and this is what sets it apart. In FDRS you define a specific path that you would like your sensor data to take by the configuration of your gateway devices. You can think of FDRS as a ‘series of tubes’ :D

      Meshes are confusing, and as a beginner I didn’t understand any of the mesh platforms. I also had a dozen or so ESP devices to work with and only two LoRa modules, so that ruled out a lot of LoRa-based meshes. I hope you’ll check it out, it was built for noobs!

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.