Sonoff motion sensor + MQTT + Automations - Help needed. - Completely new to this

I am trying to make, what I thought, was a quite simple setup, but it is turning out to be more complicated than I thought

A Sonoff motion sensor, activating a Sonoff switch, followed by the switch turning off 5 minutes after the last motion detected by the sensor.

My setup:

  • Sonoff motion sensor

  • Sonoff RF bridge running tasmota

  • Sonoff Basic running tasmota

  • Home Assistance running on Rasperry PI

  • Mosquitto running on the home assistance

Whenever the motion detector activates, I can see the following message in the RF bridge’s consol:

07:52:45 MQT: RF_Bridge/tele/RESULT = “RfReceived”:{“Sync”:12510,“Low”:430,“High”:1240,“Data”:“EA04BE”,“RfKey”:“None”}}

So I know that the topic I should listen for is “RF_Bridge/tele/RESULT” and the payload is “EA04BE”.

When I look in the Mosquitto log, I see that the bridge is connected:

1548501425: New client connected from as RF_Bridge (c1, k10, u’mqtt’).

And when I monitor the topic inMQTTlens, I get the following, when the sensor is activated:

{ “RfReceived”: { “Sync”: 15300, “Low”: 440, “High”: 1230, “Data”: “EA04BE”, “RfKey”: “None” } }

So far, I know that the RF Bridge receives the signal from the sensor and that the RF bridge is connected to Mosquitto, and that Mosquitto receives the signal from the bridge, but the light does not turn on, when the motion sensor is activated.

When I publish a packet with the topic “RF_Bridge/tele/RESULT” and the payload “EA04BE” the light turns on, which is great and points me towards thinking that it is my binary sensor part that does not work.

Any ideas, advice and suggestions will be highly appreciated.

This is my config on the MQTT on the RF bridge, binary sensor and automations;


I think you need a lower case f in RfReceived in your value_template.

1 Like

WOW! That was the issue! Thank you very much!

1 Like

Is Line 6 correct…
Should be payload_off?