Files
OpenMQTT-Gateway/docs/setitup/rf.md
T
Florian 2459e1c29b [RF] Change ESP8266 default RF_RECEIVER_GPIO from 0 to 4 (#2240) (#2323)
GPIO0 (D3) is the ESP8266 boot strapping pin: an RF receiver holding the
data line low at reset forces the board into flash mode, so a stock
nodemcuv2-rf build never starts after a restart with the receiver wired
to the documented default pin. Default to GPIO4 (D2) instead, which the
docs already recommend as the workaround. Environments that need other
pins (srfb-direct, sonoff-rfr3, rf-wifi-gateway) already override the
value explicitly and are unaffected.
2026-06-14 16:28:01 -05:00

4.8 KiB

RF gateway (433mhz/315mhz)

Protocols, modules and library

RTL_433 covers OOK protocols detailed here and supports auto-discovery following Home Assistant convention. The other libraries/modules are more for advanced users.

Board Protocols Assembly/Soldering required
Heltec LORA V2 433Mhz RTL_433, receiving only No
LILYGO® LoRa32 V2.1_1.6.1 433 Mhz RTL_433, receiving only No
ESP32 + SX127X RTL_433, receiving only Yes
ESP32 + CC1101 RTL_433, RF(RCSwitch), RF2(KaKu), Pilight Yes
ESP8266 + Basic RF modules (SRX, STX, XD RF, FS1000A RF(RCSwitch), RF2(KaKu), Pilight Yes
ESP8266 + CC1101 (might have lower range than with SRX/STX above) RF(RCSwitch), RF2(KaKu), Pilight Yes
ESP32 + Basic RF modules (SRX, STX, XD RF, FS1000A RF(RCSwitch), RF2(KaKu), Pilight Yes

:::tip If you want to try the RTL_433 module with a combination or a board outside of this list, verify that it has an SX1278 or a SX1276 :::

Heltec LORA V3 is not compatible with RTL_433 library as it is based on an SX1262 module.

Assembly/soldering required parts

Module Purpose Compatible modules Receiver Switching Where to Buy
SRX882 or SRX882S (recommended) 433Mhz Receiver RF(RCSwitch), RF2(KaKu), Pilight Supported -
STX882 (recommended) 433Mhz Transmitter RF(RCSwitch), RF2(KaKu), Pilight Supported -
CC1101 433Mhz Transceiver RTL_433, RF(RCSwitch), RF2(KaKu), Pilight Supported -
SX1276/SX1278 433Mhz Transceiver RTL_433 Not Supported -
LilyGo/Heltec 433Mhz Transceiver RTL_433 Not Supported -

SRX STX Pinout

Board Receiver Pin Emitter Pin
ESP8266 D2/D1/D8 RX/D2
ESP32 27/26 12
RF BRIDGE - -
RF BRIDGE DIRECT HACK 4 5
SONOFF RFR3 4 -
RF WIFI GATEWAY 5 -

Connect the Emitter and Receiver to a 5V or 3.3V supply source, check datasheet of your modules to confirm (3.3V for CC1101), and the ground of your supply source to the ground of your board.

:::tip With SRX882S receiver connect the CS pin to 3.3V :::

CC1101 Pinout

Board Receiver Pin(GDO2) Emitter Pin(GDO0) SCK VCC MOSI MISO CSN GND
ESP8266 D2/D1/D8 RX/D2 D5 3V3 D7 D6 D8 GND
ESP32 D27 D12 D18 3V3 D23 D19 D5 GND

To use the CC1101 module, ZradioCC1101 must be uncomment in the User_config.h or added to the build_flags.

More information about the CC1101 wiring.

:::tip Please note that with OMG we are recommending CC1101 GDO2 to be connected to ESP32 D27 and GDO0 to be connected to D12, this is different than the LSatan diagram. This is due to the ESP32 using D2 as part of the boot process.

If you want to use custom SPI pins for the CC1101 module, you can define the following variables in your User_config.h or as build_flags in platformio.ini:

  • RF_CC1101_SCK: SPI clock pin (SCK)
  • RF_CC1101_SCK: SPI clock pin (SCK)
  • RF_CC1101_MISO: SPI MISO pin (Master In Slave Out)
  • RF_CC1101_MOSI: SPI MOSI pin (Master Out Slave In)
  • RF_CC1101_CS: SPI chip select pin (CSN)

When all these variables are defined, OpenMQTTGateway will use your custom pinout for the CC1101 connection. This is useful if your board does not use the default pins or if you want to avoid conflicts with other devices. :::

ESP32 Hardware setup

Addon_RF

ESP8266 Hardware setup

The default receiver pin is D2 (gpio 4). Avoid D3 (gpio 0): it is a boot strapping pin, a receiver holding it low at reset forces the ESP8266 into flash mode and the board never starts.

With SRX882 some users reported issues on D2, use D1 instead in this case and modify config_RF.h accordingly.

Addon_RF

SONOFF RF Bridge Hardware setup

Per default there is no need on modifying the RF Bridge hardware, unless you don't want to use the provided RF controller (EFM8BB1). Indeed if you want to extend the protocols supported by the bridge you can bypass this controller and use the ESP8255 capacities to decode RF Signal. The RF processing can be achieved after the modification by either RF, RF2 or Pilight gateways.

SONOFF RFR3 Hardware setup

Connect GPIO4 of the ESP8255 to the pin D0 of SYN470

WIFI RF GATEWAY Hardware setup

This board doesn't require any hardware modifications.