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 192.168.1.81: Call https://192.168.1.81:443/api/auth/login received 404 Not Found
Error connecting to the UniFi Network at https://192.168.1.81: Error requesting data from https://192.168.1.81: 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.
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.
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 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: 192.168.1.1 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
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.