Ubiquiti Unifi Integration issues with UDM

I have a Unifi UDM and am trying to install the Ubiquiti Unifi Integration in Home Assistant. When I attempt to add the Unifi integration in home assistant, the “set up UniFi Controller” dialog always fails. I have tried entering the superuser name/password and have created a separate administrator account, but neither seem to work. I know the Host IP is correct, because I can type it directly into my browser and it goes to the UDM login screen: 192.168.X.X. I have noticed that if I browse to the 192.168.X.X:8443, I get a browser message that the site refused to connect. Any thoughts? I’m sure this is something simple that I’m missing.

It sounds like you’re on the 1.5.6 firmware. The port migrates over to 443 on the newer firmware with the newer OS.
I’ve got it working with 1.8.x on my UDM, specifically with SSL verification turned of.

Thanks for the quick response! I have upgraded the UDM to v1.8 firmware, but same situation. I also updated Home Assistant to 2020.12.6/HassOS 4.17. Same issue when trying to fill out the setup/login in the Unifi Ubiquiti integration, getting a “failed to connect” error. I’ve included the host name in the 192.168.2.1 format, username and password are known correct because I’m able to log into my Unifi network via web browser, and I’ve tried both the port 8443 (which is the default in the integration login screen) and 443 like you mentioned. No dice. Any thoughts?

It’s definitely port 443 on 1.8. I just double checked my /config/.storage/core.config_entries. Here’s what it stores for me:

image

As for other ideas, is it maybe firewall blocking you have turned on?

Just figured it out:

  • like the documentation indicated, a UniFi Cloud account won’t work, only a local user will.
  • like the documentation indicated, port 443 is required for UDM pro. While I am on a UDM (not pro), I also changed from the defaul port 8443 to 443.

THEN IT WORKED! Thanks again.

1 Like

Awesome!
Since you’re just starting your journey with UDM and HA, I wanted to share something I thought was cool I could do once I upgraded to 1.8.x on the UDM. I’m now using the boostchicken setup to run an Adguard container on the UDM. The Adguard container lets you:

  1. forward all DNS requests to an upstream DoH source
  2. filter ad network DNS sources

So I’ve set up my network to use the Adguard DNS source by default and eventually I’ll set it to drop all other DNS queries so nothing can try to fall back to 8.8.8.8 or similar.

But the reason this is cool is with HA there is an Adguard Home integration. With that integration it has knobs you can set up to turn on and off filtering. So i’ve made some toggle switches to turn off network wide filtering that I can hit from GH, from my HA panel or from the pixel power button menu. So any machine i’m using (or any of my family is using) hits a problem from network wide adguard can quickly disable it. I then set up a HA automation to turn back on ad blocking after 10 minutes (because let’s be realistic I wouldn’t remember to do it when i’m in the middle of something that required me to turn it off).

that sounds great. I have just migrated from pihole to the adguard plugin and it seems to be doing the trick.

Have you had any luck with the unfigateway custom component and the UDM? This used to work fine on the USG Pro4 but I upgraded to the UDM Pro and it has broken that plugin which is a pity as it was far more useful (to me anyway) that the native unifi integration.

This thing? custom-components/sensor.unifigateway: High level health status of UniFi Security Gateway devices via UniFi Controller (github.com)
I can’t say I’ve ever tried it.

The native integration is useful for me for person tracking. I can tell when no one home turn everything off, lock doors etc. The custom component I don’t expect to work with UnifiOS from what it looks like.

Yes… that repo seems to have been abandoned…:sleepy:

For tracking I use traccar which has native apps for ios android… and it tracks wherever you are as long as you have data.

I then use nmap for lan presence for people like the nanny where i can’t track her phone, but I know she is connected to wifi and therefore at home… i therefore never had any need for the native unifi integration…

Hhmmm…
Is anyone else not getting a firmware sensor anymore?
If it is broken and won’t be repaired that is fine but if something changed that I missed I’d be grateful for a pointer (It worked for me until a few weeks ago).

I upgraded to udm pro which I have never been able to reconfigure… so I have not been using the custom component for months now…

This fork works: https://github.com/doig007/sensor.unifigateway

Hey All,

I’ve just setup my UDM (non Pro) and for the life of me cannot get the integration up and running.

Please note that this is my first piece of unifi equipment so there is likely something I’m missing.

When I enter in my super user details (synced with local) or a new admin account, I just get an unknown error in the logs.

Perhaps I’ve made the other user in the wrong spot :-/

Running latest 1.5.6.2150 firmware

Am I just entering the straight up IP address? Or something more?
Am I checking the verify ssl checkbox?
It’s my username not email right?

If I go to https://ipaddress:443 and then launch network it sends the URL into a spin on my phone atleast.

I’ve disabled 2FA in case that was causing the issue.

Idk if this has anything to do with it but my hassio nginx setup requires me to port forward 433 to hassio.

Any help would be greatly appreciated.
As much as I hate to ask, I might need a little hand holding on this one :frowning:
Debugging in hassio is enabled as per the integration docs

Cheers

Linton

Update:

I tried it again after a hassio restart and left port 8443 and ssl unticked and it worked!
Straight IP address. Both super user and other local admin worked.

1 Like

Glad to hear you got it working! Be aware, when your UDM is updated to firmware version 1.8.6, the management port will change from 8443 to just 443. Ran into that issue today.

I have setup the Unifi Ubiquiti Integration, the documentation says the port is 443.
I do have an UDM-Pro with VLANs setup.

A firewall rule is in place as follows and it works:
Protocol: TCP

Source: HA
Port: Any

Destination: UDM-Pro
Port: 443

As soon as I change the port on Source / Home-Assistant to 443, the integration stops working.
What is the actual port to be used on HA side?

Thank you

This has been recently updated and is working fine now: GitHub - custom-components/sensor.unifigateway: High level health status of UniFi Security Gateway devices via UniFi Controller