MQTT Client setup (with Sonoff/ Tasmota Rules)

Hello all,

I’m trying to use MQTT Client ( combined with a D1 mini running Tasmota. I’ve created a ‘rule’ ( to send a MQTT message once a certain value is reached on a sensor attached to the D1. However I’m uncertain of how to setup the MQTT Client trigger.

I see the tag ‘Message received from topic’ & ‘Name Topic’ but the text to the right is cut off from the screen (I’ve tried rotating to no avail). What is the correct format to use? Must tags be used or can I get the D1 to send out any particular message that the client will recognise & trigger on?



Those are the tags that the trigger flow card provides (and that you can use in condition/action cards, for instance). Because the MQTT Client can trigger on wildcard topics, the Name Topic tag can be used to determine the exact topic that the message was posted to.

The “Topic” part is the one that you have to fill in, and should contain the topic that the rule will post a message to.

Thanks both for the replies. I’m still having some difficulty however. From the console of the D1 when a switch is activated the following MQTT appear to be sent:

11:02:15 MQT: stat/post/RESULT = {"POWER":"ON"}
11:02:15 MQT: stat/post/POWER = ON
11:02:15 MQT: stat/post/RESULT = {"POWER":"OFF"}
11:02:16 MQT: stat/post/POWER = OFF

So to capture this switch activation on the MQTT client would it be correct to construct the flow as follows:

No luck so far with this but I think the setup is complicated but the UI. On my android phone it’s not possible to select the Tags (in green) as indicated by the arrows in the picture, but it is on my Firefox browser (& Chromium).

The topics in your example are stat/post/RESULT and stat/post/POWER. Everything after the = is the message.

Thanks Robert. On selection of the green tag (eg. ‘Message received from topic’) is another text box meant to appear? As currently this is the only way I can enter text:

& from MQTT Client logs it doesn’t seem like the topic is being correctly subscribed to:


The topic field should only contain the topic name (stat/power/POWER), not the tag.

For example (from the flow web interface):

Ahh, I see. Thanks very much, Ive managed to get it working now.

Is there anyway to examine the MQTT message (e.g. ON or OFF)?

Yes, that’s where you can use the tag. For instance in an “AND” card (using Logic “equals”):


  • “Bericht ontvangen via topic” = “Message received from topic”
  • “is precies” = “equals”

Thanks very much indeed, got it now.

For anyone else following here it is put together:

1 Like

Here’s how I used this setup