Thank you @afelix for this description:
I have this set up. You install Deconz on the same device, or another if you prefer. Running from docker-compose was the easiest for me. Once this runs, go into the Phoscon web interface -> advanced, and there should be something about third party access. Next, install the deconz nodes from the palette in node-red: https://flows.nodered.org/node/node-red-contrib-deconz
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 , 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.
Drag a deconz-event node into your flow and set up the configuration, pointing it to your Phoscon install. Set it up with the API key you just got. Since the API key setting up is just a one time thing you can remove the inject/request/debug thing again. If you deploy, the deconz-event will now give a message on every event deconz outputs, including but not limited to sensor values and battery levels of connected devices. Mine is currently set up with Innr lamps, and ikea trådfri/symfonisk remotes.
This post was a big push in the right direction for me. However I have tried numerous combinations of setups/inputs in my Node Red flow to acquire the API key from Phoscon with no luck so far. Can you (@afelix) or anyone else be more specific on what text goes where? It will be greatly appriciated.
The only output I get from my debug i something like this:
7.6.2020 15.04.01[node: 69ed4b83.a021e4](http://192.168.1.114:8123/api/hassio_ingress/b7r8nrb4ltZSvVUYVCYWYHjtdCQwoKcbDpb8FS-ZGO0/#)POST /api : msg.payload : string[63]
"Error: connect ECONNREFUSED 172.30.33.2:80 : http://172.30.33.2"
7.6.2020 15.04.01[node: Conbee II](http://192.168.1.114:8123/api/hassio_ingress/b7r8nrb4ltZSvVUYVCYWYHjtdCQwoKcbDpb8FS-ZGO0/#)msg : string[60]
"WebSocket error: Error: connect ECONNREFUSED 172.30.33.2:443"
7.6.2020 15.04.03[node: Conbee II](http://192.168.1.114:8123/api/hassio_ingress/b7r8nrb4ltZSvVUYVCYWYHjtdCQwoKcbDpb8FS-ZGO0/#)msg : string[60]
"WebSocket error: Error: connect ECONNREFUSED 172.30.33.2:443"
My flow setup variations of something like this:
Inject node:
Payload: { "username": "", "devicetype": "Phoscon-GW"}
Topic: POST /api
http request node:
Method: POST
URL: 172.30.33.2
Use authentication:
Type: basic authentication
User: Zigbee-GW
Password:*********
debug node:
default