Not receiving any RF with Sonoff RF Bridge with Direct Hack

I had flashed Tasmota onto the Sonoff RF Bridge (R2 V1.0) before, then figured out that Tasmota only receives and can’t sent. Tasmota worked though and received stuff.

I then tried to flash OpenMQTTGateway which was a hassle in itself since the firmware releases aren’t really documented (Releases · 1technophile/OpenMQTTGateway · GitHub). I tried the sonoff-basic-firmware.bin, rfbridge-firmware.bin and got them working including Wifi connection and MQTT output. What never worked was any RF signals via MQTT. Then I went ahead and did the Direct Hack and flashed with the sonoff-rfbridge-direct-firmware.bin.

Same result: Everything works (i.e. lot’s of system messages via MQTT such as LWT Online, freemem etc… I then tried sending home/OpenMQTTGateway/MQTTtoPilight {"active":true} which resulted in a new MQTTtoPilight topic containining {“active”:true}, so something happened. Still the same result: No RF signals.

Then I went ahead and compiled myself with VSCode & platformio and configuring the platformio.ini with default_envs = sonoff-rfbridge-direct, the user_config.h with ESPWifiManualSetup and the config_RF.h with the correct ports (emitter 5, receiver 4). Uploaded the firmware and same result.

I think I have made the cuts and soldering ok. Maybe the cuts have to be deeper? Am I missing a basic step to get RF going?


(I can only post one image, all three images here: Imgur: The magic of the Internet)

I have a RTL-SDR set up next to everything so I do see RF signals floating around everywhere (and I have a RF remote control I am mashing the buttons on) - it is all received on the RTL-SDR (with rtl_433) - just not on the Sonoff that did receive signals before using Tasmota.

1 Like

Do you have a multimeter to verify if there is no continuity anymore?

Also I don’t remember if you need to have the switch to ON or OFF with the direct hack

I was hoping for a reply from you. Thank you!

Yeah the switch… in all tutorials it is just said to put it to OFF and noone cares to explain what the switch actually does. I tried both ON/OFF - both no RF. According to this: Sonoff RF Bridge 433 · arendst/Sonoff-Tasmota Wiki · GitHub the switch needs to be in ON position to activate RF.

I checked for continuity using a multimeter and couldn’t find any, so the traces look to be cut correctly. I have also tried powering via external USB as well as via the on board connectors via FTDI.

Do I need to send some commands via MQTT to “enable RF” or something like that?

Alright I flashed ESPurna (GitHub - xoseperez/espurna: Home automation firmware for ESP8266-based devices) and the bridge receives (and sends!) RF signals! I can happily learn the RF Code of a remote control as well as send it. I’m using the itead-sonoff-rfbridge-direct-ota image. The Switch on the PCB is set to on.

I also tried RFLink32 (via GitHub - schmurtzm/RFLink32-For-Sonoff-RF-Bridge: RFLink32 For Sonoff RF Bridge) and it also works.

FYI: due to installing these other solutions I know that the switch needs to be ON.

  1. Set switch to OFF on the PCB
  2. Hold the RST button on the PCB
  3. Powerup Sonoff
  4. Let go of the RST button
  5. Flash firmware
  6. Poweroff Sonoff
  7. Set the Switch to ON
  8. Poweron Sonoff - Everythings works

So back to OpenMQTTGateway: My hardware doesn’t seem faulty since espurna/RFLink32 seems to work? How can I get OpenMQTTGateway to work and receive/send RF?

You confirm that you are using v0.9.8?

v0.9.7 had a bug with RFBridge

Right now I’m running development branch and my version is the beautiful “version_tag”. I just deployed via PlatformIO > Upload, I guess the version_tag isn’t being replaced.

Just to be safe I re-flashed with the pre-built firmware from GH releases and now I have v0.9.8 instead of “version_tag”. actRec is 1.

I would say I see one difference: The red RF led on the PCB is flashing when I press a button on my remote. I don’t see any RF message output via MQTT though. I don’t get the RF led flashing when powered via the FTDI cable, only when connected via regular USB cable.

I tried sending home/OpenMQTTGateway_SRFB_Direct/commands/MQTTtoRF2 {"active":true} and home/OpenMQTTGateway_SRFB_Direct/commands/MQTTtoPilight, but nothing changes.

Serial monitoring seems to only work when not in programming mode (i.e. when the button wasn’t pressed while booting)? It also only works when I directly power via USB and only connect the RX/TX via FTDI. Anywasy I received serial output:

00:38:31.526 -> *WM: [1] system_get_sdk_version():  2.2.2-dev(38a443e)
00:38:31.526 -> *WM: [1] system_get_boot_version(): 31
00:38:31.526 -> *WM: [1] getFreeHeap():             27336
00:38:31.526 -> *WM: [3] allocating params bytes: 20
00:38:31.526 -> *WM: [2] Added Parameter: server
00:38:31.526 -> *WM: [2] Added Parameter: port
00:38:31.526 -> *WM: [2] Added Parameter: user
00:38:31.526 -> *WM: [2] Added Parameter: pass
00:38:31.526 -> *WM: [2] Added Parameter: secure
00:38:31.526 -> *WM: [3] Updated _max_params: 10
00:38:31.526 -> *WM: [3] re-allocating params bytes: 40
00:38:31.526 -> *WM: [2] Added Parameter: cert
00:38:31.526 -> *WM: [2] Added Parameter: name
00:38:31.526 -> *WM: [2] Added Parameter: topic
00:38:35.897 -> N: RF_EMITTER_GPIO: 5 
00:38:35.897 -> N: RF_RECEIVER_GPIO: 4 
00:38:35.897 -> N: Reading GPIO at pin: 0
00:38:35.897 -> N: Switching to Pilight Receiver
00:38:35.897 -> N: OpenMQTTGateway modules: ["Pilight","GPIOInput"]
00:38:35.897 -> N: ************** Setup OpenMQTTGateway end **************
00:38:35.897 -> W: MQTT connection...
00:38:35.989 -> N: Connected to broker
00:38:35.989 -> N: Received json : ["Pilight","GPIOInput"]
00:38:35.989 -> N: Received json : ["Pilight","GPIOInput"]
00:38:35.989 -> N: Received json : ["Pilight","GPIOInput"]
00:38:35.989 -> N: Received json : ["Pilight","GPIOInput"]
00:38:35.989 -> N: Received json : ["Pilight","GPIOInput"]
00:38:35.989 -> N: Received json : ["Pilight","GPIOInput"]
00:38:35.989 -> N: Received json : ["Pilight","GPIOInput"]
00:38:35.989 -> N: Received json : ["Pilight","GPIOInput"]
00:38:35.989 -> N: Received json : ["Pilight","GPIOInput"]
00:38:35.989 -> N: Received json : ["Pilight","GPIOInput"]
00:38:35.989 -> N: Subject: /SYStoMQTT
00:38:35.989 -> N: Received json : {"uptime":4,"version":"v0.9.8","freemem":21544,"rssi":-56,"SSID":"Wifi","ip":"192.168.178.96","mac":"C8:2B:96:E9:62:7D","actRec":1,"modules":["Pilight","GPIOInput"]}
00:38:36.034 -> N: Subject: /GPIOInputtoMQTT
00:38:36.034 -> N: Received json : {"gpio":"HIGH"}

The thing is: That’s it. The serial console doesn’t log anything else than the frequent uptime, i.e.:


00:40:35.968 -> N: Subject: /SYStoMQTT
00:40:35.968 -> N: Received json : {"uptime":124,"version":"v0.9.8","freemem":22280,"rssi":-59,"SSID":"Wifi","ip":"192.168.178.96","mac":"C8:2B:96:E9:62:7D","actRec":1,"modules":["Pilight","GPIOInput"]}

The RF led is blinking red, yet nothing via serial monitor. Weird.

Could you try this env (in case Pilight doesn’t recognize the signal you are using):

[env:sonoff-rfbridge-direct]
platform = espressif8266@^2
board = esp8285
lib_deps = 
	${com-esp.lib_deps}
	${libraries.rc-switch}
build_flags = 
	${com-esp.build_flags}
	'-DZgatewayRF="RF"'
	'-DRF_RECEIVER_GPIO=4'
	'-DRF_EMITTER_GPIO=5'
	'-DLED_INFO=13'
	'-DLED_INFO_ON=0'
	'-DZsensorGPIOInput="GPIOInput"'
	'-DINPUT_GPIO=0'
	'-DGateway_Name="OpenMQTTGateway_SRFB_Direct"'
board_build.flash_mode = dout
board_build.ldscript = eagle.flash.1m64.ld

Had to add a dependency:
${libraries.esppilight}

But I am receiving something!

{"message":{"id":13359,"unit":4},"protocol":"beamish_switch","length":"13359","value":"13359","repeats":2,"status":2} in home/OpenMQTTGateway_SRFB_Direct/PilighttoMQTT

Frankly this is not a device I own and my Hygrosensors and my remote controls do not show up as a signal, but at least something was received!
I only received something upon startup now after 1 hour those 5 messages are still all I received, I doubt that was an error?

Good news!

What are the models of those?

The hygrometers are from TFA/Dorstmann. rtl_433 recognizes them as “Ambientweather-F007TH”. There’s one post for OpenMQTTGateway that talks about a similar (maybe same) TFA sensor: TFA Sensor not detected anymore since v0.9.6 (I tried flashing the SFB with said modified pilight version to no avail: No signal received).

The remote control is a generic remote (rtl_433 says “generic_remote”), the protocol it’s using is EV1527. Again: When I press buttons on the remote (e.g. on/off) the RF light on the SFB is blinking red, so it is physically seeing something.

It is totally weird that both ESPurna and RFLink32 work with the same hardware - I just don’t like them and would love OMG (is that the abbreviation?) to work.

This should be seen with this environment:

[env:sonoff-rfbridge-direct]
platform = espressif8266@^2
board = esp8285
lib_deps = 
	${com-esp.lib_deps}
	${libraries.rc-switch}
build_flags = 
	${com-esp.build_flags}
	'-DZgatewayRF="RF"'
	'-DRF_RECEIVER_GPIO=4'
	'-DRF_EMITTER_GPIO=5'
	'-DLED_INFO=13'
	'-DLED_INFO_ON=0'
	'-DZsensorGPIOInput="GPIOInput"'
	'-DINPUT_GPIO=0'
	'-DGateway_Name="OpenMQTTGateway_SRFB_Direct"'
board_build.flash_mode = dout
board_build.ldscript = eagle.flash.1m64.ld

Yes, that is the same environment as you posted before. I had to add the ${libraries.esppilight} dependency but besides that the device is not seen (but RF light is blinking red on button presses).

Is there no way to just have debug RF, i.e. show everything you are seeing?

You should not have to add this. Something may be wrong with your configuration files.

¡Ay, caramba!

I was on the development branch and just did a pull - big differences to the version I had downloaded via ZIP. With a fresh pull the last config you posted works!!!

I’m receiving messages in home/OpenMQTTGateway_SRFB_Direct/433toMQTT: {"value":3419907,"protocol":1,"length":24,"delay":391,"tre_state":"-","binary":"001101000010111100000011","raw":"12114,447,1202,427,1202,1261,454,1247,458,401,1225,1247,463,400,1227,401,1236,400,1226,406,1224,1248,456,403,1227,1245,458,1242,464,1238,464,1236,470,393,1231,400,1232,397,1230,403,1222,404,1228,403,1224,1247,459,1242,462,"} from the remote. Also messages are created in homeassistant/device_automation for the remote control. Unfortunately the weather sensors (or any other devices) aren’t recognized via this config, but the remote works!

I now went back to the original config (sonoff-rfbridge-direct-try) and the Pilight config still doesn’t return anything (with the RF light blinking red still), i.e. no RF to MQTT output. actRec was set to 2, I changed it to mosquitto_pub -t "home/OpenMQTTGateway/commands/MQTTtoPilight" -m '{"active":true}' still no luck.

EDIT: Correction, Pilight did receives something just not one of my devices:
{"message":{"id":159,"channel":0,"battery":1,"temperature":9.1,"humidity":0},"protocol":"nexus","length":"159","value":"159","repeats":2,"status":2}. Looking at the RTL-SDR received I’m running with RTL_433 there are a lot more messages that should be seen.