Another Unifi integration issue

I’m not sure when it happened but I just realized that my unifi device trackers aren’t updating in HA at all.

I tried to bring up my history for pretty much the first time ever and that didn’t go well either. Every time I tried it completely locked up my browser window and I had to close it out & reopen it again before the HA frontend would work again. So I can’t bring up my history to know when it started.

I didn’t really notice when it started because I use the Life360 integration and it works so well that I didn’t notice that the unifi device tracker wasn’t working (good job @pnbruckner!) until my daughters iphone (that doesn’t use Life360) that was connected to the network never showed up as “home”.

I’ve noticed a bit of strangeness recently but I just chucked it off to network timing issues and the common “iphones go to sleep and drop off the network occasionally” thing. But this morning I started digging in to re-formatting some of my device tracker names and realized that my own phone, which is an android, was definitely awake and connected to the network was showing as “not_home”. I tried turning off & on the wifi, restarted HA & even restarted the unifi controller software but it still didn’t ever show as “home”. I even went as far as updating the unifi controller software to the latest version
which is running in docker on the same machine as HA and it still hasn’t helped.

I know that everything used to work. but now it’s not.

There are no errors in the HA log.

I even went in and verified that the “track network clients” and “include wired clients” was selected. They were already on but I clicked on submit again anyway as soon as I did that all of my clients that I had previously disabled were all re-enabled and rediscovered. So I know that HA is communicating with the unifi controller on some level. (It sucked having to go thru and disable all of the unwanted device trackers again tho :frowning:).

I’ve done and checked all of the stuff I know to do or check except for deleting the integration completely and re-integrating it and I’m not too keen to do that unless I have to.

Is there any way I can troubleshoot this?

Not that anyone is paying any attention to this post but…

in case anyone ever sees this and has a similar issue here is how I fixed it.

After not having any other possible solutions I decided to try to re-install my Unifi controller software.

I originally installed it in a Docker container on my HA machine using the jacobalberty image.

I thought maybe the image might be screwed up somehow so I tried to use the image from linuxserver.io but after I installed it I tried to restore a backup of my original controller and that one was using an older version of the Unifi software so I wasn’t able to do a restore from a newer version.

I had my old RPi laying around doing nothing so I decided to just install hassio on that and run the unifi-controller add-on from there. I was then able to run a restore from my backup.

So far everything seems to be working OK and my phone is being correctly tracked again…so far…

1 Like

In case there is anyone following this thread…

I know I haven’t been back to this thread to update anything but so far I have to say that the unifi device tracker integration is pretty useless. At least in my experience so far.

Since the last time I was here I have so far tried four different ways of installing the unifi controller software - two different Docker containers outside of HA and I even grabbed an old spare Pi 3b+ and installed hassio just so I could try the unifi controller add-on. Lastly I even went ass far as to buy a (very expensive) Unifi Cloud-key gen2.

So far none of these methods will reliably allow me to track my several phones.

here are three screen shots of different phones that are being tracked:

the first two are iPhones. The last ios an Android phone.

In the first pic you can see that the iPhone randomly shows as home for exactly 5 minutes then goes to away again for a random period of time. Unfortunately, even tho the phone shows as home on those occasions my daughter wasn’t home at all yesterday…at all…

On the second pic my wife’s phone shows as away for most of the day. Again, unfortunately, she was home the vast majority of the time yesterday

Lastly, the third pic is my phone which shows that I was away all day except for those few times (that are the same exact five minute intervals as my daughters & wife’s phones) but I was actually home for the first 12 hours of that time frame and I was away for the entire second half of that time frame - the only few times that it shows I was home I actually wasn’t.

While the unifi equipment is much better than my old stuff for network performance & reliability it sucks for presence detection.

I don’t know what’s up with your setup. Mine works perfect. I track up to 7 phones depending on who comes to my house without issue. I don’t track their history, but I track who uses what device and all of that works at all times. Aside from my wife and I, all the other phones are configured through unifi. As for hardware on my end: using a cloud key gen 1, unify secure gateway, 2 poe switches and 3 waps.

me neither… :frowning:

is it possible that I have something misconfigured in my unifi software?

I’ve had the same configuration since I originally set it up and have just been backing up and restoring from one controller to the next.

Any idea what might be a setting in the controller that I could check that might have that effect?

@petro

I started another thread about this yesterday since this one was so old I figured no one was paying attention to it anymore.

If you are interested in following along any further here is the thread.

I probably won’t post anymore here about this unless some miracle happens and I actually figure this out. Then I’ll post the solution here too for completeness.