# Sonoff ZigBee Tasmota and Node Red

**URL:** <https://discourse.nodered.org/t/sonoff-zigbee-tasmota-and-node-red/46036>\
**Category:** General\
**Created:** [21 May 2021 13:56 UTC](https://discourse.nodered.org/t/sonoff-zigbee-tasmota-and-node-red/46036 "2021-05-21T13:56:19Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [21 May 2021 14:44 UTC](https://discourse.nodered.org/t/sonoff-zigbee-tasmota-and-node-red/46036/2 "2021-05-21T14:44:08Z")

</div>

This topic was about the same thing it should have all you need

> [@Parsing nested object with wildcard](https://discourse.nodered.org/t/parsing-nested-object-with-wildcard/45802):
>
> I have a series of incoming MQTT messages which I use a JSON node to convert to an object. When I only had a few devices I used a Switch node to separate each device but it's getting unwieldy. A sample message is "{"ZbReceived":{"Laser":{"Device":"0x1FFC","Name":"Laser","Power":0,"Endpoint":1,"LinkQuality":39}}}" The problem I have is that 'Laser' varies for each device so I also get "{"ZbReceived":{"Front":{"Device":"0x8664","Name":"Front","Illuminance":31630,"Endpoint":2,"LinkQuality":39}}…

[edit There are 4 example flows and the finished flow from the OP is in post 17 and the first example shows how to capture the device name

And here is another example just using the Name

```auto
[{"id":"d461676b.baf408","type":"inject","z":"c74669a0.6a34f8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"ZbReceived\":{\"0x85AE\":{\"Device\":\"0x85AE\",\"Name\":\"Rancilio1\",\"0006!02\":\"\",\"Power\":2,\"Endpoint\":1,\"LinkQuality\":107}}}","payloadType":"json","x":150,"y":1040,"wires":[["2880133b.ff063c"]]},{"id":"2880133b.ff063c","type":"switch","z":"c74669a0.6a34f8","name":"","property":"payload.ZbReceived.*.Name","propertyType":"jsonata","rules":[{"t":"eq","v":"Rancilio1","vt":"str"},{"t":"eq","v":"Rancilio2","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":350,"y":1060,"wires":[["a5a711f3.437f4"],["f94ef796.4bf5f8"]]},{"id":"9e6228b0.30b6f8","type":"inject","z":"c74669a0.6a34f8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"ZbReceived\":{\"0x2ABA\":{\"Device\":\"0x2ABA\",\"Name\":\"Rancilio2\",\"0006!02\":\"\",\"Power\":2,\"Endpoint\":1,\"LinkQuality\":107}}}","payloadType":"json","x":140,"y":1100,"wires":[["2880133b.ff063c"]]},{"id":"a5a711f3.437f4","type":"debug","z":"c74669a0.6a34f8","name":"1","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":520,"y":1040,"wires":[]},{"id":"f94ef796.4bf5f8","type":"debug","z":"c74669a0.6a34f8","name":"2","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":510,"y":1080,"wires":[]}]

```

]

---

_[View the full topic](https://discourse.nodered.org/t/sonoff-zigbee-tasmota-and-node-red/46036)._
