# Phoscon (Conbee) in Node-red

**URL:** <https://discourse.nodered.org/t/phoscon-conbee-in-node-red/24622>\
**Category:** General\
**Created:** [10 April 2020 21:49 UTC](https://discourse.nodered.org/t/phoscon-conbee-in-node-red/24622 "2020-04-10T21:49:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michael](https://avatars.discourse-cdn.com/v4/letter/m/4bbf92/32.png) [@Michael](https://discourse.nodered.org/u/Michael)\
**Post date:** [10 April 2020 21:49 UTC](https://discourse.nodered.org/t/phoscon-conbee-in-node-red/24622/1 "2020-04-10T21:49:42Z")

</div>

Hello,  
im using node-red and Phoscon in Docker Containers on an Raspbi 3b+  
I get a websocket Connection from Node Red to Phoscon. But i dont get the Api Key from the Phoscon App.  
In this Topic was the same Problem:

> [@\[SOLVED\] Phoscon (Conbee) integration in Node-RED](https://discourse.nodered.org/t/solved-phoscon-conbee-integration-in-node-red/21693):
>
> Hello everybody! I am currently checking if i can use Node-RED as a standalone application (instead of Home Assistant). I have a conbee 2 stick and use it to control several thermostats and lights. For the Conbee stick to work i need an API key from Phoscon (the Gateway GUI). Can I call this GUI from Node-RED to create the key? Is it generally useful to use Node-RED standalone, or does it make more sense to use it in an environment like IOBroker? Already many thanks for your advice

> If you installed it from docker, it will include the rest API. The next step is adding a temporary part to your \>flow, or do it over curl instead if you prefer that. Set up an inject node on JSON input, based on the \>following: [http://dresden-elektronik.github.io/deconz-rest-doc/configuration/#aquireapikey \>](http://dresden-elektronik.github.io/deconz-rest-doc/configuration/#aquireapikey), then wire it to an \>http-\>request node set to your phoscon/deconz install, and the output to a debug node. Deploy, go back \>to the phoscon settings page and click the authenticate button, then inject on the flow and copy the api \>key from the debug sidebar.

Can somebody Explain this in a bit more Detail?

---

<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:** [11 April 2020 02:37 UTC](https://discourse.nodered.org/t/phoscon-conbee-in-node-red/24622/2 "2020-04-11T02:37:00Z")

</div>

I have NR running in docker, accessing the Conbee. I don't much understand the solution you posted either. However, I found I had to setup the NR docker container in host network mode for it to work, although I can't exactly remember why. It might have been because docker containers don't support multicast UDP. I hope this helps.

---

<div class="post-metadata">

**Author:** ![Michael](https://avatars.discourse-cdn.com/v4/letter/m/4bbf92/32.png) [@Michael](https://discourse.nodered.org/u/Michael)\
**Post date:** [11 April 2020 22:02 UTC](https://discourse.nodered.org/t/phoscon-conbee-in-node-red/24622/3 "2020-04-11T22:02:04Z")

</div>

Now i got it  
this is the flow

 ![grafik](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/1/91e78fed005e89e1b75bc5e649061d65c5b7193b.png)  
 ![grafik](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/8/28576aae1f27dfe248d53290b7d82f0a43a432a0.png)  
 ![grafik](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/3/934d1f31e6f1de46d0ae41c39131131ddb6ee164.png)

`[{"id":"136dae7f.a005f2","type":"http request","z":"cc28d1e6.8c90c","name":"","method":"POST","ret":"txt","url":"http://127.0.0.1:80/api","tls":"","x":410,"y":540,"wires":[["8220b4e9.a611c8"]]},{"id":"538e4e8e.f921b8","type":"inject","z":"cc28d1e6.8c90c","name":"","topic":"","payload":"{\"devicetype\":\"nodered\"}","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":150,"y":540,"wires":[["136dae7f.a005f2"]]},{"id":"8220b4e9.a611c8","type":"debug","z":"cc28d1e6.8c90c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","x":720,"y":560,"wires":[]}]`

Tasks:

1. unlock the Gateway for 3rd Party Apps ( for 60 seconds)
2. click the Inject button
3. read out the Username in the Debug Pane

---

<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:** [25 April 2020 22:02 UTC](https://discourse.nodered.org/t/phoscon-conbee-in-node-red/24622/4 "2020-04-25T22:02:07Z")

</div>

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