Kane610 / aiounifi

Asynchronous library to communicate with Unifi Controller
MIT License
60 stars 54 forks source link

Integration breaking on UDM update to Unifi OS v3.2.7/Network Appilcation v8.0.7 #549

Closed riggsdr closed 8 months ago

riggsdr commented 9 months ago

Hello all,

Noticing that ufter I updated to the Release Candidate this morning, aiounifi will connect at first, but then go stale and stop updating after about 15 minutes or so.

I deleted and reloaded the integration in HA. I deleted and re-added a the local user it logs in as in UnifiOS. I don't think this is a login/port issue, as it initially shows successful, updates device/entity info, then disconnects some time later.

I will try and snag logs when I catch it again.

Kane610 commented 9 months ago

Thanks for reporting

riggsdr commented 9 months ago

So, turned on debug logging last night, and I don't know enough about the integration to be helpful. No warnings or errors. It looks like the data "slugs" just stop coming in after a few working updates. I'm hesitant to post debug logs here as they have a lot of data and it looks like some of it could be sensitive.

I should say I'm running a UDM Pro and HA 2023.10.3 on a Synology NAS. The Unifi integration has been rock solid for me up until now. Every time I reload the integration, it works for a few minutes and then silently stops updating after ~5-10 minutes.

Any recommendations on something I could try to troubleshoot? I'm thinking of doing a firmware downgrade today to see if that fixes it.

riggsdr commented 9 months ago

Oh, and the symptom I noticed was that the number of clients reported on each SSID went to zero and device trackers are going to away or unavailable for devices that are still connected.

Kane610 commented 9 months ago

Thanks, it might be a bug with web socket reporting from unifi or that they're changing behaviour of the websocket. I will have to try it on the current stable unifi to see if anything differs. Otherwise it might be to report it as an issue on unifi that the web socket behaves differently :), but as this is unofficial APIs and nothing they're interested in maybe its moot

Kane610 commented 9 months ago

8.0.7 works as expected when tested.

riggsdr commented 8 months ago

Will track this under home-assistant/core repo, which is where I'm using it.