tplinkrouterc6u 5.0.1__tar.gz → 5.0.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {tplinkrouterc6u-5.0.1 → tplinkrouterc6u-5.0.3}/PKG-INFO +3 -3
- {tplinkrouterc6u-5.0.1 → tplinkrouterc6u-5.0.3}/README.md +2 -2
- {tplinkrouterc6u-5.0.1 → tplinkrouterc6u-5.0.3}/setup.py +1 -1
- {tplinkrouterc6u-5.0.1 → tplinkrouterc6u-5.0.3}/test/test_client_deco.py +2 -2
- {tplinkrouterc6u-5.0.1 → tplinkrouterc6u-5.0.3}/tplinkrouterc6u/client.py +8 -6
- {tplinkrouterc6u-5.0.1 → tplinkrouterc6u-5.0.3}/tplinkrouterc6u/helper.py +8 -0
- {tplinkrouterc6u-5.0.1 → tplinkrouterc6u-5.0.3}/tplinkrouterc6u.egg-info/PKG-INFO +3 -3
- {tplinkrouterc6u-5.0.1 → tplinkrouterc6u-5.0.3}/LICENSE +0 -0
- {tplinkrouterc6u-5.0.1 → tplinkrouterc6u-5.0.3}/setup.cfg +0 -0
- {tplinkrouterc6u-5.0.1 → tplinkrouterc6u-5.0.3}/test/__init__.py +0 -0
- {tplinkrouterc6u-5.0.1 → tplinkrouterc6u-5.0.3}/test/test_client.py +0 -0
- {tplinkrouterc6u-5.0.1 → tplinkrouterc6u-5.0.3}/test/test_client_c1200.py +0 -0
- {tplinkrouterc6u-5.0.1 → tplinkrouterc6u-5.0.3}/test/test_client_mr.py +0 -0
- {tplinkrouterc6u-5.0.1 → tplinkrouterc6u-5.0.3}/tplinkrouterc6u/__init__.py +0 -0
- {tplinkrouterc6u-5.0.1 → tplinkrouterc6u-5.0.3}/tplinkrouterc6u/dataclass.py +0 -0
- {tplinkrouterc6u-5.0.1 → tplinkrouterc6u-5.0.3}/tplinkrouterc6u/encryption.py +0 -0
- {tplinkrouterc6u-5.0.1 → tplinkrouterc6u-5.0.3}/tplinkrouterc6u/exception.py +0 -0
- {tplinkrouterc6u-5.0.1 → tplinkrouterc6u-5.0.3}/tplinkrouterc6u/package_enum.py +0 -0
- {tplinkrouterc6u-5.0.1 → tplinkrouterc6u-5.0.3}/tplinkrouterc6u.egg-info/SOURCES.txt +0 -0
- {tplinkrouterc6u-5.0.1 → tplinkrouterc6u-5.0.3}/tplinkrouterc6u.egg-info/dependency_links.txt +0 -0
- {tplinkrouterc6u-5.0.1 → tplinkrouterc6u-5.0.3}/tplinkrouterc6u.egg-info/requires.txt +0 -0
- {tplinkrouterc6u-5.0.1 → tplinkrouterc6u-5.0.3}/tplinkrouterc6u.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: tplinkrouterc6u
|
|
3
|
-
Version: 5.0.
|
|
3
|
+
Version: 5.0.3
|
|
4
4
|
Summary: TP-Link Router API
|
|
5
5
|
Home-page: https://github.com/AlexandrErohin/TP-Link-Archer-C6U
|
|
6
6
|
Author: Alex Erohin
|
|
@@ -257,8 +257,9 @@ or you have TP-link C5400X or similar router you need to get web encrypted passw
|
|
|
257
257
|
- Archer GX90 v1.0
|
|
258
258
|
- Archer MR200 (v5, v5.3)
|
|
259
259
|
- Archer MR600 (v1, v2, v3)
|
|
260
|
-
- Archer
|
|
260
|
+
- Archer VR600 v3
|
|
261
261
|
- Archer VR900v
|
|
262
|
+
- Archer VR2100v v1
|
|
262
263
|
- Deco M4 2.0
|
|
263
264
|
- Deco M4R 2.0
|
|
264
265
|
- Deco M5 v3
|
|
@@ -289,7 +290,6 @@ or you have TP-link C5400X or similar router you need to get web encrypted passw
|
|
|
289
290
|
- Archer C900 V1
|
|
290
291
|
- Archer C1200 V3
|
|
291
292
|
- Archer C1900 V2
|
|
292
|
-
- Archer C2300 V2
|
|
293
293
|
- Archer C4000 (V2 and V3)
|
|
294
294
|
- Archer C5400 V2
|
|
295
295
|
- TL-WR1043N V5
|
|
@@ -235,8 +235,9 @@ or you have TP-link C5400X or similar router you need to get web encrypted passw
|
|
|
235
235
|
- Archer GX90 v1.0
|
|
236
236
|
- Archer MR200 (v5, v5.3)
|
|
237
237
|
- Archer MR600 (v1, v2, v3)
|
|
238
|
-
- Archer
|
|
238
|
+
- Archer VR600 v3
|
|
239
239
|
- Archer VR900v
|
|
240
|
+
- Archer VR2100v v1
|
|
240
241
|
- Deco M4 2.0
|
|
241
242
|
- Deco M4R 2.0
|
|
242
243
|
- Deco M5 v3
|
|
@@ -267,7 +268,6 @@ or you have TP-link C5400X or similar router you need to get web encrypted passw
|
|
|
267
268
|
- Archer C900 V1
|
|
268
269
|
- Archer C1200 V3
|
|
269
270
|
- Archer C1900 V2
|
|
270
|
-
- Archer C2300 V2
|
|
271
271
|
- Archer C4000 (V2 and V3)
|
|
272
272
|
- Archer C5400 V2
|
|
273
273
|
- TL-WR1043N V5
|
|
@@ -70,7 +70,7 @@ class TestTPLinkDecoClient(TestCase):
|
|
|
70
70
|
"connection_type": "band5", "space_id": "1", "ip": "192.168.68.104", "client_mesh": true,
|
|
71
71
|
"online": true, "name": "d2lyZWxlc3M0", "enable_priority": false, "remain_time": 0, "owner_id": "",
|
|
72
72
|
"client_type": "other", "interface": "guest"},
|
|
73
|
-
{"mac": "
|
|
73
|
+
{"mac": "", "up_speed": 3, "down_speed": 1, "wire_type": "wireless", "access_host": "1",
|
|
74
74
|
"connection_type": "band2_4", "space_id": "1", "ip": "UNKNOWN", "client_mesh": true,
|
|
75
75
|
"online": true, "name": "d2lyZWxlc3M1", "enable_priority": false, "remain_time": 0, "owner_id": "",
|
|
76
76
|
"client_type": "other", "interface": "guest"}
|
|
@@ -149,7 +149,7 @@ class TestTPLinkDecoClient(TestCase):
|
|
|
149
149
|
self.assertEqual(status.devices[3].packets_received, None)
|
|
150
150
|
self.assertIsInstance(status.devices[4], Device)
|
|
151
151
|
self.assertEqual(status.devices[4].type, Connection.GUEST_2G)
|
|
152
|
-
self.assertEqual(status.devices[4].macaddr, '
|
|
152
|
+
self.assertEqual(status.devices[4].macaddr, '00-00-00-00-00-00')
|
|
153
153
|
self.assertEqual(status.devices[4].ipaddr, '0.0.0.0')
|
|
154
154
|
self.assertEqual(status.devices[4].hostname, 'wireless5')
|
|
155
155
|
self.assertEqual(status.devices[4].packets_sent, None)
|
|
@@ -10,7 +10,7 @@ from datetime import timedelta
|
|
|
10
10
|
from macaddress import EUI48
|
|
11
11
|
from ipaddress import IPv4Address
|
|
12
12
|
from logging import Logger
|
|
13
|
-
from tplinkrouterc6u.helper import get_ip
|
|
13
|
+
from tplinkrouterc6u.helper import get_ip, get_mac
|
|
14
14
|
from tplinkrouterc6u.encryption import EncryptionWrapper, EncryptionWrapperMR
|
|
15
15
|
from tplinkrouterc6u.package_enum import Connection
|
|
16
16
|
from tplinkrouterc6u.dataclass import Firmware, Status, Device, IPv4Reservation, IPv4DHCPLease, IPv4Status
|
|
@@ -355,7 +355,7 @@ class TplinkBaseRouter(AbstractRouter, TplinkRequest):
|
|
|
355
355
|
devices = {}
|
|
356
356
|
|
|
357
357
|
def _add_device(conn: Connection, item: dict) -> None:
|
|
358
|
-
devices[item['macaddr']] = Device(conn,
|
|
358
|
+
devices[item['macaddr']] = Device(conn, get_mac(item.get('macaddr', '00:00:00:00:00:00')),
|
|
359
359
|
get_ip(item['ipaddr']),
|
|
360
360
|
item['hostname'])
|
|
361
361
|
|
|
@@ -382,8 +382,8 @@ class TplinkBaseRouter(AbstractRouter, TplinkRequest):
|
|
|
382
382
|
for item in smart_network:
|
|
383
383
|
if item['mac'] not in devices:
|
|
384
384
|
conn = self._map_wire_type(item.get('deviceTag'), not item.get('isGuest'))
|
|
385
|
-
devices[item['mac']] = Device(conn,
|
|
386
|
-
item['deviceName'])
|
|
385
|
+
devices[item['mac']] = Device(conn, get_mac(item.get('mac', '00:00:00:00:00:00')),
|
|
386
|
+
get_ip(item['ip']), item['deviceName'])
|
|
387
387
|
if conn.is_iot():
|
|
388
388
|
if status.iot_clients_total is None:
|
|
389
389
|
status.iot_clients_total = 0
|
|
@@ -581,7 +581,7 @@ class TPLinkDecoClient(TplinkEncryption, AbstractRouter):
|
|
|
581
581
|
status.iot_clients_total += 1
|
|
582
582
|
|
|
583
583
|
device = Device(conn,
|
|
584
|
-
|
|
584
|
+
get_mac(item.get('mac', '00:00:00:00:00:00')),
|
|
585
585
|
get_ip(item.get('ip', '0.0.0.0')),
|
|
586
586
|
b64decode(item['name']).decode())
|
|
587
587
|
device.down_speed = item.get('down_speed')
|
|
@@ -1440,8 +1440,10 @@ class TplinkRouterProvider:
|
|
|
1440
1440
|
router = TplinkC1200Router(host, password, username, logger, verify_ssl, timeout)
|
|
1441
1441
|
try:
|
|
1442
1442
|
router.authorize()
|
|
1443
|
+
return router
|
|
1443
1444
|
except AuthorizeError as e:
|
|
1444
|
-
logger
|
|
1445
|
+
if logger:
|
|
1446
|
+
logger.error(e.__str__())
|
|
1445
1447
|
raise ClientException(('Login failed! Please check if your router local password is correct or '
|
|
1446
1448
|
'try to use web encrypted password instead. Check the documentation!'
|
|
1447
1449
|
))
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
from ipaddress import IPv4Address
|
|
2
|
+
from macaddress import EUI48
|
|
2
3
|
|
|
3
4
|
|
|
4
5
|
def get_ip(ip: str) -> IPv4Address:
|
|
@@ -6,3 +7,10 @@ def get_ip(ip: str) -> IPv4Address:
|
|
|
6
7
|
return IPv4Address(ip)
|
|
7
8
|
except Exception:
|
|
8
9
|
return IPv4Address('0.0.0.0')
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def get_mac(mac: str) -> EUI48:
|
|
13
|
+
try:
|
|
14
|
+
return EUI48(mac)
|
|
15
|
+
except Exception:
|
|
16
|
+
return EUI48('00:00:00:00:00:00')
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: tplinkrouterc6u
|
|
3
|
-
Version: 5.0.
|
|
3
|
+
Version: 5.0.3
|
|
4
4
|
Summary: TP-Link Router API
|
|
5
5
|
Home-page: https://github.com/AlexandrErohin/TP-Link-Archer-C6U
|
|
6
6
|
Author: Alex Erohin
|
|
@@ -257,8 +257,9 @@ or you have TP-link C5400X or similar router you need to get web encrypted passw
|
|
|
257
257
|
- Archer GX90 v1.0
|
|
258
258
|
- Archer MR200 (v5, v5.3)
|
|
259
259
|
- Archer MR600 (v1, v2, v3)
|
|
260
|
-
- Archer
|
|
260
|
+
- Archer VR600 v3
|
|
261
261
|
- Archer VR900v
|
|
262
|
+
- Archer VR2100v v1
|
|
262
263
|
- Deco M4 2.0
|
|
263
264
|
- Deco M4R 2.0
|
|
264
265
|
- Deco M5 v3
|
|
@@ -289,7 +290,6 @@ or you have TP-link C5400X or similar router you need to get web encrypted passw
|
|
|
289
290
|
- Archer C900 V1
|
|
290
291
|
- Archer C1200 V3
|
|
291
292
|
- Archer C1900 V2
|
|
292
|
-
- Archer C2300 V2
|
|
293
293
|
- Archer C4000 (V2 and V3)
|
|
294
294
|
- Archer C5400 V2
|
|
295
295
|
- TL-WR1043N V5
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tplinkrouterc6u-5.0.1 → tplinkrouterc6u-5.0.3}/tplinkrouterc6u.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|