Help with Sonoff-Tasmota RF Bridge Switch Config


I am Trying to automate on/off Christmas decorations on the cheap. I had some 433 plug switchers and I saw some good stuff on youtube about the Sonoff RF Bridge and Tasmota.

So I have successfully flashed my RF Bridge and Tasmota is running. I also have programmed some of the 16 pre-sets to turn on and off my plugs. For example Button 1 Turns on my Christmas Tree and Button two turns it off. I see in the Console that stat/RF_Bridge/RESULT = {“RfKey2”:“Learned sent”} (When the signal is sent) I have also figured out that I can trigger the key via my MQTT server that the RF Bridge is publishing and subscribed to using cmnd/RF_Bridge/rfkey2 at the topic (No Payload)

SO THE BIT I A CONFUSED ON! This is the HASS configuration I am looking to setup this a switch so I can say Hey Google Turn the Christmas Tree on… And Whala!
I have worked out (I think the State Topic and the Command Topic as per above
State = stat/RF_Bridge/RESULT
Command = cmnd/RF_Bridge/rfkey2

So any of you cleaver people can help me out with the Hass configuration as a switch for the above?

There is a very easy way to send Codes via MQTT through the Sonoff RF Bridge which does not need to bind codes to rfkeys.
Open the Tasmota Console runiing on your RF Bridge. Then press the “ON” Button on your original remote. In the console you’ll see something like :


Data":“0414025” contains the code in hex. form.
Simply publish this code as payload #0414025 (# is very important) to the topic cmnd/RF_Bridge/rfcode
You can repeat this with many codes as you like.

In configuration.yaml file, I defined the switch like this:

- platform: mqtt
  name: "RFPlug-1"
  command_topic: cmnd/RF_Bridge/rfcode
  availability_topic: "tele/RF_Bridge/LWT"
  payload_available: "Online"
  payload_not_available: "Offline"
  payload_on: "#0414025"
  payload_off: "#0414026"
  optimistic: true

In Home Assistant, the Switch will appear like this:

Hope this helps you in your setup.


Hi @hiscorebob

Thank you for you amazing explanation and I feel like I am at the cusp of solving this now.

Here is an example of me pushing the button on my remote to turn a plug on and the console output…

18:09:10 MQT: tele/RF_Bridge/RESULT = {"RfReceived":{"Sync":5730,"Low":180,"High":550,"Data":"551500","RfKey":"None"}}
18:09:10 MQT: tele/RF_Bridge/RESULT = {"RfReceived":{"Sync":5710,"Low":180,"High":550,"Data":"551533","RfKey":1}}
18:09:11 MQT: tele/RF_Bridge/RESULT = {"RfReceived":{"Sync":5730,"Low":180,"High":550,"Data":"551500","RfKey":"None"}}
18:09:14 MQT: tele/RF_Bridge/RESULT = {"RfReceived":{"Sync":5720,"Low":190,"High":550,"Data":"551500","RfKey":"None"}}
18:09:15 MQT: tele/RF_Bridge/RESULT = {"RfReceived":{"Sync":5710,"Low":180,"High":550,"Data":"551533","RfKey":1}}
18:09:16 MQT: tele/RF_Bridge/RESULT = {"RfReceived":{"Sync":5730,"Low":180,"High":550,"Data":"551500","RfKey":"None"}}
18:09:18 MQT: tele/RF_Bridge/RESULT = {"RfReceived":{"Sync":5720,"Low":180,"High":550,"Data":"551533","RfKey":1}}
18:09:18 MQT: tele/RF_Bridge/RESULT = {"RfReceived":{"Sync":5740,"Low":180,"High":550,"Data":"551500","RfKey":"None"}}```

The numbers change and I have tried both 551500 and 551533 both without success.

My config looks like this…

    - platform: mqtt
      name: "Tree"
      command_topic: cmnd/RF_Bridge/rfcode
      availability_topic: "tele/RF_Bridge/LWT"
      payload_available: "Online"
      payload_not_available: "Offline"
      payload_on: "#551533"
      payload_off: "#551500"
      optimistic: true

When I try the on and off button in HA I see this in the console…

ON = 18:16:08 MQT: stat/RF_Bridge/RESULT = {"RfCode":"#551533"}
OFF = 18:16:08 MQT: stat/RF_Bridge/RESULT = {"RfCode":"#551500"}

So it looks like it is sending but the plug is not reacting to the code?

Also it looks like all my off buttons on the remote output the same code 551500

1 Like

I had the same issue with one remote. Just keep pressing the button a few times, or keep it pressed for a few seconds. Also being near the Bridge (at ~50cm) might help you find the codes

1 Like


SOLVED! (I hope for now!)

I tried two things…

  1. In the console of the RFBridge I Typed rfkey1 4 I believe this saved the RFLow, RFHigh and RFSync data to the default for that key as default? Maybe / Maybe not? But it was one of the things I tried.
  2. I manually set the RFLow, RFHigh and RFSync data using the following in the console…
    RFLow 190
    RFHigh 550
    RFSync 5720

Now when my HA sends the codes is uses this RF data along with the code?

Ignorance is bliss!

Thanks for your help @hiscorebob :star2:

1 Like

Hi, i am having the same issue, can you please tell me how to set the RFlow, RFHigh and RFSync in console. thank you.

Hi @marcelmarsh

Using the data you get in the console on the Sonoff RFBridge running Tasmota from when you press a button on the remote for your RF plugs.

Here is an example of one of my devices.

tele/RF_Bridge/RESULT = {"RfReceived":{"Sync":5710,"Low":180,"High":550,"Data":"551533","RfKey":1}}

In the “Enter Command Box” you can enter the following commands…

RFLow 190
RFHigh 550
RFSync 5720

Obviously depends on the numbers you get from your output in the console will depend on the numbers you enter here.

This seemed to work for me.

Hi all,

FYI, I believe to be simpler. See automation in Node Red.
To submit commands from Sonoff RF Bridge just put the Topic payload of “cmnd/RF_Bridge/RFCODE” and make sure you inject the command learned previously with an # before the number/string

Hope this helps.


Thank you Nuno. One question, once done what you show in the screenshot, where do we put the “Call Service” (or any other) node to do the automatization?
This is, once you have the payload on from the RF, where do we put the actions we want to do?
Thank you very much in advance