Unifi Integration Devices Never Leave Home

Ok can you guys create an issue and share debug logs

It works for me with 0.106.2. My controller is 5.12.35 running installed with apt on bare metal, and not the add on.

Note that the logs that @Robban asks for are enabled with

logger:
  default: info
  logs:
    aiounifi: debug
    homeassistant.components.unifi: debug

I first was a little confused because the log grows fast but it is actually the same periodic messages that get transmitted so you just have to tail a couple of minutes of traffic to give him what he needs.

Sorry guys headed out of town today and didn’t want to make changes to my install (and I’ll obviously be gone, so presence is less important!), So I didn’t get a chance try .106.2 yet.

That said, thanks for the quick response Robban and everyone!

1 Like

I upgraded to 0.106 and my presence detection got totally messed up. 0.106.1 or .2 did not fix it reliably.
Back to my stable 0.105.5 waiting for confirmation the issues are addressed.
I have the latest firmware for all my Unifi devices.

What does “did not fix it reliable” mean? Can you share logs showcasing your issues?

After a reboot, all devices show “not_home”. I deleted the integration and reinstalled. Had to repopulate my persons with the device_trackers from Unifi. It worked until I rebooted again.
I gave up and went back to 105.5

My devices are switching between home & away with 0.106.2. However, I think part of the problem is with the ‘Person’ logic.

Same issue. Stops tracking real status after awhile. Had to remove the entity from my person entities.

Are you guys running on a different site than default?

Vanilla Docker install. No issues until recently.

I meant UniFi site

Hosted Unifi controller in its own Proxmox container. Latest version (stabel) from Unifi. Nothing special about it. Have 3 APs.

Thanks! I also meant the site inside of your Unifi controller :slight_smile:

Sorry. Just the default site. Nothing special or custom. If you need anything else, just let me know.

Debug logs would still be nice :+1:

I had the same problems, with release 0.106.2, all devices showed not home. I am using a custom site (not the default).

Switched back to 0.105.5 and wait until the issue is resolved.

yeah same issue here

Updated to .106.5 and still have the same issue.

After updating, I also did the following:

  • Remove Unifi integration
  • Verify Unifi controller is up to date and restart it
  • Restart Home Assistant
  • Re-add the Unifi integration

Same issues. Devices show as Home for a little bit, then they all goto not_home after a period of time.

Using Docker (not Hass.io). Controller runs in its own Proxmox container as a default site. Latest controller version. No issues until recently.

I turned on logging for Unifi. For these logs, Hass started around 1104. Devices marked as not_home around 1109. There are a lot of entries after startup related to Unifi, but they have very identifiable information that would be difficult to scrub. These are all at times devices seemed to show up OK.

I went to the ~1109 entries and added those below with some information removed:

