Unifi Controller Won't Connect

I’m unable to figure out how to connect to my unifi controller. I’m running a UDMP. I’m setting the host up to the UDMP’s IP (which also houses the controller) at 192.168.1.1. UID is my login UID (but I also tried creating another account just for HA), and the PW is correct.

I’m trying to install the integration through config/integrations/dashboard, click ‘+’, and add Unifi.

The log says,

Log Details (ERROR)
Logger: homeassistant.components.unifi
Integration: unifi (documentation, issues)
First occured: 5:19:16 PM (1 occurences)
Last logged: 5:19:16 PM

Error connecting to the UniFi controller at 192.168.1.1

At this point, I’m stumped. Just installed HA earlier today, and so far, I’ve had little issue.

Appreciate the help.

Looks like this is a known issue - https://github.com/home-assistant/core/issues/31603 & https://github.com/Kane610/aiounifi/issues/13

Thought it was me as I just installed HA for the first time this afternoon, and learning as I go. Good to know that it’s being looked into however.

Did you guys ever got this to work? Having the same issue over here. Thanks!

+1 cant get this to work either

Mine stopped working after cloud key 6.0.41 was updated to 6.0.43

Try changing the port to 443. That worked for me after multiple failed to connect errors. I read that when you log into the UniFi controller in your browser and then look at the URL, if it doesn’t show the port number then is using the SSL port.

1 Like

This worked for me.

Thanks. Changing the port to 443 worked.
I also had to turn off 2 side verification (2FA) to be able to log on again.

2FA stopped my integration.

Trying to log in with 2FA enabled does not work.

Disabling 2FA and trying again works like a charm!

I went into my accounts on my local UDMP and when I clicked on my name, then the profile. There was a place to add local credentials - as soon as I did this…it allowed me to add it in Home Assistant.

1 Like

I had to disable the new controller interface to get the local user account creation options. Worked for me

Danesh, thank you for posting. How did you disable the new controller interface in UniFi?
I only have an invite by email option and suspect this may be the reason, but cannot find the option to revert. Many thanks.