Farm-Data-Relay-System/FDRS_Gateway2000
Timm Bogner 2bc728de82
Update fdrs_functions.h
fixed something
2022-04-20 11:05:41 -05:00
..
Advanced_Setup_LoRa.png Add files via upload 2022-02-22 08:03:54 -06:00
Advanced_Setup.png Add files via upload 2022-04-16 21:09:20 -05:00
Basic_LoRa_Setup.png Add files via upload 2022-02-22 08:14:28 -06:00
Basic_Setup.png Add files via upload 2022-02-22 08:03:54 -06:00
DataReading.h Add files via upload 2022-03-08 11:00:09 -06:00
defaults.h Add files via upload 2022-03-08 11:00:09 -06:00
fdrs_config.h Add files via upload 2022-03-08 11:00:09 -06:00
fdrs_functions.h Update fdrs_functions.h 2022-04-20 11:05:41 -05:00
FDRS_Gateway2000.ino Add files via upload 2022-03-08 11:00:09 -06:00
README.md Update README.md 2022-03-24 00:08:07 -05:00

Gateway 2.000

This is the FDRS Multiprotocol Gateway sketch. The device listens for packets over ESP-NOW, UART, LoRa, and/or MQTT, then retransmits the packets over these interfaces using rules defined in the configuration file.

The most commonly used configuration tells the device to take any ESP-NOW packet it receives and output the data over the serial port (UART):

#define UNIT_MAC       0x00
#define ESPNOWG_ACT    sendSerial();

The companion for this device, connected via serial, takes any data it receives from the serial port and sends it via MQTT:

#define USE_WIFI
#define SERIAL_ACT   sendMQTT();

Splitting the gateway into two devices allows you to use ESP-NOW and WiFi simultaneously without channel conflicts. You can also connect the first device to a computer with a USB-UART adapter and get the data that way, eliminating WiFi altogether.

If you have sensors that are out of range of your first gateway, you can use a gateway as a repeater. First set the UNIT_MAC to 0x01, then send general ESP-NOW traffic to the address of the first gateway:

#define UNIT_MAC     0x01 
#define ESPNOWG_ACT  sendESPNOW(0x00);

Basic

Basic

Basic