2020-03-04 11:05:48 DEBUG (MainThread) [aiounifi.websocket] {"meta":{"rc":"ok","message":"events"},"data":[{"user":"<MAC>","ssid":"Home","ap":"<MAC>","duration":260,"bytes":91394,"key":"EVT_WU_Disconnected","subsystem":"wlan","site_id":"<SITEID>","time":1583348736000,"datetime":"2020-03-04T19:05:36Z","msg":"User[<MAC>] disconnected from \"Home\" (4m 20s connected, 89.25K bytes, last AP[<MAC>])","_id":"<ID>"}]}
2020-03-04 11:05:58 DEBUG (MainThread) [aiounifi.websocket] {"meta":{"rc":"ok","message":"events"},"data":[{"user":"<MAC>","ssid":"Home","ap":"<MAC>","radio":"na","channel":"48","key":"EVT_WU_Connected","subsystem":"wlan","site_id":"<SITEID>","time":1583348745437,"datetime":"2020-03-04T19:05:45Z","msg":"User[<MAC>] has connected to AP[<MAC>] with SSID \"Home\" on \"channel 48(na)\"","_id":"<ID>"}]}
2020-03-04 11:05:58 DEBUG (MainThread) [aiounifi.websocket] {"meta":{"rc":"ok","message":"events"},"data":[{"user":"<MAC>","ssid":"Home","ap":"<MAC>","radio":"na","channel":"48","key":"EVT_WU_Connected","subsystem":"wlan","site_id":"<SITEID>","time":1583348745437,"datetime":"2020-03-04T19:05:45Z","msg":"User[<MAC>] has connected to AP[<MAC>] with SSID \"Home\" on \"channel 48(na)\"","_id":"<ID>"}]}
2020-03-04 11:12:18 DEBUG (MainThread) [aiounifi.websocket] {"meta":{"rc":"ok","message":"events"},"data":[{"user":"<MAC>","ap_from":"<MAC>","ap_to":"<MAC>","radio_from":"na","radio_to":"na","radio":"na","channel_from":"48","channel_to":"157","channel":"157","ssid":"Home","key":"EVT_WU_Roam","subsystem":"wlan","site_id":"<SITEID>","time":1583349127085,"datetime":"2020-03-04T19:12:07Z","msg":"User[<MAC>] roams from AP[<MAC>] to AP[<MAC>] from \"channel 48(na)\" to \"channel 157(na)\" on \"Home\"","_id":"<ID>"}]}
2020-03-04 11:14:23 DEBUG (MainThread) [aiounifi.websocket] {"meta":{"rc":"ok","message":"events"},"data":[{"ap":"<MAC>","user":"<MAC>","radio_from":"na","radio_to":"ng","channel_from":"157","channel_to":"11","key":"EVT_WU_RoamRadio","subsystem":"wlan","site_id":"<SITEID>","time":1583349250894,"datetime":"2020-03-04T19:14:10Z","msg":"User[<MAC>] roams from \"channel 157(na)\" to \"channel 11(ng)\" at AP[<MAC>]","_id":"<ID>"}]}
2020-03-04 11:14:28 DEBUG (MainThread) [aiounifi.websocket] {"meta":{"rc":"ok","message":"events"},"data":[{"user":"<MAC>","ssid":"Home","ap":"<MAC>","duration":515,"bytes":212787,"key":"EVT_WU_Disconnected","subsystem":"wlan","site_id":"<SITEID>","time":1583349260000,"datetime":"2020-03-04T19:14:20Z","msg":"User[<MAC>] disconnected from \"Home\" (8m 35s connected, 207.80K bytes, last AP[<MAC>])","_id":"<ID>"}]}
2020-03-04 11:14:38 DEBUG (MainThread) [aiounifi.websocket] {"meta":{"rc":"ok","message":"events"},"data":[{"user":"<MAC>","ssid":"Home","ap":"<MAC>","radio":"na","channel":"157","key":"EVT_WU_Connected","subsystem":"wlan","site_id":"<SITEID>","time":1583349265831,"datetime":"2020-03-04T19:14:25Z","msg":"User[<MAC>] has connected to AP[<MAC>] with SSID \"Home\" on \"channel 157(na)\"","_id":"<ID>"}]}
2020-03-04 11:14:53 DEBUG (MainThread) [aiounifi.websocket] {"meta":{"rc":"ok","message":"events"},"data":[{"user":"<MAC>","ap_from":"<MAC>","ap_to":"<MAC>","radio_from":"na","radio_to":"na","radio":"na","channel_from":"157","channel_to":"48","channel":"48","ssid":"Home","key":"EVT_WU_Roam","subsystem":"wlan","site_id":"<SITEID>","time":1583349283505,"datetime":"2020-03-04T19:14:43Z","msg":"User[<MAC>] roams from AP[<MAC>] to AP[<MAC>] from \"channel 157(na)\" to \"channel 48(na)\" on \"Home\"","_id":"<ID>"}]}

Hopefully this helps. Not sure what else to give you.

I updated this morning to 106.5 and the problem seems to be resolved in my case. The devices now are reporting the correct state.