Home Assistant Community Add-on: UniFi Controller

I made the mistake of configuring my new Unifi network on the cloud.

Looks like they’ve had some major changes to the cloud version of the controller (6.4.54) vs. Supervisor 6.2.26.

Do I need to pause my updates on my system until Home Assistant catches up?

My UCK have crashed and won’t boot anymore, tried to restore an backup to the HA supplied install, but was running 6.4.54 already on my UCK so don’t have any backups left for the 6.2.26 running within HA.

How could i solve this without reconfiguring my whole site, cause that would be a lot of work.

Arjan

I have trouble with backup, try to download backup from controller but it just loading and can’t get the backup file. Is the add-on can’t generate backup file or something wrong with my HA system?

It does. You should be able to see it within the separate folder unifi in your /backup/ folder.

How do I SSH into the Unifi Controller with this add on?

I am trying to fix a VPN issue with a solution as per this thread:

https://community.ui.com/questions/USG-L2TP-issue-Authentication-Failed/17ecd602-5c95-4b35-8dd6-7fcacbfd892c#answer/88d832b6-3a68-490c-a3bb-d70b5fdbf29c

You need to enable it in your Unifi Controller settings menu

https://help.ui.com/hc/en-us/articles/204909374#h_01F8G1NSFWE9GWXMT977VQEP8V

This doesn’t seem to work. All I’m getting is connection refusal when I try and connect. Is this cause Home Assistant and Unifi Controller are the same IP address?

Hmm…
Apparently it can’t be done :frowning:

Just installed this and can’t get it to load the web UI. I had to change just about every default port number, so I expect that is why. Not sure what to do about that though. After changing all the ports in the config and hitting start, this is all I get in the logs:

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-banner.sh: executing... 

-----------------------------------------------------------
 Add-on: UniFi Controller
 Manage your UniFi network using a web browser
-----------------------------------------------------------
 Add-on version: 1.0.0
 You are running the latest version of this add-on.
 System: Ubuntu 18.04.5 LTS  (amd64 / qemux86-64)
 Home Assistant Core: 2021.5.1
 Home Assistant Supervisor: 2021.09.6
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing... 
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] unifi.sh: executing... 
[cont-init.d] unifi.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[10:49:01] INFO: Starting the UniFi Controller...

Anyone else have the occasional issue where the Ap’s are shown as not connected, yet they are working fine?

I’m pretty sure that SSH’ing into each AP and setting ‘inform’ will fix it, but I seem to have to do this every few months…

EDIT: and for some reason the AP’s aren’t accepting what I’m pretty sure is the correct password…

EDIT 2: power cycled the AP’s and they came up in the Controller ‘green’. I’d still like to know what the issue is though.

Sounds like the issue I’ve experienced. As Unifi runs in Docker it will have a different IP than your HA, and by default (I believe) the Docker IP is sent to your Unifi APs (and switches) rather than the IP of HA every now and then. Open Unifi, go to Settings->Controller and check “Override inform host with controller hostname/IP”. Haven’t seen the issue since I did this.

1 Like

Thanks. I’ve set it as the HA IP with no port or anything since it didn’t allow that to be entered. Hopefully I have it correct. Simply 192.168.0.14

I run this add-on already for a long period. However, after the upgrade to 1.0.0, the memory usage of my Raspberry 4 is increasing on a daily basis (see first graph). To check the possible reasons for this memory increase, I have restarted Home Assistant, the Raspberry and other addons. It became clear that Unify add-on is the reason. When I restart this add-on, the memory usage drops immediately (from 60% to 21%). However after a couple of hours, it becomes clear that the memory usage is increasing again. Is this a known issue? Please let me know if and how this can be solved. Thanks!

Best to open an Issue on the GitHub Repo

I call a restart on mine if it gets to 70% memory usage at the moment.

How did you solve this?
I’m trying to solve this too but no matter what i do, its unreachable.

Tried installing old addon 0.23 backup, all working good, as soon as i update, its unreachable
Tried installing fresh 1.0.0 (without old version) , its unreachable

I had the Unifi Controller integration working, and then I had to move my Controller to a different IP address. Obviously I need to change the configuration of the Integration, but the Configuration flow won’t run (“Config flow could not be loaded”).
Is there a manual way to update the controller IP? If not, will an uninstall/reinstall correct my problem?

Have you checked the memory settings in your config?
I believe the default is increased, but am not sure. However, you could try running it at max 1024MB

image

I daily backup my HA using Samba Backup and since a while I get the message (persistent notification) that I need to reconfigure the UniFi integration. Looking at the log, it’s because UniFi is unreachable during the back-up. The integration seems to work as usual1

I think it’s caused by the latest version of HA and I am curious if others are experiencing the same behavior. To me it makes sense that the controller is unavailable shortly, but never had the persistent notification. The result

  1. When I reconfigure, it says that it’s already configured.
    image

  2. When I don’t reconfigure (like the last 3 days/nights)


  1. Which is not extremely reliable. I monitor the presence state and if it’s ‘not_home’ restart the integration using a restfull command that I created in the configuration.yaml since it’s a bit unreliable. Most of the time we are at home, but at an average of once I day the integration thinks we are not. The devices are seen in the controller, so the restart just fixes our presence.

Uninstall/reinstall solved my problem BTW. Brute force to the rescue!