What's new
  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Educate me: WiFi device disconnection detection

bpsmicro

Occasional Visitor
I'm not 100% certain if this is Merlin-specific, but I'm only seeing this weirdness with 3006.102.5b3 and it seems new to me.

Background: I run Home Assistant, with one of the automation triggers being whether family members are home or not. That's triggered by an interface to AsusWRT that detects the status of WiFi devices. In this case, our phones. It's set up to point to my phone with home/not determined by whether AsusWRT has a WiFi connection to it. I leave, the WiFi connection will drop out, HA sees that and flags me as not home.
I noticed that it seems to be taking a really long time to notice when I'd gone out (before it was within a couple of minutes) and started backtracking.

In Network Map | Clients | Wireless | 5GHz *or* in System Log | Connections, I can look up my phone. I'm home, connected and all is well.
If I now turn off the phone's WiFi (or go out or turn the phone off), I'm seeing that it takes a good 10 minutes for the router to notice it's gone. Despite WiFi on the phone being off, the router is literally showing it still connected, with a "Good" WiFi signal strength. Which is clearly inaccurate.

This "lag" appears to be 10 minutes, might be longer. But eventually the router will notice and remove it from the connection list (and Home Assistant will notice that).

If I re-enable WiFi on the phone, it's detected as back online immedately.

Where is this lag coming from? Is there a setting somewhere to persuade the router to "notice" quicker? Or would shortening that lag be a bad thing for other reasons?

Just trying to educate myself. :-)
 
We need to know what mechanism Home Assistant is using to detect the presence of the client. (It doesn't matter what you see in the router's webUI if HA is using a different method.)
 
Home Assistant's integration looks at the list of connected devices parsing by name.

Ignore the HA part and tweak the question to: Why does the Connections on the router list take 10 minutes to notice that a WiFi device is no longer there? Once that's solved, the rest will fall into place.
 
If you're referring to NAT connections on System Log - Active Connections, I've just tested disconnecting my mobile phone and it also takes about 10 minutes to expire all the connections. This is nothing new, that's the normal timeout behaviour. But then I'm using firmware 388.9_2 not 3006.102.5b3 and I believe the Connections page was redesigned in 3006.102.5.
 
Yeah, there is the new Connections page, which is what I'm referring to.

But if you say the 10-minute timeout is normal, then good enough for me. I never noticed it before, but with the new router and Merlin updates I've been poking at stuff and "noticing" things a bit more. :-)
 
Just to add, if I disconnect my phone it disappears from the Network Map Client list within a few seconds (i.e. the refresh period).
 
Yes, I should add that's true. It's just the Connections page that doesn't notice (I have the refresh there set at 5 seconds). *That* page will not reflect the missing device & connections for 10 minutes. What's amusing is if I watch, it actually will add and remove connections to/from the list.

And whatever "magic" the HA integration is using is obviously getting its info from the same place.

In fairness, the Connections page specifically says it's a "history log", so accepting "live" updates may not be reasonable, since my gut tells me that'd become pretty much unreadable.
Which makes me think that recent changes in Asus and/or Merlin mean that the HA integration might need some tweaking. I'll see if I can get the attention of the maintainer of that.
 

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Back
Top