Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Counter shows known devices to UniFi, not Active devices #24

Open
cjramseyer opened this issue Jun 3, 2023 · 3 comments
Open

Bug: Counter shows known devices to UniFi, not Active devices #24

cjramseyer opened this issue Jun 3, 2023 · 3 comments

Comments

@cjramseyer
Copy link

I recently tried this integration, and it connects to my UniFi controller, and retrieves information.
However, I found that it counts 'known' devices to unifi, which is any device that has ever connected whether active or not.

Like many other trying to use this integration, I need 'Active' devices, not known.

In testing, I connected a mobile device to the 'guest' network (where I am seeking this for), the count increases from 0 to 1 (great!).
I disconnected the device from that network, allow the DHCP lease to expire (24 hours), and UniFi still knows the device, the count remains at 1, until I login to UniFi and tell the controller to 'Forget Device'.

@clyra
Copy link
Owner

clyra commented Jun 10, 2023

Hm... i guess this is a unifi problem, because what you see at the web interface is what the sensor gets. Did you tried to lower the dhcp lease time?

@cjramseyer
Copy link
Author

Yes, I reduced the lease time to less than an hour and the issue persists.

@clyra
Copy link
Owner

clyra commented Jul 7, 2023

I'm not sure if there's a fix for that... the integration uses the pyunifi python package (https://github.com/finish06/pyunifi). Their documentations says that the function get_clients(self) "Return a list of all active clients, with significant information about each". Perhaps those "signficant information" has the last time the device sent something, and maybe we can use that, at the risk of considering a device that is quiet as non-active.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants