[solved]RaspBee II into Node Red

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

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

As per the documentation:

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

[{"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.

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"}

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

[{"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 ) 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

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

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

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

1 Like

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