Presence Tracking with Unifi AP stopped working

Has anything changed in the Unifi AP presence tracking? I can’t pinpoint the exact HA release but for me it has stopped working.

I am using this code in configurations.yaml

# Unifi Presence Detection
device_tracker:
  - platform: unifi_direct
    host: 192.168.178.55
    username: !secret unifi_ap_username
    password: !secret unifi_ap_password
    new_device_defaults:
      track_new_devices: False
      hide_if_away: True

I can see the devices disappearing in the Unifi panel after 5 minutes but the state in HA will still show “Home”. Does somebody else have the same problem?

Is still working. When did you last reboot your AP? Can you try that and see what happens.

I did only yesterday. Could it have anything to do with the fact that I am using 3 access points? They used to all work fine that’s what’s so weird.

I’m not sure, I guess that’s possible. Enable debug logging and see what happens?

Seems to have stopped working for me, too.

It started working normally again sometime ago without any changes. There was a firmware update for Unifi but it worked again before that.

Another user found the problem. Turns out that some poorly formatted SSIDs can cause the JSON parsing to fail. The data used to track devices also contains all of your neighbors SSIDs and if any of them have a ’ or " in them it will cause the component to crash. I think that other user is working on a fix, but if not I will attempt to fix it.

Its stopped working for me too since the AP firmware upgrade. I get it working then it stops again, seems very unpredictable.

Most likely the SSID issue I reported above.

Not sure what you mean by a ‘or’, I have 2 AP’s using the same SSID and password and I’m using the Unifi WAP not the Unifi direct AP component, whether that make any difference. The system seems to be working now on tracking my phone after a few restarts.

Sorry that was confusing. What I meant was the SSID has a ' or a " in it. However this only effects the unifi direct component.

Any news?
It’s happened to me for 2-4 months. “On/Off”
Sometimes reset ha and AP working.
And some Times its working for few hours only

I am running the latest Ha version,And AP .

I tried fixing this awhile back, but not sure if there is a way around it. The issue is WiFi networks with strange characters break the JSON that the AP is outputting so it isn’t valid.