Home Assistant Community Add-on: UniFi Controller

Before I try this myself, can anyone comment on the strain this add on might put on a Raspberry pi 3 or similar board? Would you see just occasional spikes of cpu activity (which is fine) or would it add a consistent amount of CPU usage? My priority is keeping cpu usage and temps to a minimum on my passively cooled board for overall longevity and stability. Thanks

My experience is that this add-on consumes quite a lot of resources. Not so much CPU, but RAM. On a Pi with only 1Gb of memory this can be a problem. I did manage to run it on a Pi 3B+ with Home Assistant quite ok, but I had to stop some other add-ons like Grafana and InfluxDB. Now, I moved the Unifi controller to a dedicated Pi with just the Unifi controller and Pi-hole.

Yeah, I waited until I got my pi4 so I could run unifi addon on hassio

I have mine running on a 3B+ and no issues but not running any other large add ons.

Thanks for the feedback, I think I might run it on an old pi2 I have in a drawer. Don’t want to put my hassio under pressure since it’s responsible for so many functions at this stage.

Everytime I reboot my Hassio machine, I have to reset the unfi devices back to factory and go through the whole adoption process again. What am I doing wrong?

@rmikulec have you logged into the controller software and tried manually setting the Controller Hostname/IP?

Put the IP address of your HA machine in, check the box for Override inform…, save and reboot.

That was it! Thank you so much!

1 Like

:tada: Release v0.13.0

Full Changelog

This is a general maintenance release and contains no breaking changes.

:hammer: Changes

  • :arrow_up: Upgrades UniFi Controller to 5.11.46 (#53)
  • :arrow_up: Upgrades add-on base image to v4.0.0
  • :fire: Removes unneeded access to config folder

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

1 Like

I receive the following error message while trying to restore my configuration backup of my existing controller (running on UniFi Controller 5.11.46). Restart does not help. I tried to re-install the add-on several time → no success until now:

[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.13.0
 You are running the latest version of this add-on.
 System: HassOS 2.12  (armv7 / raspberrypi2)
 Home Assistant version: 0.99.3
 Supervisor version: 189
-----------------------------------------------------------
 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.
[08:59:34] 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 <libfile>', or link it with '-z noexecstack'.
org.tuckey.web.filters.urlrewrite.UrlRewriteFilter INFO: destroy called
Exception in thread "Thread-13" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'requestMappingHandlerMapping' defined in org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration: Initialization of bean failed; nested exception is java.lang.IllegalStateException: BeanFactory not initialized or already closed - call 'refresh' before accessing beans via the ApplicationContext
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:584)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:498)
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
	at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:273)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.addCandidateEntry(DefaultListableBeanFactory.java:1455)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1419)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveMultipleBeans(DefaultListableBeanFactory.java:1310)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1197)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1166)
	at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:855)
	at org.springframework.beans.factory.support.ConstructorResolver.resolvePreparedArguments(ConstructorResolver.java:802)
	at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:143)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1308)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1143)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:538)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:498)
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
	at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:273)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.addCandidateEntry(DefaultListableBeanFactory.java:1455)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1419)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveMultipleBeans(DefaultListableBeanFactory.java:1310)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1197)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1166)
	at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:855)
	at org.springframework.beans.factory.support.ConstructorResolver.resolvePreparedArguments(ConstructorResolver.java:802)
	at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:143)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1308)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1143)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:538)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:498)
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
	at org.springframework.context.support.DefaultLifecycleProcessor.getLifecycleBeans(DefaultLifecycleProcessor.java:289)
	at org.springframework.context.support.DefaultLifecycleProcessor.stopBeans(DefaultLifecycleProcessor.java:195)
	at org.springframework.context.support.DefaultLifecycleProcessor.stop(DefaultLifecycleProcessor.java:116)
	at org.springframework.context.support.AbstractApplicationContext.stop(AbstractApplicationContext.java:1331)
	at com.ubnt.service.B.õÒ0000(Unknown Source)
	at com.ubnt.ace.Launcher$2.run(Unknown Source)
