Unifi Network integration Failed to Connect

Trying to install the Unifi Network integration so I can use the presence detection feature but I keep getting a “Failed to connect” error when I am putting the credentials in at the beginning of the setup for the integration.

I have created a local user with view only permission for the network application, username, password and gateway address are all correct. I even added a firewall rule specifically allowing the static IP of the raspberry pi running home assistant to talk on any port to the ip of the udm-pro.

I have rebooted the udm-pro and the home assistant server multiple times and I am at a loss. Anyone have any ideas on how to get the integration to connect?

Can you ping from HA to unifi server?

Can you login directly with user/password you created?

Try creating a local admin and use that.

Yes to both, I am able to ping the unifi server from HA and I can log into the account I created if I go to the local ip of the unifi server

Forgot there was a difference between user and admin, the account is a local access only admin account

Have you enabled debug logging and checked the logs?

image

I don’t have the option to do that because the “failed to connect” error comes up when I am trying to set up the integration. Since it can’t connect it doesn’t install the integration

This may be obvious, but just checking. Did you enable 2FA on UniFi as they have been notifiying users recently. Not sure how this is going to affect this component

Similar issue is being reported here: Unifi Network integration fails to setup · Issue #117158 · home-assistant/core · GitHub

1 Like

On my actual admin account yes I do have 2FA on, but not on the local access admin account that I made for HA

was there a resolution to this?

Supposedly it was fixed in the June release of Home Assistant, but I am still having the same issues with no resolution despite updating.

I’m guessing this has something to do with unifi now requiring 2FA for connection. Where is the information about the supposed fix that went in in June. Just want to make sure I’m doing everything right and there is a lot of old information out there on this.

No, it does not. The MFA requirement is for cloud users, not local users.

I have the same issue as well - Failed to connect - local admin user as well

Unfortunately the issue still exists. I’ve had the problem before I’ve updated to the newest version of unifi (with 2FA).