Home Assistant Community Add-on: UniFi Controller

Kind of: I found (an undocumented?) way to change port on the embedded MQTT:

embedded:
  listeners:
    default:
      max-connections: 5000
      bind: 192.168.x.x:1883
      type: tcp
    ws-1:
        bind: 192.168.x.x:8088
        type: ws
  auth:
    plugins: ['auth.anonymous']
    allow-anonymous: true
broker: 192.168.x.x
port: 1883

That works for me.

Next thing was that the Unifi refuses to start if the deCONZ addon is started. So I had to delay the deCONZ start 30 seconds (not using autostart, but to trigger an automation at startup that waits for 30 s then start the deCONZ addon).

Not really, maybe if you want to save some energy or want to combine multiple machines into one… just stick with the cloud key if you already have it :slight_smile:

I found this addon unreliable and AP were being disconnected and require re-adopting all the time. I have switched back to the OSX controller (installed on my Mac) and everything is working well again.

Seems like you failed to follow the installation instructions.

Well I thought I had, might be worth another go then! BTW I do use the restore option and restored my previous config…if that makes any difference.

All my APs are being disconnected and require re-adopting and stays in loop
What i did wrong??

From the docs:

The AP seems stuck in “adopting” state: Please read the installation instructions carefully. You need to change some controller settings in order for this add-on to work properly.

Quote from installation steps:

1 Like

I ise the Cloudkey rather than the Hassio controller but even with that there are sometimes adoption issues with the APs etc.
You sometimes need to login via ssh to the AP and use the set-inform command to prod them as to where the controller is on the network and they then pick up the controller properly. You still need the controller Hostname/IP settting in the controller UI to be setup as frenck says above however.

Thx… Work!!!

:tada: Release v0.1.3

Full Changelog

Changed

  • Upgrades UniFi to 5.8.28
1 Like

OK for various reasons I installed this addon and then uninstalled it again. Now when I tried to install it again with the latest 0.1.3 version it takes around 2 seconds to install (which can’t be right as the previous version took well over a minute!). If I click on START it turns red and does not start. There is nothing in the logs. Repeated this a few times with the same result.

I assume there is something remaining from a previous install. How can I check via SSH and maybe remove?

Thanks

The installation can be quick! (Docker caches images). A reboot after removing the add-on should purge that.

About the starting, that is odd. Anything in the Hass.io system logs?

Nope nothing. Very odd. Can you purge the cache?

There is no cache… (except for the docker images, which flushes at reboot, but that should not matter since Docker containers are stateless).

Has anyone gotten it to work with iFrame so I can manage it within the Home Assistant page? I’ve tried my duckdns address, the local IP of the HassIO computer, and just hassio.local, but the tab for it just shows a blank page. I feel like it’s something involving the SSL certificate, but I don’t actually know.

panel_iframe:
unifi:
title: ‘UniFi’
icon: ‘mdi:ethernet’
url: ‘https://hassio.local:8443

From the documentation:

Due to security policies in the UniFi Controller software, it is currently impossible to add the UniFI web interface to your Home Assistant frontend using a panel_iframe.

3 Likes

Well that explains that. Thanks.

OK I have spent some more time with this and missed this erorr in the log

ERROR (SyncWorker_3) [hassio.docker] Can't start addon_a0d7b954_unifi: 500 Server Error: Internal Server Error ("driver failed programming external connectivity on endpoint addon_a0d7b954_unifi (b7b9f45c64ad878e9a191c8cd1debdd0816aff332fe8963afc42867f800592a3): Error starting userland proxy: listen udp 0.0.0.0:1900: bind: address already in use")

I have no idea what is using port 1900 on my Pi. netstat gives no clues. I changed 1900 to 1901 and I can now install and start the plugin. Any ideas why port 1900 is used?

Port 1900 is an uPnP port, which is used by a lot of tools.

AirSonos, Plex, Unifi, enz…

You can disable it is you don’t need it (I don’t use it for example). To disable it, simply leave the port field on the add-on empty.

:tada: Release v0.2.0

Full Changelog

Changed

  • Upgrades hadolint to latest
  • Upgrades base image to v2.1.0
  • Sets default Shell
  • Updates README and links
  • Enables SSL by default
  • Less aggressive cleanup
  • Upgrades OpenJDK to 8u181-b13-0ubuntu0.18.04.1

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