AlexandrErohin / TP-Link-Archer-C6U

Python package for API access and management for TP-Link Routers. See supported routers list
GNU General Public License v3.0
59 stars 22 forks source link

Devices listed missing values #35

Closed ryirv closed 2 months ago

ryirv commented 3 months ago

Hi,

I've been trying to get the download speed / upload speed for the devices connected to my router (Archer AX20) and when I iterated over the devices list, the results were always None on all values not provided in the parameters of Device (upload,download, pkt sent, pkt recieved)

The following code is reached in your client.py : image image

I fixed my issue with the upload/ download by moving the value assignments here: image

Cheers 👍

AlexandrErohin commented 3 months ago

@ryirv Hi Could you make a MR please for these changes?

ryirv commented 3 months ago

@ryirv Hi Could you make a MR please for these changes?

I double checked my router model and it turns out I'm running an AX1800, not AX20. Not sure where I got the wrong model from.

Sorry about that!

If you'd like some data to add support for this version, let me know!

AlexandrErohin commented 2 months ago

@ryirv Could you open Pull Request for these changes please?

AlexandrErohin commented 2 months ago

@ryirv What is your hardware version of your tplink AX1800 ?

ryirv commented 2 months ago

@AlexandrErohin

Archer AX20 v3.0

AlexandrErohin commented 2 months ago

@ryirv Thank you I have mage changes which is compatible with other routers. Could you check the new client version?

ryirv commented 2 months ago

Hi @AlexandrErohin

The download speed / upload speed now works! Thank you for that.

Just wanted to double check something, should client.packets_recieved and client.packets_sent always be 0 or 1? This confused be a bit.

{'mac': '7C-1C-4E-03-4F-9F', 'type': '2.4GHz', 'encryption': 'wpa2-psk', 'rxpkts': 0, 'txpkts': 0} {'mac': 'FC-A1-83-EB-9B-F3', 'type': '5GHz', 'encryption': 'wpa2-psk', 'rxpkts': 0, 'txpkts': 0} {'mac': '1C-86-9A-3D-CA-2E', 'type': '5GHz', 'encryption': 'wpa2-psk', 'rxpkts': 0, 'txpkts': 0} {'mac': '7C-50-79-58-FC-69', 'type': '5GHz', 'encryption': 'wpa2-psk', 'rxpkts': 0, 'txpkts': 0} {'mac': 'A6-B7-75-A0-A6-75', 'type': '5GHz', 'encryption': 'wpa2-psk', 'rxpkts': 0, 'txpkts': 0} {'mac': '80-91-33-EE-5F-95', 'type': '5GHz', 'encryption': 'wpa2-psk', 'rxpkts': 0, 'txpkts': 0} {'mac': 'DC-03-98-6F-49-DC', 'type': '5GHz', 'encryption': 'wpa2-psk', 'rxpkts': 0, 'txpkts': 1} {'mac': '3A-17-6E-A9-8D-DA', 'type': '5GHz', 'encryption': 'wpa2-psk', 'rxpkts': 0, 'txpkts': 0} {'mac': '5A-BD-6C-55-15-E6', 'type': '5GHz', 'encryption': 'wpa2-psk', 'rxpkts': 0, 'txpkts': 0} {'mac': '34-2F-BD-F0-26-EF', 'type': '5GHz', 'encryption': 'wpa2-psk', 'rxpkts': 0, 'txpkts': 0} {'mac': '10-BF-67-80-67-50', 'type': '5GHz', 'encryption': 'wpa2-psk', 'rxpkts': 0, 'txpkts': 0} {'mac': '36-14-0A-1A-B8-BA', 'type': '5GHz', 'encryption': 'wpa2-psk', 'rxpkts': 0, 'txpkts': 0}

Cheers 👍

AlexandrErohin commented 2 months ago

@ryirv Added. Please try the latest version P.S. Dont forget please to give a star to the repo :)