Can you combine a controller and a repeater/gateway in the same board. #170
Unanswered
PerRieland
asked this question in
Q&A
Replies: 1 comment 2 replies
-
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is it possible to have a controller that can function as a controller and a repeater/gateway ?
I have had no success in the following setup.
<=WiFi=> MQTT <=LoRa=> Controller1 <=ESPNOW=> Controller2
Controller1 must act as an irrigation controller and repeater/gateway.
Controller2 must act as an irrigation controller.
I have a long distance between the MQTT Gateway and Controller1 and here is LoRa perfect. This setup works perfectly.
Now I want to extend the setup with one more irrigation controller.
Controller1 and Controller2 have a short distance. Here ESPNOW will be a good choice for wireless communication between Controller1 and Controller2.
I’m using WIFI LoRa 32 (V3) – Heltec Automation board for MQTT and Controller1, which have both LoRa and WiFi. Controller2 is a Wemos mini D1 8266.
Nothing shows up in serial monitor on Controller1.
Here is the config files
MQTT:
//Addresses
#define UNIT_MAC 0x00 // The address of this gateway
#define ESPNOW_NEIGHBOR_1 0x00 // Address of ESP-NOW neighbor 1
#define ESPNOW_NEIGHBOR_2 0x00 // Address of ESP-NOW neighbor 2
#define LORA_NEIGHBOR_1 0x00 // Address of LoRa neighbor 1
#define LORA_NEIGHBOR_2 0x00 // Address of LoRa neighbor 2
// Interfaces
#define USE_LORA
#define USE_WIFI
// Routing
// Options: sendESPNowNbr(1 or 2); sendESPNowPeers(); sendLoRaNbr(1 or 2); broadcastLoRa(); sendSerial(); sendMQTT();
#define ESPNOWG_ACT
#define LORAG_ACT sendMQTT();
#define SERIAL_ACT
#define MQTT_ACT broadcastLoRa(); sendSerial();
#define INTERNAL_ACT
#define ESPNOW1_ACT
#define ESPNOW2_ACT
#define LORA1_ACT
#define LORA2_ACT
Controller1:
//Addresses
#define UNIT_MAC 0x03 // The address of this gateway
#define ESPNOW_NEIGHBOR_1 0x00 // Address of ESP-NOW neighbor 1
#define ESPNOW_NEIGHBOR_2 0x07 // Address of ESP-NOW neighbor 2
#define LORA_NEIGHBOR_1 0x00 // Address of LoRa neighbor 1
#define LORA_NEIGHBOR_2 0x99 // Address of LoRa neighbor 2
// Interfaces
#define USE_ESPNOW
#define USE_LORA
// Routing
// Options: sendESPNowNbr(1 or 2); sendESPNowPeers(); sendLoRaNbr(1 or 2); broadcastLoRa(); sendSerial(); sendMQTT();
#define ESPNOWG_ACT sendSerial(); sendESPNowNbr(1);
#define LORAG_ACT sendSerial(); sendLoRaNbr(1); sendESPNowNbr(2);
#define SERIAL_ACT
#define MQTT_ACT
#define INTERNAL_ACT sendSerial(); sendLoRaNbr(1);
#define ESPNOW1_ACT
#define ESPNOW2_ACT sendSerial(); sendLoRaNbr(1);
#define LORA1_ACT sendSerial(); sendESPNowNbr(2); broadcastLoRa();
#define LORA2_ACT
Controller2:
#define UNIT_MAC 0x07 // The address of this gateway
#define READING_ID 1007 //Unique ID for this sensor
#define GTWY_MAC 0x03 //Using a repeater with address 0x03.
#define USE_ESPNOW
#define FDRS_DEBUG
Beta Was this translation helpful? Give feedback.
All reactions