Sonoff RF Bridge - Cheap RF switches in UK

I was looking at using the RF Bridge with inexpensive hardware switches - I had a number of RF devices around the house - old wireless plugs and controllers, doorbell switches etc., but after ordering a Sonoff RF Bridge found that this would either not recognise the RF packets or the sender was using a rolling code that would make it difficult to integrate into logic within HA.

I took the plunge and bought a dirt cheap RF based remote plug system from my local superstore (Asda in Nottingham UK) and to my delight, this has a sender that has easy to use transmission packets with no rolling code to complicate matters. The sender has 10 buttons that can be assigned to ten different functions within HA - perfect!

The plug package from Asda is a “Masterplug remote control socket - 2 pack - SWITCHED POWER”

To get everything working, I flashed my RF Bridge with Tasmota, giving me mqtt messages in the form of:
tele/rf-bridge/STATE
and the payload looks like the following json:
{“RfReceived”:{“Sync”:10350,“Low”:320,“High”:830,“Data”:“F6250B”,“RfKey”:“None”}}
I followed advice from DrZZs in order to get the Data component of this json (it is the Data item that is different for each button) and bingo.

To create this setup, I needed to first set up the messages as an MQTT Binary Sensor:

binary_sensor:
  - platform: mqtt
    hidden: true
    name: "RF Plug"
    state_topic: "tele/rf-bridge/RESULT"
    value_template: '{{value_json.RfReceived.Data}}'
    payload_on: 'F6250F'
    payload_off: 'F6250E'
    optimistic: false
    qos: 1
    retain: true

and then to process this, create automations to perform whatever I require - in the following case I wanted to control another Tasmota Sonoff device:

- id: rf_plug_on
  alias: RF Plug On
  initial_state: 'on'
  trigger:
    platform: state
    entity_id: binary_sensor.rf_plug
    to: 'on'
  action:
    service: switch.turn_on
    data:
      entity_id: switch.plug

- id: rf_plug_off
  alias: RF Plug Off
  initial_state: 'on'
  trigger:
    platform: state
    entity_id: binary_sensor.rf_plug
    to: 'off'
  action:
    service: switch.turn_off
    data:
      entity_id: switch.plug

I will freely admit that my code could probably be improved upon, however I am just delightedto now have 10 individually operating buttons,working at 100x the speed of my Dash buttons (via Dashio) and at around a 10th of the cost!
I

1 Like

This is interesting and it’s nice to see some UK hardware recommendations :slight_smile:

I’m not sure how it is one tenth the cost of using Dash buttons though because they are essentially free. however a remote with ten buttons and super fast response is still probably worth £17 (from Wickes, unless your Asda was cheaper!)

Are you actually using the plugs too or just the remote?

EDIT: Wow! just searched Asda… £12!!

I have not managed to grab a Dash button when they are on free offer :frowning: - I did buy one at half price recently but this still works out at ÂŁ2.50 each.

Yes - I think I paid ÂŁ12 for my pack. I am not using the plugs at present - but might mix and match - no reason why some plugs could be used as well as the RF connectivity via the Sonoff RF

My code is not yet perfect… I need to use a status flag for my switches I think - or play with the QOS and Retain options. At the moment, if I turn on a switch using my RF command, then try and turn it off using a different HA device, it takes a couple of goes to understand that the switch really is on and should be turned off!

The speed of response is definitely nice to have, as is the availability of 10 configurable buttons.

