Home Assistant Community Add-on: UniFi Controller

Now the error messages from before are gone. Thanks.
The “open web ui” button will not get me to the controller, it tells me that server is not found. ssl is set to true.
When i navigate to hassio.local:8080, only then i’m able to get to the controller.
I also use DuckDNS and NGINX proxy addon, can these addons mess with the Unifi addon?

@frenck Dear frenck, can you please let me know, if it´s possible? Thank you very much in advance

:tada: Release v0.8.0

Full Changelog

Changed

  • :arrow_up: Upgrades UniFi Controller to 5.10.20 (#28) (@schliflo)
  • :arrow_up: Upgrades add-on base image to 3.0.0
  • :fire: Removes log_level from default options
  • :fire: Removes custom log format override
  • :ambulance: Workaround Docker issue by reinstating legacy tags
  • :books: Updates documentation for ARMv7
  • :fire: Removes armhf leftovers
  • :hammer: Rewrite add-on onto Bashio
  • :ambulance: Disables ARMHF in GitLab CI

Questions? Join our Discord server! https://discord.me/hassioaddons
Enjoying my add-ons? Consider supporting my work: https://patreon.com/frenck

1 Like

Reading the documentation, it appears the controller backs up its configuration to /backup/unifi.

Yep, my memory on rpi3 was getting smashed but the new memory setting is super useful in this respect. Now going to experiment with how little I can give it while still being usable.

Edit: even with limiting it to 150mb it seems to blow out to 300-400mb used.

:tada: Release v0.9.0

Full Changelog

Changed

  • :arrow_up: Upgrades add-on base image to 3.1.0
  • :hammer: Disables port 1900 by default to prevent collisions
  • :sparkles: Adds port descriptions
  • :fire: Removes default config options
  • :hammer: Simplifies add-on code logic
  • :arrow_up: Upgrades UniFi Controller to 5.10.21 (#31) (@Nyqi)

Questions? Join our Discord server! https://discord.me/hassioaddons
Enjoying my add-ons? Consider supporting my work: https://patreon.com/frenck

2 Likes

:tada: Release v0.9.1

Full Changelog

Changed

  • :ambulance: Fixes issue with execution order in init

Questions? Join our Discord server! https://discord.me/hassioaddons
Enjoying my add-ons? Consider supporting my work: https://patreon.com/frenck

Would it be possible to use ingress for this addon?

@AlmostSerious, no that won’t be possible.
I’ve explored ways to enable that, but the UniFi software simply won’t let me do it.

I installed the addon like described. I was able to setup the access points. Unfortunately the login I created with the wizard didn’t work after. Only the cloud login via App worked.
So i reinstalled the whole thing - but with the same result. I couldn’t find a solution for this topic only people with the same problem on different platforms. Does anyone have an idea?

Since upgrading to 0.92.0, I’m getting the below error in the add-on:

[19:59:00] INFO: Starting the UniFi Controller...
Exception in thread "main" java.lang.ClassFormatError: LineNumberTable attribute has wrong length in class file com/fasterxml/jackson/databind/introspect/BasicClassIntrospector
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
	at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	at com.ubnt.data.X.<clinit>(Unknown Source)
	at com.ubnt.service.OoOO.R.<clinit>(Unknown Source)
	at com.ubnt.ace.Launcher.<clinit>(Unknown Source)
[19:59:07] INFO: Starting the UniFi Controller...
Exception in thread "main" java.lang.ClassFormatError: LineNumberTable attribute has wrong length in class file com/fasterxml/jackson/databind/introspect/BasicClassIntrospector
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
	at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	at com.ubnt.data.X.<clinit>(Unknown Source)
	at com.ubnt.service.OoOO.R.<clinit>(Unknown Source)
	at com.ubnt.ace.Launcher.<clinit>(Unknown Source)

Anyone have an idea?

How does this addon run in a Raspberry Pi 3B+? Good enough? Will it freeze or crash Homeassistant?

I am about to get Ubiquiti network gear and I am curious if I should install this addon or install it as a docker on another Raspberry Pi which is running Pi-Hole… I also have RPi 3B doing nothing that I could use solely for this but I’d rather not add another device more to the collection… I already ran out of available power plugs…

I ran the add-on fine on my RPi 3B, but it did chew up a fair amount of RAM. Since my Unifi setup only consists of one AP-Lite right now, I opted to disable the add-on since it’s only absolutely necessary for the initial AP adoption.

The plan is to get an USG and one AP AC LR, I’m planning to keep it running to use the device presence. Bad idea? Not quite happy about spending another 100 bucks in the Cloud Key which has terrible reputation for failing and corrupted databases, and the Cloud Key Gen2 beside pricey it is not available in Malaysia.

I think you’d probably be okay, my free RAM usually sits at around 640 MB and with the UniFi Controller it was down around 300, so still quite a bit of headroom. I don’t know if it would have continued to eat more if I kept it running longer-term, though. If I had the USG or additional AP’s, or if I was using it for something like presence detection, I’d probably leave it running, I just didn’t currently have the use for it.

1 Like

I re-installed as i now started getting errors in other components too, so I suspect some corruption. all is back up and running, but now I get his message and it never seems to complete. In the meantime I am not able to access. I read some recommendations above that on going to earlier versions, but I am using the official add-on in Hassio on an RPI3 and not able to downgrade as far as I am aware.

Importing keystore /tmp/tmp.5bf2YU5et4 to /usr/lib/unifi/data/keystore... Warning: The JKS keystore uses a proprietary format. It is recommended to migrate to PKCS12 which is an industry standard format using "keytool -importkeystore -srckeystore /usr/lib/unifi/data/keystore -destkeystore /usr/lib/unifi/data/keystore -deststoretype pkcs12". [cont-init.d] unifi.sh: exited 0. [cont-init.d] done. [services.d] starting services [services.d] done. [14:09:26] INFO: Starting the UniFi Controller... OpenJDK Client VM warning: You have loaded library /usr/lib/unifi/lib/native/Linux/armv7/libubnt_webrtc_jni.so which might have disabled stack guard. The VM will try to fix the stack guard now. It's highly recommended that you fix the library with 'execstack -c &lt;libfile&gt;', or link it with '-z noexecstack'.

Anyone has any suggestions?

Installed it on a Raspberry Pi 2, everything seems to work fine untill I try to adopt a device (UAP-AC-PRO). It always keeps hanging on ‘adopting’. Anyone have experience with this issue?

The same AP can be addopted almost instantly with another Unifi controller that runs locally on my desktop.

I get no specific error messages or something.

Make sure you read everything in the installation instructions, specifically this part:

  1. Go to the settings (gears icon in the bottom left) -> Controller (tab).
  2. Change the Controller Hostname/IP to match the IP or hostname of the device running Hass.io.
  3. Check the box Override inform host with controller hostname/IP .
  4. Hit the “Apply Changes” button to activate the settings.

I had the same trouble initially until I went back and realized I hadn’t completed those steps.

2 Likes

Wow, thanks, that works. Hadn’t see the tutorial even, just installed the plugin from Hassio and tried some stuff. I should read better :sweat_smile:

No worries! When I set it up I made the same mistake. And it was my first time using UniFi so when it wouldn’t adopt I tried updating the firmware, factory resetting the AP, and using a different Ethernet cable. I was ready to tear my hair out before going back and reading the instructions. :joy: