Unifi Device_tracker problem

Your posted config was with unifi direct platform

Robban, you are right :grinning:
But can you give me an exampel how the unifi device tracker should be configured?

Sure. Have you looked at the integrating documentation?

Robban, I have following configuration today.

device_tracker:
 - platform: unifi
   host: 192.168.1.4
   username: !secret device_tracker_username
   password: !secret device_tracker_password
   site_id: !secret device_tracker_site_id
   verify_ssl: false
   interval_seconds: 10
   detection_time: 120 
   consider_home: 180
   new_device_defaults:
     track_new_devices: true

But I can not see any of my devices in HA.
Does the configuration look okay?
I suspect that my firewall is blocking the info from Unifi, what port does the device tracker use?
Maybe I need to open up the firewall.
Because I have my HA computer in a DMZ.

You have a few things not supported by the integration: https://www.home-assistant.io/integrations/unifi/#configuration-variables

Does this look better?

unifi:
  controllers:
    - host: unifi
      site: !secret unifi_site

device_tracker:
  - platform: unifi
    host: 192.168.1.4
    username: !secret unifi_username
    password: !secret unifi_password
    interval_seconds: 12
    consider_home: 180
    new_device_defaults:
      track_new_devices: true
      hide_if_away: false

But it still not work!

Nothing should be under device tracker, it should all be under unifi, look at the documentation again

Robban, please help me I donā€™t get it!

This is deprecated

device_tracker:
 - platform: unifi

This is how you should do it

unifi:
  controllers:
    - host: unifi
      site: My site
      ssid_filter:
        - 'HomeSSID'
        - 'IoTSSID'

Robban,
Okay, but should I set ā€œHomeSSIDā€ to my network SSID?
And should I also add username and password?
I didnā€™t understand how it should be configured

You can only configure existing set up unifi integration. So no you canā€™t set credentials. The rest of supported parameters are listed in the link above. Most things can also be configured through gui

Sorry Robban, I must be stupied but I donā€™t understand how I should set it up to get a device tacker function. I have been reading the documentation but I donā€™t get it.
I have a Unifi controller (cloude key) on ip-address 192.168.1.4 and the router has ip-address 192.168.1.1.
According to the document I have following code in configuration.yaml

unifi:
  controllers:
    - host: unifi
      site: !secret unifi_site
      ssid_filter:
        - 'HomeSSID'
        - 'IoTSSID'

What is ā€œHomeSSIDā€ and ā€œIoTSSIDā€ in the exemple?
Should I change them?
Should I add an add-on in Hassio for Unifi?

The only thing I want to do is to track devices.
I handle the network from the cloude key and the controller

So you havenā€™t set up Unifi integration?

Home Assistant offers UniFi integration through Configuration -> Integrations -> UniFi Controller .

Enter host address , user name and password and then continue to select which site you want to connect to Home Assistant. The user needs administrator privileges in order to control POE switches.

Robban, do you mean the Unifi add-on in ADD-ON STORE ?

Iā€™m handling/running my network on a Unifi cloud key.
Will it be any problem to run the Unifi add-on?
I would still like to running the unifi contoller on the cloud key.

Isnā€™t that clear?

Okay now I understand what you mean, I will tryā€¦

I get following error when I try to connect to the Unifi controller.
image

Could have samething to do with my firewall settings, I need to check that I have access from Hassio to Unifi controller.
Should the ā€œController using proper certificateā€ be used ?

It where the firewall that blocked me from configure the Unifi in the Configuration -> Integrations -> UniFi Controller
When I open up the firewall and configure the Unifi Controller, I got this.
image

But it doesnā€™t work 100% because it will not show the actual status in the frontend.
image
The Galaxy tab S2 is connected, see Unifi Controller web interface.

Now I have following configuration in my configuration.yaml

unifi:
  controllers:
    - host: unifi
      site: !secret unifi_site
      ssid_filter:
        - 'HomeSSID'
        - 'IoTSSID

Should I do something more to get this to work?

I got it to work, apparently I have several instance of galaxy_tab_s2 in HA!
image
How could it be like this?
Can I remove the different instance of galaxy_tab_s2?