[SOLVED] Sonoff RfBridge Button setup

Hello again,

I have done the last things you mentioned but they sonoff isn’t seeing any messages published. If I subscribe to the topic in my MQTT viewer the messages also aren’t coming through.

Here’s my configuration files:

Projector.items -

Switch TVScreen
String TVScreenCommand { channel="mqtt:topic:mosquitto:genericthing:tvscreen" }


 mqtt:broker:mosquitto [ host="",secure=false, username="openhab", password="habopen" ]

Bridge mqtt:broker:mosquitto [ host="localhost", secure=false, username="openhab", password="habopen" ]
    Thing topic genericthing {
	    Type string : tvscreen "TV Screen" [ commandTopic="tasmota/cmnd/sonoff-rfbridge/rfraw" ]


rule "TV Screen UP"
    Item TVScreen received command ON
    TVScreenCommand.sendCommand(transform("MAP", "sonoffrf.map", "up"))

rule "TV Screen DOWN"
    Item TVScreen received command OFF
    TVScreenCommand.sendCommand(transform("MAP", "sonoffrf.map", "down"))
    createTimer(now.plusSeconds(5), [ |
        TVScreenCommand.sendCommand(transform("MAP", "sonoffrf.map", "stop"))


Switch item=TVScreen label="TV Screen UP" mappings=[ON="UP"]
Switch item=TVScreen label="TV Screen DOWN" mappings=[OFF="DOWN"]

The only thing I can think I had to input into your example config was the channel name. The channel name was the generic mqtt string thing from paper ui: mqtt:topic:mosquitto:genericthing:tvscreen

Any ideas why this might not be working?

the logs show the following

14:19:51.984 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'TVScreen' received command ON
14:19:51.997 [INFO ] [smarthome.event.ItemStateChangedEvent] - TVScreen changed from OFF to ON
14:19:52.032 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'TVScreenCommand' received command AAB03C04081374027600DC13BA381929292929292929292929292929292929292A192A1A1A1A192A1A1929292A1A1929292929292A192A19292A192A19292955
14:19:52.038 [INFO ] [arthome.event.ItemStatePredictedEvent] - TVScreenCommand predicted to become AAB03C04081374027600DC13BA381929292929292929292929292929292929292A192A1A1A1A192A1A1929292A1A1929292929292A192A19292A192A19292955
14:19:52.055 [INFO ] [smarthome.event.ItemStateChangedEvent] - TVScreenCommand changed from AAB03C0408137E026C00DC13A6381929292929292929292929292929292929292A192A1A1A1A192A1A1929292A1A1929292929292A1A1A19292A192A192A1955 to AAB03C04081374027600DC13BA381929292929292929292929292929292929292A192A1A1A1A192A1A1929292A1A1929292929292A192A19292A192A19292955
14:20:15.788 [INFO ] [smarthome.event.ItemStateChangedEvent] - Michael_iPhone changed from OFF to ON
14:20:15.801 [INFO ] [smarthome.event.ItemStateChangedEvent] - Michael_Response_Time changed from UNDEF to 22.0
14:21:20.843 [INFO ] [smarthome.event.ItemStateChangedEvent] - Michael_iPhone changed from ON to OFF
14:21:20.853 [INFO ] [smarthome.event.ItemStateChangedEvent] - Michael_Response_Time changed from 22.0 to UNDEF
14:21:26.327 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'TVScreen' received command OFF
14:21:26.357 [INFO ] [smarthome.event.ItemStateChangedEvent] - TVScreen changed from ON to OFF
14:21:26.365 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'TVScreenCommand' received command AAB03C0408136A027600DC13C4381929292929292929292929292929292929292A192A1A1A1A192A1A1929292A1A192929292929292A1A19292A19292A1A1955
14:21:26.375 [INFO ] [arthome.event.ItemStatePredictedEvent] - TVScreenCommand predicted to become AAB03C0408136A027600DC13C4381929292929292929292929292929292929292A192A1A1A1A192A1A1929292A1A192929292929292A1A19292A19292A1A1955
14:21:26.383 [INFO ] [smarthome.event.ItemStateChangedEvent] - TVScreenCommand changed from AAB03C04081374027600DC13BA381929292929292929292929292929292929292A192A1A1A1A192A1A1929292A1A1929292929292A192A19292A192A19292955 to AAB03C0408136A027600DC13C4381929292929292929292929292929292929292A192A1A1A1A192A1A1929292A1A192929292929292A1A19292A19292A1A1955
14:21:31.376 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'TVScreenCommand' received command AAB03C0408137E026C00DC13A6381929292929292929292929292929292929292A192A1A1A1A192A1A1929292A1A1929292929292A1A1A19292A192A192A1955
14:21:31.385 [INFO ] [arthome.event.ItemStatePredictedEvent] - TVScreenCommand predicted to become AAB03C0408137E026C00DC13A6381929292929292929292929292929292929292A192A1A1A1A192A1A1929292A1A1929292929292A1A1A19292A192A192A1955
14:21:31.395 [INFO ] [smarthome.event.ItemStateChangedEvent] - TVScreenCommand changed from AAB03C0408136A027600DC13C4381929292929292929292929292929292929292A192A1A1A1A192A1A1929292A1A192929292929292A1A19292A19292A1A1955 to AAB03C0408137E026C00DC13A6381929292929292929292929292929292929292A192A1A1A1A192A1A1929292A1A1929292929292A1A1A19292A192A192A1955

If you are on 2.4 you need to restart openHAB after modifying the things file.

Aha the good old restart! Works as expected! Thank you very much for your help!

please tick the solution, thanks


i hope you can help me, i will do the same, but with the cmnd/Sonoff-RF-Bridge/Backlog command.

this is my last thing i have to change to the mqtt 2.4 version.

i have a intertechno cmr 1000 with 433mhz that i will use.

this was my working mqtt v1 config:

Rollershutter Rollershutter_GF_Living_1    					"Wohnzimmer Links"  							<rollershutter>	(GF_Living, Shutterswz) 					{ mqtt=">[mosquitto:cmnd/Sonoff-RF-Bridge/Backlog:command:up:RfSync 11310; RfLow 360; RfHigh 1050; RfCode #000015],>[mosquitto:cmnd/Sonoff-RF-Bridge/Backlog:command:down:RfSync 11310; RfLow 360; RfHigh 1060; RfCode #000014]" }

what i have tried with the mqtt v2.4 binding:

Type switch : switchrfA "Wohnzimmer Links"   	   [ stateTopic="stat/Sonoff-RF-Bridge/RESULT", commandTopic="cmnd/Sonoff-RF-Bridge/Backlog", UP="RfSync 11310; RfLow 360; RfHigh 1050; RfCode #000015", DOWN="RfSync 11310; RfLow 360; RfHigh 1060; RfCode #000014"]
Rollershutter Rollershutter_GF_Living_1    					"Wohnzimmer Links"  							<rollershutter>	(GF_Living, Shutterswz) 					{channel="mqtt:topic:mosquitto:Sonoff_RF_GF_Living:switchrfA", autoupdate="false"}

on that i got no error, in the logs i see the item is changing to UP and DOWN, but no rf command is sending…

and secound try:

Type string : switchrfA "Wohnzimmer Links"   	   [ stateTopic="stat/Sonoff-RF-Bridge/RESULT", commandTopic="cmnd/Sonoff-RF-Bridge/Backlog", on="RfSync 11310; RfLow 360; RfHigh 1050; RfCode #000015", off="RfSync 11310; RfLow 360; RfHigh 1060; RfCode #000014", on="UP", off="DOWN" ]
String Rollershutter_GF_Living_1    					    "Wohnzimmer Links"  							<rollershutter>	(GF_Living, Shutterswz) 					{channel="mqtt:topic:mosquitto:Sonoff_RF_GF_Living:switchrfA", autoupdate="false"}
Switch item=Rollershutter_GF_Living_1 mappings=[ON="UP", OFF="DOWN"] label="Rollo Links"

here the same.

the ,on=“UP”, off=“DOWN” in the thing file i have only on one, on a secound i have it without this, is also not woking!
i dont know how do i need to write this that its working :neutral_face:

i can receive rf data with the mqtt 2.4 binding

Did you check what is actually being published to the MQTT broker?
Use MQTT Explorer

Hello, with the mqtt explorer i get:



and when i subscribe cmnd/Sonoff-RF-Bridge/Backlog/# i get


as message, not the code!

this is with the setup of the secound try, but it is a string, and not a switch, why i get ON ore OFF and not the Code i have definite as ON in the thing file?

now i have changed the type string to switch in the thing file and the item file, now it is working, i already had it, but it did not work bevore, i dont know why its working now, but thank you for your help :slight_smile:
ore maybe i missed in the item file the rollershutter type to change, thats possible