I am sad that my Byron doorbell uses a transmission that cannot be determined by the Sonoff RF Bridge (although I read on the Tasmota page that it might be possible to update the RF firmware - which might allow access to more RF devices - but I need to see comments from others before I jump down that particular route. Not keen on bricking my one and only Sonoff RF Bridge just at this moment.

I don’t want to be a bore but don’t you get that credited towards your first purchase? So if you get a Dash button for a product you want and use it once then it becomes free?

Anyway that is not the point. Those plugs are a nice find at ÂŁ12. Thanks!

Read the T&Cs, you’re missing the best bit!

Not boring - very polite!
It is a good point you make - I need to check whether there are any Dash Button items at a sensible price that I want to buy!
I use Amazon for all kinds of things but maybe not anything that is purchasable via a Dash Button - but I could be wrong.

T&Cs for the Amazon Dash Button or for the Master Plug RF plug set?

I’ve been using the Asda sold Status 433 plugs with HA for a few years. All codes were easily scanned using https://pypi.org/project/rpi-rf/ and controlled using https://github.com/1technophile/OpenMQTTGateway

I would be surprised if the Sonoff RF bridge had trouble using these plugs as well.

Do you mean that they credit you with £4.99 even if you buy the Dash button at a discounted price? I didn’t know that!

Please can you explain a bit more. I have just done my first experiment with a dash button to control a script in HA. I do not have the RF bridge, (or any RF devices). Could the Asda remote fire a HA script if I bought the RF bridge, or is it just for controlling RF devices? I’m more interested in getting extra buttons than plugs!

The RF Bridge can be flashed with Tasmota like any similar device - see https://github.com/arendst/Sonoff-Tasmota/wiki/Sonoff-RF-Bridge-433

Then you set the MQTT topic you want it to use, and this can be picked up in your HomeAssistant and scripts can be triggered when specific MQTT messages are received. - a different message for each button means that a different script can be run for each of the 10 buttons on the Asda RF keypad.

The speed is what makes it extra useful - the Amazon Dash buttons have to wake up, connect to WiFi, then HomeAssistant has to notice they have connected - all this takes a few seconds more than the fast RF message.

You can read my scripts above to see how to read the MQTT messages sent using different buttons. I also show how I can turn a switch on and off.

Can you explain how you added switch to the plug?
I have 3 rf plugs, each have ‘on’ and ‘off’ codes, I want to control them like a HA switch to turn them on and off, not only with automation, cant find the proper way.
I have lights connected to each plug and I want to be able to control them.

Sorry but my post was nothing to do with RF PLUGS. My post uses an RF SWITCH or transmitter in combination with an RF RECEIVER (the Sonoff RF Bridge) and then HA is used to interpret the RF signals and send ON / OFF messages or any other signals to MQTT devices.

Other very good (UK) RF transmitters I’m using aswell…

Kerui D026 Battery Sensor. Sends codes for open,Closed,Tamper and Low Battery
GLS Touch - 1,2,3,4G RF Remote Switches (mains Powered - L+N) in White/Gold/Black. (Their RF receiver switches can similarly be controlled from the RF Bridge). I also have tested the GLS Touch RF panel paired directly with a Tasmota’d RF 4CH Pro +Sonoff RF. Both work well.

Maybe I didn’t describe my problem clear, sorry.
I have hassio installed, I bought ‘sonoff rf bridge’ and flashed it with Tasmota.
I bought few rf wall socket to control some water pump I need to control the on off time or manually turn it on and off. That socket have a remote with on off button.
I can read the remote signal with the ‘rf bridge’ I can also teach the ‘rfkey1’ to be the on and ‘rfkey2’ to act as off insted of the remote that I have.
My problem is that I cant find how to create a toggle switch on the HA to be able to switch the pump directly from HA.
It seems to me similar to what you have done, isn’t it?
If not, maybe you know a solution as I cant find any.
If yes, can you please share the switch yaml.
Thanks

1 Like

The confusion is over the words for “switch” “socket” and “plug”.
I have a different setup to yours… I do not have any RF plugs or sockets. I am using RF signals from a hand held RF multi button device to communicate with my Sonoff RF Bridge which converts the RF messages to mqtt that is acted upon by HA. The Sonoff RF Bridge converts the RF to MQTT which is understood by HA so HA can then perform actions such as turning on my Tasmota based switches and plugs or any other items managed by HA. I do not have any wall sockets or devices that receive RF. The only device acting as an RF receiver in my setup is the Sonoff RF Bridge.

I know you can do what you want want (you want HA - > mqtt -> Sonoff RF Bridge -> RF Socket/plug) but I don’t know know how to do that without researching it myself.

If you are sure that the sockets use fixed RF codes (and not a “rolling” code system) then I am sure you can do what you want. I assume you have flashed your Sonoff RF Bridge with Tasmota? I think I remember seeing info on the Tasmota Github pages explaining how to trigger an RF message based on a mqtt message from HA. Have a look around to see if you can find this info.

Good luck!

Thanks, now its clear, I didn’t realize you are just.using the rf buttons.
I’ll check at some other locations, the most deficult part is it to make a ‘toggle switch’ on HA that will send the on off codes.

Just a quick couple of question regarding the pack you bought from Asda. Are you just using the 12-button remote, from that pack, to control other types of switches? Aren’t the power sockets that come in the pack RF?

Thanks

I am currently not using the power switches in that pack, just the 12 button remote. It seems a little wateful, but I am thinking of buying another pack and then I will have one remote used for HA controllable switches and one for RF switches.

A little update on how I use the switches to control MQTT devices…
Up until recently I was using a rather convoluted method of creating a switch system to react to these RF signals involving the creation of binary like this:

binary_sensor:
  - platform: mqtt
    name: "RF A"
    state_topic: "tele/rf-bridge/RESULT"
    value_template: '{{value_json.RfReceived.Data}}'
    payload_on: 'F6250F'
    payload_off: 'F6250E'
    qos: 0

But I have finally worked out a simpler and more direct approach. The following automation will fire off an MQTT command to toggle a light directly. Simple

- id: light_on
  alias: Light On
  hide_entity: true
  trigger:
    platform: mqtt
    topic: tele/rf-bridge/RESULT
  condition:
    condition: template
    value_template: '{{ trigger.payload_json.RfReceived.Data == "F6250D" }}'      
  action:
    service: mqtt.publish
    data:
      topic: 'cmnd/my_light/power'
      payload: "toggle"
`` 
This may be obvious to some but I hope will help others who want to use these RF buttons in an easy way.
4 Likes