elad-bar / ha-edgeos

Integration with EdgeOS (Ubiquiti)
134 stars 24 forks source link

Delay with device being registered as disconnected #8

Closed sebastian-ruiz closed 4 years ago

sebastian-ruiz commented 5 years ago

I would like to use the disconnected/connected state to trigger events when I leave/arrive home. However, the disconnected state is usually delayed by half an hour or so. Is there a way to fix this?

Thanks!

elad-bar commented 5 years ago

it's kind of annoying but, it take 30 minutes for the EdgeOS to remove that record from the ARP (if you are getting into the router you will see it active as well), I need to check if there is last activity date somewhere so I can extract it and use it

elad-bar commented 5 years ago

After deeper investigation of that issue why it takes 30 minutes to notify the device is offline - I found out that the router tries to send requests and count them for the first 30 minutes the device is disconnected.

Added the functionality that from now on it will take 10 minutes to identify that the device is disconnected (will try to reduce it to 2-3 minutes).

elad-bar commented 5 years ago

Reduced it to 2 minutes if not active (TX rate is equal to 0)

elad-bar commented 4 years ago

Issue was fixed, no comments over the last 14 days