tplinkrouterc6u 5.6.2__py3-none-any.whl → 5.7.0__py3-none-any.whl

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.
test/test_client_c6u.py CHANGED
@@ -257,6 +257,7 @@ class TestTPLinkClient(TestCase):
257
257
  self.assertEqual(status.devices[0].hostname, 'SERVER')
258
258
  self.assertEqual(status.devices[0].packets_sent, None)
259
259
  self.assertEqual(status.devices[0].packets_received, None)
260
+ self.assertEqual(status.devices[0].active, True)
260
261
  self.assertIsInstance(status.devices[0], Device)
261
262
  self.assertEqual(status.devices[1].type, Connection.WIRED)
262
263
  self.assertEqual(status.devices[1].macaddr, 'AC-04-D6-25-2A-96')
@@ -266,6 +267,7 @@ class TestTPLinkClient(TestCase):
266
267
  self.assertEqual(status.devices[1].hostname, 'UNKNOWN')
267
268
  self.assertEqual(status.devices[1].packets_sent, None)
268
269
  self.assertEqual(status.devices[1].packets_received, None)
270
+ self.assertEqual(status.devices[1].active, True)
269
271
  self.assertIsInstance(status.devices[2], Device)
270
272
  self.assertEqual(status.devices[2].type, Connection.HOST_2G)
271
273
  self.assertEqual(status.devices[2].macaddr, '06-82-9D-2B-8F-C6')
@@ -273,6 +275,7 @@ class TestTPLinkClient(TestCase):
273
275
  self.assertEqual(status.devices[2].hostname, 'UNKNOWN')
274
276
  self.assertEqual(status.devices[2].packets_sent, 450333)
275
277
  self.assertEqual(status.devices[2].packets_received, 4867482)
278
+ self.assertEqual(status.devices[2].active, True)
276
279
  self.assertIsInstance(status.devices[3], Device)
277
280
  self.assertEqual(status.devices[3].type, Connection.HOST_2G)
278
281
  self.assertEqual(status.devices[3].macaddr, '06-55-9D-2B-8F-A7')
@@ -280,6 +283,7 @@ class TestTPLinkClient(TestCase):
280
283
  self.assertEqual(status.devices[3].hostname, 'Unknown')
281
284
  self.assertEqual(status.devices[3].packets_sent, None)
282
285
  self.assertEqual(status.devices[3].packets_received, None)
286
+ self.assertEqual(status.devices[3].active, True)
283
287
  self.assertIsInstance(status.devices[4], Device)
284
288
  self.assertEqual(status.devices[4].type, Connection.HOST_5G)
285
289
  self.assertEqual(status.devices[4].macaddr, '1F-7A-BD-F7-20-0D')
@@ -287,6 +291,7 @@ class TestTPLinkClient(TestCase):
287
291
  self.assertEqual(status.devices[4].hostname, '')
288
292
  self.assertEqual(status.devices[4].packets_sent, 134815)
289
293
  self.assertEqual(status.devices[4].packets_received, 2953078)
294
+ self.assertEqual(status.devices[4].active, True)
290
295
 
291
296
  def test_get_status_ax_55(self) -> None:
