Unifi Controller connects but no tracking?

Hoping for some help, maybe it’s a version thing, but my device tracking has completely stopped working.

I have the following setup:
HASS 0.95.4 running on ArchLinux (fully patched)
Unifi controller 5.10.25 running on Windows (Unifi Gateway, 3x Unifi APs, Unifi Switch connected)

I have enabled verbose logging in configuration.yaml

logger:
  default: info
  # added to debug unifi connections:
  logs:
    aiounifi: debug
    homeassistant.components.unifi: debug
    homeassistant.components.switch.unifi: debug

When I (re)start home assistant, I can see in the logs that it connects fine to the unifi controller, and dumps a LOT of information, including all the details of all connected devices.

The unifi account is a full admin, and I can also login to the controller web interface and view everything using this account.

Weirder still, is that this configuration has worked in the past, I have had a known_devices.yaml file and been able to edit that with no issues, however now when I move/rename the known_devices.yaml and restart hass, it doesn’t come back at all. I see (via the documentation) that known_devices.yaml is being phased out as of 0.94, (but replaced by what?) is that my issue?

It’s as if device tracking isn’t even enabled - and yet it does connect to the controller using the settings specified under device_tracker.

There are also no errors in the logs (set to info).

I’m currently using the config below, however have tried with only the required options enabled, and it makes no difference that I can see (as nothing at all is being tracked).

Configuration.yaml:

device_tracker:
  - platform: unifi
    username: !secret unifi_user
    password: !secret unifi_password
    host: 192.168.11.3
    #port: 8443
    #site_id: default
    verify_ssl: false
    detection_time: 180
    interval_seconds: 12
    consider_home: 180
    monitored_conditions:
      - last_seen
      - hostname
      - ip
      - name
    new_device_defaults:
      track_new_devices: true

There are some issues when I migrated unifi device tracker to the async library the integration uses in preparation for combining them. People have had success getting device tracker to work by having both config entry enabled and device_tracker in configuration.yaml.

I have a PR that is nearly done which unfortunately won’t be a part of hass until 0.97.

1 Like

Hi Robban, thanks for helping out

Could you please point me in the direction of some information about ‘config entry’ ? Is that to do with having the Unifi integration enabled? I did have a look at that but I haven’t been following the update changes at all for the last 12 months or so.

Seems like I have some reading to do?

cheers

Exactly. Configure unifi from hass frontend and then device tracker config in configuration.yaml should work

Not sure that this would be applicable here because I run a much older HA version, but when I moved my Unifi controller from a Pi to my Synology NAS a few months ago, it took me a few hours to recognize that V5.10 did not work in my case - I had to go back to a 5.9 version.

You wrote that you run 0.95.4

Hi Robban

Thanks again for your help. I can confirm that after adding the unifi integration tracking is back up and running!

Regards
Aaron

1 Like