Skip to content

Enabling Relay Communication in Firmware

Expert Topic for experienced builders.

Relay communication is controlled by modules in BottangoArduinoModules.h. If you are not familiar with enabling firmware modules, start with Changing Modules.

The relay portion of the current modules file looks like this by default:

BottangoArduinoModules.h
// #define RELAY_SUPPORTED // uncomment this line to allow for relay bridge / relay peer behavior
// relay Comms type. // (select only 1 if relay behavior is supported)
// #define RELAY_COMS_ESPNOW // ESP-Now communication stack for relay parent <-> child. only fully supported currently (There's also an RS485 experimental option)

To enable relay communication over ESP-NOW, uncomment both RELAY_SUPPORTED and RELAY_COMS_ESPNOW:

BottangoArduinoModules.h
#define RELAY_SUPPORTED
#define RELAY_COMS_ESPNOW

ESP-NOW relay communication requires an ESP32-based microcontroller.

RS485 relay communication is still experimental and is not listed as a disabled option in the current modules file. To use it, enable RELAY_SUPPORTED, leave RELAY_COMS_ESPNOW disabled, and add RELAY_COMS_RS485:

BottangoArduinoModules.h
#define RELAY_SUPPORTED
// #define RELAY_COMS_ESPNOW
#define RELAY_COMS_RS485

Select only one relay communication type. Do not enable both RELAY_COMS_ESPNOW and RELAY_COMS_RS485.

For custom RS485 hardware, configure the pins and transceiver-control settings needed by your circuit in BottangoArduinoConfig.h.

  1. Make the module and configuration changes required for your selected transport.

  2. Compile and upload the firmware to each device that will act as a bridge or peer.

  3. Connect to each device directly over USB before changing its connection type in the app.

After every device is running relay-enabled firmware, continue with Setting Up Relay Communication in the Desktop App.