asuswrt-api icon indicating copy to clipboard operation
asuswrt-api copied to clipboard

clients.py gives outdated devices

Open roger- opened this issue 5 years ago • 5 comments

Running on MerlinWrt.

Viewing the clients from the router shows only currently connected devices, but the script show devices that haven't been connected in months.

The JSON response from self.get('get_clientlist(appobj)... includes a wlConnectTime entry, but the values in it are too small to be valid.

Any ideas?

roger- avatar Mar 08 '20 18:03 roger-

@roger- Yes, you all right. The api response include clients list. and each item have wlConnectTime, isOnline fields. That method that called get_online_clients is exactly mean of ONLINE CLIENTS. So I committed what is retrieving clients related. Can you check my pull request? https://github.com/vrachieru/asuswrt-api/pull/4

engineer-myoa avatar Mar 22 '20 15:03 engineer-myoa

I didn't notice the isOnline field -- looks like your change fixed the issue, thanks!

I also request that you include the connected time to the Client class.

roger- avatar Mar 22 '20 15:03 roger-

That request included wlConnectTime field. but it is inaccurate. I'll check more this related.

engineer-myoa avatar Mar 22 '20 16:03 engineer-myoa

On stock Asus firmware only force update of list worked, allows me to track devices that were online for a minute You may check out my PR and see if it works with merlin: https://github.com/vrachieru/asuswrt-api/pull/5

rostopira avatar Mar 29 '20 15:03 rostopira

@rostopira Nice work.

engineer-myoa avatar Mar 30 '20 00:03 engineer-myoa