tplinkrouterc6u 5.9.3__py3-none-any.whl → 5.10.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.
- tplinkrouterc6u/common/dataclass.py +111 -90
- {tplinkrouterc6u-5.9.3.dist-info → tplinkrouterc6u-5.10.0.dist-info}/METADATA +10 -1
- {tplinkrouterc6u-5.9.3.dist-info → tplinkrouterc6u-5.10.0.dist-info}/RECORD +6 -6
- {tplinkrouterc6u-5.9.3.dist-info → tplinkrouterc6u-5.10.0.dist-info}/WHEEL +0 -0
- {tplinkrouterc6u-5.9.3.dist-info → tplinkrouterc6u-5.10.0.dist-info}/licenses/LICENSE +0 -0
- {tplinkrouterc6u-5.9.3.dist-info → tplinkrouterc6u-5.10.0.dist-info}/top_level.txt +0 -0
|
@@ -1,31 +1,29 @@
|
|
|
1
1
|
from macaddress import EUI48
|
|
2
2
|
from ipaddress import IPv4Address
|
|
3
|
-
from dataclasses import dataclass
|
|
3
|
+
from dataclasses import dataclass, field
|
|
4
4
|
from datetime import datetime
|
|
5
5
|
from tplinkrouterc6u.common.package_enum import Connection
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
@dataclass
|
|
9
9
|
class Firmware:
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
self.firmware_version = firmware
|
|
10
|
+
hardware_version: str
|
|
11
|
+
model: str
|
|
12
|
+
firmware_version: str
|
|
14
13
|
|
|
15
14
|
|
|
16
15
|
@dataclass
|
|
17
16
|
class Device:
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
self.active: bool = True
|
|
17
|
+
type: Connection
|
|
18
|
+
_macaddr: EUI48
|
|
19
|
+
_ipaddr: IPv4Address
|
|
20
|
+
hostname: str
|
|
21
|
+
packets_sent: int | None = None
|
|
22
|
+
packets_received: int | None = None
|
|
23
|
+
down_speed: int | None = None
|
|
24
|
+
up_speed: int | None = None
|
|
25
|
+
signal: int | None = None
|
|
26
|
+
active: bool = True
|
|
29
27
|
|
|
30
28
|
@property
|
|
31
29
|
def macaddr(self):
|
|
@@ -46,31 +44,30 @@ class Device:
|
|
|
46
44
|
|
|
47
45
|
@dataclass
|
|
48
46
|
class Status:
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
self.devices: list[Device] = []
|
|
47
|
+
_wan_macaddr: EUI48 | None = None
|
|
48
|
+
_lan_macaddr: EUI48 = None
|
|
49
|
+
_wan_ipv4_addr: IPv4Address | None = None
|
|
50
|
+
_lan_ipv4_addr: IPv4Address | None = None
|
|
51
|
+
_wan_ipv4_gateway: IPv4Address | None = None
|
|
52
|
+
wired_total: int = 0
|
|
53
|
+
wifi_clients_total: int = 0
|
|
54
|
+
guest_clients_total: int = 0
|
|
55
|
+
iot_clients_total: int | None = None
|
|
56
|
+
clients_total: int = 0
|
|
57
|
+
guest_2g_enable: bool | None = None
|
|
58
|
+
guest_5g_enable: bool | None = None
|
|
59
|
+
guest_6g_enable: bool | None = None
|
|
60
|
+
iot_2g_enable: bool | None = None
|
|
61
|
+
iot_5g_enable: bool | None = None
|
|
62
|
+
iot_6g_enable: bool | None = None
|
|
63
|
+
wifi_2g_enable: bool | None = None
|
|
64
|
+
wifi_5g_enable: bool | None = None
|
|
65
|
+
wifi_6g_enable: bool | None = None
|
|
66
|
+
wan_ipv4_uptime: int | None = None
|
|
67
|
+
mem_usage: float | None = None
|
|
68
|
+
cpu_usage: float | None = None
|
|
69
|
+
conn_type: str | None = None
|
|
70
|
+
devices: list[Device] = field(default_factory=list)
|
|
74
71
|
|
|
75
72
|
@property
|
|
76
73
|
def wan_macaddr(self) -> str | None:
|
|
@@ -115,11 +112,10 @@ class Status:
|
|
|
115
112
|
|
|
116
113
|
@dataclass
|
|
117
114
|
class IPv4Reservation:
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
self.enabled = enabled
|
|
115
|
+
_macaddr: EUI48 | None = None
|
|
116
|
+
_ipaddr: IPv4Address | None = None
|
|
117
|
+
hostname: str | None = None
|
|
118
|
+
enabled: bool = True
|
|
123
119
|
|
|
124
120
|
@property
|
|
125
121
|
def macaddr(self):
|
|
@@ -140,11 +136,10 @@ class IPv4Reservation:
|
|
|
140
136
|
|
|
141
137
|
@dataclass
|
|
142
138
|
class IPv4DHCPLease:
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
self.lease_time = lease_time
|
|
139
|
+
_macaddr: EUI48
|
|
140
|
+
_ipaddr: IPv4Address
|
|
141
|
+
hostname: str
|
|
142
|
+
lease_time: str
|
|
148
143
|
|
|
149
144
|
@property
|
|
150
145
|
def macaddr(self):
|
|
@@ -165,19 +160,18 @@ class IPv4DHCPLease:
|
|
|
165
160
|
|
|
166
161
|
@dataclass
|
|
167
162
|
class IPv4Status:
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
self.remote: bool | None = None
|
|
163
|
+
_wan_macaddr: EUI48 | None = None
|
|
164
|
+
_wan_ipv4_ipaddr: IPv4Address | None = None
|
|
165
|
+
_wan_ipv4_gateway: IPv4Address | None = None
|
|
166
|
+
_wan_ipv4_conntype: str = ""
|
|
167
|
+
_wan_ipv4_netmask: IPv4Address | None = None
|
|
168
|
+
_wan_ipv4_pridns: IPv4Address | None = None
|
|
169
|
+
_wan_ipv4_snddns: IPv4Address | None = None
|
|
170
|
+
_lan_macaddr: EUI48 | None = None
|
|
171
|
+
_lan_ipv4_ipaddr: IPv4Address | None = None
|
|
172
|
+
lan_ipv4_dhcp_enable: bool | None = None
|
|
173
|
+
_lan_ipv4_netmask: IPv4Address | None = None
|
|
174
|
+
remote: bool | None = None
|
|
181
175
|
|
|
182
176
|
@property
|
|
183
177
|
def wan_macaddr(self):
|
|
@@ -193,7 +187,7 @@ class IPv4Status:
|
|
|
193
187
|
|
|
194
188
|
@property
|
|
195
189
|
def wan_ipv4_conntype(self):
|
|
196
|
-
return self._wan_ipv4_conntype
|
|
190
|
+
return self._wan_ipv4_conntype
|
|
197
191
|
|
|
198
192
|
@property
|
|
199
193
|
def wan_ipv4_ipaddress(self):
|
|
@@ -258,36 +252,63 @@ class IPv4Status:
|
|
|
258
252
|
|
|
259
253
|
@dataclass
|
|
260
254
|
class SMS:
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
self.unread = unread
|
|
255
|
+
id: int
|
|
256
|
+
sender: str
|
|
257
|
+
content: str
|
|
258
|
+
received_at: datetime
|
|
259
|
+
unread: bool
|
|
267
260
|
|
|
268
261
|
|
|
269
262
|
@dataclass
|
|
270
263
|
class LTEStatus:
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
264
|
+
enable: int | None = None
|
|
265
|
+
connect_status: int | None = None
|
|
266
|
+
network_type: int | None = None
|
|
267
|
+
sim_status: int | None = None
|
|
268
|
+
total_statistics: int | None = None
|
|
269
|
+
cur_rx_speed: int | None = None
|
|
270
|
+
cur_tx_speed: int | None = None
|
|
271
|
+
sms_unread_count: int | None = None
|
|
272
|
+
sig_level: int | None = None
|
|
273
|
+
rsrp: int | None = None
|
|
274
|
+
rsrq: int | None = None
|
|
275
|
+
snr: int | None = None
|
|
276
|
+
isp_name: str | None = None
|
|
277
|
+
network_types = {
|
|
278
|
+
0: "No Service",
|
|
279
|
+
1: "GSM",
|
|
280
|
+
2: "WCDMA",
|
|
281
|
+
3: "4G LTE",
|
|
282
|
+
4: "TD-SCDMA",
|
|
283
|
+
5: "CDMA 1x",
|
|
284
|
+
6: "CDMA 1x Ev-Do",
|
|
285
|
+
7: "4G+ LTE"
|
|
286
|
+
}
|
|
287
|
+
sim_statuses = {
|
|
288
|
+
0: "No SIM card detected or SIM card error.",
|
|
289
|
+
1: "No SIM card detected.",
|
|
290
|
+
2: "SIM card error.",
|
|
291
|
+
3: "SIM card prepared.",
|
|
292
|
+
4: "SIM locked.",
|
|
293
|
+
5: "SIM unlocked. Authentication succeeded.",
|
|
294
|
+
6: "PIN locked.",
|
|
295
|
+
7: "SIM card is locked permanently.",
|
|
296
|
+
8: "suspension of transmission",
|
|
297
|
+
9: "Unopened"
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
@property
|
|
301
|
+
def network_type_info(self) -> str:
|
|
302
|
+
return self.network_types.get(self.network_type, "Unknown network type")
|
|
303
|
+
|
|
304
|
+
@property
|
|
305
|
+
def sim_status_info(self) -> str:
|
|
306
|
+
return self.sim_statuses.get(self.sim_status, "Unknown SIM status")
|
|
285
307
|
|
|
286
308
|
|
|
287
309
|
@dataclass
|
|
288
310
|
class VPNStatus:
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
self.pptpvpn_clients_total: int = 0
|
|
311
|
+
openvpn_enable: bool | None = None
|
|
312
|
+
pptpvpn_enable: bool | None = None
|
|
313
|
+
openvpn_clients_total: int = 0
|
|
314
|
+
pptpvpn_clients_total: int = 0
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: tplinkrouterc6u
|
|
3
|
-
Version: 5.
|
|
3
|
+
Version: 5.10.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
|
|
@@ -258,7 +258,9 @@ or you have TP-link C5400X or similar router you need to get web encrypted passw
|
|
|
258
258
|
| enable | is enabled | int |
|
|
259
259
|
| connect_status | connect status | int |
|
|
260
260
|
| network_type | network type | int |
|
|
261
|
+
| network_type_info | Example: 4G LTE | str |
|
|
261
262
|
| sim_status | sim status | int |
|
|
263
|
+
| sim_status_info | Example: SIM locked. | str |
|
|
262
264
|
| total_statistics | total statistics in bytes | int |
|
|
263
265
|
| cur_rx_speed | current download speed in bytes per second | int |
|
|
264
266
|
| cur_tx_speed | current upload speed in bytes per second | int |
|
|
@@ -268,6 +270,8 @@ or you have TP-link C5400X or similar router you need to get web encrypted passw
|
|
|
268
270
|
| rsrq | RSRQ | int |
|
|
269
271
|
| snr | SNR | int |
|
|
270
272
|
| isp_name | ISP name | str |
|
|
273
|
+
| network_types | All possible network types - {0: "No Service", 1: "GSM", 2: "WCDMA", 3: "4G LTE", 4: "TD-SCDMA", 5: "CDMA 1x", 6: "CDMA 1x Ev-Do", 7: "4G+ LTE"} | dict |
|
|
274
|
+
| sim_statuses | All possible sim statuses - {0: "No SIM card detected or SIM card error.", 1: "No SIM card detected.", 2: "SIM card error.", 3: "SIM card prepared.", 4: "SIM locked.", 5: "SIM unlocked. Authentication succeeded.", 6: "PIN locked.", 7: "SIM card is locked permanently.", 8: "suspension of transmission", 9: "Unopened"} | dict |
|
|
271
275
|
|
|
272
276
|
## Enum
|
|
273
277
|
### <a id="connection">Connection</a>
|
|
@@ -327,6 +331,7 @@ or you have TP-link C5400X or similar router you need to get web encrypted passw
|
|
|
327
331
|
- Archer C7 (v4.0, v5.0)
|
|
328
332
|
- Archer C24 (1.0, 2.0)
|
|
329
333
|
- Archer C60 v2.0
|
|
334
|
+
- Archer C64 1.0
|
|
330
335
|
- Archer C80 (1.0, 2.20)
|
|
331
336
|
- Archer C5400X V1
|
|
332
337
|
- Archer GX90 v1.0
|
|
@@ -359,7 +364,9 @@ or you have TP-link C5400X or similar router you need to get web encrypted passw
|
|
|
359
364
|
- TD-W9960 (v1, V1.20)
|
|
360
365
|
- TL-MR100 v2.0
|
|
361
366
|
- TL-MR105
|
|
367
|
+
- TL-MR100-Outdoor v1.0
|
|
362
368
|
- TL-MR110-Outdoor v1.0
|
|
369
|
+
- TL-MR150 v2
|
|
363
370
|
- TL-MR6400 (v5, v5.3)
|
|
364
371
|
- TL-MR6500v
|
|
365
372
|
- TL-WA1201 3.0
|
|
@@ -372,7 +379,9 @@ or you have TP-link C5400X or similar router you need to get web encrypted passw
|
|
|
372
379
|
- MR47BE v1.0
|
|
373
380
|
- MR50G 1.0
|
|
374
381
|
- H60XR 1.0
|
|
382
|
+
- H47BE 2.0
|
|
375
383
|
- Halo H80X 1.0
|
|
384
|
+
- Halo H3000x 1.0
|
|
376
385
|
|
|
377
386
|
Please let me know if you have tested integration with any other model. Open an issue with info about router's model, hardware and firmware versions.
|
|
378
387
|
|
|
@@ -22,13 +22,13 @@ tplinkrouterc6u/client/vr.py,sha256=7Tbu0IrWtr4HHtyrnLFXEJi1QctzhilciL7agtwQ0R8,
|
|
|
22
22
|
tplinkrouterc6u/client/wdr.py,sha256=i54PEifjhfOScDpgNBXygw9U4bfsVtle846_YjnDoBs,21679
|
|
23
23
|
tplinkrouterc6u/client/xdr.py,sha256=QaZ_5vCaf8BV_JEs3S2Nz-QDREBYHGh3OUWIVS-fefY,10406
|
|
24
24
|
tplinkrouterc6u/common/__init__.py,sha256=pCTvVZ9CAwgb7MxRnLx0y1rI0sTKSwT24FfxWfQXeTM,33
|
|
25
|
-
tplinkrouterc6u/common/dataclass.py,sha256=
|
|
25
|
+
tplinkrouterc6u/common/dataclass.py,sha256=mIQFJoDmKZccV5M3NjguIGm7N9ROEt71Weg0ExYWrEQ,7709
|
|
26
26
|
tplinkrouterc6u/common/encryption.py,sha256=4HelTxzN6esMfDZRBt3m8bwB9Nj_biKijnCnrGWPWKg,6228
|
|
27
27
|
tplinkrouterc6u/common/exception.py,sha256=_0G8ZvW5__CsGifHrsZeULdl8c6EUD071sDCQsQgrHY,140
|
|
28
28
|
tplinkrouterc6u/common/helper.py,sha256=23b04fk9HuVinrZXMCS5R1rmF8uZ7eM-Cdnp7Br9NR0,572
|
|
29
29
|
tplinkrouterc6u/common/package_enum.py,sha256=4ykL_2Pw0nDEIH_qR9UJlFF6stTgSfhPz32r8KT-sh8,1624
|
|
30
|
-
tplinkrouterc6u-5.
|
|
31
|
-
tplinkrouterc6u-5.
|
|
32
|
-
tplinkrouterc6u-5.
|
|
33
|
-
tplinkrouterc6u-5.
|
|
34
|
-
tplinkrouterc6u-5.
|
|
30
|
+
tplinkrouterc6u-5.10.0.dist-info/licenses/LICENSE,sha256=YF6QR6Vjxcg5b_sYIyqkME7FZYau5TfEUGTG-0JeRK0,35129
|
|
31
|
+
tplinkrouterc6u-5.10.0.dist-info/METADATA,sha256=33mzp1gSyNl5dsHOZQfSCs-ZC530hhC70nn-kXxxqBs,16373
|
|
32
|
+
tplinkrouterc6u-5.10.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
33
|
+
tplinkrouterc6u-5.10.0.dist-info/top_level.txt,sha256=1iSCCIueqgEkrTxtQ-jiHe99jAB10zqrVdBcwvNfe_M,21
|
|
34
|
+
tplinkrouterc6u-5.10.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|