Giter Club home page Giter Club logo

addon-unifi's Introduction

Home Assistant Community Add-on: UniFi Network Application

GitHub Release Project Stage License

Supports aarch64 Architecture Supports amd64 Architecture Supports armhf Architecture Supports armv7 Architecture Supports i386 Architecture

GitHub Actions Project Maintenance GitHub Activity

Discord Community Forum

Sponsor Frenck via GitHub Sponsors

Support Frenck on Patreon

The UniFi Network Application allows you to manage your UniFi network using a web browser.

The UniFi Network Application add-on

About

This add-on runs Ubiquiti Networks' UniFi Network Application software, which allows you to manage your UniFi network via the web browser. The add-on provides a single-click installation and run solution for Home Assistant, allowing users to get their network up, running, and updated, easily.

📚 Read the full add-on documentation

Support

Got questions?

You have several options to get them answered:

You could also open an issue here GitHub.

Contributing

This is an active open-source project. We are always open to people who want to use the code or contribute to it.

We have set up a separate document containing our contribution guidelines.

Thank you for being involved! 😍

Authors & contributors

The original setup of this repository is by Franck Nijhof.

For a full list of all authors and contributors, check the contributor's page.

We have got some Home Assistant add-ons for you

Want some more functionality to your Home Assistant instance?

We have created multiple add-ons for Home Assistant. For a full list, check out our GitHub Repository.

License

MIT License

Copyright (c) 2018-2024 Franck Nijhof

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

addon-unifi's People

Contributors

adamfeldman avatar alghazu avatar allanpersson avatar brmo avatar cfergeau avatar chrillebile avatar cwmoriarty avatar david-pivonka avatar dependabot[bot] avatar frenck avatar glyph-se avatar hip4 avatar lejoui avatar lopesdasilva avatar loudsoftware avatar nickdos avatar nkm8 avatar pattyland avatar quentin-cs avatar renewoensdregt avatar renovate-bot avatar rsnodgrass avatar schliflo avatar sinclairpaul avatar snoof85 avatar stocker85 avatar tommatheussen avatar wolvverine avatar zerohour avatar zmottie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

addon-unifi's Issues

Conflict over port 1900?

Problem/Motivation

I have discovered an interesting behaviour with my Raspberry Pi 3. I'm running the Unifi addon, the deCONZ addon and the Airsonos addon. If I start deCONZ and Airsonos and then start Unifi, Unufi won't start. If I start Unifi first and then the other two, it works like a charm.

I think I've been able to trace the error to port 1900 (PnP?) and a conflict over the port then Unifi starts.

Expected behavior

I'm expecting all the addons to start, regardless of what order they start in.

Actual behavior

(What actually happened)

Steps to reproduce

(How can someone else make/see it happen)

Proposed changes

(If you have a proposed change, workaround or fix,
describe the rationale behind it)

CERT file not found.

Adon-unifi not starting.

Fresh HassOS 2.4 (Production) with superviso 143 @ RaspberryPI 3 armv7 image, configuration.yaml checked --> Fresh addon-unifi installation from GUI not starting.

Config:

{
  "log_level": "trace",
  "ssl": true,
  "certfile": "fullchain.pem",
  "keyfile": "privkey.pem"
}

Log:

TRACE: hass.jq: /data/options.json .certfile | if type=="string" then true else false end
TRACE: hass.jq: /data/options.json .certfile // empty
TRACE: hass.file_exists: /ssl/fullchain.pem
TRACE: hass.die: The configured certfile is not found
TRACE: hass.has_value: The configured certfile is not found
FATAL: The configured certfile is not found
[cont-init.d] 10-requirements.sh: exited 1.
[cont-finish.d] executing container finish scripts...
[cont-finish.d] 99-message.sh: executing... 
-----------------------------------------------------------
                Oops! Something went wrong.
 
 We are so sorry, but something went terribly wrong when
 starting or running this add-on.
 
 Be sure to check the log above, line by line, for hints.
-----------------------------------------------------------

Without SSL at configuration, UNIFI controller starts flawlessly.

There seems to be the "hacky" way of doing a partial backup

There seems to be the "hacky" way of doing a partial backup, unpacking the addon, adding the config. Repacking and restoring. It would be great if the folder \data\unifi\data\sites\default could be made accessible in the same way as the backups.

Originally posted by @almostserious in #35 (comment)

--> What are you guys using for repacking tar / tar.gz? My repackaged tar snapshot generated under macos terminal gets rejected by hassio when restoring:
[hassio.snapshots.snapshot] Can't read snapshot tarfile /data/backup/9cf8ab91.tar: "filename './snapshot.json' not found"

Cannot find Unifi AP to connect

Problem/Motivation

Cannot find AP

(Why the issue was filed)
Doe not function

Expected behavior

Finds current APLR

(What you expected to happen)
Find available AP

Actual behavior

Get the following:
UniFi Access Point Required
Please connect at least one to enable the channel charts.

(What actually happened)

