Unifi Network: Failed to connect

After updating to 2022.6.7 on Home Assistant OS I have been unable to connect to my Cloud Key gen 2 when setting up the Unifi Network integration. At first, all my previously-configured Unifi devices went offline and wouldn’t come back. So I removed the integration and attempted to reinstall it. I get to the “Set up Unifi Network” dialog, enter the IP of the cloud key and user credentials, but just get “Failed to connect” error each time. The log entry is below.

Logger: homeassistant.components.unifi
Source: components/unifi/controller.py:513
Integration: UniFi Network (documentation, issues)
First occurred: 3:38:18 PM (2 occurrences)
Last logged: 3:38:44 PM

Error connecting to the UniFi Network at Call received 404 Not Found
Error connecting to the UniFi Network at Error requesting data from Cannot connect to host https:443 ssl:default [Name does not resolve]

Has anyone else run into this? Any ideas? I can access the CK2 at that IP address and log in via the web interface, so not sure why suddenly HA can’t connect to it.

Thanks for any help!


I am having the same issue.

Did you get anywhere so far?

Same Issue, life gets hard without presence detection :sweat_smile: allredy tried beta channel updates.

Hello, i have the same issue

1 Like

Also down for me. Rebooted the Unifi and deleted the integration. Now I can’t reinstall the integration.

No, haven’t found a solution yet. :frowning:

Interesting, I had this problem with the EdgeOS (Ubiquiti) integration. All that I ended up doing was rebooting my EdgeRouter X and then completely rebooting my RPi that runs Home Assistant. I’m assuming you’ve all tried that?

I know there is a difference between the Unifi vs the old Ubiquiti stuff, even though it is the same company. I didn’t go through trying to redo the integration. Something that both of these integrations use in HA must have changed in the recent update.

I’ve got the same problem, but haven’t yet found a solution.

UDM Controller
UniFi OS Version 1.12.22
Network Version 7.1.66

I can go to the link in a browser and all works fine, so the host is correct.

The error I’m getting is:

Same problem as others and same error as @d149.

Unifi CloudKey2
Unifi OS Version 2.2.12
Network Version 6.5.55

Home Assistant Core 2022.6.7
Home Assistant Supervisor 2022.05.3
Home Assistant OS 8.2

Edit: There is an open issue on Github regarding this issue. I pointed them to this thread. https://github.com/home-assistant/core/issues/74373

update UDMPro an reboot fixed the problem

Looks like on that thread they say the “401 issue” will be fixed in 2022.7. I’m getting a 404 though, so it may be a different problem. Fingers crossed it fixes our issue as well.

I’m also getting 404. Just updated to 2022.7.0 and the issue remains. Still getting the 404 error in the logs.

1 Like

2022.7.6 still an issue, is it correct that 2022.8 will fix the issue?

I’m having the same issue ( * Error connecting to the UniFi Network at Call received 404 Not Found).

Running HA Os 2022.7. UniFi on a Cloud Key 2. Tried restarting everything and no joy. Cabot even reinstall the integration.

Has anybody got any workarounds?


I was also experiencing this issue. What solved it for me was

  • Removing the unifi integration
  • Updating my service account in UnifiOS (this step probably isn’t necessary but I wanted to start controlling POE devices so I need to upgrade from view only to admin)
  • Hard rebooting my UDMP (pulling the power cord (this is also probably un-necessary but my UDMP never reboots properly if done through the site))
  • Re-adding the integration targeting my UDMP IP/Port (ip: port: 443 in my case)

After this Home Assistant saw my UDMP and allowed me to setup everything.

Misc version information:
UnifOS: 1.12.22
Unifi Network: 7.1.66
Home Assistant OS: 8.2
Home Assistant: 2022.7.6

1 Like

Anyone make any progress with this? I am having the same problem but my Unifi Controller is running in a Docker container on my NAS but I get the “Failed to connect” error also.

I have upgraded from 2022.6.7 to 2022.7.7 today and had this same issue.
I thought maybe it was due to my ageing Unifi controller (5.14) so I upgraded to 6.04 and still no fix.
I then changed the password of the user in Unifi controller which HA uses. I then inputted the new password in to HA Unifi configuration screen and this worked!
Maybe someone else may have this experience.

Still seems to be an issue on 2022.8.6. Failed to Connect.

I am running into the same issue as well. Has anyone found a solution?

also having this issue in 2022.09 - makes my HA setup almost useless since I use cameras and Protect for so many things.
How was this not tested?