# \[node-red\] zigbee2mqtt and node-red

**URL:** <https://community.gladysassistant.com/t/node-red-zigbee2mqtt-et-node-red/6607>\
**Category:** Configuration\
**Created:** [October 15, 2021, 8:11pm UTC](https://community.gladysassistant.com/t/node-red-zigbee2mqtt-et-node-red/6607 "2021-10-15T20:11:33Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![mikael](https://gladys-assistant-community.b-cdn.net/letter_avatar_proxy/v4/letter/m/f04885/32.png) [@mikael](https://community.gladysassistant.com/u/mikael)\
**Post date:** [October 15, 2021, 8:11pm UTC](https://community.gladysassistant.com/t/node-red-zigbee2mqtt-et-node-red/6607/1 "2021-10-15T20:11:33Z")

</div>

Hello,

Since I don’t have all the required features (for now) on some of my Zigbee devices, I wanted to test via Node-RED. (I also plan to get a Schneider module not managed by Zigbee2MQTT for one of my shutters)

So I followed the installation video and when I want to integrate my new device (not a sensor, my IKEA switch here) MQTT it does not appear in the dashboard.

- Node-RED install OK
- MQTT via the graphical interface OK  
I restarted Zigbee2MQTT and Eclipse-Mosquitto: No improvement  
Connection of Node-RED to MQTT: OK (alone)

Well, with a sensor it appears well in the dashboard choices. 🧐

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [October 18, 2021, 2:46am UTC](https://community.gladysassistant.com/t/node-red-zigbee2mqtt-et-node-red/6607/2 "2021-10-18T02:46:22Z")

</div>

I admit that I don’t understand your problem, can you be more specific about what you want to do and what exactly isn’t working?

---

<div class="post-metadata">

**Author:** ![mikael](https://gladys-assistant-community.b-cdn.net/letter_avatar_proxy/v4/letter/m/f04885/32.png) [@mikael](https://community.gladysassistant.com/u/mikael)\
**Post date:** [October 18, 2021, 7:03pm UTC](https://community.gladysassistant.com/t/node-red-zigbee2mqtt-et-node-red/6607/3 "2021-10-18T19:03:49Z")

</div>

for my initial problem: I followed the video and got stuck at 22:43, the created device does not appear in the list of devices in the selected room on the dashboard.

For me, I want to use node-red as a «&nbsp;temporary&nbsp;» solution to integration issues with certain devices I own (carbon monoxide detector, Ikea On/Off button) as well as devices not supported by zigbee2mqtt (a Schneider micro module for roller shutters).

Otherwise, I tried to connect node-red to zigbee2mqtt or to my key but failed in both cases. I get no list. I did retrieve the z2m or gladys passwords.

modules used:

node-red-contrib-zigbee  
node-red-contrib-zigbee2mqtt-devices  
node-red-contrib-zigbee2mqtt

---

<div class="post-metadata">

**Author:** ![spenceur](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/spenceur/32/1961_2.png) [@spenceur](https://community.gladysassistant.com/u/spenceur)\
**Post date:** [October 18, 2021, 7:57pm UTC](https://community.gladysassistant.com/t/node-red-zigbee2mqtt-et-node-red/6607/4 "2021-10-18T19:57:08Z")

</div>

Hello Mikael!  
No issues on my end with this library  
node-red-contrib-zigbee2mqtt

How did you configure the server?

At my place:

 ![Screenshot_20211018-215610](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/5/5fd373818290b36bba5f642cdf437bcd137eb7b2.jpeg)

The Host corresponds to Gladys 4’s IP

Remember to deploy the flow before checking if you retrieve your list as indicated by the module

 ![Screenshot_20211018-215610__01](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/9/9f0adb087b435e91fe82ea476d012346df7d9dd5.jpeg)

---

<div class="post-metadata">

**Author:** ![mikael](https://gladys-assistant-community.b-cdn.net/letter_avatar_proxy/v4/letter/m/f04885/32.png) [@mikael](https://community.gladysassistant.com/u/mikael)\
**Post date:** [October 19, 2021, 5:33pm UTC](https://community.gladysassistant.com/t/node-red-zigbee2mqtt-et-node-red/6607/5 "2021-10-19T17:33:23Z")

</div>

Thanks. I was stuck on the MQTT address: localhost… not used to Docker. Just have to think of it as «&nbsp;servers&nbsp;» (well noted the quotation marks because I know there’s no OS) and therefore localhost doesn’t leave the Docker

[edit] it’s okay I managed to handle the Ikea on/off button (but don’t forget to check the box «&nbsp;Run only when the threshold is passed (and not for each value sent)&nbsp;» for the scene otherwise it has a strobe effect lol)

well I’m going to tackle the Heiman and then I’ll try the roller shutter when I receive the module

---

<div class="post-metadata">

**Author:** ![guim31](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/guim31/32/4840_2.png) [@guim31](https://community.gladysassistant.com/u/guim31)\
**Post date:** [May 9, 2022, 8:37pm UTC](https://community.gladysassistant.com/t/node-red-zigbee2mqtt-et-node-red/6607/6 "2022-05-09T20:37:09Z")

</div>

Hello everyone!

I’m bumping this thread because I have an issue getting Node-RED to talk to z2m (Zigbee2MQTT) …

Here’s my config:

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/7/74d5b8ee3c8cd5f3bad2e3ea9b0e2a57612e8cdd.png)

Unfortunately I don’t see any device.. I tried with/without a password… it won’t work.  
Are there logs in Node-RED that could help me?

---

<div class="post-metadata">

**Author:** ![guim31](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/guim31/32/4840_2.png) [@guim31](https://community.gladysassistant.com/u/guim31)\
**Post date:** [May 9, 2022, 8:56pm UTC](https://community.gladysassistant.com/t/node-red-zigbee2mqtt-et-node-red/6607/7 "2022-05-09T20:56:55Z")

</div>

Here’s what I see in the Node-RED debug :

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/a/aa81ee4ea0aaa57fe4d1c782316629db04a16344.png)

I’m having trouble understanding… I entered the password correctly, the address is correct.. 🤔

---

<div class="post-metadata">

**Author:** ![VonOx](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/vonox/32/10128_2.png) [@VonOx](https://community.gladysassistant.com/u/VonOx)\
**Post date:** [May 9, 2022, 9:02pm UTC](https://community.gladysassistant.com/t/node-red-zigbee2mqtt-et-node-red/6607/8 "2022-05-09T21:02:46Z")

</div>

Did you take the password from the DB? Or from the zigbee2mqtt configuration file?  
Are you sure about the address?

---

<div class="post-metadata">

**Author:** ![guim31](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/guim31/32/4840_2.png) [@guim31](https://community.gladysassistant.com/u/guim31)\
**Post date:** [May 9, 2022, 9:12pm UTC](https://community.gladysassistant.com/t/node-red-zigbee2mqtt-et-node-red/6607/9 "2022-05-09T21:12:14Z")

</div>

I am sure of the address and I set the password myself from the z2m interface (port 8080)

However, in the meantime I don’t know what happened, but I tried to restart my container, thinking it might help… it restarts in a loop 😑

Here’s the output of the command `docker logs gladys-z2m-zigbee2mqtt`:

> Zigbee2MQTT:info 2022-05-09 21:10:23: Connecting to MQTT server at mqtt://localhost:1884  
> Zigbee2MQTT:debug 2022-05-09 21:10:23: Using MQTT keepalive: 60  
> Zigbee2MQTT:debug 2022-05-09 21

---

<div class="post-metadata">

**Author:** ![VonOx](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/vonox/32/10128_2.png) [@VonOx](https://community.gladysassistant.com/u/VonOx)\
**Post date:** [May 9, 2022, 9:31pm UTC](https://community.gladysassistant.com/t/node-red-zigbee2mqtt-et-node-red/6607/10 "2022-05-09T21:31:25Z")

</div>

So yes, you changed the password on the zigbee2mqtt side, but the mqtt container isn’t aware of it — it wants the old one (the one generated by gladys), so it refuses the connection, which is normal.

The only way is to go into the database to retrieve the password. (not available in the gladys interface at the moment)

I’ll give you the procedure tomorrow if I find a bit of time (I don’t have the energy right now)

---

<div class="post-metadata">

**Author:** ![guim31](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/guim31/32/4840_2.png) [@guim31](https://community.gladysassistant.com/u/guim31)\
**Post date:** [May 9, 2022, 9:32pm UTC](https://community.gladysassistant.com/t/node-red-zigbee2mqtt-et-node-red/6607/11 "2022-05-09T21:32:56Z")

</div>

Ok, no worries. I can still look into how to manage the database, but I think I’ll probably mess everything up!

---

<div class="post-metadata">

**Author:** ![VonOx](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/vonox/32/10128_2.png) [@VonOx](https://community.gladysassistant.com/u/VonOx)\
**Post date:** [May 10, 2022, 7:10am UTC](https://community.gladysassistant.com/t/node-red-zigbee2mqtt-et-node-red/6607/12 "2022-05-10T07:10:21Z")

</div>

On your Pi install sqlite3

`sudo apt install sqlite3`

Then execute this query

`sudo sqlite3 /var/lib/gladysassistant/gladys-production.db "SELECT value FROM t_variable WHERE name='Z2M_MQTT_PASSWORD';" ".exit"`

The returned value is the MQTT password for the zigbee2mqtt integration

Then edit the zigbee2mqtt config

`sudo nano /var/lib/gladysassistant/zigbee2mqtt/z2m/configuration.yaml`

![

---

<div class="post-metadata">

**Author:** ![guim31](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/guim31/32/4840_2.png) [@guim31](https://community.gladysassistant.com/u/guim31)\
**Post date:** [May 10, 2022, 7:54am UTC](https://community.gladysassistant.com/t/node-red-zigbee2mqtt-et-node-red/6607/13 "2022-05-10T07:54:49Z")

</div>

Great, thank you for this tutorial, I’ll test it tonight when I get home!!! 🙂

---

<div class="post-metadata">

**Author:** ![guim31](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/guim31/32/4840_2.png) [@guim31](https://community.gladysassistant.com/u/guim31)\
**Post date:** [May 10, 2022, 8:05pm UTC](https://community.gladysassistant.com/t/node-red-zigbee2mqtt-et-node-red/6607/14 "2022-05-10T20:05:03Z")

</div>

Everything worked perfectly @VonOx , thank you so much!!!

---

<div class="post-metadata">

**Author:** ![VonOx](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/vonox/32/10128_2.png) [@VonOx](https://community.gladysassistant.com/u/VonOx)\
**Post date:** [May 10, 2022, 9:17pm UTC](https://community.gladysassistant.com/t/node-red-zigbee2mqtt-et-node-red/6607/15 "2022-05-10T21:17:18Z")

</div>

So you have the password to configure Node-RED now 😁

---

<div class="post-metadata">

**Author:** ![guim31](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/guim31/32/4840_2.png) [@guim31](https://community.gladysassistant.com/u/guim31)\
**Post date:** [May 11, 2022, 9:51am UTC](https://community.gladysassistant.com/t/node-red-zigbee2mqtt-et-node-red/6607/16 "2022-05-11T09:51:48Z")

</div>

Yes, I managed to link Node-RED and z2m 😉  
Well, now I’ll have to figure out a bit how all that works… it’s cool! Thanks again

---

<div class="post-metadata">

**Author:** ![guim31](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/guim31/32/4840_2.png) [@guim31](https://community.gladysassistant.com/u/guim31)\
**Post date:** [May 11, 2022, 7:37pm UTC](https://community.gladysassistant.com/t/node-red-zigbee2mqtt-et-node-red/6607/17 "2022-05-11T19:37:46Z")

</div>

I’m popping back to thank you again for your help — I managed to pull off this little hack to get my roller shutters working 🙂

 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/e/e1e5ff8a7ece63989b7c10ba7a261162d0a4deaf.png)
