# DeCONZ / Home Assistant: can't get it going with Node Red

**URL:** <https://discourse.nodered.org/t/deconz-home-assistant-cant-get-it-going-with-node-red/32544>\
**Category:** General\
**Created:** [7 September 2020 11:33 UTC](https://discourse.nodered.org/t/deconz-home-assistant-cant-get-it-going-with-node-red/32544 "2020-09-07T11:33:04Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Edwinek](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/edwinek/32/20501_2.png) [@Edwinek](https://discourse.nodered.org/u/Edwinek)\
**Post date:** [7 September 2020 11:33 UTC](https://discourse.nodered.org/t/deconz-home-assistant-cant-get-it-going-with-node-red/32544/1 "2020-09-07T11:33:04Z")

</div>

Hi,

I've been struggling with this for over a week now, but can't get it running. I'll try to be as complete as possible.

First of all: I have DeCONZ working in Home Assistant now, with a ConBee II USB dongle. This took a mere four days... This means that both the DeCONZ addon and the Phoscon/DeCONZ integration are up and running. I have one Aqara vibration sensor, which works in Home Assistant.

**Settings**  
DeCONZ:  
device: \>-  
/dev/serial/by-id/usb-dresden\_elektronik\_ingenieurtechnik\_GmbH\_ConBee\_II\_DE2220748-if00

40850/tcp deCONZ API backend  
5900/tcp deCONZ via VNC  
8081/tcp deCONZ WebSocket

I then added the node-red-contrib-deconz nodes in Node Red. It proved to be impossible to get an API key using the Magick get settings button, but I found the key in the log and added it.  
After some fiddling, where I kept getting "connection refused" errors, I'm now at a point where I'm getting:

![Screenshot_2020-09-07_13-21-10](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/5/b5ee93402a6d7776eee5d162fc1bee6d7974100d.png)

My settings for the config node are:

 ![Screenshot_2020-09-07_13-22-45b](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/2/72954f835af624c41760ddd9171f621c74cbadd3.png)

Refresh devices doesn't work.

**Tail end of the DeCONS addon log (after trying refresh devices):**  
13:25:02:949 don't close database yet, keep open for 900 seconds  
13:25:02:955 Remove websocket 192.168.178.38:40726 after error Unknown error  
13:25:02:956 New websocket 172.30.32.1:53924 (state: 3)  
13:25:19:763 don't close database yet, keep open for 900 seconds  
13:25:19:771 New websocket 192.168.178.38:40752 (state: 3)  
13:25:53:933 don't close database yet, keep open for 900 seconds  
13:25:53:941 Remove websocket 192.168.178.38:40752 after error Unknown error  
13:25:53:943 New websocket 192.168.178.38:40764 (state: 3)  
13:25:53:965 Current channel 15  
13:25:53:973 Device TTL 3752 s flags: 0x7  
13:26:16:297 don't close database yet, keep open for 900 seconds  
13:26:16:304 Remove websocket 192.168.178.38:40764 after error Unknown error  
13:26:16:960 New websocket 192.168.178.38:40802 (state: 3)  
13:26:46:239 don't close database yet, keep open for 900 seconds  
13:26:46:248 Remove websocket 192.168.178.38:40802 after error Unknown error  
13:26:46:249 New websocket 192.168.178.38:40810 (state: 3)  
13:26:46:263 Current channel 15  
13:26:46:271 Device TTL 3700 s flags: 0x7

**Tail end of the NR log (after trying refresh devices):**  
7 Sep 13:25:02 - [warn] [deconz-server:ConBee II] WebSocket connection timeout, reconnecting  
7 Sep 13:25:19 - [info] [deconz-server:ConBee II] WebSocket opened  
7 Sep 13:25:32 - [warn] [deconz-server:ConBee II] WebSocket connection timeout, reconnecting  
7 Sep 13:25:53 - [info] [deconz-server:ConBee II] WebSocket opened  
7 Sep 13:26:06 - [warn] [deconz-server:ConBee II] WebSocket connection timeout, reconnecting  
7 Sep 13:26:15 - [info] [deconz-server:ConBee II] discoverDevices: Using cached devices  
[07/Sep/2020:13:26:15 +0200] 200 192.168.178.164, 172.30.32.1(172.30.32.2) GET /deconz/itemlist?controllerID=7440a617.3347e8&forceRefresh=false HTTP/1.1 (Mozilla/5.0 (X11; Linux x86\_64; rv:80.0) Gecko/20100101 Firefox/80.0)  
[07/Sep/2020:13:26:16 +0200] 200 192.168.178.164, 172.30.32.1(172.30.32.2) GET /deconz/itemlist?controllerID=7440a617.3347e8&forceRefresh=true HTTP/1.1 (Mozilla/5.0 (X11; Linux x86\_64; rv:80.0) Gecko/20100101 Firefox/80.0)  
[07/Sep/2020:13:26:16 +0200] 200 192.168.178.164, 172.30.32.1(172.30.32.2) GET /deconz/itemlist?controllerID=7440a617.3347e8&forceRefresh=true HTTP/1.1 (Mozilla/5.0 (X11; Linux x86\_64; rv:80.0) Gecko/20100101 Firefox/80.0)  
7 Sep 13:26:16 - [info] [deconz-server:ConBee II] WebSocket opened  
7 Sep 13:26:29 - [warn] [deconz-server:ConBee II] WebSocket connection timeout, reconnecting  
7 Sep 13:26:46 - [info] [deconz-server:ConBee II] WebSocket opened  
7 Sep 13:27:09 - [warn] [deconz-server:ConBee II] WebSocket connection timeout, reconnecting  
7 Sep 13:27:28 - [info] [deconz-server:ConBee II] WebSocket opened  
7 Sep 13:27:41 - [warn] [deconz-server:ConBee II] WebSocket connection timeout, reconnecting  
7 Sep 13:27:53 - [info] [deconz-server:ConBee II] WebSocket opened  
7 Sep 13:28:06 - [warn] [deconz-server:ConBee II] WebSocket connection timeout, reconnecting  
7 Sep 13:28:32 - [info] [deconz-server:ConBee II] WebSocket opened

Can anyone help me out here?

---

<div class="post-metadata">

**Author:** ![michaelblight](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/michaelblight/32/445_2.png) [@michaelblight](https://discourse.nodered.org/u/michaelblight)\
**Post date:** [9 September 2020 07:56 UTC](https://discourse.nodered.org/t/deconz-home-assistant-cant-get-it-going-with-node-red/32544/2 "2020-09-09T07:56:16Z")

</div>

Why not just connect Node Red to Home Assistant and work with the relevant `entity_id` devices it found from deCONZ?

---

<div class="post-metadata">

**Author:** ![Edwinek](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/edwinek/32/20501_2.png) [@Edwinek](https://discourse.nodered.org/u/Edwinek)\
**Post date:** [9 September 2020 08:05 UTC](https://discourse.nodered.org/t/deconz-home-assistant-cant-get-it-going-with-node-red/32544/3 "2020-09-09T08:05:40Z")

</div>

I have Node Red running as an add-on in Home Assistant, so it's connected.

Then I created this flow:  
 ![Screenshot_2020-09-09_10-01-34](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/f/bfb23e432d10c76e0e3d4bc63bebde30ea1e7a9d.png)

I used it to setup the server node (screenshot above), then clicked 'Refresh devices' in the Test node:  
 ![Screenshot_2020-09-09_10-02-13](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/0/30582845b2433b4b7164f0785c311f7cb370d931.png)

But I don't get any devices, logs as shown above.

The Node Red \<-\> Home Assistant connection is working fine, I have no problem with my ZWave devices, but somehow I don't get any devices from DeCONZ.

---

<div class="post-metadata">

**Author:** ![michaelblight](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/michaelblight/32/445_2.png) [@michaelblight](https://discourse.nodered.org/u/michaelblight)\
**Post date:** [9 September 2020 10:51 UTC](https://discourse.nodered.org/t/deconz-home-assistant-cant-get-it-going-with-node-red/32544/4 "2020-09-09T10:51:10Z")

</div>

What I'm suggesting is to use the HA nodes instead of integrating Node Red to deCONZ. Meaning you would uninstall `node-red-contrib-deconz` (it would be used by people that don't use HA). Then you can use the `events` HA nodes to trigger a Node Red flow when the Aqara sensor fires an event.

This means that Node Red only needs to know about HA, and doesn't need to care whether devices are Zigbee, ZWave, Wifi, etc. HA does the work of mapping all of these to entities for you to use in Node Red.

---

<div class="post-metadata">

**Author:** ![Edwinek](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/edwinek/32/20501_2.png) [@Edwinek](https://discourse.nodered.org/u/Edwinek)\
**Post date:** [9 September 2020 13:19 UTC](https://discourse.nodered.org/t/deconz-home-assistant-cant-get-it-going-with-node-red/32544/5 "2020-09-09T13:19:17Z")

</div>

Good tip! I tried this and it works, thanks a lot!

---

<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:** [8 November 2020 13:19 UTC](https://discourse.nodered.org/t/deconz-home-assistant-cant-get-it-going-with-node-red/32544/6 "2020-11-08T13:19:21Z")

</div>

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