# \[solved\]RaspBee II into Node Red

**URL:** <https://discourse.nodered.org/t/solved-raspbee-ii-into-node-red/37373>\
**Category:** General\
**Created:** [11 December 2020 21:45 UTC](https://discourse.nodered.org/t/solved-raspbee-ii-into-node-red/37373 "2020-12-11T21:45:05Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![vikozo](https://avatars.discourse-cdn.com/v4/letter/v/858c86/32.png) [@vikozo](https://discourse.nodered.org/u/vikozo)\
**Post date:** [11 December 2020 21:45 UTC](https://discourse.nodered.org/t/solved-raspbee-ii-into-node-red/37373/1 "2020-12-11T21:45:05Z")

</div>

Hallo

i have a Phoscon RaspBee II Modul on my Raspberry Pi 4 connected.  
i installed the Software in the Command Line

now i would like to connect it to Node Red.  
i installed  
node-red-contrib-zigbee2mqtt

but i can't find out how to login into this RaspBee II to be connected.

Somebody has done it before?

have a nice day  
vinc

---

<div class="post-metadata">

**Author:** ![vikozo](https://avatars.discourse-cdn.com/v4/letter/v/858c86/32.png) [@vikozo](https://discourse.nodered.org/u/vikozo)\
**Post date:** [11 December 2020 21:53 UTC](https://discourse.nodered.org/t/solved-raspbee-ii-into-node-red/37373/2 "2020-12-11T21:53:01Z")

</div>

sorry i found this too  
`node-red-contrib-deconz`

but how to create the API Key on the Raspberry Pi, with command Line?

have a nice day  
vinc

---

<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:** [12 December 2020 06:49 UTC](https://discourse.nodered.org/t/solved-raspbee-ii-into-node-red/37373/3 "2020-12-12T06:49:33Z")

</div>

As per [the documentation](https://dresden-elektronik.github.io/deconz-rest-doc/getting_started/):

Press button and then send a POST request to `http://<gatewayip>:8080/api`  
You can do this via commandline with curl, but you can also do it with node red.

example flow

```auto
[{"id":"75af6fc9.02a7f","type":"inject","z":"4825904.b19057","name":"","props":[{"p":"payload"},{"p":"url","v":"http://192.168.1.1:8080/api","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"devicetype\":\"deconz\"}","payloadType":"json","x":254,"y":408,"wires":[["6772b209.54299c"]]},{"id":"6772b209.54299c","type":"http request","z":"4825904.b19057","name":"","method":"GET","ret":"obj","paytoqs":"ignore","url":"","tls":"","persist":false,"proxy":"","authType":"","x":454,"y":408,"wires":[["b2f732ac.bcb138"]]},{"id":"b2f732ac.bcb138","type":"debug","z":"4825904.b19057","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":602,"y":408,"wires":[]}]

```

Change the information in the inject node, deploy, press button on raspbee module and click inject, hopefully you get some output with the api key.

---

<div class="post-metadata">

**Author:** ![vikozo](https://avatars.discourse-cdn.com/v4/letter/v/858c86/32.png) [@vikozo](https://discourse.nodered.org/u/vikozo)\
**Post date:** [12 December 2020 08:26 UTC](https://discourse.nodered.org/t/solved-raspbee-ii-into-node-red/37373/4 "2020-12-12T08:26:15Z")

</div>

Hello @bakman2  
thanks for your feedback, it did not work!  
The Error i got is a

{"\_msgid":"3d25e5a4.1a5d1a","payload":"Error: connect ECONNREFUSED 10.18.42.180:8080 : [http://10.18.42.180:8080/api","url":"http://10.18.42.180:8080/api","statusCode":"ECONNREFUSED](http://10.18.42.180:8080/api%22,%22url%22:%22http://10.18.42.180:8080/api%22,%22statusCode%22:%22ECONNREFUSED)"}

i also found out to be the same error when in den phoscon place i do not activate the APP connection.  
so i think, maybe, the APP Conection on the phoscon do not work nicely!

i found out to get information with WS like below and there i got information

```auto
[{"id":"56f6dc46.46e574","type":"websocket in","z":"484a0edd.1e80f","name":"","server":"","client":"3726780e.3f0298","x":430,"y":300,"wires":[["1c49d288.4502cd"]]},{"id":"1c49d288.4502cd","type":"debug","z":"484a0edd.1e80f","name":"ws","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":830,"y":340,"wires":[]},{"id":"3726780e.3f0298","type":"websocket-client","path":"ws://10.18.42.180:443/","tls":"","wholemsg":"false"}]

```

the WS give the information below

{"attr":{"id":"2","lastannounced":null,"lastseen":"2020-12-12T08:26Z","manufacturername":"dresden elektronik","modelid":"RaspBee II","name":"Configuration tool 2","swversion":"0x26610700","type":"Configuration tool","uniqueid":"00:21:2e:ff:ff:06:1e:76-01"},"e":"changed","id":"2","r":"lights","t":"event","uniqueid":"00:21:2e:ff:ff:06:1e:76-01"}

doing a nmap 10.18.42.180 show the port 8080 is not open

# nmap 10.18.42.180 -p U:53,111,137,T:21-25,80,139,8080

Starting Nmap 7.70 ( [https://nmap.org](https://nmap.org) ) at 2020-12-12 09:39 CET  
Nmap scan report for 10.18.42.180  
Host is up (0.0022s latency).

PORT STATE SERVICE  
21/tcp closed ftp  
22/tcp open ssh  
23/tcp closed telnet  
24/tcp closed priv-mail  
25/tcp closed smtp  
80/tcp open http  
139/tcp closed netbios-ssn  
8080/tcp closed http-proxy

Nmap done: 1 IP address (1 host up) scanned in 0.44 seconds

---

<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:** [12 December 2020 09:44 UTC](https://discourse.nodered.org/t/solved-raspbee-ii-into-node-red/37373/5 "2020-12-12T09:44:13Z")

</div>

As the documentation suggests: do a discover first; ie [http://10.18.42.180/discover](http://10.18.42.180/discover) using a GET request.

Most likely it is 80 (ie. default) after all

---

<div class="post-metadata">

**Author:** ![vikozo](https://avatars.discourse-cdn.com/v4/letter/v/858c86/32.png) [@vikozo](https://discourse.nodered.org/u/vikozo)\
**Post date:** [12 December 2020 13:45 UTC](https://discourse.nodered.org/t/solved-raspbee-ii-into-node-red/37373/6 "2020-12-12T13:45:37Z")

</div>

Strange - after \>100 test it connected now!  
Thanks for your help and support @bakman2

---

<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:** [10 February 2021 13:45 UTC](https://discourse.nodered.org/t/solved-raspbee-ii-into-node-red/37373/7 "2021-02-10T13:45:44Z")

</div>

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