Integration of Unifi Controller

These are related to the device tracker configuration, what logs do you get from the config entry?

1 Like

I was reading through the thread - I understand it worked for you while having an entry in the configuration.yaml and then going via the interface, right?
Well, I have an entry as well as going through the interface, but the interface already denies any connection …

33

you might be referring to this?

2019-07-10 15:20:06 INFO (MainThread) [homeassistant.setup] Setting up unifi
2019-07-10 15:20:06 INFO (MainThread) [homeassistant.setup] Setup of domain unifi took 0.0 seconds.

I was happy when I saw that - however, I cannot access anything around unifi …

Is the user you are using for the Integration setup as Admin in the controller?
I remember reading some where that it didn’t need to be but then on another post that it did.
Also if your Unifi Site isn’t Default, you need to change that in the configuration.yaml.

There is an important question to ask: are you running the Unifi Controller 24/7?

If not, the is no actual Controller for you to connect to. The Controller is only accessible when running on your Mac.

You can make a test, installing the Controller within your Hassio installation (there is an add-on for it) and configuring it all again. Running as an add-on you’ll have 24/7 access to the Controller.

1 Like

That is a very good point and you are basically right - however, it should be able to connect while running on the iMac and during all my different tries, it was running on the iMac.

By the way, are you referring to this Unifi Controller add-on?

Yes, if you had the Controller running you should have been able to connect to it.

That’s the addon I was referring! I have used it for months without any problem but switched for a dedicated VM.

It is always about searching, reading. attempting, learning and eventually finding.

I am sure everybody is going to laugh now at me but I had a weird thought considering the IP Address of the Unifi Controller :wink: When I look into the controller settings of the Unifi Controller, it shows me a controller IP address which I have used in my endless attempts, however, I am not quite sure why that IP address appears there, because the IP address to be used is logically the IP address of the computer running the UNIFI controller and NOT the IP Address shown in the configuration settings of the controller.

Solving a problem, which is not a problem :wink:

1 Like

You need to change that IP to match your controller IP address. :wink:

When you say that, you mean I have to change that IP address to the ip address of the computer running the UNIFI Controller, right?

Yes. That IP is what is handed to an AP when it is added, to find the controller.

I am having issues getting HA to connect to Unifi. The log reports:

Log Details (ERROR)

Logger: homeassistant.components.unifi
Source: components/unifi/controller.py:434
Integration: Ubiquiti UniFi (documentation, issues)
First occurred: 6:15:42 PM (4 occurrences)
Last logged: 6:28:50 PM

Error connecting to the UniFi controller at 192.168.0.123.

My entry in my config.yaml is below. I have it logging in as a read only account and verified those creds work.
Any direction to read up on is greatly appreciated.
Just for clarity. This is running on the same Synology, but in a different container, not as an add-on.

##################
###Device Trackers
##################
device_tracker:
###Unifi
  - platform: unifi
    host: 192.168.0.123:8443
    username: !secret unifi_user
    password: !secret unifi_pw
    verify_ssl: false

jwb

Hello i have multiple sites @ my unifi configuration.
Is there any possibility to point which site integration should use?

You select site when you setup the integration

Nope,there is no such option, but i found solution.
When you are creating HA user, create it in apriopriate site., then you have access only to desired location

Then something is amiss since it has branching points depending on if you have one or more sites https://github.com/home-assistant/core/blob/a59460a23336627d0bc12b1eefffdaa516e55e87/homeassistant/components/unifi/config_flow.py#L182

Anyone know what to do if you change your unifi controller ip after the integration has already been installed? I moved my unifi controller to a cloud host so I need to update the ip. I tried to update it in the config but the error logs still show it looking for the local address.

Yes. How do we do this?

Why is it the Addon in general (with a few exceptions) does not allow you to alter basic config settings like IP address and password?.

The values are stored in the file config/.storage/core.config_entries

But I actually raised this issue a while ago and it was fixed but poorly documented.

There is a generic UI component missing in Core HA for configuration of Addons in general. Most implement nothing. You can either hack JSON files or remove the Addon and re -add it and clean up the mess it causes.

You need to restart Home Assistant for the new config to be loaded. Did you do that?

1 Like

I ended up removing and re-adding the integration.

is there a way to filter what gets picked up by the integration? i have about 100 devices on my network and this ends up creating about 400 entities.