Ubiquiti Unifi network integration issues with 2022.2.9

I upgraded from 2021.12.x a few days ago to 2022.2.9.

The unifi device trackers are a train wreck. I’m tracking two devices, and have automations triggering based upon those trackers. The automations are firing every few seconds, which is a huge problem.

I saw a couple other threads with people having similar issues, but did not see a resolution. Does anyone have any advice/ideas?

It’s really hard to reach a solution that works for everyone. I did a change I thought would simplify and improve situation with 2022.2. I’ll post a small change for 2022.3 to see if that improves the situation.

And can you detail what the original change was or what your intent is for 2022.3? I’m eagerly awaiting the ability to turn on and off PoE ports when that hits - but what I’ve seen in 2022.2 has me QUITE gunshy - I heavily rely on the trackers too.

You can always find references to the changes in the release notes, https://github.com/home-assistant/core/pull/64147

The upcoming change will be https://github.com/home-assistant/core/pull/67129#issuecomment-1049173930

There is an open GitHub issue to improve POE control, but the author hasn’t responded in some time. I have it on my list to complete if the original author doesn’t. I can’t give a timeline on that though as Im in the midst of refactoring the Deconz library, I aim to do the same refactoring to unifi down the line as well.

1 Like

Sorry, lots of projects around the house. I don’t use poe control, so I can’t comment on that. My issues were solely with the trackers. I wanted something closer to “instantaneous” tracking, so I’ve had the “seconds away” set to 5, instead of the default 300. Has worked fine - until the upgrade. Then the trackers began flapping wildly from home to not_home. I increased this value to 30 and it seems to have addressed the problem, but the delay in my automations is a bit frustrating now…

For every change I do I get one happy user and two new unhappy users how do think I feel? :joy:

1 Like

I thought I saw somewhere at some point recently that if I “forget” a device in the Unifi controller then the integration is supposed to also remove the device_tracker entity from HA as well.

Is that the way it is supposed to work because I’m not seeing that behavior?

Can you confirm the way that the integration is supposed to work before I submit either a FR or issue?

Yes that’s how it’s supposed to work

1 Like

thanks.

done

Thanks! It will have to wait a bit since I’m focused on some other stuff right now

1 Like

I upgraded from 2021.12.5 to 2022.3. As a result of that my presence detection (2 iphones on Unifi) went haywire. Some how the right status is only set when reloading the integration.
Would this relate to the same changes?

Yeah same problem here, home for a second and then not home for a few, rinse and repeat

Any manual workaround for the time being?

I’m busy doing some other things but I will revisit all aspects of the unifi integration shortly. Probably not before next release though.

As mentioned on another topic, I tried both the built-in unifi_direct integration and also the patched version (as custom_component) starting with 2022.2.x (so no experience with 2021.x versions) but device_tracker was highly unstable. The only way to temporarily fix it, when was stuck, was to restart HA.
Thanks to @joelp, 5 weeks ago I started using his project MQTT Unifi WiFi client device tracker as part of minimal-HA which is working perfect since, with the latest AP firmware.

as another point of reference my unifi integration device trackers are very stable as far as I can see.

Thank you! Though I can’t really make heads or tails if its Ubiquiti or me who can’t get their shit together :stuck_out_tongue: because these random issues reported creeps me out

1 Like

Let us know how we can help. Appreciate your efforts!

@finity, are you using official unifi_direct? On what HA version and what Unifi AP (model, firmware)?

I’m using whatever integration is built-in to HA (link)

HA V2022.3.5

Unifi Controller V6.5.55 running on a CloudKey Gen 2 V2.2.12

EDIT to clarify:

I’ve just looked at the various Unifi integrations and I use the “Unifi Network” integration linked above. I don’t use the “Ubiquiti Unifi AP” integration that I think you might be referring to.