Caused by: java.lang.IllegalStateException: BeanFactory not initialized or already closed - call 'refresh' before accessing beans via the ApplicationContext
	at org.springframework.context.support.AbstractRefreshableApplicationContext.getBeanFactory(AbstractRefreshableApplicationContext.java:177)
	at org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:1212)
	at org.springframework.beans.factory.BeanFactoryUtils.beansOfTypeIncludingAncestors(BeanFactoryUtils.java:340)
	at org.springframework.web.servlet.handler.AbstractHandlerMapping.detectMappedInterceptors(AbstractHandlerMapping.java:318)
	at org.springframework.web.servlet.handler.AbstractHandlerMapping.initApplicationContext(AbstractHandlerMapping.java:293)
	at org.springframework.context.support.ApplicationObjectSupport.initApplicationContext(ApplicationObjectSupport.java:124)
	at org.springframework.web.context.support.WebApplicationObjectSupport.initApplicationContext(WebApplicationObjectSupport.java:77)
	at org.springframework.context.support.ApplicationObjectSupport.setApplicationContext(ApplicationObjectSupport.java:78)
	at org.springframework.context.support.ApplicationContextAwareProcessor.invokeAwareInterfaces(ApplicationContextAwareProcessor.java:120)
	at org.springframework.context.support.ApplicationContextAwareProcessor.postProcessBeforeInitialization(ApplicationContextAwareProcessor.java:96)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:419)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1737)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:576)
	... 45 more
[09:05:02] INFO: Starting the UniFi Controller...

I am trying to do exactly this for openVPN but my snapshot file doesn’t contain any site folders. Has something major changed in snapshot so this doesn’t work anymore?

:tada: Release v0.13.1

Full Changelog

This is a general maintenance release.

:hammer: Changes

  • :arrow_up: Upgrades UniFi Controller to 5.11.50 (#59)
  • :books:Minor update to readme (#56)

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

1 Like

:tada: Release UniFi Controller v0.13.2

Full Changelog

This is a general maintenance release.

:hammer: Changes

  • :arrow_up: Upgrades UniFi Controller to 5.12.22 (#62)
  • :books: Add information about device adoption (#63)
  • :shirt: Fixes Markdownlint warnings
  • :books: Tiny documentation improvement

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

1 Like

This may be a dumb question, but what is this add-on? There is an integration called UniFi Controller which seems to pull in a list of all devices in the controller. Then this add-on called the same thing that almost reads like it takes the full UniFi controller and makes it available within Home Assistant for whatever reason. Appreciate some clarification.

JR

This add-on IS a Unifi Controller, in that it lets you configure your AP’s etc. The HA component is simply for communicating with the Unifi network for device tracking and such

I’m not sure why but with version 0.13.2 3 of my wireless devices didn’t work.
Besides the updated add-on i did not change any setting.

After reverting to 0.13.1 everything worked fine.

I will skip 0.13.2 and try the next version.

I have somewhat of an odd issue. I have Hass.io running inside a VM on ESXi in a pretty vanilla setup. I have the controller deployed as per normal guidelines and have implemented the hostname override in the settings for the controller. Furthermore I have a DNS alias setup in my PFsense router such that unifi.mydomainname.com resolves to my Hass.io IP address.

Now for the weird part. I have 2 APs. One is a UAP-LR and the other is a UAP-AC-V2. If I factory reset the UAP-LR, it does a DNS search for “unifi” as per the default inform url, and automatically connects and registers with my controller. All I have to do is to click adopt inside the controller and the UAP-LR comes online. My other AP, the UAP-AC-V2 doesn’t even show up inside the controller to click adopt upon a factory reset. I’ve even logged into the UAP-AC-V2 via SSH and manually set the inform url to the IP address of my hass.io machine as per the documentation for the add-on. I even recently manually updated the firmware on the UAP-AC-V2 via SSH to ensure it wasn’t an old firmware problem, but it still doesn’t show up. I am able to manually log into the UAP-AC-V2 via SSH and ping the hass.io machine, so I don’t think there is a network or communication issue at play.

There must be something different about the adoption method of the UAP-AC-V2 vs the UAP-LR since the LR works with no fuss, but the AC-V2 doesn’t. Anyone have any ideas how to troubleshoot short of standing up a separate unifi controller?

I think shortly after posting this I found the issue. Apparently the “square” UAP-AC* APs went end of life and aren’t supported on newer controller versions (anything past 5.6).

I suppose this means I’m out of luck of using these on the Hass.io component and will just need to spin up a separate VM to run my controller. Not a big deal, but just wanted to update in case anyone else ran into a similar issue.

I haven’t read thru the whole thread so hopefully it isn’t already answered but does anyone know if the only way to update the unifi controller software is by waiting for the add-on to pick up the latest version and then update itself?

My controller software is saying that there is a new version out but there doesn’t seem to be an update to the add-on yet.

Or is there a different way we can/are supposed to update the controller software internal to the add-on?

If it’s the former then how long does it usually take to get the add-on updated to the newest version of the unifi software?

:tada: Release v0.13.3

Full Changelog

This is a general maintenance release.

:hammer: Changes

  • :arrow_up: Upgrade UniFi Controller to 5.12.35 (#65)
  • :arrow_up: Upgrades add-on base image to v4.0.1

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

1 Like