Trouble with Sonoff RF Bridge - MQTT messages not showing in Hassio console so not working

I’m not sure if I’ve described the error I’m getting properly in the title so hopefully I can explain it a bit better.

I have 10 Sonoff devices functioning fine. Plugs, Switches, all OK. I had a Sonoff RF functioning fine but I upgraded the firmware and it stopped functioning, quite a while ago. It’s to receive signals from a PIR, some door sensors and some remotes. That part works fine now I have reflashed it with Tasmota (various versions, latest and old with the same results).

When I press a button on a remote, it’s supposed to toggle a switch within home assistant. This used to work fine but now doesn’t.

When connecting via SSH I can see the MQTT messages for the Sonoff/Tasmota switches when they are toggled just fine (using the command ‘hassio homeassistant logs’ I can see ‘2019-06-20 17:15:13 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on stat/sonoff10/RESULT: b’{“POWER”:“ON”}’
2019-06-20 17:15:13 DEBUG (MainThread) [homeassistant.components.mqtt] Received message on stat/sonoff10/POWER: b’ON’). However… When I press a button on the remote, the console for the RF Bridge displays it’s seen it but no message is forwarded to Home Assistant.

When rebooting Home Assistant I get the message ‘[homeassistant.components.mqtt] Subscribing to stat/sonoff6/POWER’ for each of my devices but NOT for the RF Bridge. It’s as though it can’t see it properly?

MQTT settings are fine, I can see the device under the MQTT addon logs appearing fine with no errors. ‘1561047137: New client connected from 192.168.1.90 as DVES_8266F7 (c1, k15, u’homeassistant1’).’

I’ve tried setting a static IP and also leaving it at the one assigned by the router, no difference.

Console output from a working device -

