After update Home Assistant, Error connecting to deCONZ gateway

Hey there all, I’m looking to fix my connection to deconz in a similar manner after upgrading the underlying container deconz is running in. It is actually accessible via the machine’s IP and HA is detecting the docker IP. Very comfortable editing the json to point to the correct IP however I’ve read elsewhere that HA will eventually update the JSON upon a restart and I’ll be back to square one.

I’m trying to be cautious because I have 58 entities that I don’t want to get renamed, etc since I have them all over the UI. Does editing the JSON actually stick?

EDIT: I figured it out I think. I edited the JSON but also when I restarted HA I went to deconz to reallow API access and we’re all set. I’ll just check the availability of entities (the 86, I was way under in my guess above).

Docker assigns container IP with each reboot. I resolved this by putting the deconz container on network ‘host’ (NUC-docker). On Synology NAS same and run it with high privileges

Searching and looking for the .storage directory in studiocode. But I cannot find it. What am I doing wrong?

1 Like

I have the same issue since last HA update. I am wondering how this can happen.
The file in question cannot be found in my HA file editor

How is the gateway address different from the device address?

I ran in that same issue when I tried to use the simple text editor. It does not show the hidden " .storage" folder. Virtual studio code will show it.
Open the application menu (hamburger menu) → files->Open Folder (Ctrl+O) → Select the /config/.storage/ folder via the selection box.

for why this is happening, my guess:
When the server restart the dockers DHCP server has to assign new IP addresses and the order of readiness decides who gets what IP. (a race condition?). I think Docker has a local DNS as well so if can point to the containers name this should not be a issue anymore. I have not tried that yet.
I hope someone with more knowledge about this topic can try this or say something smart about it.

1 Like

I found the changed IP for the Phoscon Gateway here:

image

I then followed EngiBenchi’s guide:

I ran in that same issue when I tried to use the simple text editor. It does not show the hidden " .storage" folder. Virtual Studio Code will show it.

Open the application menu (hamburger menu) → files->Open Folder (Ctrl+O) → Select the /config/.storage/ folder via the selection box.
4 Likes

I understand how to change the ip, but after changing it, reboot the host it changes back again.
Any suggestions or tips.

Is it the configuration file that is changing? Or the ip address of Deconz?
And if it is the config file, is it a fallback to old configuration because something is broken In the file? A typo or miss alignment

1 Like

I have this issue, too. Changing the IP between boots thus breaking the connection from the add-on to the integration is not an expected behaviour.
Worse, I can’t make the de-conz integration use the System IP and Port (which is fix), which would circumvent that for good.

I’ve set the value in the add-on for “deCONZ API backend” explicitly to 40850.
I would assume now the extension is able to connect via public ip and port.
But its not :frowning:

For anyone having the same Issue: I had the same Problem and asked for a more permanent Solution (editing the config file rather isn’t, as the IP always can change again) - and it seems is quite simple to solve:

"host": "core-deconz"

What i can confirm so for: I had a static IP under host, which changed from time to time. I just replaced it by “core-deconz”. It survived a reboot, and i still can use all Zigbee-Devices by now.
Just wanted to let you know :slight_smile:

13 Likes

Great! That is something I wanted to try that for a long time. To point to the DNS name. Is that container name universal for all types of setups?

Can’t tell. Im runnning on HomeassistantOS RP4 64Bit. michaelblight who had the Solution by looking at his config is using Hassos as well, but in a VM.

I’d think it is worth a try. Worst case should be, that after a reboot you can’t control Deconz with HA. Then you just do what you already did - entering the static IP again and reboot again :wink: I would give it a shot :slight_smile:

Unfortunately It dit not work for me.
I tried both “core_deconz” and “addon_core_deconz” in /config/.storage/core.config_entries. Neither worked and had to go back to the IP address.

I uses Glances to see the container name
Glances_containers
If anyone has a suggestion what else to try?

Sorry I used underscore and it should be minus -

Well, like i wrote, thats the Setting that worked for me :wink:

Oh… Shoot I used underscore.
Thanks. Now it works fine

Had the same issue
Found this post and learnd about the location of the core.config_entries.

As my primary system which is a system running for multiple years didn’t had this issue I compaired the core.config_enties files and noticed that the older system had core-deconz defined instead of the ip-address so I replaced it in the newer system and restarted it and all started working like it should.

Wanted to post my solution to help but smartin beat me to it by 41 days :smiley:

2 Likes

I’d just like to add that there’s an easier way to do this with the simple file editor add on (ie Home Assistants own addon) instead of a Home Assistant Community Visual Code Studio Addon. Just go to the Simple File Editor addon’s configuration GUI and remove “.storage” from the ignore patterns section there.

Then you can just browse (from the GUI) to the core.config_entries file, edit and save (after backing up, of course!)

1 Like

You are a life saviour!
Editing the config file worked for me!

Thanks!

2 Likes

Excellent solution.
It worked for me too.
Thank you