Steps to reproduce

(How can someone else make/see it happen)
Running HASSIO .773 UNIFI add on 0.2.1

Proposed changes

(If you have a proposed change, workaround or fix,
describe the rationale behind it)

Revise/improve all log messages

Problem/Motivation

There are several reasons for this:

  • Not all log messages are consistent across all add-ons.
  • Some messages are unclear to the novice user.

Unifi Cloud not working - DNS issues with controller container

Problem/Motivation

I am unable to connect this controller to my UBNT cloud account; I keep getting error messages that it is unable to reach the cloud. When I check the controller logs, I get several errors that all seem to revolve around failed DNS lookups including failure to find firmware updates for my devices.

Running bash inside the container on the host, I can see that the only DNS entry in /etc/resolv.conf is for Docker (my other Docker dns settings from /etc/docker/daemon.json are not copied in. ping and nslookup are not installed inside the container, so I can't do any further tests.

Expected behavior

DNS name resolution to function.

Actual behavior

Unable to perform any DNS lookups from Controller container.

Steps to reproduce

Try to connect a cloud account to the Unifi Controller running in this container.

Proposed changes

Possible to change config.json to allow host_network: true? I don't know if this would fix the issue or not. I don't have this problem in the Hass.io container or any other addons. I tried to build my own version of this addon from the Dockerfile, but kept having issues on my aarch64 system (Rock Pi 4b).

Device in state 'Unavailable' after HA restart

Problem: when a (smartphone) device that is tracked by unifi addon is not connected to the unifi AP, and the HA is restarted. Then the device will be in state "Unavailable".

This is a problem if you use the device as tracker for state home or not_home.

I think the correct solution is to put the device into Away(as it is when simply disconnecting the smartphone from wifi), because if it is not found within the unifi controller, it should assume the device is away.

Home Assistant 0.108.6
Unifi Controller Addon 0.14.1

PEM file not found.

Problem/Motivation

(Why the issue was filed)

Expected behavior

(What you expected to happen)

Actual behavior

(What actually happened)

Steps to reproduce

(How can someone else make/see it happen)

Proposed changes

(If you have a proposed change, workaround or fix,
describe the rationale behind it)

webgui unavailable

I had a HA crash, so had to restore from a backup
The unifi addon is installed good from the backup

Normally i can reach the webgui, but now i cant
i get a
connection refused warning

Log from addon says:
[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.14.0
You are running the latest version of this add-on.
System: HassOS 3.12 (armv7 / raspberrypi4)
Home Assistant Core: 0.107.4
Home Assistant Supervisor: 209

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.
[12:47:22] INFO: Starting the UniFi Controller...

not sure whats wrong, restarting doesnt help

unifi controller fails to start on new hassio install

Problem/Motivation

unifi controller fails to start

Expected behavior

controller starts

Actual behavior

goes green after clicking startt but on refresh off line, never started.

Here are the log entries from a restart attempt:
19-08-09 10:47:16 INFO (SyncWorker_6) [hassio.docker.interface] Clean addon_a0d7b954_unifi application
19-08-09 10:47:18 INFO (SyncWorker_6) [hassio.docker.addon] Start Docker add-on hassioaddons/unifi-armv7 with version v0.10.0
19-08-09 10:47:19 INFO (MainThread) [hassio.api.security] /host/info access from a0d7b954_unifi

Steps to reproduce

fresh install and click start. I am on a raspberry pi 4b

Proposed changes

Guessing this is my user ignorance but though Id check.

After firmware upgrade of UniFi devices set-inform url will change to internal docker IP address

Problem/Motivation

Inform url was automatically changed from real IP of HASS.io to the Internal Docker IP address of HASS.io addon.

Expected behavior

Keep Inform URL as it is during manual/initial configuration (for example if IP address of HASS.io connected to the network has IP address 192.168.1.100).

Connect to the managed IP of the device via SSH > info > Status: Connected (http://192.168.1.100:8080/inform)

Actual behavior

I experienced this behavior during firmware upgrade of UniFi devices (AP and Switch). USG Inform URLwas never changed, only AP and Switch were changed.

Connect to the managed IP of the device via SSH:

info
Status: Unknown[11] (http://172.30.33.3:8080/inform)
set-inform http://192.168.1.100:8080/inform

Device was connected back to UniFi Controller.

Steps to reproduce

Mostly after auto-firmware upgrade or it happen once during Addon upgrade.

Cannot start addon from Raspberry Pi 3

Problem/Motivation

While it has worked on another Raspberry Pi 3, the one I'm currently using cannot start the docker container. Tried starting the docker from command line and got this error log:

(Why the issue was filed)

Expected behavior

I expected the Unifi controller to show as started from the Hassio GUI and I also expected to be able to run the image from command line.

(What you expected to happen)

Actual behavior

root@PI:/usr/share/hassio/homeassistant# docker images
REPOSITORY                                 TAG                 IMAGE ID            CREATED             SIZE
hassioaddons/unifi                         0.1.2               9a109abbe854        2 days ago          483MB
hassioaddons/unifi                         latest              9a109abbe854        2 days ago          483MB
homeassistant/armhf-hassio-supervisor      110                 8c40df2ff924        2 days ago          132MB
homeassistant/armhf-hassio-supervisor      latest              8c40df2ff924        2 days ago          132MB
homeassistant/raspberrypi3-homeassistant   0.72.1              a0c13be884d3        6 days ago          1.06GB
homeassistant/raspberrypi3-homeassistant   latest              a0c13be884d3        6 days ago          1.06GB
marthoc/hassio-addon-deconz-armhf          2.05.30             88722dfce087        13 days ago         187MB
marthoc/hassio-addon-deconz-armhf          latest              88722dfce087        13 days ago         187MB
homeassistant/armhf-addon-ssh              3.7                 e4a8b8fe1813        2 weeks ago         69.8MB
homeassistant/armhf-addon-ssh              latest              e4a8b8fe1813        2 weeks ago         69.8MB
hassioaddons/ide-armhf                     0.3.0               879298c5f101        3 weeks ago         345MB
hassioaddons/ide-armhf                     latest              879298c5f101        3 weeks ago         345MB
root@StavsnasPi:/usr/share/hassio/homeassistant# docker run 9a109abbe854
[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...
curl: (6) Could not resolve host: hassio
[20:15:17+0000] ERROR ----> Something went wrong contacting the API
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing...
parse error: Invalid numeric literal at line 2, column 0
parse error: Invalid numeric literal at line 2, column 0
parse error: Invalid numeric literal at line 2, column 0
parse error: Invalid numeric literal at line 2, column 0
/var/run/s6/etc/cont-init.d/01-log-level.sh: line 44: log_level: unbound variable
[cont-init.d] 01-log-level.sh: exited 1.
[cont-finish.d] executing container finish scripts...
[cont-finish.d] 99-message.sh: executing...
-----------------------------------------------------------
                Oops! Something went wrong.

 We are so sorry, but something went terribly wrong when
 starting or running this add-on.

 Be sure to check the log above, line by line, for hints.
-----------------------------------------------------------
[cont-finish.d] 99-message.sh: exited 0.
[cont-finish.d] done.
[s6-finish] syncing disks.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.

(What actually happened)

Steps to reproduce

(How can someone else make/see it happen)

Proposed changes

Is it the case that the connection is tried for hassio.local:8123?

(If you have a proposed change, workaround or fix,
describe the rationale behind it)

Can't install hassioaddons/unifi-amd64:0.10.0 -> 404 Client Error: Not Found

Hello,

I'm unable to install it on my amd64 platform due to "Can't install hassioaddons/unifi-amd64:0.10.0 -> 404 Client Error: Not Found ("no such image: hassioaddons/unifi-amd64:0.10.0: No such image: hassioaddons/unifi-amd64:0.10.0")." - Is there really no image for that platform available?

Thanks, Thomas

access points need re-adopting after every update to Hass.io

Problem/Motivation

after every update to Hass.io, or restoring from a snapshot, the Unifi Access Points are no longer adopted. This necessitates using ssh to send a set-inform command in each access point.

Expected behavior

for the access points to remain in an adopted state through updates.

Proposed changes

I'm not sure, as I lack the skills to do anything to help, however I am reporting this with the hope that someone else might be able to figure it out.

Doesn't launch successfully

Problem/Motivation

I am using HASS.io on a raspberry pi 3 with this add-on installed. It appears that it is hanging when I launch it.

Actual behavior

[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.9.2
 You are running the latest version of this add-on.
 System: HassOS 2.11  (armv7 / raspberrypi3)
 Home Assistant version: 0.93.1
 Supervisor version: 164
-----------------------------------------------------------
 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... 
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".
Importing keystore /tmp/tmp.GDLgaqwFbV 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.
[19:45:42] 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'.

Steps to reproduce

I tried uninstalling and reinstalling the addon to see if that would fix it, but the issue is still happening. I also tried deleting /ssl/fullchain.pem and /ssl/privkey.pem to see if they would get automatically regenerated. That caused it to fail with an error message. At that point I set ssl to false and still no luck.

Addon won't start

Problem/Motivation

The controller was running fine for a few weeks. Now it will not start

Expected behavior

Unifi Controller to start

Actual behavior

Config entry for unifi not ready yet. Retrying in 5 seconds.
10:27:01 PM – config_entries.py (WARNING) - message first occurred at 10:08:01 PM and shows up 18 times
Error connecting to the UniFi controller at 10.40.67.3
10:27:01 PM – unifi (ERROR) - message first occurred at 10:08:01 PM and shows up 18 times

Steps to reproduce

(How can someone else make/see it happen)

Proposed changes

(If you have a proposed change, workaround or fix,
describe the rationale behind it)

UniFi Controller stucks on startup

Hi,

I'm trying to launch the UniFi Controller addon but it get's stuck on "UniFi Controller is starting up... Please wait a moment" and it never starts (I have had it running for a couple of days now).

I have extended the log to debug but I can't find anything relevant to my troubleshooting.

Have anyone seen this before? Have anyone solved it? Are there any other logs to check for information?

Running version 0.40 of UniFi controller and 0.81.6 HA.

hassio

hassio.txt

Changing port number to 8081

Problem/Motivation

I tried to change setting called "8080/tcp - Used for device and controller communication" to be 8081 since my deCONZ already use 8080

Expected behavior

Since this is a setting within the configuration page for this Add-on i assumed that this would work the same way for other Add-ons i have changed port numbers for.

Actual behavior

The Unifi controller are starting as normal, I can log into the interface, but after i changed from 8080 to 8081 the controller lost connection to all three Access Points

Steps to reproduce

Only change I did was changing from port 8080 to 8081

Kind Regards
Eirek Gullvåg

Unable to get response from https://host:8443

I am unable to get unifi responding on its 8443 port.

Expected behavior

Expect to be able to connect at the 8443 port with the self signed cert

Actual behavior

No connection

Steps to reproduce

New HASSIO (97.2) / UNIFI addon installation

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... 
-----------------------------------------------------------

 Hass.io Add-on: UniFi Controller
 Manage your UniFi network using a web browser
-----------------------------------------------------------
 Add-on version: 0.12.0
 You are running the latest version of this add-on.
 System: Debian GNU/Linux 10 (buster)  (armv7 / odroid-xu)
 Home Assistant version: 0.97.2
 Supervisor version: 184
-----------------------------------------------------------
 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.
[16:13:49] INFO: Starting the UniFi Controller...

configuration:

{ "ssl": false, "certfile": "fullchain.pem", "keyfile": "privkey.pem" }

Command line test:

curl -k https://localhost:8443 curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to localhost:8443

Using NETSTAT

After installing netstat into the container and then running it, I don't see the port 8443:

docker exec -it addon_a0d7b954_unifi netstat -at
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State      
tcp        0      0 0.0.0.0:8880            0.0.0.0:*               LISTEN     
tcp        0      0 0.0.0.0:8080            0.0.0.0:*               LISTEN     
tcp        0      0 127.0.0.11:43101        0.0.0.0:*               LISTEN     
tcp        0      0 a0d7b954-unifi.lo:56882 astomi.canonical.com:80 TIME_WAIT  

MongoDB logs

THe mongo db logs is repeating this:

2019-08-27T21:17:27.145-0400 ***** SERVER RESTARTED *****
2019-08-27T21:17:27.146-0400 SEVERE: Invalid access at address: 0x48a731a
2019-08-27T21:17:27.151-0400 SEVERE: Got signal: 7 (Bus error).
Backtrace:0x7639be 0x762f6e 0x76300a 0xf6f52760 0x75ece4 0x75cd7e 0x75cdf4 0x1f0300 0x1fc81a 0x1fcb7e 0x1fcdc8 0x1c4e64 0xf6f43fe6 
 bin/mongod(_ZN5mongo15printStackTraceERSo+0x25) [0x7639be]
 bin/mongod() [0x762f6e]
 bin/mongod() [0x76300a]
 /lib/arm-linux-gnueabihf/libc.so.6(+0x25760) [0xf6f52760]
 bin/mongod(_ZN5mongo11ProcessInfo10SystemInfo17collectSystemInfoEv+0x87f) [0x75ece4]
 bin/mongod(_ZN5mongo11ProcessInfo20initializeSystemInfoEv+0x7d) [0x75cd7e]
 bin/mongod(_ZN5mongo36_mongoInitializerFunction_SystemInfoEPNS_18InitializerContextE+0x7) [0x75cdf4]
 bin/mongod(_ZN5boost6detail8function17function_invoker1IPFN5mongo6StatusEPNS3_18InitializerContextEES4_S6_E6invokeERNS1_15function_bufferES6_+0x17) [0x1f0300]
 bin/mongod(_ZNK5mongo11Initializer7executeERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EERKSt3mapIS7_S7_St4lessIS7_ESaISt4pairIKS7_S7_EEE+0x15d) [0x1fc81a]
 bin/mongod(_ZN5mongo21runGlobalInitializersERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EERKSt3mapIS6_S6_St4lessIS6_ESaISt4pairIKS6_S6_EEE+0x29) [0x1fcb7e]
 bin/mongod(_ZN5mongo21runGlobalInitializersEiPKPKcS3_+0x22b) [0x1fcdc8]
 bin/mongod(main+0x6f) [0x1c4e64]
 /lib/arm-linux-gnueabihf/libc.so.6(__libc_start_main+0x99) [0xf6f43fe6]
root@a0d7b954-unifi:/usr/lib/unifi/bin# mongod --version
db version v2.6.10
2019-08-27T21:20:23.961-0400 git version: nogitversion
2019-08-27T21:20:23.962-0400 OpenSSL version: OpenSSL 1.0.2n  7 Dec 2017

Tried to start unifi:

root@a0d7b954-unifi:/usr/lib/unifi/bin# ./unifi.init status
 * unifi is not running
root@a0d7b954-unifi:/usr/lib/unifi/bin# ./unifi.init start
 * Starting Ubiquiti UniFi Controller unifi                                                                                                                                                                [fail] 
root@a0d7b954-unifi:/usr/lib/unifi/bin# ./unifi.init status
 * unifi is not running
root@a0d7b954-unifi:/usr/lib/unifi/bin# ./unifi.init status
 * unifi is not running
root@a0d7b954-unifi:/usr/lib/unifi/bin# ./unifi.init status
 * unifi is not running
root@a0d7b954-unifi:/usr/lib/unifi/bin#

Add On Needs a Version Bump

d254acd bumped the controller version to 5.8.30 but it wasn't tagged so HASS.io still shows add-on version 0.2.1 with controller version 5.8.28 as current.

There's a USG firmware update but it requires the newer controller to avoid issues.

Addon unable to restore backup - stuck at starting

Problem/Motivation

This issue seems related to #11 but this problem has returned? I'm unable to restore a backup. This results in a broken addon. Stopping/starting or Uninstalling/Installing don't work. I had to restore a full snapshot for the addon to work again.

Expected behavior

Start addon
Restore backup
Restart addon
Business as usual.

Actual behavior

Start addon
Restore backup
Restarting addon
-Stuck-
"Starting addon" and "Repairing database" message continue, even after 12 hours.

Steps to reproduce

Run Hassio on RPI3
Install Unifi addon
Start Unifi addon
Choose to restore backup
And you get - Stuck -

Logs don't reveal anything:

[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.8.0
 You are running the latest version of this add-on.
 System: HassOS 1.10  (armv7 / raspberrypi3)
 Home Assistant version: 0.91.0
 Supervisor version: 152
-----------------------------------------------------------
 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... 
Log level is set to DEBUG
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] 10-requirements.sh: executing... 
[cont-init.d] 10-requirements.sh: exited 0.
[cont-init.d] 50-persist-data.sh: executing... 
[cont-init.d] 50-persist-data.sh: exited 0.
[cont-init.d] 51-db.sh: executing... 
[cont-init.d] 51-db.sh: exited 0.
[cont-init.d] 60-ssl.sh: executing... 
[cont-init.d] 60-ssl.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[12:53:21] INFO: Starting the UniFi Controller..

Only solution seems to be to restore a backup of hassio to make unifi addon work again and start from scratch.

Proposed changes

I have no clue. Tried to look true the previous topics, but the solution for this seems to be needing some handy work from @frenck

EDIT

Found a work around and will describe the steps I took.

  • Install full snapshot
  • Start and open Unifi after hassio re-install
  • Go back and stop Unifi and delete
  • Install Unifi again
  • Go true the setup process (do not restore backup in setup process!)
  • Access Unifi and go to Maintenance and choose to restore backup

Trying to restore in the setup process or from an older install (so the one that's re-installed with the full snapshot of Hassio) won't work. You need the Unifi addon in a "clean state" sort of speak, only than I was able to succesfully restore a backup of Unifi.

EDIT 2

Still, cloud access won't enable for some reason. This worked in the beginning, but somehow after disabling/enabling it once, it hasn't worked since. That was the main reason for me to try and restore a backup. So maybe this is related to the failing restore backup part? I'm don't seem to be blocking stuff. Tried a different account etc, but I may be going off topic. Just wanted to give the information in case it's helpfull.
There was an error registering credentials. Unable to connect to UniFi cloud. Please check your network connection, and try again.

EDIT 3
Found a message in the controller log pointing to IPS. I disabled IPS, provisioned and rebooted hassio (and thus the controller). This seems to have fixed the Cloud Access problem.

My theory: Enabling IPS blocks not only Cloud Access (no wonder it's in beta), but it also brakes something which prevents restoring a backup. I haven't found anything that can explain that, but maybe this rings a bell and helps the development of this addon.

Really great addon! Thank you!

How to install?

Problem/Motivation

How can I install this add-on? It doesn't appear in the add-on store.

Issue with recent update to unifi

Problem/Motivation

cant open unifi controller. I see this in webpage but but no hints in log. I am not using ssl.

Bad Request
This combination of host and port requires TLS.

Expected behavior

typical usage can see at port 8443.

Actual behavior

(What actually happened)

[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.12.0
You are running the latest version of this add-on.
System: HassOS 3.3 (armv7 / raspberrypi4)
Home Assistant version: 0.97.2
Supervisor version: 183

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.
[11:33:06] 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 ', or link it with '-z noexecstack'.

Proposed changes

(If you have a proposed change, workaround or fix,
describe the rationale behind it)

unable to restore from backup

Problem/Motivation
This issue seems related to #11 and #30 I'm unable to restore a backup. This results in a broken addon. Stopping/starting or Uninstalling/Installing don't work. Not sure what to do. Could I take a very selective snapshot of my Unifi controller from my old Hass instance and restore JUST that and it would leave the rest of my new setup untouched?

Also get this in the logs

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-14" 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.oÓ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
Reply

Expected behaviour
Start addon
Restore backup
Restart addon
Business as usual.

Actual behaviour
Start addon
Restore backup
Restarting addon
-Stuck-

Steps to reproduce
Run Hassio on RPI3
Install Unifi addon
Start Unifi addon
Choose to restore backup
And you get - Stuck -

[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.4
 You are running the latest version of this add-on.
 System: HassOS 3.8  (armv7 / raspberrypi2)
 Home Assistant version: 0.104.1
 Supervisor version: 195
-----------------------------------------------------------
 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.
[07:25:18] INFO: Starting the UniFi Controller...

Incorrectly reports update available

Problem/Motivation

I noticed the log showed that there was an update available. When I checked there wasn't.

Expected behavior

Only say that there is an updated when there is one available.

Actual behavior

[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.14.1
 There is an update available for this add-on!
 Latest add-on version: null
 Please consider upgrading as soon as possible.
 System: HassOS 3.12  (armv7 / raspberrypi3)
 Home Assistant Core: 0.107.7
 Home Assistant Supervisor: 214
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------

Steps to reproduce

All I did was install/launch the addon. It has been installed for several months.

Add UniFi Video Controler

Ubiquiti provides the UniFi Video Controller which can be integrated with Hassio. Will be great to be able to use it as an addon in Hassio

Working Dockerfile is already available thx to @pducharme
https://github.com/pducharme/UniFi-Video-Controller/blob/master/Dockerfile

It might be used to gently tune current one from Network Contoller, to convert it to the Video Contoller

GitHub
Docker for Unifi-Video Controller (Ubiquiti Networks) - pducharme/UniFi-Video-Controller

Don’t login after backup restore

I’m using hassio image on rpi2 with latest version of home assistant 0.84.6

I have exported the configuration from actual UniFi controller (another rpi with raspian) and imported in this add on, after import I can’t login in web infterface, always says username/password error

Another question, where is saved the configuration? I need to edit config.properties file

Thanks

Add on doesn't start

Problem/Motivation

Does not start

Expected behavior

It should start

Actual behavior

Doesn't start

Steps to reproduce

Install. Click start.

Proposed changes

Fix it. ;-)

Running on Rasbpi 3. Hassio 0.96.5 - I get this error:

19-07-28 00:32:40 ERROR (SyncWorker_12) [hassio.docker] Can't start addon_a0d7b954_unifi: 500 Server Error: Internal Server Error ("driver failed programming external connectivity on endpoint addon_a0d7b954_unifi (0193b68130ac82c46619cda06fe0fd5da5de8eb1613f5276b156e07916dc4acf): Error starting userland proxy: listen tcp 0.0.0.0:8080: bind: address already in use")

Update UniFi controller software

Problem/Motivation

It's currently not possible to import backups from an existing Unifi controller, when that controller is running a version higher than 5.11.46.

Expected behavior

The backup import works.

Actual behavior

The import fails with the message that the backup is from a newer controller version.

Proposed changes

Update the UniFi controller software in the Docker container to the latest version.

add link on sidebar

Problem/Motivation

(Why the issue was filed)
Convenience to find the link to the unifi dashboard

Expected behavior

It would be nice to have a direct link to the unifi dashboard from the sidebar in the front-end of hassio.

(What you expected to happen)

Actual behavior

(What actually happened)

Steps to reproduce

(How can someone else make/see it happen)

Proposed changes

(If you have a proposed change, workaround or fix,
describe the rationale behind it)

Fails to start - No SSL Cert, but certfile there (used to work)

Problem/Motivation

Addon doesnt start, throwing error that SSL certificate doesnt exist.

Cert file is specified as "fullchain.pem"

fullchain.pem exists in /config/ssl (HASSIO)

Any steps to perform additional debug? This was working, and now fails. Not sure if I updated the HA version (most likely did).

Update to 5.10.24

Problem/Motivation

Was wondering whether an update for 5.10.24 is in the works or not. Not urgent more just curious.

Addon crashes supervisor / hassio when accessed using web ui.

Problem/Motivation

Addon crashes supervisor / hassio when accessed using webui.
New installation of HassOS on Tinker Board.

You are running the latest version of this add-on.
System: HassOS 2.11  (armv7 / tinker)
Home Assistant version: 0.92.1
Supervisor version: 162

Expected behavior

Not crash the system.
I have a similar installation with same hardward. It was running addon 0.7.1 I believe and there was no issues. I updated that installation to 0.9.1 as well, then immediately saw this error (I am using the controller as device tracker and set verify_ssl: false):

Failed to scan clients: Expecting value: line 1 column 1 (char 0)

Tue Apr 30 2019 16:35:29 GMT-0700 (Pacific Daylight Time)
Failed to perform <function Controller._read at 0xafca19c0> due to HTTPSConnectionPool(host='localhost', port=8443): Max retries exceeded with url: /api/s/default/stat/sta (Caused by SSLError(SSLError("bad handshake: SysCallError(104, 'ECONNRESET')")))

Tue Apr 30 2019 16:35:42 GMT-0700 (Pacific Daylight Time)
Failed to perform <function Controller._read at 0xafca19c0> due to HTTPSConnectionPool(host='localhost', port=8443): Max retries exceeded with url: /api/s/default/stat/sta (Caused by SSLError(SSLError("bad handshake: SysCallError(-1, 'Unexpected EOF')")))

Tue Apr 30 2019 16:35:42 GMT-0700 (Pacific Daylight Time)
Failed to scan clients: HTTPSConnectionPool(host='localhost', port=8443): Max retries exceeded with url: /api/login (Caused by SSLError(SSLError("bad handshake: SysCallError(-1, 'Unexpected EOF')")))

Tue Apr 30 2019 16:35:57 GMT-0700 (Pacific Daylight Time)
Failed to perform <function Controller._read at 0xafca19c0> due to `api.err.LoginRequired

As this installation is remote, I do not want to access web ui afraid it might crash the system.
I also have the same addon 0.9.1 running on a Raspberry Pi 3 B, no issues.

Actual behavior

This is a new install. Installed 0.9.1 fresh.
During first start up of addon, then accessing through the Web UI of the addon. Hassio itself became unresponsive. At first I did not realize it was caused by the addon. Ping worked but getting some request timeouts. SSH did not work. Web UI of lovelace is inaccessible.

Had to unplug the tinker board. Everything back to normal, then I loaded a backup to the controller. Crashed again. Same behavior as above. There's no extra logs on supervisor. Unfortunately I cannot see any additional logs from the addon as the UI becomes instantly unresponsive.

Another hard unplug, I was able to get into the Web UI of the addon, the backup should be restored. I can login with username and pw. But then a couple clicks in (trying to adopt AP), same freeze happens again.

This and the above behavior with another installation leads me to believe it might be an issue with 0.9.1 and Tinker board..

Just running the addon does not seem to do anything. Only accessing the web ui does.

Steps to reproduce

  1. Install Addon on Tinker Board, start it.
  2. Access web UI.

Is there any other way to troubleshoot this issue? Any recommendation is appreciated.

Upgrade

I'm sorry, my fault - please close and remove.

Controller starts crashing after 5.10.26

Problem/Motivation

After upgrading to 5.10.26 the controller starts to crash and needs to be restarted:

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

Add-on version: 0.11.0
You are running the latest version of this add-on.
System: HassOS 2.12 (armv7 / raspberrypi3)
Home Assistant version: 0.97.2
Supervisor version: 173

[06:18:10] INFO: Starting the UniFi Controller...
OpenJDK Client VM warning: INFO: os::commit_memory(0x48550000, 357957632, 0) failed; error='Cannot allocate memory' (errno=12)

There is insufficient memory for the Java Runtime Environment to continue.

Native memory allocation (mmap) failed to map 357957632 bytes for committing reserved memory.

An error report file with more information is saved as:

/run/s6/services/unifi/hs_err_pid23697.log

[06:18:11] INFO: Starting the UniFi Controller...
OpenJDK Client VM warning: INFO: os::commit_memory(0x48550000, 357957632, 0) failed; error='Cannot allocate memory' (errno=12)

There is insufficient memory for the Java Runtime Environment to continue.

Native memory allocation (mmap) failed to map 357957632 bytes for committing reserved memory.

An error report file with more information is saved as:

/run/s6/services/unifi/hs_err_pid23714.log

Anyone else seen this or is it related to my pi?

after reboot - problem

hi, when i restart the controler i have problem with the database.
maybe can be this the problem:

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 ', or link it with '-z noexecstack'.
Exception in thread "WsSitesList" com.mongodb.MongoSocketReadException: Prematurely reached end of stream

I am using the hass.io on rasp 3

looking also in the ubnt i see that inform is not my server but
Status: Unknown[11] (http://172.30.33.1:8080/inform)
and must be http://192.168.10.235:8080/inform

i made also reset of unifi AP and still this happens.
Please help

config.gateway.json

Problem/Motivation

It is often required that you need to create a gateway config json file and store it within the directory structure of the unifi controller to be read. The contents of the json file vary from implementation to implementation

Expected behavior

Save json file to "wherever_your_controller_is_installed_directory\Ubiquiti UniFi\data"

Actual behavior

No documented way of doing this

Steps to reproduce

none

Proposed changes

Is it possible to ssh in to the docker container running the Unifi controller add-on?

Controller won't start - Failed creating UniFi keystore

I'm running the latest hass.io version

[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.9.0
You are running the latest version of this add-on.
System: HassOS 2.11 (armv7 / tinker)
Home Assistant version: 0.91.4
Supervisor version: 160

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] ssl.sh: executing...
keytool error: java.io.FileNotFoundException: /usr/lib/unifi/data/keystore (No such file or directory)
[08:27:47] FATAL: Failed creating UniFi keystore

[cont-init.d] ssl.sh: exited 1.
[cont-finish.d] executing container finish scripts...
[cont-finish.d] 99-message.sh: executing...

            Oops! Something went wrong.

We are so sorry, but something went terribly wrong when
starting or running this add-on.

Be sure to check the log above, line by line, for hints.

[cont-finish.d] 99-message.sh: exited 0.
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.

Actual behavior

(What actually happened)

Steps to reproduce

(How can someone else make/see it happen)

Proposed changes

(If you have a proposed change, workaround or fix,
describe the rationale behind it)

Expose system.properties parameters (e.g. Xmx and Xms)

Problem/Motivation

I would like to be able to control the Java Heap Size as a config option for the addon. The Add-on sets
JVM_MAX_HEAP_SIZE=1024M in /usr/lib/unifi/bin/unifi.init.

On smaller single board computers allocating 1024 MB of memory is a lot. For example, I run HASS.IO on an macbook with 2GB of RAM.

Proposed changes

Expose the system.properties setting in the Addon Config parameters. being able to set the Xmx and Xms properties manually.

The Xmx and Xms features are controlled in the unifi.init via the two variable below. However, they cannot currently be changed.
JVM_MAX_HEAP_SIZE=1024M
JVM_INIT_HEAP_SIZE=

FATAL: Failed creating UniFi keystore

Problem/Motivation

Tried to access addon via addon page "open web UI"

Expected behavior

New tab with addon login screen

Actual behavior

ERR: CONNECTION REFUSED A short time after, the addon's state changes to red (stopped)

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... 
-----------------------------------------------------------
 Hass.io Add-on: UniFi Controller
 Manage your UniFi network using a web browser
-----------------------------------------------------------
 Add-on version: 0.9.0
 You are running the latest version of this add-on.
 System: HassOS 1.11  (armv7 / raspberrypi3)
 Home Assistant version: 0.91.4
 Supervisor version: 160
-----------------------------------------------------------
 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... 
Log level is set to INFO
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] ssl.sh: executing... 
keytool error: java.io.FileNotFoundException: /usr/lib/unifi/data/keystore (No such file or directory)
[16:56:32] FATAL: Failed creating UniFi keystore
[cont-init.d] ssl.sh: exited 1.
[cont-finish.d] executing container finish scripts...
[cont-finish.d] 99-message.sh: executing... 
-----------------------------------------------------------
                Oops! Something went wrong.

 We are so sorry, but something went terribly wrong when
 starting or running this add-on.
 
 Be sure to check the log above, line by line, for hints.
-----------------------------------------------------------
[cont-finish.d] 99-message.sh: exited 0.
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.

I'm not really sure how to troubleshoot this any further.

hassio loses connection to controller

Problem/Motivation

Over the past few days I started experiencing a lot of these. All device trackers associated with the UniFi controller switch to "unavailable" inside HA and then to available right back. Please see below the log entries, "debug" level set in the unifi addon setup.

Expected behavior

(What you expected to happen)

Actual behavior

2020-01-15 18:36:09 ERROR (MainThread) [homeassistant.components.unifi] Unable to reach controller xxxx.duckdns.org
2020-01-15 18:36:22 INFO (MainThread) [homeassistant.components.unifi] Reconnected to controller xxxx.duckdns.org

There is absolutely nothing in the addon log.
INFO: Starting the UniFi Controller...

Steps to reproduce

(How can someone else make/see it happen)

Proposed changes

(If you have a proposed change, workaround or fix,
describe the rationale behind it)

Access to config.gateway.json in sites configuration

Problem/Motivation

Need to edit site configuration and provisioning files. Specifically the config.gateway.json file on the default site. Ideally all sites would be available and the whole data/sites folder would be mapped if possible.

Expected behavior

To be able to access the relevant files from the standard homeassistant folders.

Actual behavior

Unable to access configuration files.

Steps to reproduce

n/a

Proposed changes

Map the sites folder to a location that makes sense that either the smb, ide, or ssh addons can access.

<unifi_base>/data/sites/<site id: usually just 'default'>/config.gateway.json

Wrong IP address

Problem/Motivation

Wrong IP address in case of adoption a new device. Used addon on RPi 3+ and hass.io.

Expected behavior

Should be Home Assistant IP address not docker container ip

Actual behavior

IP Address of docker container:
UBNT-BZ.v4.0.21# info
Model:       UAP-AC-LR
Version:     4.0.21.9965
MAC Address: 18:xx:xx:xx:xx:xx
IP Address:  10.0.0.253
Hostname:    UBNT
Uptime:      268 seconds

Status:      Unknown[11] (http://172.30.33.2:8080/inform)

Steps to reproduce

Run addon with default configuration, try addopt new device

Proposed changes

Change internal docker container ip to supervisior ip.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.