# Tradfri / ZBbridge (zigbee) / Tasmota commands in Node-Red

**URL:** <https://discourse.nodered.org/t/tradfri-zbbridge-zigbee-tasmota-commands-in-node-red/32969>\
**Category:** General\
**Created:** [16 September 2020 17:40 UTC](https://discourse.nodered.org/t/tradfri-zbbridge-zigbee-tasmota-commands-in-node-red/32969 "2020-09-16T17:40:44Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![yogy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/yogy/32/32191_2.png) [@yogy](https://discourse.nodered.org/u/yogy)\
**Post date:** [16 September 2020 17:40 UTC](https://discourse.nodered.org/t/tradfri-zbbridge-zigbee-tasmota-commands-in-node-red/32969/1 "2020-09-16T17:40:45Z")

</div>

Struggling to find the correct syntax for power on / off a tradfri lightbulb with a SonOff ZBbridge with Tasmota on it from Node-Red.  
I have lots of other switches witch I control from Node-red, but the ZBbridge in between makes it a litte complex for me  
A normal switch works with

```auto
t[{"id":"63456e41.361b2","type":"mqtt out","z":"338d727f.43c00e","name":"","topic":"cmnd/Bureau/power","qos":"","retain":"","broker":"58f75f51.08c4d","x":660,"y":620,"wires":[]},{"id":"e2956ba8.e045c8","type":"inject","z":"338d727f.43c00e","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"ON","payloadType":"str","x":300,"y":620,"wires":[["63456e41.361b2"]]},{"id":"58f75f51.08c4d","type":"mqtt-broker","z":"","name":"Localhost","broker":"localhost","port":"1883","clientid":"","usetls":false,"compatmode":false,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""}]

```

Putting _ZbSend {"Device":"0x7509","Send":{"Power":"off"}}_ in the web console of the Tasmota ZBridge works, I can switch the bulb.  
But I cannot figure out what/how to send from node-red.  
When I have one correct flow, I can probable figure out other things such as hue, color etc.  
Anybody who would help me out?

---

<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:** [16 September 2020 21:06 UTC](https://discourse.nodered.org/t/tradfri-zbbridge-zigbee-tasmota-commands-in-node-red/32969/2 "2020-09-16T21:06:05Z")

</div>

I dont have a zigbee bridge (yet) - how is it working for you ? Does it has enough range ?

For the command i suspect you can use:

```auto
{
  "topic":"cmnd/yourbridge/ZbSend",
  "payload":{"Device":"0x7509","Send":{"Power":"off"}}
}

```

---

<div class="post-metadata">

**Author:** ![yogy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/yogy/32/32191_2.png) [@yogy](https://discourse.nodered.org/u/yogy)\
**Post date:** [17 September 2020 06:23 UTC](https://discourse.nodered.org/t/tradfri-zbbridge-zigbee-tasmota-commands-in-node-red/32969/3 "2020-09-17T06:23:42Z")

</div>

Thanks, funny how people can overlook simple things 😊  
That was the answer!

I do not have exact data for distance, but I brought 2 bulbs and a remote.  
The remote works with the bridge through 1 concrete wall with linkQuality 13.  
20 cm from the bridge the quality is 225  
But I have not tried out putting another bulb between the two, to see if the signal changes.  
Lots of measuring fun yet to happen. 😁

From what I understand, is that zigbee forms a mesh network.  
And then there are (Tradfi) repeaters for not to much money so to say.  
And if I understand the zigbee protocol correct ,all the parts relay the message.  
Had some trouble to join the switch, but that was more due to my impatiences

---

<div class="post-metadata">

**Author:** ![stefan24](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/stefan24/32/23075_2.png) [@stefan24](https://discourse.nodered.org/u/stefan24)\
**Post date:** [17 September 2020 06:44 UTC](https://discourse.nodered.org/t/tradfri-zbbridge-zigbee-tasmota-commands-in-node-red/32969/4 "2020-09-17T06:44:34Z")

</div>

Most zigbee devices which are wall powered (sorry, don't know the exact word for it) do relay. Battery powered like my aqara door contact or temperature sensor do not relay, since this would consume too much power.  
So I placed some Ikea tradfri bulbs in different areas and my whole house with three floors is meshed now! No need for a additional gateway or repeater!

---

<div class="post-metadata">

**Author:** ![yogy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/yogy/32/32191_2.png) [@yogy](https://discourse.nodered.org/u/yogy)\
**Post date:** [17 September 2020 07:39 UTC](https://discourse.nodered.org/t/tradfri-zbbridge-zigbee-tasmota-commands-in-node-red/32969/5 "2020-09-17T07:39:53Z")

</div>

Yes, looks like the Zigbee protocol is not a bad choice.  
And you have full control in your own home, not a server in China/US/Sweden.  
Bit sick of the TUA and other WiFi devices witch are now almost not to re-flash with Tasmota or other own software anymore.  
No re-flash necessary with zigbee, only the bridge wifi/zigbee.

---

<div class="post-metadata">

**Author:** ![derekoharrow](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/derekoharrow/32/28995_2.png) [@derekoharrow](https://discourse.nodered.org/u/derekoharrow)\
**Post date:** [23 September 2020 16:12 UTC](https://discourse.nodered.org/t/tradfri-zbbridge-zigbee-tasmota-commands-in-node-red/32969/6 "2020-09-23T16:12:16Z")

</div>

Sorry to hijack this thread a bit. I'm trying to get my Sonoff ZB Bridge working with NodeRED too. Sending an individual command is easy - as you've described above. How are you handling getting feedback from sensors, etc? It seems each message includes the unique device ID which makes picking it up and parsing it a nighmare!  
Ta

---

<div class="post-metadata">

**Author:** ![yogy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/yogy/32/32191_2.png) [@yogy](https://discourse.nodered.org/u/yogy)\
**Post date:** [23 September 2020 17:42 UTC](https://discourse.nodered.org/t/tradfri-zbbridge-zigbee-tasmota-commands-in-node-red/32969/7 "2020-09-23T17:42:10Z")

</div>

I use a mqtt in node

> tele/yourbridge/SENSOR/#

Then use some code to select the wanted device  
You can give your devices in tasmota friendly names

---

<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:** [7 October 2020 17:42 UTC](https://discourse.nodered.org/t/tradfri-zbbridge-zigbee-tasmota-commands-in-node-red/32969/8 "2020-10-07T17:42:23Z")

</div>

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