00:00:00 Project sonoff Bedroom Lamp (Topic sonoff1, Fallback DVES_4F9F1E, GroupTopic sonoffs) Version 6.1.1-2_3_0
00:00:00 WIF: Connecting to AP1 DrayTek in mode 11N as sonoff1-7966…
00:00:03 WIF: Connected
00:00:03 DNS: Initialized
00:00:03 HTP: Web server active on sonoff1-7966.local with IP address 192.168.1.41
15:50:55 MQT: Attempting connection…
15:50:57 MQT: Connected
15:50:57 MQT: tele/sonoff1/LWT = Online (retained)
15:50:57 MQT: cmnd/sonoff1/POWER =
15:50:57 MQT: stat/sonoff1/RESULT = {“POWER”:“OFF”}
15:50:57 MQT: stat/sonoff1/POWER = OFF
15:50:57 MQT: tele/sonoff1/INFO1 = {“Module”:“Sonoff Basic”,“Version”:“6.1.1”,“FallbackTopic”:“DVES_4F9F1E”,“GroupTopic”:“sonoffs”}
15:50:57 MQT: tele/sonoff1/INFO2 = {“WebServerMode”:“Admin”,“Hostname”:“sonoff1-7966”,“IPAddress”:“192.168.1.41”}
15:50:57 MQT: tele/sonoff1/INFO3 = {“RestartReason”:“Software/System restart”}
15:50:57 MQT: homeassistant/light/sonoff1_1/config = (retained)
15:50:57 MQT: homeassistant/switch/sonoff1_1/config = {“name”:“Bedroom Lamp”,“command_topic”:“cmnd/sonoff1/POWER”,“state_topic”:“stat/sonoff1/RESULT”,“value_template”:"{{value_json.POWER}}",“payload_off”:“OFF”,“payload_on”:“ON”,“availability_topic”:“tele/sonoff1/LWT”,“payload_available”:“Online”,“payload_not_available”:“Offline”} (retained)
15:50:57 MQT: homeassistant/light/sonoff1_2/config = (retained)
15:50:57 MQT: homeassistant/switch/sonoff1_2/config = (retained)
15:50:57 MQT: homeassistant/light/sonoff1_3/config = (retained)
15:50:57 MQT: homeassistant/switch/sonoff1_3/config = (retained)
15:50:57 MQT: homeassistant/light/sonoff1_4/config = (retained)
15:50:57 MQT: homeassistant/switch/sonoff1_4/config = (retained)
15:50:57 MQT: homeassistant/light/sonoff1_5/config = (retained)
15:50:58 MQT: homeassistant/switch/sonoff1_5/config = (retained)
15:50:58 MQT: homeassistant/light/sonoff1_6/config = (retained)
15:50:58 MQT: homeassistant/switch/sonoff1_6/config = (retained)
15:50:58 MQT: homeassistant/light/sonoff1_7/config = (retained)
15:50:58 MQT: homeassistant/switch/sonoff1_7/config = (retained)
15:50:58 MQT: homeassistant/light/sonoff1_8/config = (retained)
15:50:58 MQT: homeassistant/switch/sonoff1_8/config = (retained)
15:50:59 MQT: stat/sonoff1/RESULT = {“POWER”:“OFF”}
15:50:59 MQT: stat/sonoff1/POWER = OFF
15:51:06 MQT: tele/sonoff1/STATE = {“Time”:“2019-06-20T15:51:06”,“Uptime”:“0T00:00:20”,“Vcc”:3.193,“POWER”:“OFF”,“Wifi”:{“AP”:1,“SSId”:“DrayTek”,“RSSI”:42,“APMac”:“00:1D:AA:6D:10:D0”}}
15:56:08 MQT: tele/sonoff1/STATE = {“Time”:“2019-06-20T15:56:07”,“Uptime”:“0T00:05:21”,“Vcc”:3.194,“POWER”:“OFF”,“Wifi”:{“AP”:1,“SSId”:“DrayTek”,“RSSI”:38,“APMac”:“00:1D:AA:6D:10:D0”}}
16:00:55 APP: Serial logging disabled
16:01:08 MQT: tele/sonoff1/STATE = {“Time”:“2019-06-20T16:01:08”,“Uptime”:“0T00:10:22”,“Vcc”:3.194,“POWER”:“OFF”,“Wifi”:{“AP”:1,“SSId”:“DrayTek”,“RSSI”:42,“APMac”:“00:1D:AA:6D:10:D0”}}
16:02:00 MQT: tele/sonoff1/UPTIME = {“Time”:“2019-06-20T16:02:00”,“Uptime”:“0T00:11:14”}
16:06:08 MQT: tele/sonoff1/STATE = {“Time”:“2019-06-20T16:06:08”,“Uptime”:“0T00:15:22”,“Vcc”:3.192,“POWER”:“OFF”,“Wifi”:{“AP”:1,“SSId”:“DrayTek”,“RSSI”:40,“APMac”:“00:1D:AA:6D:10:D0”}}

Console output from the RF Bridge -

