Home Assistant Community Add-on: UniFi Controller

It looks like a certificate issue. Have you tried using the self signed certificate?
Of course you get a warning then, but just as a test?

Config:

ssl: false
certfile: fullchain.pem
keyfile: privkey.pem

Hello,

Still the same issue:
[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…

Hass.io Add-on: UniFi Controller
Manage your UniFi network using a web browser

Add-on version: 0.19.0
You are running the latest version of this add-on.
System: HassOS 4.13 (armv7 / raspberrypi3)
Home Assistant Core: 0.115.4
Home Assistant Supervisor: 245

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.
[14:13:21] INFO: Starting the UniFi Controller…

I’d suggest you remove the screenshot, your DNS is in it.
However, I took the freedom to do a little test. I don’t know if the port is (still) open from the Internet, but the thing that I noticed first was that I don’t see a port number in your url. It might depend on the browser you use of course, but the port seems not responding.

Just to be sure, i assume the Network port-settings (part of the addon config) are correct and set to 8443 for the controller web interface and API.

Then it has to be the Nginx config (corrupt, mistake in the reverse proxy?) or your UniFi config is corrupt.

In the last situation the only thing I can think off is uninstalling the addon and reinstalling it. I personally do not have the knowledge to support you with the UniFi config from the CLI. Perhaps you can find something at https://community.ui.com/

I don’t know if you have the automatic back-up configured in UniFi and if that does still work, but if it is, you should be accessible through: \backup\unifi\autobackup. If you have Samba installed, you could access it through the samba share.

You could then decide to install the controller on your Windows computer and restore the back-up there. You even might be able to use the SSH password there, so you might be able to adopt your network components to the Windows controller right away. If not, you at least have the config, so it can be provisioned right away.

I was thinking about it also.
To uninstall the UniFi add-on, reboot ha and then reinstall the UniFi add on.
How can I check the Nginx config / reverse proxy ?
HA is available from the the inside/outside.

I removed the UniFi controller and I am trying to install it again but I got on error:
image

I can also uninstall the NGINX add-on and reinstall it, what do you think ?

Ok it works !
I reinstalled the NGINX and UniFi Controller again and now it works !
Now I need to find out how I can let adopt the controller my AP’s again.
Thanks for your support !

1 Like

Great to see that you got it fixed.
Your AP’s and perhaps switches are linked to the old controller. You need to factory reset them and then it is easy to adopt them. Just wait until they show.

But, perhaps it was just Nginx and can you restore a snapshot or something.

I updated to the latest v6 of this addon a few days ago and was fully expecting to have to reconfigure my network since I was using Wifi overrides to split out the 2.4 and 5ghz SSIDs with specific names. However it seems to have kept this configuration intact, I just can’t make any changes to it until I suppose I reset the overall Wifi config.

Everything’s working as I like it for now so I won’t touch it, but I wish it was easier with the controller to make simple changes like separating and renaming SSIDs.

I’m new to HASS (and this add-on) and I may be missing something obvious or I may be misinterpreting the Documentation. Regarding the device migration, the way I understand the Documentation sentence “If you want to migrate from an existing controller to the controller provided by this addon, …” as if I can use this add-on in a “view-only” or “mobile” mode, such that I don’t need to migrate my devices. In the default “controller” mode, I simply cant view site information without adopting/migrating my UniFi devices and there can only be 1 controller for a given site.

I want to keep using my existing controller, is it possible to integrate it into Home Assistant?

Hi Marko, it sounds like you are looking for the Unifi integration instead of the controller. https://www.home-assistant.io/integrations/unifi/

Just want to share my migration experience to this add-on:

Situation:

  • Controller running on a win 2012 R2 system (VM)
  • 5 APs (big house…)
  • 15-25 client devices, around 15 connected 24/7

Target:

  • controller running as HA add-on
  • Config/APs/Clients migrated
  • don’t break HA configs (automations, entities, scripts)

Migration:

  • Backup the old controller (with 7 days of logs) via Backup - NOT via the export/migrate site wizard - you won’t be able to log into the new controller when using the wizard-generated backup because the credentials are missing from the backup as it seems
  • install the HA add-on - make sure you have at least the same or higher version as the old controller
  • configure certificate (or set to false to use self-signed)
  • start the HA add-on
  • wait a minute for the services to start
  • import the backup
  • go to the old controller, settings, site and scroll down
  • on the right click export
  • download and discard the backup, you don’t need that anymore
  • select the APs you want to migrate and point them to the new controller
    • optional: migrate one by one, so that clients don’t experience disconnects if they can reach another AP (I did it all at once and had a short WLAN downtime, maybe a minute or two).
  • if all APs show up as connected on the new controller tell the old controller to forget them
  • if you already use the HA unifi integration:
    • delete the integration
    • add the unifi integration again and configure it
  • check if everything is working
  • decomission the old controller

That’s it! All your entities, automations, etc. should be there again and working as with the old controller.
This took me literally only minutes. Writing this wrap-up took more time.

2 Likes

Thanks Emphyrio, you are right, I completed the integration :slight_smile:

Would the Unifi Controller backups be saved in HA’s snapshots? I see that its saved in its own folder “/backup/unifi”, but I can’t see if that folder is included in the full or partial snapshot.

I’m pretty sure it’s not included in the snapshot

Would it be possible to change the location of the Unifi Backup so it would be included in the snapshot?

I think you can change the save directory in the Unifi Controller settings. I can’t check right now

I assume/expect the running config is in the snapshot. This is based on the roll back I had to do a while ago and just restored the snapshot and all was okay again. What use would the snapshot have if it’s only an “install add-on” again?

I remember the auto backup function in UniFi stores it’s backup in the /backup directory. This is accessible in several ways, but from a Windows device the Samba share (add-on) is the most convenient way.

Hi

I’m having an issue with the addon after the update yesterday.

It won’t start and gives the error msg:

Failed to start addon
Unknown error, see logs

Under logs this is the error msg:

20-10-20 06:35:27 ERROR (SyncWorker_5) [supervisor.docker] Image hassioaddons/unifi-aarch64 not exists for addon_a0d7b954_unifi

Current version: 0.19.1
Home Assistant 0.116.4
Pi 3B

Hello,

Is there any hardware/access point compatibility list?

The last versions of the official controller dropped some of the earlier AP. Does this add-on supports the earlier AP versions?

Thanks

Hi
Are there default login details for the unifi controller addon?

I have an existing controller on a different machine, I installed the home assistant addon on my new PI server running Home Assistant Supervised. I did an export site / import site from the old to the new server. I cant seem to login to the new unifi controller with my previous username and password.

Hi guys, any idea what login details im supposed to use? trying to login with my old unifi controller login details and it wont let me login. I have tried the reset password, no email comes. I have tried resetting my uniqi cloud login details. Nothing seems to work, I can login to my old controller fine…

have you tried the usual suspects? admin, admin… ubnt, ubnt

EDIT: https://www.google.com/search?q=default+ubiquiti+controller+password&rlz=1C1GCEJ_enAU921AU921&oq=default+ubi&aqs=chrome.6.69i57j0i457j0l6.9135j0j7&sourceid=chrome&ie=UTF-8