Setting up Unifi Controller via integrations

Hi there!

I have some troubles setting up my unifi controller via the web ui.
I’m using 0.81 on a RP3b and there a two issues and a question.

  1. clicking on the configure link in the integrations section doesn’t work in chrome on pc
  2. using edge it works, but I get the error “User input malformed” when trying to set up the unifi controller, no matter what I enter in the required fields. Any ideas?

my question regarding unifi in general: I have manually set up a device_tracker in the configuration.yaml file for unifi: that doesn’t seem to do anything - my WLAN devices still show up as entities with “source_type: router” when I disable this device_tracker.
So I’m a bit confused - where do they come from?

Point 2, same here, using a Raspbery Pi 3+, manually installed in a Virtual Environment (not

I do/did have a working setup with a manual configuration:

  • Added in configuration.yaml: device_tracker: !include device_tracker.yaml
  • Made a file device_tracker.yaml:
  • platform: unifi
    host: HOST_IP
    username: USERNAME
    password: PASSWORD
    verify_ssl: false
    track_new_devices: no
    interval_seconds: 20

Before performing the integration I commented out the include-line in configuration.yaml and renamed device_tracker.yaml and known_devices.yaml and restarted the Home Assistant.

Still the same User input malformed error.

Can anyone please help?

FYI, when detected they will be stored in known_devices.yaml
When attribute track: is set to true it will appear in your frontend, if attribute hide_if_away is set to true they will only appear when connected.

Same here. Using unifi cloud key.

Edit: Just enabled logs to debug the issue as described in home assistant’s unifi page, and it magically worked without an issue. Tried exactly same thing but worked. I don’t know how, lol.

Edit2: Just confirmed it stops working if I disable logs. Strange behaviour.

1 Like

that didn’t work for me - what where your exact steps?

I have put in the debug info in the configuration.yaml file, restarted HA and tried the config - same error as before…

This issue is known, it will be fixed next update I believe.

1 Like

The device tracker implementation is still separate from the UniFi integration. It will be moved into the integration at a later date. Hopefully that will go unnoticed when it happens.

For the issues: I have fixed an issue when setup takes to long and triggers a retry.
The malformed user input issue seems to be that the port is sent as a string instead of a integer. By cancelling the configure window prompt and starting it a new seems to solve that issue.
This other issue with logs is something I can’t reproduce. Can you go into more details what you are doing?

For me Unifi was working correct on 0.80.3 and now with 0.81.1 no precense detection anymore. Device keeps in same state it was before.

removed entry in configuration.yaml and added integration configuration. But that wont help also. Any ideas ? How do i enable logging ?

I have no experience with the device tracker component yet so I can’t really help you there. All I can say is that it should work since it is separate from the unifi integration with poe control

Retry mechanism should be fixed. Keep an eye out for 81.2

Issue still present in 0.81.2!

I’ve noticed that you can get passed the Malformed User input by clicking on configure, trying to set up the integration, getting the error, cancel the integration and then starting it anew. Second time the port will be a proper integer.

Hi, the integration works for me, just a small remark: it gives me the possibility to switch off my CloudKey, but when you do that, there is no way to turn it on again. IMO would be better to hide the port.

Can you enable debug and share logs so I can identify parameters to filter cloud key on?

I added the integration but it doesn’t show any devices. I have several POE powered cameras and I was under the impression that this integration would enable POE devices to become switches.

Hey, I’m trying but I do not see anything about unifi in the home-assistant.log. Do you have your own log?

That is true. Tell me about your setup.

ok, here you go:
2018-11-01 17:11:04 INFO (MainThread) [homeassistant.loader] Loaded switch.unifi from homeassistant.components.switch.unifi
2018-11-01 17:11:04 INFO (MainThread) [homeassistant.components.switch] Setting up switch.unifi
2018-11-01 17:11:04 DEBUG (MainThread) [homeassistant.components.switch.unifi] New UniFi switch SEP204C9ED6E08F (20:4c:9e:d6:e0:8f)
2018-11-01 17:11:04 DEBUG (MainThread) [homeassistant.components.switch.unifi] New UniFi switch None (fc:ec:da:49:79:31)
2018-11-01 17:11:04 DEBUG (MainThread) [homeassistant.components.switch.unifi] New UniFi switch bha-1CCAE3717084 (1c:ca:e3:71:70:84)
2018-11-01 17:11:04 DEBUG (MainThread) [homeassistant.components.switch.unifi] New UniFi switch SEP204C9ED6E39E (20:4c:9e:d6:e3:9e)
2018-11-01 17:11:04 DEBUG (MainThread) [homeassistant.components.switch.unifi] New UniFi switch UVC-G3-Dome-1e78 (f0:9f:c2:14:1e:78)
2018-11-01 17:11:04 DEBUG (MainThread) [homeassistant.components.switch.unifi] New UniFi switch UVC-G3-Flex-29f8 (fc:ec:da:1f:29:f8)

This one: None (fc:ec:da:49:79:31) is the CloudKey

I’m gonna need the big logs if it’s gonna be of any help. Do a PM if you don’t want to share all details here.