Stupid deCONZ install question

I have deCONZ running on a straight Rasbian Pi, pip install of Hass. Trying to get the integration working with deconz using an original ConBee. I try to install the integration, but it tells me:

Unlock your deCONZ gateway to register with Home Assistant.

Go to deCONZ Settings -> Gateway -> Advanced
Press “Authenticate app” button

Where is this mythical menu? I’m looking in the deconz web app, but there is a settings, but a whole page of stuff, one of which is Unlock gateway, but that doesn’t seem to do anything. Can someone thrown me a clue? Usually, the menu sequence would mean, choose the Settings menu, then the Gateway menu from that, then the Advanced menu from that. This simply doesn’t exist any place I can think to look.

I’m usually good at figuring out interfaces, but not this time…

Click on the 3 lines in the top left corner, a sidebar should appear. Click on “Gateway” there, now you should see some info about firmware, version etc. At the bottom of this page is a button “Advanced”. If it doesn’t work, please post a picture of your phoscon page.

1 Like

OK, I didn’t have the option, so I totally removed the deconz package and installed it fresh. Now, using the web app, I can find the 2 lights I have, but even when I click the Authenticate button, I get a red “couldn’t get API key” from Hass.

Try to add this to your configuration.yaml, restart and try again:

deconz:
  host: ip-of-deconz
  port: port-of-deconz
1 Like

Yup… That worked. Thanks!

I would have thought the component would find the right port, but if it’s on another host, that makes sense.

… and how (where) did you find the IP and Port of the ConBee ?

I found it in the init script for deconz. You can always run

ps ax|grep -i decon

at the command prompt to see the command running

I’ve tried everything now, and nothing works. I persistantly get Couldn't get an API Key
If I enter into the HA container and issue the following command:

curl -H 'Content-Type: application/json' -X POST -d '{"devicetype": "NAME_OF_CHOICE"}' http://192.168.0.9:80/api/

Then the respons is:

[{"success":{"username":"6D8345A28B"}}]

Which appears to be correct (?), but HA still refuse to pick up the API Key.
Any other suggestions anyone?

Do you run hass.io or a normal docker install? Running inside a VM or not? Can you access Phoscon?

Normal HA docker installation. Phoscon runs just fine.
From the HA log I can see this:

DEBUG (MainThread) [pydeconz.utils] Sending {} to https://phoscon.de/discover
DEBUG (MainThread) [pydeconz.utils] HTTP request response: [{'id': 'XXXXXXXXXXXXXXX', 'internalipaddress': '192.168.XX.YY', 'macaddress': 'XXXXXXXXXXXXXX', 'internalport': 80, 'name': 'Phoscon-GW', 'publicipaddress': 'XXX.XXX.XXX.XXX'}]
INFO  (MainThread) [pydeconz.utils] Discovered the following bridges: [{'bridgeid': 'XXXXXXXXXXXXX', 'host': '192.168.XX.XX', 'port': 80}].
DEBUG (MainThread) [pydeconz.utils] Sending {'auth': None, 'data': b'{"devicetype": "pydeconz"}'} to http://192.168.XX.XX:80/api

My concern is that the IP address is not a valid address on my LAN. It is an invalid subnet. How can I change/correct the IP that HA is trying to use?

Are you running deconz in a docker container as well? Is this a RPi or a NUC or what is the host machine?

With the method I suggested above by adding deconz:… to your configuration.yaml.

Can you access Phoscon when you go to :

http://192.168.XX.XX:80/api

Well, I tried to add the deconz: section to my configuration.yaml file, but HA completely ignored it.
It wasn’t until I factory reset the ConBee and moved it to another brand new, untouched PC, that it was willing to drop the invalid IP address and HA actually asked for IP + Port instead of just telling me to push SUBMIT after activating authentication.
So, now it works. But I do not understand why, and why not.

thanks - this did it for me - I had to search long for this! again this simple thing helpt

what do i put down as the host? is it the HA address?

The IP of the machine running deconz. I’m not sure whether YAML config is still accepted or not.

With reference to this post:
https://community.home-assistant.io/t/move-conbee-ii-to-another-host-and-reconfigure-home-assistant-deconz-integration/260594/7

I have successfully moved deconz that was running in docker, with home assistant also running in docker on the same host, and connecting together using the internal docker network ips 172.x.x.x to home assistant and deconz running on two separate docker hosts.

I had to make the following changes to reconnect home assistant with deconz:

  1. change deconz docker to use the host network and specified a custom port for the web server.
  2. navigate to http://192.168.1.x:32766/api to confirm the api is accessible
  3. modify .stoarge/core.config_entries manually to point to the new deconz ip and port
  4. restart home assistant

I found that setting the hostname and ip in configuration.yaml did not work.
I did not need to remove and re-add the home assistant integration.

hopefully this information will be useful to others!

2 Likes