00:00:00 APP: Set Baudrate to 19200
00:00:00 Project sonoff RF Bridge (Topic sonoff_rf, Fallback DVES_8266F7, GroupTopic sonoffs) Version 6.1.1-2_3_0
00:00:00 WIF: Connecting to AP1 DrayTek in mode 11N as sonoff_rf-1783…
00:00:03 WIF: Connected
00:00:03 DNS: Initialized
00:00:03 HTP: Web server active on sonoff_rf-1783.local with IP address 192.168.1.90
00:00:05 MQT: Attempting connection…
00:00:06 MQT: Connected
00:00:06 MQT: tele/sonoff_rf/LWT = Online (retained)
00:00:06 MQT: cmnd/sonoff_rf/POWER =
00:00:06 MQT: tele/sonoff_rf/INFO1 = {“Module”:“Sonoff Bridge”,“Version”:“6.1.1”,“FallbackTopic”:“DVES_8266F7”,“GroupTopic”:“sonoffs”}
00:00:06 MQT: tele/sonoff_rf/INFO2 = {“WebServerMode”:“Admin”,“Hostname”:“sonoff_rf-1783”,“IPAddress”:“192.168.1.90”}
00:00:06 MQT: tele/sonoff_rf/INFO3 = {“RestartReason”:“Software/System restart”}
15:59:14 MQT: tele/sonoff_rf/STATE = {“Time”:“2019-06-20T15:59:14”,“Uptime”:“0T00:00:13”,“Vcc”:3.124,“Wifi”:{“AP”:1,“SSId”:“DrayTek”,“RSSI”:80,“APMac”:“00:1D:AA:6D:10:D0”}}
16:00:00 MQT: tele/sonoff_rf/RESULT = {“RfReceived”:{“Sync”:12460,“Low”:410,“High”:1220,“Data”:“D49B1E”,“RfKey”:“None”}}
16:00:28 MQT: tele/sonoff_rf/RESULT = {“RfReceived”:{“Sync”:12540,“Low”:420,“High”:1220,“Data”:“D49B1E”,“RfKey”:“None”}}
16:02:00 MQT: tele/sonoff_rf/UPTIME = {“Time”:“2019-06-20T16:02:00”,“Uptime”:“0T00:02:59”}
16:03:47 MQT: tele/sonoff_rf/RESULT = {“RfReceived”:{“Sync”:13140,“Low”:430,“High”:1250,“Data”:“FA97D1”,“RfKey”:“None”}}
16:03:49 MQT: tele/sonoff_rf/RESULT = {“RfReceived”:{“Sync”:13060,“Low”:420,“High”:1270,“Data”:“FA97D1”,“RfKey”:“None”}}
16:04:16 MQT: tele/sonoff_rf/STATE = {“Time”:“2019-06-20T16:04:16”,“Uptime”:“0T00:05:15”,“Vcc”:3.123,“Wifi”:{“AP”:1,“SSId”:“DrayTek”,“RSSI”:78,“APMac”:“00:1D:AA:6D:10:D0”}}
16:08:35 MQT: tele/sonoff_rf/RESULT = {“RfReceived”:{“Sync”:12660,“Low”:430,“High”:1210,“Data”:“080521”,“RfKey”:“None”}}
16:09:11 APP: Serial logging disabled
16:09:24 MQT: tele/sonoff_rf/STATE = {“Time”:“2019-06-20T16:09:24”,“Uptime”:“0T00:10:23”,“Vcc”:3.122,“Wifi”:{“AP”:1,“SSId”:“DrayTek”,“RSSI”:70,“APMac”:“00:1D:AA:6D:10:D0”}}

Any ideas? It’s driving me NUTS!

More info - I have configured MQTTlens for Chrome and connected to the Home Assistant MQTT instance and when I subscribe to ‘tele/sonoffrf/RESULT’ the button presses on the RF remote display so the RF Bridge is forwarding them, they just aren’t being noticed by Home Assistant…

You have to either use MQTT discovery, or set up configuration.yaml for the device.

Which one are you doing?

If configuration.yaml, then post your config.

I’ve tried both. If I turn on discovery within the tasmota device config (SetOption19 1), Home Assistant finds the device under MQTT discovery. I’ve not added a specific switch like the rest of the devices in Home Assistant, rather this config in an automations.yaml (with this in configuration.yaml - automation: !include includes/automations.yaml)

#Home Alarm on (George)
  - alias: Home Alarm On (Georges Fob)
    trigger:
     platform: mqtt
     topic: tele/sonoff0/RESULT
    condition:
     condition: template
     value_template: '{{ trigger.payload_json.RfReceived.Data == "FA97D1" }}'      
    action:
     service: input_boolean.turn_on
     entity_id: input_boolean.home_alarm

#Home Alarm off (George)
  - alias: Home Alarm Off (Georges Fob)
    trigger:
     platform: mqtt
     topic: tele/sonoff0/RESULT
    condition:
     condition: template
     value_template: '{{ trigger.payload_json.RfReceived.Data == "FA97D2" }}'      
    action:
     service: input_boolean.turn_off
     entity_id: input_boolean.home_alarm

There is a quite a bit more, relating to other rf sensors and switches but this is the same format for all the devices. Can post more if you think it’ll help.

Really appreciate your reply, I’m on holiday now and would love to get these talking to each other so I can know if someone’s wandering around the house while we are away!