292
297
  response_status = '''
test/test_client_c80.py CHANGED
@@ -474,6 +474,7 @@ class TestTPLinkClient(TestCase):
474
474
  self.assertEqual(device.hostname, 'Laptop')
475
475
  self.assertEqual(device.up_speed, 0)
476
476
  self.assertEqual(device.down_speed, 0)
477
+ self.assertEqual(device.active, False)
477
478
 
478
479
  device = status.devices[1]
479
480
  self.assertIsInstance(device, Device)
@@ -485,6 +486,7 @@ class TestTPLinkClient(TestCase):
485
486
  self.assertEqual(device.hostname, 'iPhone')
486
487
  self.assertEqual(device.up_speed, 0)
487
488
  self.assertEqual(device.down_speed, 0)
489
+ self.assertEqual(device.active, False)
488
490
 
489
491
  device = status.devices[2]
490
492
  self.assertIsInstance(device, Device)
@@ -496,6 +498,7 @@ class TestTPLinkClient(TestCase):
496
498
  self.assertEqual(device.hostname, 'Laptop2')
497
499
  self.assertEqual(device.up_speed, 30)
498
500
  self.assertEqual(device.down_speed, 200)
501
+ self.assertEqual(device.active, True)
499
502
 
500
503
  device = status.devices[3]
501
504
  self.assertIsInstance(device, Device)
@@ -507,6 +510,7 @@ class TestTPLinkClient(TestCase):
507
510
  self.assertEqual(device.hostname, 'iPhone2')
508
511
  self.assertEqual(device.up_speed, 800)
509
512
  self.assertEqual(device.down_speed, 400)
513
+ self.assertEqual(device.active, True)
510
514
 
511
515
  device = status.devices[4]
512
516
  self.assertIsInstance(device, Device)
@@ -518,6 +522,7 @@ class TestTPLinkClient(TestCase):
518
522
  self.assertEqual(device.hostname, 'IoT_thing')
519
523
  self.assertEqual(device.up_speed, 1824)
520
524
  self.assertEqual(device.down_speed, 800)
525
+ self.assertEqual(device.active, True)
521
526
 
522
527
  device = status.devices[5]
523
528
  self.assertIsInstance(device, Device)
@@ -529,6 +534,7 @@ class TestTPLinkClient(TestCase):
529
534
  self.assertEqual(device.hostname, 'PC')
530
535
  self.assertEqual(device.up_speed, 600)
531
536
  self.assertEqual(device.down_speed, 50)
537
+ self.assertEqual(device.active, True)
532
538
 
533
539
  def test_get_status_without_iot(self) -> None:
534
540
  client = TplinkC80RouterTest('', '')
test/test_client_mr.py CHANGED
@@ -734,7 +734,6 @@ ussdStatus=1
734
734
 
735
735
  class TPLinkMRClientTest(TPLinkMRClient):
736
736
  def _request(self, url, method='POST', data_str=None, encrypt=False):
737
- nonlocal check_url, check_data
738
737
  check_url.append(url)
739
738
  check_data.append(data_str)
740
739
  return 200, responses.pop(0)
@@ -776,7 +775,6 @@ ussdStatus=2
776
775
 
777
776
  class TPLinkMRClientTest(TPLinkMRClient):
778
777
  def _request(self, url, method='POST', data_str=None, encrypt=False):
779
- nonlocal check_url, check_data
780
778
  check_url.append(url)
781
779
  check_data.append(data_str)
782
780
  return 200, responses.pop(0)
@@ -328,6 +328,7 @@ class TplinkC80Router(AbstractRouter):
328
328
  device_to_add = Device(connection_type, EUI48(device['mac']), IPv4Address(device['ip']), device['name'])
329
329
  device_to_add.up_speed = int(device['up'])
330
330
  device_to_add.down_speed = int(device['down'])
331
+ device_to_add.active = device['online'] == '1'
331
332
  mapped_devices.append(device_to_add)
332
333
  return mapped_devices
333
334
 
@@ -25,6 +25,7 @@ class Device:
25
25
  self.down_speed: int | None = None
26
26
  self.up_speed: int | None = None
27
27
  self.signal: int | None = None
28
+ self.active: bool = True
28
29
 
29
30
  @property
30
31
  def macaddr(self):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tplinkrouterc6u
3
- Version: 5.6.2
3
+ Version: 5.7.0
4
4
  Summary: TP-Link Router API (supports also Mercusys Router)
5
5
  Home-page: https://github.com/AlexandrErohin/TP-Link-Archer-C6U
6
6
  Author: Alex Erohin
@@ -187,6 +187,7 @@ or you have TP-link C5400X or similar router you need to get web encrypted passw
187
187
  | down_speed | download speed | int, None |
188
188
  | up_speed | upload speed | int, None |
189
189
  | signal | Signal strength | int, None |
190
+ | active | Is active device | bool |
190
191
 
191
192
  ### <a id="IPv4Reservation">IPv4Reservation</a>
192
193
  | Field | Description | Type |
@@ -289,8 +290,9 @@ or you have TP-link C5400X or similar router you need to get web encrypted passw
289
290
  - [MERCUSYS routers](#mercusys)
290
291
  ### <a id="tplink">TP-LINK routers</a>
291
292
  - Archer A7 V5
292
- - Archer A8 1.0
293
+ - Archer A8 (1.0, 2.20)
293
294
  - Archer A9 V6
295
+ - Archer A20 v1.0
294
296
  - Archer AX10 v1.0
295
297
  - Archer AX12 v1.0
296
298
  - Archer AX20 (v1.0, v3.0)
@@ -338,6 +340,7 @@ or you have TP-link C5400X or similar router you need to get web encrypted passw
338
340
  - Deco P7
339
341
  - Deco X20
340
342
  - Deco X50 v1.3
343
+ - Deco X55 1.0
341
344
  - Deco X60 V3
342
345
  - Deco X90
343
346
  - Deco XE75 (v1.0, v2.0)
@@ -1,10 +1,10 @@
1
1
  test/__init__.py,sha256=McQmUjeN3AwmwdS6QNfwGXXE77OKoPK852I2BM9XsrU,210
2
2
  test/test_client_c1200.py,sha256=4RdwMEwTGWLOxOVTuPikifXDcUJFQ13DuyWGm2Aevrk,8811
3
- test/test_client_c6u.py,sha256=3nvhybxYxiCVjjLXB3nBYrAkXS8zoLtJibgvsqsTQ3U,32140
4
- test/test_client_c80.py,sha256=ZW4Ad-Y-o_IVNz1YPdrtq6At-_hujT1sMtOEOLkgu24,42081
3
+ test/test_client_c6u.py,sha256=c0_czoZzBN2hiVEAOAmasD_64P2jsZ_fYRpAtqGgk2E,32425
4
+ test/test_client_c80.py,sha256=RY_1SgRVcQQdN9h0_IXA0YW4_0flEB_uel05QvDDfws,42359
5
5
  test/test_client_deco.py,sha256=YPLKRD8GoyDYHfRgdXvCk8iVNw8zdMJW-AHVnNbpdTM,31719
6
6
  test/test_client_ex.py,sha256=0dVvOJqxpR2xNca99vadfdpxmzW-4sk9X_4tAK8x9-c,21710
7
- test/test_client_mr.py,sha256=NxTgXv_wN50K8KsJhykoU-TX0ddDGlX_7jp50FXOLjg,33517
7
+ test/test_client_mr.py,sha256=lePxkmjcPzcrSFcaT8bT67L154cVJIOWrFlXMDOa8oY,33423
8
8
  test/test_client_xdr.py,sha256=mgn-xL5mD5sHD8DjTz9vpY7jeh4Ob6Um6Y8v5Qgx2jA,23374
9
9
  tplinkrouterc6u/__init__.py,sha256=-YGlTq78D4jE7pTTs4xTW3NamoiSIrNtpswne5ohb0s,951
10
10
  tplinkrouterc6u/client_abstract.py,sha256=3UYzmll774S_Gb5E0FTVO_rI3-XFM7PSklg1-V-2jls,1419
@@ -13,20 +13,20 @@ tplinkrouterc6u/client/__init__.py,sha256=KBy3fmtA9wgyFrb0Urh2x4CkKtWVnESdp-vxmu
13
13
  tplinkrouterc6u/client/c1200.py,sha256=_nY_pJ-wPWODAaes9kHPdVcM6YM54f1E54CfdoFHqbE,4771
14
14
  tplinkrouterc6u/client/c5400x.py,sha256=9E0omBSbWY_ljrs5MTCMu5brmrLtzsDB5O62Db8lP8Q,4329
15
15
  tplinkrouterc6u/client/c6u.py,sha256=TbS8qbwfPzIVDEMNNlKMhWuGeo-RUvaCkG_bF7Y4L0Q,17637
16
- tplinkrouterc6u/client/c80.py,sha256=3Cy9FCYHZaGzTGAjsB2BdjxpzJmBoW6TMDTDaCyUDjI,18437
16
+ tplinkrouterc6u/client/c80.py,sha256=Hx7ORiDu3YYXDkyE8KOQJ8qz5Z7XrCG60TS3rwCy-UM,18496
17
17
  tplinkrouterc6u/client/deco.py,sha256=cpKRggKD2RvSmMZuD6tzsZmehAUCU9oLiTTHcZBW81Y,8898
18
18
  tplinkrouterc6u/client/ex.py,sha256=ZK08mlOts3fbBJh9NUrzBADP0N9LHgzOXCKY2tF9gG0,13111
19
19
  tplinkrouterc6u/client/mr.py,sha256=kJ-meAgMPub6aKtzBEVI3CNNzsVab7pLkOlXU9dj030,26030
20
20
  tplinkrouterc6u/client/vr.py,sha256=7Tbu0IrWtr4HHtyrnLFXEJi1QctzhilciL7agtwQ0R8,5025
21
21
  tplinkrouterc6u/client/xdr.py,sha256=QaZ_5vCaf8BV_JEs3S2Nz-QDREBYHGh3OUWIVS-fefY,10406
22
22
  tplinkrouterc6u/common/__init__.py,sha256=pCTvVZ9CAwgb7MxRnLx0y1rI0sTKSwT24FfxWfQXeTM,33
23
- tplinkrouterc6u/common/dataclass.py,sha256=QQTGb9w4Yt3GNkISgrQhvWPMEEJOsgFFZ2MI1MIAPjw,7807
23
+ tplinkrouterc6u/common/dataclass.py,sha256=UNQdr-tkAQcF3KiefKOIKOtPTJczgcey4zMvbqbv_4M,7840
24
24
  tplinkrouterc6u/common/encryption.py,sha256=4HelTxzN6esMfDZRBt3m8bwB9Nj_biKijnCnrGWPWKg,6228
25
25
  tplinkrouterc6u/common/exception.py,sha256=_0G8ZvW5__CsGifHrsZeULdl8c6EUD071sDCQsQgrHY,140
26
26
  tplinkrouterc6u/common/helper.py,sha256=23b04fk9HuVinrZXMCS5R1rmF8uZ7eM-Cdnp7Br9NR0,572
27
27
  tplinkrouterc6u/common/package_enum.py,sha256=4ykL_2Pw0nDEIH_qR9UJlFF6stTgSfhPz32r8KT-sh8,1624
28
- tplinkrouterc6u-5.6.2.dist-info/licenses/LICENSE,sha256=YF6QR6Vjxcg5b_sYIyqkME7FZYau5TfEUGTG-0JeRK0,35129
29
- tplinkrouterc6u-5.6.2.dist-info/METADATA,sha256=OJZ_573ij0N15aCx8DIhTyQ-gM8x794j5gYaygq5310,15365
30
- tplinkrouterc6u-5.6.2.dist-info/WHEEL,sha256=tTnHoFhvKQHCh4jz3yCn0WPTYIy7wXx3CJtJ7SJGV7c,91
31
- tplinkrouterc6u-5.6.2.dist-info/top_level.txt,sha256=1iSCCIueqgEkrTxtQ-jiHe99jAB10zqrVdBcwvNfe_M,21
32
- tplinkrouterc6u-5.6.2.dist-info/RECORD,,
28
+ tplinkrouterc6u-5.7.0.dist-info/licenses/LICENSE,sha256=YF6QR6Vjxcg5b_sYIyqkME7FZYau5TfEUGTG-0JeRK0,35129
29
+ tplinkrouterc6u-5.7.0.dist-info/METADATA,sha256=zeLTyG9UFRTMjRIs3ECk1CGLEGIM2OP7dLkjiswAtZM,15443
30
+ tplinkrouterc6u-5.7.0.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
31
+ tplinkrouterc6u-5.7.0.dist-info/top_level.txt,sha256=1iSCCIueqgEkrTxtQ-jiHe99jAB10zqrVdBcwvNfe_M,21
32
+ tplinkrouterc6u-5.7.0.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (77.0.1)
2
+ Generator: setuptools (78.1.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5