Home Assistant Community Add-on: UniFi Controller

I never cared about SSL for Unifi Network addon. After update to v1.0.0 it broke anyway, webpage never showed up. Glad I discovered your “hack”, BUT: I can´t find any unifi section in the core.config_entries file. You´re sure it´s the right file @wrkn ?

What an unnecessary breaking change by the way, pure time thief :smiley:

Update: my setup is a bit different: I only use the addon, without using the integration. After updating I can no longer access the addons user interface. How to fix this? Here´s my log output:

addon log:

[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: Home Assistant OS 6.2  (aarch64 / raspberrypi4-64)
 Home Assistant Core: 2021.8.5
 Home Assistant Supervisor: 2021.06.8
-----------------------------------------------------------
 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.
[02:41:12] INFO: Starting the UniFi Controller...

supervisor log:

21-08-14 02:41:07 INFO (SyncWorker_4) [supervisor.docker.interface] Cleaning addon_a0d7b954_unifi application
21-08-14 02:41:07 WARNING (MainThread) [supervisor.addons.options] Option 'ssl' does not exist in the schema for UniFi Controller (a0d7b954_unifi)
21-08-14 02:41:07 WARNING (MainThread) [supervisor.addons.options] Option 'certfile' does not exist in the schema for UniFi Controller (a0d7b954_unifi)
21-08-14 02:41:07 WARNING (MainThread) [supervisor.addons.options] Option 'keyfile' does not exist in the schema for UniFi Controller (a0d7b954_unifi)
21-08-14 02:41:07 WARNING (SyncWorker_5) [supervisor.addons.options] Option 'ssl' does not exist in the schema for UniFi Controller (a0d7b954_unifi)
21-08-14 02:41:07 WARNING (SyncWorker_5) [supervisor.addons.options] Option 'certfile' does not exist in the schema for UniFi Controller (a0d7b954_unifi)
21-08-14 02:41:07 WARNING (SyncWorker_5) [supervisor.addons.options] Option 'keyfile' does not exist in the schema for UniFi Controller (a0d7b954_unifi)
21-08-14 02:41:10 INFO (SyncWorker_5) [supervisor.docker.addon] Starting Docker add-on ghcr.io/hassio-addons/unifi/aarch64 with version 1.0.0
21-08-14 02:41:11 WARNING (MainThread) [supervisor.addons.options] Option 'ssl' does not exist in the schema for UniFi Controller (a0d7b954_unifi)
21-08-14 02:41:11 WARNING (MainThread) [supervisor.addons.options] Option 'certfile' does not exist in the schema for UniFi Controller (a0d7b954_unifi)
21-08-14 02:41:11 WARNING (MainThread) [supervisor.addons.options] Option 'keyfile' does not exist in the schema for UniFi Controller (a0d7b954_unifi)

Since upgrading to 1.0.0 I am no longer able to access the Web UI either. I was able to roll back to my pre-upgrade snapshot without issue. I disabled SSL and tried upgrading again with the same result. I see an issue over on GitHub so I am sure they are working it.

Hey, when trying to update to UniFi Controller 1.0.0 is available it says that my platform is no longer supported “This add-on is not compatible with the processor of your device or the operating system you have installed on your device.”

I am running Hass.IO on a Raspberry 4. Any News why the support was dropped? This is very frustrating

Never had any issues with my Let’s Encrypt SSL certificate, through the HomeAssistant provided add-on. All worked flawless. Now with the 1.0.0 upgrade I get SSL errors while accessing the controller and my device tracker integration stopped working. Why did you guys change this? At least give us the option to either use a self-signed certificate provided by the controller or your own. A reverse proxy is not something that is for everyone. Still looking for a solution to get my device tracker back working… nothing seems to work as I can’t configure the add-on anymore, the flow is broken.

1 Like

I’m having the same issue here, after upgrading HASSIO

Unify addon showing: Add-on a0d7b954_unifi not supported on that platform
Couldn’t update and decided to remove
Now cannot install and get error: This add-on is not compatible with the processor of your device or the operating system you have installed on your device.

Versions
Home Assistant OS 6.2
core-2021.8.7
supervisor-2021.06.8

Do you use a 32 bit version of hassos? They drop support for it

1 Like

Yes, this seem to be the issue. Know I have to go thru the trouble of moving over to 64bit. Let’s see if this works

I need to do the same since I am running HomeAssistant supervised.

Can’t remember if I chose 32 or 64 bit on installation

With researching it seems armv7l is only 32bit. Guess I must upgrade? :frowning:

Version core-2021.8.7
Installation Type Home Assistant OS
Development false
Supervisor true
Docker true
user root
Virtual Environment false
Python Version 3.9.6
Operating System Family Linux
Operating System Version 5.10.17-v7l
CPU Architecture armv7l
1 Like

So after a lot of checking and double checking last night : the only way to move from 32bit to 64bit is to install HAOS new. The GOOD news. The whole process is very straight forward.

  1. Create a full snapshot

  2. Download the snapshot to you PC

  3. Install the 64bit HAOS (in my case it was flashing the SD Card for my Raspberry 4)

  4. Start HAOS back up and wait for the Onboarding UI to showup

  5. Select “Restore from Backup”

  6. Wait. In my case it took about 1 hour until the Snapshot was restored and all Add-Ons have been installed.

So far everything is working again. Now I only need to fix the Unify Addon since this is not working anymore

1 Like

Hi Everyone,

i have a new strange issue. two of my AP keep going into error mode or at least show up es reconnecting in the controller UI. If i SSH into the AP and run

info

it comes back with

Status:      Timeout (http://172.30.33.8:8080/inform)

This means it cannot get thru the HA proxy to publish its information to the addon. Any ideas?

The other AP that works as it should uses the correct IP of my HA

Status:      Connected (http://192.168.2.136:8080/inform)

I had something similar a while ago, troubleshooting like crazy and found after restarting my Pi it resolved mine.

Tried this a couple of times but no luck. It seems like the AP Inform URL is overwritten after it sends the request to the HA url. No idea why this is happening.

Maybe I have found the solution

  1. ssh into the ap
  2. set-inform {url}
  3. switch to controller
  4. adopt ap
  5. ssh to ap again and run set-inform {url} again. this seems to override some setting in the AP and the set-inform url stays as it should

UPDATE
It seems like this did the trick. The AP stay connected and keep the correct inform url

Been away for a few days, has a solution been found in the mean time?

In the 1.0 release notes there is a breaking change that custom certs are no longer possible, and a self signed cert is created. I guess that’s because of security…

I would like to opt for getting this back in, but that’s just me because I use hostnames and matching certs from letsencrypt for some weird “SSL green lock in browser must be good” reason… :wink:

Anyway, Here is a manual way to get a cert from HASSIO back into the UNIFY container. Note the “manual” there. It means that when you refresh your certificate, for example with Let’s Encrypt, you need to rerun the below. Far from friendly and hoping for better times with the official plugin. (or we need to crontab this somewhere).

Think again

To start, you need root access and you need to be brave to perform the below.

  • SSH into you host (not the supervisor, but the host that runs the containers. as root or with sudo rights.

  • First find the container ID and put it in a var
    UNIFI_ID=$(sudo docker ps -aqf "name=unifi")

  • Copy the cert files into the container from Hassio (mine are Let’s Encrypt wildcard certs, if you have more files, copy the all)
    sudo docker cp /usr/share/hassio/ssl/fullchain.pem $UNIFI_ID:/root/fullchain.pem
    sudo docker cp /usr/share/hassio/ssl/privkey.pem $UNIFI_ID:/root/privkey.pem

  • Bash into the container
    sudo docker exec -t -i $UNIFI_ID /bin/bash

  • Change dir to the cert location
    cd /root/

  • Migrate the certs to a format UNIFI understands (again, mine are wildcard, perhaps you need a different for at “-in” if you have more file, but i do not think so.
    openssl pkcs12 -export -in fullchain.pem -inkey privkey.pem -out unifi.p12 -name unifi -CAfile fullchain.pem -caname root

Enter the password temppass.

  • Back-up the keystore PLEASE:
    mv /usr/lib/unifi/data/keystore /backup/unifi/keystore.backup

  • Import the cert into the UI KEy Store.
    keytool -importkeystore -deststorepass aircontrolenterprise -destkeypass aircontrolenterprise -destkeystore /usr/lib/unifi/data/keystore -srckeystore unifi.p12 -srcstoretype PKCS12 -alias unifi -srcstorepass temppass -noprompt

  • Reboot / Restart the “/usr/bin/java -Xmx256m -Xms128m -jar /usr/lib/unifi/lib/ace.jar start” process
    ps -ef
    kill -9 <processID>
    It will automatically restart.

  • Or restart via supervisor GUI

If it doesn’t work, bash back into the container and restore the keystore.

Happy hacking. :upside_down_face:

update nov 22, small changes to open ssl command and back-up to mapped back-up dir outside container based on install in latest version of add-on

3 Likes

Hello,

I had been running HA on 32bit and found out unifi controller ver 1 needs 64bit going forward so I have updated my OS to 64bit. Before update I had no issues with Unifi controller or its memory/cpu usage. with upgrading to 64bit Unifi controller add on itself consuming 45% of the memory and its not just right away. After I reboot memory usage starts with 1 or 2 % then gradually increase to 50% sometimes more than 60%. Is there a memory leak issue with unifi add on ver1?

I’m using Rpi 4 with 4GB ram.

I have a UAP LR which is EOL. The message is “Firmware and security updates are no longer supported. The device was fully supported until Mar 1, 2021.” From what I remember, the older controllers before March 1, 2021 were the only ones that were able to configure it.

I am currently using the latest version of hassio and the controller. What is the best way to downgrade the controller to regain function and control of the UAP LR?

That’s my experience for years with the Unifi addon, I removed the addon and my HA runs smooth as hell since

Hello

I’m running the 1.0.0 Unifi Controller add-on, but I’m not able to reach the controller web interface. Can someone help with this issue? I do not find any error in the log

Thanks
André