FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
python-kasa/devtools/bench/utils/data.py at master · python-kasa/python-kasa · GitHub
python-kasa
python-kasa
Repository navigation
Code
Issues
56
(56)
Pull requests
38
(38)
Discussions
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
python-kasa
/
devtools
/
bench
/
utils
/
data.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
140 lines (136 loc) · 4.48 KB
Breadcrumbs
python-kasa
/
devtools
/
bench
/
utils
/
data.py
Copy path
File metadata and controls
140 lines (136 loc) · 4.48 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
"""Test data for benchmarks."""
import
json
from
.
original
import
OriginalTPLinkSmartHomeProtocol
REQUEST
=
{
"system"
: {
"get_sysinfo"
:
None
},
"anti_theft"
: {
"get_rules"
:
None
,
"get_next_action"
:
None
},
"schedule"
: {
"get_rules"
:
None
,
"get_next_action"
:
None
,
"get_realtime"
:
None
,
"get_daystat"
: {
"year"
:
2023
,
"month"
:
6
},
"get_monthstat"
: {
"year"
:
2023
},
},
"time"
: {
"get_time"
:
None
,
"get_timezone"
:
None
},
"emeter"
: {
"get_realtime"
:
None
,
"get_daystat"
: {
"year"
:
2023
,
"month"
:
6
},
"get_monthstat"
: {
"year"
:
2023
},
},
}
RESPONSE
=
{
"anti_theft"
: {
"get_next_action"
: {
"err_code"
:
-
2
,
"err_msg"
:
"member not support"
},
"get_rules"
: {
"enable"
:
0
,
"err_code"
:
0
,
"rule_list"
: [],
"version"
:
2
},
},
"emeter"
: {
"get_daystat"
: {
"day_list"
: [{
"day"
:
30
,
"energy_wh"
:
0
,
"month"
:
6
,
"year"
:
2023
}],
"err_code"
:
0
,
},
"get_monthstat"
: {
"err_code"
:
0
,
"month_list"
: [{
"energy_wh"
:
0
,
"month"
:
6
,
"year"
:
2023
}],
},
"get_realtime"
: {
"current_ma"
:
0
,
"err_code"
:
0
,
"power_mw"
:
0
,
"slot_id"
:
0
,
"total_wh"
:
0
,
"voltage_mv"
:
119390
,
},
},
"schedule"
: {
"get_daystat"
: {
"day_list"
: [{
"day"
:
30
,
"month"
:
6
,
"time"
:
3
,
"year"
:
2023
}],
"err_code"
:
0
,
},
"get_monthstat"
: {
"err_code"
:
0
,
"month_list"
: [{
"month"
:
6
,
"time"
:
3
,
"year"
:
2023
}],
},
"get_next_action"
: {
"err_code"
:
0
,
"type"
:
-
1
},
"get_realtime"
: {
"err_code"
:
-
2
,
"err_msg"
:
"member not support"
},
"get_rules"
: {
"enable"
:
1
,
"err_code"
:
0
,
"rule_list"
: [],
"version"
:
2
},
},
"system"
: {
"get_sysinfo"
: {
"alias"
:
"TP-LINK_Power Strip_5C33"
,
"child_num"
:
6
,
"children"
: [
{
"alias"
:
"Plug 1"
,
"id"
:
"8006AF35494E7DB13DDE9B8F40BF2E001E77031900"
,
"next_action"
: {
"type"
:
-
1
},
"on_time"
:
231
,
"state"
:
1
,
},
{
"alias"
:
"Plug 2"
,
"id"
:
"8006AF35494E7DB13DDE9B8F40BF2E001E77031901"
,
"next_action"
: {
"type"
:
-
1
},
"on_time"
:
231
,
"state"
:
1
,
},
{
"alias"
:
"Plug 3"
,
"id"
:
"8006AF35494E7DB13DDE9B8F40BF2E001E77031902"
,
"next_action"
: {
"type"
:
-
1
},
"on_time"
:
231
,
"state"
:
1
,
},
{
"alias"
:
"Plug 4"
,
"id"
:
"8006AF35494E7DB13DDE9B8F40BF2E001E77031903"
,
"next_action"
: {
"type"
:
-
1
},
"on_time"
:
231
,
"state"
:
1
,
},
{
"alias"
:
"Plug 5"
,
"id"
:
"8006AF35494E7DB13DDE9B8F40BF2E001E77031904"
,
"next_action"
: {
"type"
:
-
1
},
"on_time"
:
231
,
"state"
:
1
,
},
{
"alias"
:
"Plug 6"
,
"id"
:
"8006AF35494E7DB13DDE9B8F40BF2E001E77031905"
,
"next_action"
: {
"type"
:
-
1
},
"on_time"
:
231
,
"state"
:
1
,
},
],
"deviceId"
:
"8006AF35494E7DB13DDE9B8F40BF2E001E770319"
,
"err_code"
:
0
,
"feature"
:
"TIM:ENE"
,
"hwId"
:
"955F433CBA24823A248A59AA64571A73"
,
"hw_ver"
:
"2.0"
,
"latitude_i"
:
297852
,
"led_off"
:
0
,
"longitude_i"
:
-
954074
,
"mac"
:
"C0:06:C3:42:5C:33"
,
"mic_type"
:
"IOT.SMARTPLUGSWITCH"
,
"model"
:
"HS300(US)"
,
"oemId"
:
"32BD0B21AA9BF8E84737D1DB1C66E883"
,
"rssi"
:
-
41
,
"status"
:
"new"
,
"sw_ver"
:
"1.0.3 Build 201203 Rel.165457"
,
"updating"
:
0
,
}
},
"time"
: {
"get_time"
: {
"err_code"
:
0
,
"hour"
:
9
,
"mday"
:
30
,
"min"
:
32
,
"month"
:
6
,
"sec"
:
54
,
"year"
:
2023
,
},
"get_timezone"
: {
"err_code"
:
0
,
"index"
:
13
},
},
}
WIRE_RESPONSE
=
OriginalTPLinkSmartHomeProtocol
.
encrypt
(
json
.
dumps
(
RESPONSE
))
Back
|
FazBrowse Home
|
New Git URL