# How to access zigbee2mqtt topic / sensor name?

**URL:** https://discourse.nodered.org/t/how-to-access-zigbee2mqtt-topic-sensor-name/33899
**Category:** General
**Created:** [7 October 2020 17:42 UTC](https://discourse.nodered.org/t/how-to-access-zigbee2mqtt-topic-sensor-name/33899 "2020-10-07T17:42:13Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![diagonali](https://avatars.discourse-cdn.com/v4/letter/d/e36b37/32.png) [@diagonali](https://discourse.nodered.org/u/diagonali)
#### Post date: [7 October 2020 17:42 UTC](https://discourse.nodered.org/t/how-to-access-zigbee2mqtt-topic-sensor-name/33899/1 "2020-10-07T17:42:13Z")

</div>

I'm trying to extract the zigbee2mqtt topic from a msg.payload sent from a zigbee2mqtt sensor in Home Assistant which otherwise works perfectly but I can't see an object attribute of "topic" in the debug output. I've seen tutorials which do show it there. I can however see that "zigbee2mqtt/vb\_test" is listed above the object attributes in the debug panel. How can I access this string or how can I enable to topic to be sent/set? Attached screenshot of what I mean. Thanks

 ![Screenshot 2020-10-07 182436](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/2/9230afc6c271f10912bbb4889773b5e4e34f552e.png)

---

<div class="post-metadata">

### Author: ![diagonali](https://avatars.discourse-cdn.com/v4/letter/d/e36b37/32.png) [@diagonali](https://discourse.nodered.org/u/diagonali)
#### Post date: [7 October 2020 17:48 UTC](https://discourse.nodered.org/t/how-to-access-zigbee2mqtt-topic-sensor-name/33899/2 "2020-10-07T17:48:44Z")

</div>

I figured it out: I used msg.topic

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [21 October 2020 17:48 UTC](https://discourse.nodered.org/t/how-to-access-zigbee2mqtt-topic-sensor-name/33899/3 "2020-10-21T17:48:45Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
