core
core copied to clipboard
deCONZ integration demands recongifuration on each reboot
The problem
at some point this spring (february estimate). my deCONZ integration started failing on restart. By failing I mean, I would get a notification that an integration needs to be reconfigured.
I can currently solve the issue manually, but it needs to be done after each reboot:
- enter deconz -> phoscon and allow app authentification for 60 seconds or whatever timewindow it is
- go to configuration -> integrations and click "reconfigure"
- I now get a "integration is already configured" type message. At this point it is still NOT working.
- Now I press disable the integration.
- Then I re-enable the integration
- Then I click the configure button and ok in the pop up
- NOW it is working (reliably if steps above are followed).
(yes I came up with this in solution in last-resort-frustration mode. I have tried some variants of the above without success).
I have googled around and read some threads, not found anything directly comparable. If anyone knows how to solve, by all means enlighten me, it not it may well be some bug in the integration happening for some reason.
What version of Home Assistant Core has the issue?
core-2022.4.7
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
deCONZ
Link to integration documentation on our website
No response
Diagnostics information
config_entry-deconz-2d69584f745cc13c978ac5e26dad046d.json.txt
Example YAML snippet
No response
Anything in the logs that might be useful for us?
Logger: homeassistant.components.deconz
Source: components/deconz/gateway.py:286
Integration: deCONZ (documentation, issues)
First occurred: 11:35:34 AM (1 occurrences)
Last logged: 11:35:34 AM
Error connecting to deCONZ gateway at core-decon
Additional information
No response
deconz documentation deconz source (message by IssueLinks)
Hey there @kane610, mind taking a look at this issue as it has been labeled with an integration (deconz) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
Can you enable debug logging per deconz integration documentation and share logs when you reproduce it all?
This appears to be fixed at Deconz 6.12.1 and Home Assistant OS 2022.4.7
I still get this error when running Deconz on another system via DOCKER in Bridge mode. When I put it into host mode with the correct IP being published it works.
Is the HomeAssistant Integration using the phoscon.de/discover to find it?
HA: HAOS on core-2022.5.3
Using the official addon works though. But with the official addon I am unable to pair it to Harmony Hub
2022-05-10 10:31:25 ERROR (MainThread) [homeassistant.components.deconz] Error connecting to deCONZ gateway at core-deconz 2022-05-10 10:31:25 WARNING (MainThread) [homeassistant.config_entries] Config entry '00212E02A29E' for deconz integration not ready yet; Retrying in background 2022-05-10 10:31:25 ERROR (MainThread) [pydeconz.websocket] Websocket is not accessible (core-deconz) 2022-05-10 10:31:34 ERROR (MainThread) [homeassistant.components.deconz] Error connecting to deCONZ gateway at core-deconz
The error lists address as core-deconz which is the addon adress. But you're saying that it works so I'm not sure what to make of it
So the error lists the core-deconz as the addon address.. which is the problem. I am running deconz on a different machine and just connected it. This works fine until restart when this issue pops up.
Upon further investigation I believe that is because of the Internal IP Address that Deconz reports to HomeAssistant. With a Docker Setup if the "HOST" mode is NOT specified in the docker container for deconz it reports the Bridge IP where the API will not be available. You can still manually configure it by entering the correct IP. But on restart of Homeassistant it breaks.
If I use the official addon from the HomeAssistant Addons this works just fine. No Issues. But here I cannot connect the Harmony Hub. I assume for similar issue, as the phoscon.de/discover reports only the internal Bridge IP.
Sounds really weird. Can you enable debug logging for the integration and share the logs?
Sorry I missed the logging thing! Here is (as far as I can tell) a full restart including then the "reconnecting to deconz". I am now running on version core-2022.5.4, and it does not work with this version either, still seeing the same thing "needs to be reconfigured" on each restart. log deconz troubles restart and reconfiguration.txt
Attaching the log with the debug level logging from deConz turned on: @Kane610 can you make any sense of this?
Sorry, its hard to follow your logs. A lot of errors from other integrations as well.
Can you add annotations to your log on what is happening when and when you're are doing manual things?
I see the same behavior. Installed as a Addon and almost with all restarts, I have to reconfigure the Device. Normally I delete the Integration, restart HomeAssistant add the Intregration again.
I see the following error
2022-07-12 11:48:14 WARNING (MainThread) [homeassistant.components.deconz] Invalid key for deCONZ at core-deconz
so somehow, the key always becomes invalid
Ok, can you share hass debug logs of it before you set it up and after you've set it up again?
I have exactly the same behavior, when i start/restart my host, If you tell me how can I get the proper logs, I could also spend them. (I am running HASSOS in a Virtual Box)
After I reset my gateway, it started doing this issue too. Here are my logs - https://pastebin.com/GkFKicJW
So every after a restart of HA, I always have to go through the following steps to restore connection:
- deCONZ > Phoscon > log in
- Gateway > Advanced > Authenticate app
- Settings > Devices & Services
- Reconfigure
- Reload deCONZ
- Refresh HA tab
deCONZ 6.15.0 Conbee II 2.17.01 / 7/1/2022, Firmware: 26720700 Home Assistant 2022.8.7 Supervisor 2022.08.3 Operating System 8.5 Frontend 20220802.0
I have the same problem, and had it for a cuple of months. My ip net is: 192.168.123.x I use Home Assistant OS, with Decons on the same host. Latest version of everything. (and done a few updates since i got the problem)
The Error from the log is: "Error connecting to deCONZ gateway at 172.30.33.3" When i log in to Deconz/Phoscon it says: "LIN-PhosconGW172.30.33.2" in the upper right corner.
So my conclusion is that the IP of the Phoscon Gateway has changed, however.. I do not find any way of changing that. Does anyone know how to do that? That would be a much easyer sollution, and aswell configure some sort of static IP on the Phoscon GW..
I have the same problem, and had it for a cuple of months. My ip net is: 192.168.123.x I use Home Assistant OS, with Decons on the same host. Latest version of everything. (and done a few updates since i got the problem)
The Error from the log is: "Error connecting to deCONZ gateway at 172.30.33.3" When i log in to Deconz/Phoscon it says: "LIN-PhosconGW172.30.33.2" in the upper right corner.
So my conclusion is that the IP of the Phoscon Gateway has changed, however.. I do not find any way of changing that. Does anyone know how to do that? That would be a much easyer sollution, and aswell configure some sort of static IP on the Phoscon GW..
Are you saying that the address reported from deconz is not the correct one?
I have the same problem, and had it for a cuple of months. My ip net is: 192.168.123.x I use Home Assistant OS, with Decons on the same host. Latest version of everything. (and done a few updates since i got the problem) The Error from the log is: "Error connecting to deCONZ gateway at 172.30.33.3" When i log in to Deconz/Phoscon it says: "LIN-PhosconGW172.30.33.2" in the upper right corner. So my conclusion is that the IP of the Phoscon Gateway has changed, however.. I do not find any way of changing that. Does anyone know how to do that? That would be a much easyer sollution, and aswell configure some sort of static IP on the Phoscon GW..
Are you saying that the address reported from deconz is not the correct one?
No. I think it's reporting the correct one. But the integration is configured against an old one.
It's been 172.30.33.3, and has changed in the reboot to 172.30.33.2, but the integrations tries to connect to the OLD ip.
The sollution is probably one of two things, but i haven't figured out how to do niether of them. 1.) Configure an static IP for the gateway that matches the config. (which might be a problem if another addon might get it later on from DHCP (I actually have no idea if its a DHCP or some other magic that decides the internal ips). 2.) Change the configuration for the integration every time it happens.. Not the best way, but simple enough if you can find a setting for it..
I have the same problem, and had it for a cuple of months. My ip net is: 192.168.123.x I use Home Assistant OS, with Decons on the same host. Latest version of everything. (and done a few updates since i got the problem) The Error from the log is: "Error connecting to deCONZ gateway at 172.30.33.3" When i log in to Deconz/Phoscon it says: "LIN-PhosconGW172.30.33.2" in the upper right corner. So my conclusion is that the IP of the Phoscon Gateway has changed, however.. I do not find any way of changing that. Does anyone know how to do that? That would be a much easyer sollution, and aswell configure some sort of static IP on the Phoscon GW..
Are you saying that the address reported from deconz is not the correct one?
No. I think it's reporting the correct one. But the integration is configured against an old one.
It's been 172.30.33.3, and has changed in the reboot to 172.30.33.2, but the integrations tries to connect to the OLD ip.
The sollution is probably one of two things, but i haven't figured out how to do niether of them. 1.) Configure an static IP for the gateway that matches the config. (which might be a problem if another addon might get it later on from DHCP (I actually have no idea if its a DHCP or some other magic that decides the internal ips). 2.) Change the configuration for the integration every time it happens.. Not the best way, but simple enough if you can find a setting for it..
You're running the add-on right? How did you set it up? From the + button on the integration page or from the discovered add-on?
I got the same problem, but I haven't found the ""reconfigure" button so mine is still not working (step 2 and 3 in OP). No workaround working for me, very frustrating. Got this issue few times before but rebooting multiple times fixed it for those reboots, this is not working anymore for me. I reckon the problem is that de deconz container got a different IP than the configurated one but cant find how to change those...
Same problem here, anyone that can help? Thanks
I have the same problem, and had it for a cuple of months. My ip net is: 192.168.123.x I use Home Assistant OS, with Decons on the same host. Latest version of everything. (and done a few updates since i got the problem) The Error from the log is: "Error connecting to deCONZ gateway at 172.30.33.3" When i log in to Deconz/Phoscon it says: "LIN-PhosconGW172.30.33.2" in the upper right corner. So my conclusion is that the IP of the Phoscon Gateway has changed, however.. I do not find any way of changing that. Does anyone know how to do that? That would be a much easyer sollution, and aswell configure some sort of static IP on the Phoscon GW..
Are you saying that the address reported from deconz is not the correct one?
No. I think it's reporting the correct one. But the integration is configured against an old one. It's been 172.30.33.3, and has changed in the reboot to 172.30.33.2, but the integrations tries to connect to the OLD ip. The sollution is probably one of two things, but i haven't figured out how to do niether of them. 1.) Configure an static IP for the gateway that matches the config. (which might be a problem if another addon might get it later on from DHCP (I actually have no idea if its a DHCP or some other magic that decides the internal ips). 2.) Change the configuration for the integration every time it happens.. Not the best way, but simple enough if you can find a setting for it..
You're running the add-on right? How did you set it up? From the + button on the integration page or from the discovered add-on?
I actually don't remember.. But I think that I used the +button.
Same problem, integration auto discovered setup to 172.30.33.3, after reboot ip on deconz changed to 172.30.33.4, integration tries to connect to 172.30.33.3, and fails. Has to be removed and added again.
Is there really no other sollution than removing the addon and adding it again.? What a pain. :(
I was able to remedy this by accident once, by restoring HA from a backup. After that, the problem disappeared!!! Don't know if it will repeat for others.
On Mon, Sep 12, 2022 at 10:22 AM taminooo @.***> wrote:
Is there really no other sollution than removing the addon and adding it again.? What a pain. :(
— Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/70874#issuecomment-1243384871, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATLN3QMTOUQAR7QYW6OR5LTV53R4FANCNFSM5UOU2NRQ . You are receiving this because you authored the thread.Message ID: @.***>
same problem, i also installed it again and it doesn't fix, what can i do? Please help me
It is possible to edit the IP of the Deconz in the file core.config_entries manually. You have to login to your home assistant via ssh (for e.g. with the terminal from the Add-on "SSH & Web Terminal") and write:
cd /config/.storage vi core.config_entries
There you find somewhere the entry of deconz with the wrong IP (something like this):
"entry_id": "c195c9a63c3b23b05200538f5f7def71",
"version": 1,
"domain": "deconz",
"title": "00212E02A4BD",
"data": {
"host": "172.30.33.4",
"port": 40850,
"api_key": "7CY7X44B7B"
The host IP has to be edited to the IP which is shown in the upper right corner in the Phoscon app.
The commands for the vi-editor are little specific: To save the file in vi, press Esc key, type :w and hit Enter key or save the file and quit vi by pressing Esc key, type :x and hit Enter key.
Then you have to reboot the Home Assitant and I hope it should work again. ;-)
For me I could also reboot and everything. Just if I update Home Assistant again I have also to do the loop again.
@basecore thanks, you solved a big problem that has been bothering me for
It is possible to edit the IP of the Deconz in the file core.config_entries manually. You have to login to your home assistant via ssh (for e.g. with the terminal from the Add-on "SSH & Web Terminal") and write:
For me I could also reboot and everything. Just if I update Home Assistant again I have also to do the loop again.
@basecore thanks a lot for sharing your fix.
some info as I had some trouble.
-
use a space after "cd" (stupid mistake)
cd config/.storage vi core.config_entries -
for vi some basic commands are helpful https://www.cs.colostate.edu/helpdocs/vi.html
BR Fuchs
I'm on a quite unstable vbox, and the error on deconz integration only happens on hard reboots. It is also possible to give the "File editor" addon access to .storage and edit core entries from there. If one is not comfortable with using vi.