home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.04k stars 30.55k forks source link

Unifi Express constantly bouncing between 'away' and 'at home' #124196

Open dirthsj opened 2 months ago

dirthsj commented 2 months ago

The problem

I have a UniFi express router powering my network. The machine running HA is connected to it via a network switch, all ethernet.

The HA integration is frequently -- about every 3-5 minutes -- detecting the device as 'away' for 20-30 seconds.

What version of Home Assistant Core has the issue?

2024.8.2

What was the last working version of Home Assistant Core?

2024.8.2

What type of installation are you running?

Home Assistant Container

Integration causing the issue

UniFi Network

Link to integration documentation on our website

https://www.home-assistant.io/integrations/unifi

Diagnostics information

config_entry-unifi-01J5HTNQDNZ2ATNNAE9HBGHJT5.json

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Here is an excerpt from the Logbook, filtered to the UniFi Express

UniFi Express was detected at home
9:43:23 PM - 2 minutes ago
UniFi Express was detected away
9:42:55 PM - 2 minutes ago
UniFi Express was detected at home
9:38:46 PM - 7 minutes ago
UniFi Express was detected away
9:38:20 PM - 7 minutes ago
UniFi Express was detected at home
9:31:00 PM - 14 minutes ago
UniFi Express was detected away
9:30:34 PM - 15 minutes ago
UniFi Express was detected at home
9:26:19 PM - 19 minutes ago
UniFi Express was detected away
9:25:52 PM - 19 minutes ago
UniFi Express was detected at home
9:24:09 PM - 21 minutes ago
UniFi Express was detected away
9:23:42 PM - 22 minutes ago
UniFi Express was detected at home
9:22:04 PM - 23 minutes ago
UniFi Express was detected away
9:21:38 PM - 24 minutes ago
UniFi Express was detected at home
9:19:25 PM - 26 minutes ago
UniFi Express was detected away
9:18:58 PM - 26 minutes ago
UniFi Express was detected at home
9:17:33 PM - 28 minutes ago
UniFi Express was detected away
9:17:07 PM - 28 minutes ago
UniFi Express was detected at home
9:13:03 PM - 32 minutes ago
UniFi Express was detected away
9:12:37 PM - 33 minutes ago
UniFi Express was detected at home
9:05:11 PM - 40 minutes ago
UniFi Express was detected away
9:04:45 PM - 41 minutes ago
UniFi Express was detected at home
9:01:20 PM - 44 minutes ago
UniFi Express was detected away
9:00:55 PM - 44 minutes ago
UniFi Express was detected at home
8:56:38 PM - 1 hour ago
UniFi Express was detected away
8:56:13 PM - 1 hour ago
UniFi Express was detected at home
8:48:47 PM - 1 hour ago
UniFi Express was detected away
8:48:21 PM - 1 hour ago
UniFi Express was detected at home
8:40:48 PM - 1 hour ago
UniFi Express was detected away
8:40:21 PM - 1 hour ago
UniFi Express was detected at home
8:35:52 PM - 1 hour ago
UniFi Express was detected away
8:35:26 PM - 1 hour ago
UniFi Express was detected at home
8:29:33 PM - 1 hour ago
UniFi Express was detected away
8:29:07 PM - 1 hour ago
UniFi Express was detected at home
8:27:47 PM - 1 hour ago
UniFi Express was detected away
8:27:22 PM - 1 hour ago
UniFi Express was detected at home
8:24:12 PM - 1 hour ago
UniFi Express was detected away
8:23:46 PM - 1 hour ago
UniFi Express was detected at home
8:20:42 PM - 1 hour ago
UniFi Express was detected away
8:20:16 PM - 1 hour ago
UniFi Express was detected at home
8:09:42 PM - 2 hours ago
UniFi Express was detected away
8:09:16 PM - 2 hours ago
UniFi Express was detected at home
8:08:05 PM - 2 hours ago
UniFi Express was detected away
8:07:38 PM - 2 hours ago
UniFi Express was detected at home
8:06:25 PM - 2 hours ago
UniFi Express was detected away
8:05:59 PM - 2 hours ago


### Additional information

Unifi Express details:

Model: UniFi Express
UniFi OS Version: 3.2.9
Status: Up to date
Uptime: 41d 22h 42m
UniFi Network Version: 8.3.32
home-assistant[bot] commented 2 months ago

Hey there @kane610, mind taking a look at this issue as it has been labeled with an integration (unifi) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `unifi` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign unifi` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


unifi documentation unifi source (message by IssueLinks)

Kane610 commented 2 months ago

This was a new one. Could you enable debug logging and share those with me. You can share privately over the forums if you prefer

dirthsj commented 2 months ago

home-assistant_unifi_2024-08-19T15-25-11.159Z.log

Kane610 commented 2 months ago

UniFi OS Version: 3.2.9 UniFi Network Version: 8.3.32

Please make sure to run latest software

I looked at the logs and the logic to mark unavailable is simple if state of device is not 1 set a timer for 5 minutes and then mark offline, but there are messages more often than every 5 minutes in the logs and state is always 1 so no issues according to the logs you shared.

So make sure everything is updated and properly restarted, that resolves some phantom issues for users

dirthsj commented 2 months ago

Thanks for pointing that out, I have it configured to Auto update but apparently that didn't happen.

Versions after manual update & restart:

UniFi OS: 4.0.4 UniFi Network: 8.3.32

The issue unfortunately persists.

dexterdar commented 2 months ago

I have this same issue though In using a UDR.

MrAdam commented 1 month ago

I have this same issue though In using a UDR.

Same here, but it's been doing it for several months now:

image
olliewright84 commented 1 month ago

I also have the same issue, but more frequently.

image

VBoucher commented 1 month ago

Same issue here but with a simple Unify AP