[SOLVED] Phoscon (Conbee) integration in Node-RED

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

Node-RED is mainly used stand-alone.

You can almost certainly do what you want though you may have to finesse the authentication if it uses anything complex.

1 Like

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.

2 Likes

Thank you felix, this was the the solution. I was able to retrieve the API Key :slight_smile:
i am not a big friend of docker. i have installed my own vncserver and run the deconz gui on :0

apt install tightvncserver
su - pi -c '/usr/bin/tightvncserver :0'
systemctl restart deconz-gui.service

I just have to figure out why I can't find any devices.

I’m not the biggest fan of docker either, but I’ve made an exception for deconz. Docker can be a good tool as long as you’re able to properly administrate it and use it for the right tasks. I’ve used the docker swarm in the past for tasks that had to be executed/run from 15+ machines in parallel.
I’m not the biggest fan of the old deconz VNC gui either, but I had to use it to get my symfonisk connected. Here’s to hoping that connecting will survive the move :crossed_fingers:

1 Like

The daylight device you see is a virtual device created by Phoscon. Are you certain that the install you’re connecting with is the same one as shown in the GUI? I can’t think of a reason why not as that conbee stick can’t be in use on two different installs at the same time, but that’s strange and I haven’t seen that behaviour before.

The devices aren't reset. I configured them in Home Assistant.

Edit: Had to reset them. They are now in Node-RED :slight_smile:

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