# Topic for mqtt node?

**URL:** <https://discourse.nodered.org/t/topic-for-mqtt-node/16890>\
**Category:** General\
**Created:** [19 October 2019 16:58 UTC](https://discourse.nodered.org/t/topic-for-mqtt-node/16890 "2019-10-19T16:58:06Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ruraldev](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ruraldev/32/13365_2.png) [@ruraldev](https://discourse.nodered.org/u/ruraldev)\
**Post date:** [19 October 2019 16:58 UTC](https://discourse.nodered.org/t/topic-for-mqtt-node/16890/1 "2019-10-19T16:58:06Z")

</div>

I'm a newbie to node red and I just can't seem to work out the correct topic value for an MQTT node, I am using Tasmota on a Sonoff device and Mosquitto MQTT.

If I use "#" as the topic value I get

tele/sonoff/SENSOR : msg.payload : string[91]

"{"Time":"2019-10-19T17:50:44","SI7021":{"Temperature":14.6,"Humidity":68.7},"TempUnit":"C"}"

This makes sense to me and. if I use "tele/#" as the topic it works as well, however if I use either "sonoff" or "tele/sonoff" I don't get any response.

In Tasmota I have the topic set as "sonoff" and "%prefix%/%topic%/" as the full topic.

Everywhere I look it seems to imply that "sonoff" as the topic should work, what am I doing wrong?

Hope someone can tell me where I am going wrong.

Gordon

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [19 October 2019 17:13 UTC](https://discourse.nodered.org/t/topic-for-mqtt-node/16890/2 "2019-10-19T17:13:09Z")

</div>

this should be it:

> [@ruraldev](#):
>
> tele/sonoff/SENSOR

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [19 October 2019 17:13 UTC](https://discourse.nodered.org/t/topic-for-mqtt-node/16890/3 "2019-10-19T17:13:46Z")

</div>

Keeping things simple, # is a wildcard.  
So # matches anything  
tele/# matches anything starting with tele  
tele/sonoff/# matches anything starting tele/sonoff

---

<div class="post-metadata">

**Author:** ![ruraldev](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ruraldev/32/13365_2.png) [@ruraldev](https://discourse.nodered.org/u/ruraldev)\
**Post date:** [19 October 2019 17:17 UTC](https://discourse.nodered.org/t/topic-for-mqtt-node/16890/4 "2019-10-19T17:17:59Z")

</div>

Thanks, I had tried "sonoff/SENSOR" earlier but not since I worked out it needed to start "tele" rookie mistake!

---

<div class="post-metadata">

**Author:** ![hominidae](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hominidae/32/4174_2.png) [@hominidae](https://discourse.nodered.org/u/hominidae)\
**Post date:** [19 October 2019 17:20 UTC](https://discourse.nodered.org/t/topic-for-mqtt-node/16890/5 "2019-10-19T17:20:23Z")

</div>

when connecting to the sonoff device, the topic(s) can be seen at the console output during logging events

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [19 October 2019 17:21 UTC](https://discourse.nodered.org/t/topic-for-mqtt-node/16890/6 "2019-10-19T17:21:57Z")

</div>

Try [mqtt explorer](http://mqtt-explorer.com) to get a better view of the topics in the broker (can also be copied from there)
