# Zigbee2mqtt bridge node

**URL:** <https://discourse.nodered.org/t/zigbee2mqtt-bridge-node/37422>\
**Category:** General\
**Created:** [12 December 2020 20:22 UTC](https://discourse.nodered.org/t/zigbee2mqtt-bridge-node/37422 "2020-12-12T20:22:16Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wim](https://avatars.discourse-cdn.com/v4/letter/w/da6949/32.png) [@Wim](https://discourse.nodered.org/u/Wim)\
**Post date:** [12 December 2020 20:22 UTC](https://discourse.nodered.org/t/zigbee2mqtt-bridge-node/37422/1 "2020-12-12T20:22:16Z")

</div>

Hallo,  
I have a problem with the zigbee2mqtt bridge node node. It does not show any devices.  
This is the output from starting node red:

11 Dec 13:34:02 - [info] Starting flows  
11 Dec 13:34:03 - [info] [zigbee-shepherd:zigbee herdsman] Herdsman version: v0.12.101  
11 Dec 13:34:03 - [info] [zigbee-shepherd:zigbee herdsman] Converters version: v12.0.235  
11 Dec 13:34:03 - [info] [zigbee-shepherd:zigbee herdsman] persistPath /home/pi/.node-red/zigbee/f07b7f07.0d0fb  
11 Dec 13:34:03 - [info] [zigbee-shepherd:zigbee herdsman] connecting /dev/ttyACM0 undefined  
11 Dec 13:34:07 - [info] [sun events:c0831460.089a88] Calculating sun event times for 52.1, 4.66.  
11 Dec 13:34:10 - [info] Started flows  
11 Dec 13:34:10 - [info] [mqtt-broker:MQTT-Domoticz] Connected to broker: mqtt://192.168.178.9:1883  
11 Dec 13:34:10 - [error] [function:Format Data] TypeError: Cannot read property 'length' of undefined  
11 Dec 13:34:10 - [info] [zigbee2mqtt-server:b576105c.d3338] MQTT Connected  
11 Dec 13:34:10 - [info] [zigbee2mqtt-server:b576105c.d3338] Refreshing devices  
11 Dec 13:34:10 - [info] [mqtt-broker:7f77281c.68f878] Connected to broker: mqtt://localhost:1883  
11 Dec 13:34:10 - [info] [mqtt-broker:8c10d09d.262a9] Connected to broker: mqtt://localhost:1883  
11 Dec 13:34:12 - [info] [zigbee-shepherd:zigbee herdsman] Currently 2 devices are joined:  
11 Dec 13:34:12 - [info] [zigbee-shepherd:zigbee herdsman] 0x588e81fffed11808 Lamp (Router \_TZ3000\_49qchf10 TS0502A)  
11 Dec 13:34:12 - [info] [zigbee-shepherd:zigbee herdsman] 0xec1bbdfffedf7a23 Bewegings Sensor (EndDevice \_TZ1800\_fcdjzz3s TY0202)  
11 Dec 13:34:12 - [info] [zigbee-shepherd:zigbee herdsman] Zigbee network parameters: {"panID":9027,"extendedPanID":"0xdddddddddddddddd","channel":11}  
11 Dec 13:34:12 - [info] [zigbee-shepherd:zigbee herdsman] Coordinator: zStack12 2.6.3 20190608  
11 Dec 13:34:14 - [info] [zigbee2mqtt-server:b576105c.d3338] MQTT Subscribed to: "zigbee2mqtt/#

So it looks like the (2) devices are there. What must I do to get them to show up in the bridge node?  
(and to control them from node red?)  
Thanks,  
Wim

---

<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:** [14 December 2020 20:32 UTC](https://discourse.nodered.org/t/zigbee2mqtt-bridge-node/37422/2 "2020-12-14T20:32:11Z")

</div>

To read the device, use a MQTT-in node und put in the name of the device:

`zigbee2mqtt/0x588e81fffed11808`

Since I have set up the friendly name I can use `zigbee2mqtt/IkeaDimmer2`

Optionally you can use a JSON node to convert the output to JSON and check via debug node, which data is send by the device.

To send data to the device, use the MQTT-out node and send the data in msg.payload to

`zigbee2mqtt/IkeaBulb3/set`

(You see, I use here a friendly name, too)

---

<div class="post-metadata">

**Author:** ![Wim](https://avatars.discourse-cdn.com/v4/letter/w/da6949/32.png) [@Wim](https://discourse.nodered.org/u/Wim)\
**Post date:** [15 December 2020 10:26 UTC](https://discourse.nodered.org/t/zigbee2mqtt-bridge-node/37422/3 "2020-12-15T10:26:03Z")

</div>

> [@Wim](#):
>
> 0xec1bbdfffedf7a23

Stefan,  
Thanks for your reply. I have a MQQT-in node listening to zigbee2mqtt/# but nothing arrives.  
That is why I worrie about the bridge node. It has no devices.  
"Start searching devices for 3 minutes" finds no devices.  
There must still be something I do wrong.  
Any further help / suggestions?  
Thanks,  
Wim

---

<div class="post-metadata">

**Author:** ![cflurin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cflurin/32/29_2.png) [@cflurin](https://discourse.nodered.org/u/cflurin)\
**Post date:** [15 December 2020 10:42 UTC](https://discourse.nodered.org/t/zigbee2mqtt-bridge-node/37422/4 "2020-12-15T10:42:16Z")

</div>

As an option try:

[https://www.zigbee2mqtt.io/](https://www.zigbee2mqtt.io/)

---

<div class="post-metadata">

**Author:** ![Wim](https://avatars.discourse-cdn.com/v4/letter/w/da6949/32.png) [@Wim](https://discourse.nodered.org/u/Wim)\
**Post date:** [15 December 2020 12:10 UTC](https://discourse.nodered.org/t/zigbee2mqtt-bridge-node/37422/5 "2020-12-15T12:10:46Z")

</div>

cflurin,  
Thanks  
I did this about a dozen times. It is not very node-red specific. (I have no yaml file)  
Any further suggestion?  
I have copied a few node red flows, but problem remains.  
Wim

---

<div class="post-metadata">

**Author:** ![cflurin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cflurin/32/29_2.png) [@cflurin](https://discourse.nodered.org/u/cflurin)\
**Post date:** [15 December 2020 13:37 UTC](https://discourse.nodered.org/t/zigbee2mqtt-bridge-node/37422/6 "2020-12-15T13:37:44Z")

</div>

> [@Wim](#):
>
> I did this about a dozen times.

How did you install zigbee2mqtt? (zigbee2mqtt isn't a node-red node but an external app).  
Which zigbee adapter are you using, which zigbee firmware version?  
Which zigbee2mqtt version?

You can install zigbee2mqtt on a raspberry pi and use the node-red core mqtt nodes. (zigbee2mqtt can run on the same rpi as node-red).

To test the mqtt connection you can install the mqtt-explorer e.g. on a PC, see [http://mqtt-explorer.com/](http://mqtt-explorer.com/)

---

<div class="post-metadata">

**Author:** ![Wim](https://avatars.discourse-cdn.com/v4/letter/w/da6949/32.png) [@Wim](https://discourse.nodered.org/u/Wim)\
**Post date:** [15 December 2020 13:51 UTC](https://discourse.nodered.org/t/zigbee2mqtt-bridge-node/37422/7 "2020-12-15T13:51:51Z")

</div>

I installed node-red-contrib-zigbee and node-red-contrib-zigbee2mqtt from within node-red.  
CC2531firmware CC2531\_DEFAULT\_20190608.hex  
zigbee2mqtt 0.6.2  
I will install the mqtt explorer and report results  
Thanks,  
Wim

---

<div class="post-metadata">

**Author:** ![cflurin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cflurin/32/29_2.png) [@cflurin](https://discourse.nodered.org/u/cflurin)\
**Post date:** [15 December 2020 13:54 UTC](https://discourse.nodered.org/t/zigbee2mqtt-bridge-node/37422/8 "2020-12-15T13:54:43Z")

</div>

The option I proposed is an external app (which I'm using for months). Please read the doc:

[https://www.zigbee2mqtt.io/getting\_started/running\_zigbee2mqtt.html](https://www.zigbee2mqtt.io/getting_started/running_zigbee2mqtt.html)

---

<div class="post-metadata">

**Author:** ![Wim](https://avatars.discourse-cdn.com/v4/letter/w/da6949/32.png) [@Wim](https://discourse.nodered.org/u/Wim)\
**Post date:** [15 December 2020 13:58 UTC](https://discourse.nodered.org/t/zigbee2mqtt-bridge-node/37422/9 "2020-12-15T13:58:29Z")

</div>

MQTT-Explorer (0.3.5) reports no zigbee2mqtt traffic.  
I still assume the zigbee2mqtt bridge is non functional (no devices)  
Wim

---

<div class="post-metadata">

**Author:** ![Wim](https://avatars.discourse-cdn.com/v4/letter/w/da6949/32.png) [@Wim](https://discourse.nodered.org/u/Wim)\
**Post date:** [15 December 2020 14:01 UTC](https://discourse.nodered.org/t/zigbee2mqtt-bridge-node/37422/10 "2020-12-15T14:01:37Z")

</div>

I briefly looed at [https://www.zigbee2mqtt.io/getting\_started/running\_zigbee2mqtt.html](https://www.zigbee2mqtt.io/getting_started/running_zigbee2mqtt.html) ]([https://www.zigbee2mqtt.io/getting\_started/running\_zigbee2mqtt.html](https://www.zigbee2mqtt.io/getting_started/running_zigbee2mqtt.html)  
Can I do this parallel to node-red on the same machine?  
How can I use this from within node-red?  
Wim

---

<div class="post-metadata">

**Author:** ![cflurin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cflurin/32/29_2.png) [@cflurin](https://discourse.nodered.org/u/cflurin)\
**Post date:** [15 December 2020 14:06 UTC](https://discourse.nodered.org/t/zigbee2mqtt-bridge-node/37422/11 "2020-12-15T14:06:04Z")

</div>

I can only try to help if you read my answers.

> You can install zigbee2mqtt on a raspberry pi and use the node-red core mqtt nodes. ( **zigbee2mqtt can run on the same rpi as node-red** ).

Do you run node-red on a raspberry pi?

---

<div class="post-metadata">

**Author:** ![Wim](https://avatars.discourse-cdn.com/v4/letter/w/da6949/32.png) [@Wim](https://discourse.nodered.org/u/Wim)\
**Post date:** [15 December 2020 14:19 UTC](https://discourse.nodered.org/t/zigbee2mqtt-bridge-node/37422/12 "2020-12-15T14:19:09Z")

</div>

Yes, I have node-red and MQTT on the same Pi

---

<div class="post-metadata">

**Author:** ![Wim](https://avatars.discourse-cdn.com/v4/letter/w/da6949/32.png) [@Wim](https://discourse.nodered.org/u/Wim)\
**Post date:** [15 December 2020 14:20 UTC](https://discourse.nodered.org/t/zigbee2mqtt-bridge-node/37422/13 "2020-12-15T14:20:23Z")

</div>

> [@cflurin](#):
>
> You can install zigbee2mqtt on a raspberry pi and use the node-red core mqtt nodes. ( **zigbee2mqtt can run on the same rpi as node-red** ).

In addition to what I have rirht now, I will do just that.

---

<div class="post-metadata">

**Author:** ![Wim](https://avatars.discourse-cdn.com/v4/letter/w/da6949/32.png) [@Wim](https://discourse.nodered.org/u/Wim)\
**Post date:** [15 December 2020 15:09 UTC](https://discourse.nodered.org/t/zigbee2mqtt-bridge-node/37422/14 "2020-12-15T15:09:52Z")

</div>

This is the result:

pi@Pi4-8G:~ $ node-red-start  
bash: node-red-start: command not found

pi@Pi4-8G:~ $ sudo journalctl -u zigbee2mqtt.service -f  
-- Logs begin at Tue 2020-12-15 16:01:23 CET. --  
Dec 15 16:05:36 Pi4-8G npm[1426]: Zigbee2MQTT:info 2020-12-15 16:05:36: Coordinator firmware version: '{"meta":{"maintrel":3,"majorrel":2,"minorrel":6,"product":0,"revision":20190608,"transportrev":2},"type":"zStack12"}'  
Dec 15 16:05:36 Pi4-8G npm[1426]: Zigbee2MQTT:info 2020-12-15 16:05:36: Currently 0 devices are joined:  
Dec 15 16:05:36 Pi4-8G npm[1426]: Zigbee2MQTT:warn 2020-12-15 16:05:36: `permit_join` set to `true` in configuration.yaml.  
Dec 15 16:05:36 Pi4-8G npm[1426]: Zigbee2MQTT:warn 2020-12-15 16:05:36: Allowing new devices to join.  
Dec 15 16:05:36 Pi4-8G npm[1426]: Zigbee2MQTT:warn 2020-12-15 16:05:36: Set `permit_join` to `false` once you joined all devices.  
Dec 15 16:05:36 Pi4-8G npm[1426]: Zigbee2MQTT:info 2020-12-15 16:05:36: Zigbee: allowing new devices to join.  
Dec 15 16:05:37 Pi4-8G npm[1426]: Zigbee2MQTT:info 2020-12-15 16:05:37: Connecting to MQTT server at mqtt://localhost  
Dec 15 16:05:37 Pi4-8G npm[1426]: Zigbee2MQTT:info 2020-12-15 16:05:37: Connected to MQTT server  
Dec 15 16:05:37 Pi4-8G npm[1426]: Zigbee2MQTT:info 2020-12-15 16:05:37: MQTT publish: topic 'zigbee2mqtt/bridge/state', payload 'online'  
Dec 15 16:05:37 Pi4-8G npm[1426]: Zigbee2MQTT:info 2020-12-15 16:05:37: MQTT publish: topic 'zigbee2mqtt/bridge/config', payload '{"commit":"0514204","coordinator":{"meta":{"maintrel":3,"majorrel":2,"minorrel":6,"product":0,"revision":20190608,"transportrev":2},"type":"zStack12"},"log\_level":"info","network":{"channel":11,"extendedPanID":"0xdddddddddddddddd","panID":6754},"permit\_join":true,"version":"1.16.2"}'

As you can see node-red can no longer be started.  
So I definately need help now.

Wim

---

<div class="post-metadata">

**Author:** ![cflurin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cflurin/32/29_2.png) [@cflurin](https://discourse.nodered.org/u/cflurin)\
**Post date:** [15 December 2020 15:16 UTC](https://discourse.nodered.org/t/zigbee2mqtt-bridge-node/37422/15 "2020-12-15T15:16:39Z")

</div>

Sorry, I can't help you, you need some basic knowledge.

Have a look here:

> **[Using Zigbee2MQTT- A Beginners Guide](https://stevessmarthomeguide.com/using-zigbee2mqtt-beginners-guide/)**

---

<div class="post-metadata">

**Author:** ![Wim](https://avatars.discourse-cdn.com/v4/letter/w/da6949/32.png) [@Wim](https://discourse.nodered.org/u/Wim)\
**Post date:** [15 December 2020 15:28 UTC](https://discourse.nodered.org/t/zigbee2mqtt-bridge-node/37422/16 "2020-12-15T15:28:46Z")

</div>

For the moment I forget about zigbee2mqtt.  
I have killed node-red, which is far worse.  
Wim

---

<div class="post-metadata">

**Author:** ![Wim](https://avatars.discourse-cdn.com/v4/letter/w/da6949/32.png) [@Wim](https://discourse.nodered.org/u/Wim)\
**Post date:** [15 December 2020 22:12 UTC](https://discourse.nodered.org/t/zigbee2mqtt-bridge-node/37422/17 "2020-12-15T22:12:09Z")

</div>

I upgraded node-red and everything seems to be working.

I removed and reinstalled the node-red-contribute-zigbee node.

I removed the node-red-contribute zigbee2mqtt node.

Now I think I have it working somewhat:

---

<div class="post-metadata">

**Author:** ![Wim](https://avatars.discourse-cdn.com/v4/letter/w/da6949/32.png) [@Wim](https://discourse.nodered.org/u/Wim)\
**Post date:** [21 December 2020 11:04 UTC](https://discourse.nodered.org/t/zigbee2mqtt-bridge-node/37422/18 "2020-12-21T11:04:12Z")

</div>

And I removed (disabled) the zigbee2mqtt service outside of node-red.  
Only the node-red-contribute-zigbee seems to be working well.  
I just have to to the intergration with mqtt myself within node-red.  
And that is no problem at all.  
Thanks for all advise.  
Wim

---

<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:** [19 February 2021 11:04 UTC](https://discourse.nodered.org/t/zigbee2mqtt-bridge-node/37422/19 "2021-02-19T11:04:13Z")

</div>

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