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
43 stars 14 forks source link

configurable timeout #8

Closed gordonaspin closed 8 months ago

gordonaspin commented 8 months ago

code as-is would throw timeout exception with my Archer A6 when calling get_status(). I added timeout to TpLinkRouter defaulted to 60 seconds

AlexandrErohin commented 8 months ago

@gordonaspin Thank you! 60 seconds too much I think. Could you test on your router timeout for 10 seconds?

gordonaspin commented 8 months ago

10s works. It takes what it takes ... !

AlexandrErohin commented 8 months ago

@gordonaspin Great. Could you also update README.md with you new additions? Also, what is version of your router? Archer A6 v2?

gordonaspin commented 8 months ago

Mine is:

firmware version: 1.2.1 Build 20220714 rel.75573(5553) hardware version: Archer A7 v5.0

I'll update readme with my second commit. I added APIs to get dhcp lease info and a couple of others. I also used macaddress and ipaddress libs to have a client program be able sort by ip (vs a lexical sort). I'll send another pull request maybe tomorrow.

gordonaspin commented 8 months ago

I updated the README and cleaned up naming conventions, added requirements.txt.

AlexandrErohin commented 8 months ago

Thank you!

AlexandrErohin commented 8 months ago

As 10 sec works for you - Ill reduce 60 sec to 10 ok?