python-kasa 0.6.2__py3-none-any.whl → 0.7.0.dev0__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.
Files changed (168) hide show
  1. kasa/__init__.py +88 -27
  2. kasa/aestransport.py +51 -34
  3. kasa/cli.py +326 -130
  4. kasa/device.py +406 -0
  5. kasa/device_factory.py +83 -44
  6. kasa/device_type.py +7 -3
  7. kasa/deviceconfig.py +16 -9
  8. kasa/discover.py +100 -81
  9. kasa/emeterstatus.py +12 -7
  10. kasa/exceptions.py +41 -26
  11. kasa/feature.py +201 -0
  12. kasa/httpclient.py +21 -14
  13. kasa/interfaces/__init__.py +16 -0
  14. kasa/interfaces/fan.py +20 -0
  15. kasa/interfaces/led.py +38 -0
  16. kasa/interfaces/light.py +133 -0
  17. kasa/interfaces/lighteffect.py +80 -0
  18. kasa/interfaces/lightpreset.py +76 -0
  19. kasa/iot/__init__.py +18 -0
  20. kasa/{effects.py → iot/effects.py} +4 -2
  21. kasa/{smartbulb.py → iot/iotbulb.py} +100 -147
  22. kasa/{smartdevice.py → iot/iotdevice.py} +157 -286
  23. kasa/{smartdimmer.py → iot/iotdimmer.py} +42 -33
  24. kasa/iot/iotlightstrip.py +71 -0
  25. kasa/{modules/module.py → iot/iotmodule.py} +22 -42
  26. kasa/iot/iotplug.py +94 -0
  27. kasa/{smartstrip.py → iot/iotstrip.py} +57 -75
  28. kasa/{modules → iot/modules}/__init__.py +10 -2
  29. kasa/{modules → iot/modules}/ambientlight.py +31 -3
  30. kasa/{modules → iot/modules}/antitheft.py +1 -0
  31. kasa/{modules → iot/modules}/cloud.py +25 -6
  32. kasa/{modules → iot/modules}/countdown.py +1 -0
  33. kasa/iot/modules/emeter.py +210 -0
  34. kasa/iot/modules/led.py +32 -0
  35. kasa/iot/modules/light.py +221 -0
  36. kasa/iot/modules/lighteffect.py +122 -0
  37. kasa/iot/modules/lightpreset.py +151 -0
  38. kasa/{modules → iot/modules}/motion.py +8 -8
  39. kasa/{modules → iot/modules}/rulemodule.py +11 -12
  40. kasa/{modules → iot/modules}/schedule.py +1 -0
  41. kasa/{modules → iot/modules}/time.py +5 -4
  42. kasa/{modules → iot/modules}/usage.py +10 -8
  43. kasa/iotprotocol.py +22 -20
  44. kasa/klaptransport.py +25 -15
  45. kasa/module.py +136 -0
  46. kasa/modulemapping.py +25 -0
  47. kasa/modulemapping.pyi +96 -0
  48. kasa/protocol.py +6 -4
  49. kasa/smart/__init__.py +6 -0
  50. kasa/smart/effects.py +429 -0
  51. kasa/smart/modules/__init__.py +57 -0
  52. kasa/smart/modules/alarm.py +142 -0
  53. kasa/smart/modules/autooff.py +96 -0
  54. kasa/smart/modules/batterysensor.py +54 -0
  55. kasa/smart/modules/brightness.py +66 -0
  56. kasa/smart/modules/childdevice.py +10 -0
  57. kasa/smart/modules/cloud.py +42 -0
  58. kasa/smart/modules/color.py +96 -0
  59. kasa/smart/modules/colortemperature.py +78 -0
  60. kasa/smart/modules/contactsensor.py +42 -0
  61. kasa/smart/modules/devicemodule.py +22 -0
  62. kasa/smart/modules/energy.py +101 -0
  63. kasa/smart/modules/fan.py +80 -0
  64. kasa/smart/modules/firmware.py +216 -0
  65. kasa/smart/modules/frostprotection.py +59 -0
  66. kasa/smart/modules/humiditysensor.py +55 -0
  67. kasa/smart/modules/led.py +49 -0
  68. kasa/smart/modules/light.py +139 -0
  69. kasa/smart/modules/lighteffect.py +115 -0
  70. kasa/smart/modules/lightpreset.py +142 -0
  71. kasa/smart/modules/lightstripeffect.py +135 -0
  72. kasa/smart/modules/lighttransition.py +183 -0
  73. kasa/smart/modules/reportmode.py +36 -0
  74. kasa/smart/modules/temperaturecontrol.py +177 -0
  75. kasa/smart/modules/temperaturesensor.py +77 -0
  76. kasa/smart/modules/time.py +57 -0
  77. kasa/smart/modules/waterleaksensor.py +66 -0
  78. kasa/smart/smartchilddevice.py +65 -0
  79. kasa/smart/smartdevice.py +653 -0
  80. kasa/smart/smartmodule.py +112 -0
  81. kasa/smartprotocol.py +107 -41
  82. kasa/tests/conftest.py +27 -551
  83. kasa/tests/device_fixtures.py +427 -0
  84. kasa/tests/discovery_fixtures.py +197 -0
  85. kasa/tests/{newfakes.py → fakeprotocol_iot.py} +61 -291
  86. kasa/tests/fakeprotocol_smart.py +318 -0
  87. kasa/tests/fixtureinfo.py +154 -0
  88. kasa/tests/fixtures/smart/H100(EU)_1.0_1.2.3.json +221 -0
  89. kasa/tests/fixtures/smart/H100(EU)_1.0_1.5.10.json +547 -0
  90. kasa/tests/fixtures/smart/H100(EU)_1.0_1.5.5.json +391 -0
  91. kasa/tests/fixtures/smart/KH100(UK)_1.0_1.5.6.json +1557 -0
  92. kasa/tests/fixtures/smart/KS240(US)_1.0_1.0.4.json +899 -0
  93. kasa/tests/fixtures/smart/KS240(US)_1.0_1.0.5.json +479 -0
  94. kasa/tests/fixtures/smart/L530E(EU)_3.0_1.1.6.json +449 -0
  95. kasa/tests/fixtures/smart/P100_1.0.0_1.1.3.json +173 -0
  96. kasa/tests/fixtures/smart/P100_1.0.0_1.4.0.json +204 -0
  97. kasa/tests/fixtures/smart/P110(EU)_1.0_1.0.7.json +566 -0
  98. kasa/tests/fixtures/smart/P300(EU)_1.0_1.0.13.json +13 -23
  99. kasa/tests/fixtures/smart/P300(EU)_1.0_1.0.7.json +6 -6
  100. kasa/tests/fixtures/smart/TP15(US)_1.0_1.0.3.json +295 -0
  101. kasa/tests/fixtures/smart/TP25(US)_1.0_1.0.2.json +423 -0
  102. kasa/tests/fixtures/smart/child/KE100(EU)_1.0_2.4.0.json +170 -0
  103. kasa/tests/fixtures/smart/child/KE100(EU)_1.0_2.8.0.json +171 -0
  104. kasa/tests/fixtures/smart/child/KE100(UK)_1.0_2.8.0.json +171 -0
  105. kasa/tests/fixtures/smart/child/T110(EU)_1.0_1.8.0.json +526 -0
  106. kasa/tests/fixtures/smart/child/T300(EU)_1.0_1.7.0.json +533 -0
  107. kasa/tests/fixtures/smart/child/T310(EU)_1.0_1.5.0.json +530 -0
  108. kasa/tests/fixtures/smart/child/T315(EU)_1.0_1.7.0.json +537 -0
  109. kasa/tests/smart/__init__.py +0 -0
  110. kasa/tests/smart/features/__init__.py +0 -0
  111. kasa/tests/smart/features/test_brightness.py +55 -0
  112. kasa/tests/smart/features/test_colortemp.py +30 -0
  113. kasa/tests/smart/modules/__init__.py +0 -0
  114. kasa/tests/smart/modules/test_contact.py +28 -0
  115. kasa/tests/smart/modules/test_fan.py +79 -0
  116. kasa/tests/smart/modules/test_firmware.py +108 -0
  117. kasa/tests/smart/modules/test_humidity.py +28 -0
  118. kasa/tests/smart/modules/test_light_effect.py +41 -0
  119. kasa/tests/smart/modules/test_temperature.py +47 -0
  120. kasa/tests/smart/modules/test_temperaturecontrol.py +137 -0
  121. kasa/tests/smart/modules/test_waterleak.py +42 -0
  122. kasa/tests/test_aestransport.py +115 -25
  123. kasa/tests/test_bulb.py +169 -86
  124. kasa/tests/test_childdevice.py +84 -0
  125. kasa/tests/test_cli.py +452 -100
  126. kasa/tests/test_common_modules.py +216 -0
  127. kasa/tests/test_device.py +268 -0
  128. kasa/tests/test_device_factory.py +61 -41
  129. kasa/tests/test_device_type.py +1 -1
  130. kasa/tests/test_deviceconfig.py +2 -5
  131. kasa/tests/test_dimmer.py +33 -24
  132. kasa/tests/test_discovery.py +112 -69
  133. kasa/tests/test_emeter.py +39 -12
  134. kasa/tests/test_feature.py +205 -0
  135. kasa/tests/test_httpclient.py +9 -9
  136. kasa/tests/test_iotdevice.py +286 -0
  137. kasa/tests/test_klapprotocol.py +94 -41
  138. kasa/tests/test_lightstrip.py +24 -19
  139. kasa/tests/test_plug.py +51 -9
  140. kasa/tests/test_protocol.py +8 -12
  141. kasa/tests/test_readme_examples.py +86 -27
  142. kasa/tests/test_smartdevice.py +211 -247
  143. kasa/tests/test_smartprotocol.py +129 -26
  144. kasa/tests/test_strip.py +15 -6
  145. kasa/tests/test_usage.py +1 -3
  146. kasa/xortransport.py +15 -12
  147. {python_kasa-0.6.2.dist-info → python_kasa-0.7.0.dev0.dist-info}/METADATA +45 -141
  148. python_kasa-0.7.0.dev0.dist-info/RECORD +239 -0
  149. {python_kasa-0.6.2.dist-info → python_kasa-0.7.0.dev0.dist-info}/WHEEL +1 -1
  150. kasa/modules/emeter.py +0 -111
  151. kasa/smartlightstrip.py +0 -143
  152. kasa/smartplug.py +0 -91
  153. kasa/tapo/__init__.py +0 -7
  154. kasa/tapo/childdevice.py +0 -44
  155. kasa/tapo/tapobulb.py +0 -262
  156. kasa/tapo/tapodevice.py +0 -383
  157. kasa/tapo/tapoplug.py +0 -45
  158. kasa/tests/fixtures/HS105(US)_1.0_mocked.json +0 -47
  159. kasa/tests/fixtures/HS110(EU)_2.0_mocked.json +0 -50
  160. kasa/tests/fixtures/HS110(US)_1.0_mocked.json +0 -50
  161. kasa/tests/fixtures/HS200(US)_1.0_mocked.json +0 -47
  162. kasa/tests/fixtures/HS220(US)_1.0_mocked.json +0 -75
  163. kasa/tests/fixtures/LB100(US)_1.0_mocked.json +0 -103
  164. kasa/tests/fixtures/LB120(US)_1.0_mocked.json +0 -103
  165. kasa/tests/fixtures/LB130(US)_1.0_mocked.json +0 -104
  166. python_kasa-0.6.2.dist-info/RECORD +0 -163
  167. {python_kasa-0.6.2.dist-info → python_kasa-0.7.0.dev0.dist-info}/LICENSE +0 -0
  168. {python_kasa-0.6.2.dist-info → python_kasa-0.7.0.dev0.dist-info}/entry_points.txt +0 -0
@@ -0,0 +1,899 @@
1
+ {
2
+ "child_devices": {
3
+ "SCRUBBED_CHILD_DEVICE_ID_1": {
4
+ "component_nego": {
5
+ "component_list": [
6
+ {
7
+ "id": "device",
8
+ "ver_code": 2
9
+ },
10
+ {
11
+ "id": "firmware",
12
+ "ver_code": 2
13
+ },
14
+ {
15
+ "id": "quick_setup",
16
+ "ver_code": 3
17
+ },
18
+ {
19
+ "id": "time",
20
+ "ver_code": 1
21
+ },
22
+ {
23
+ "id": "schedule",
24
+ "ver_code": 2
25
+ },
26
+ {
27
+ "id": "countdown",
28
+ "ver_code": 2
29
+ },
30
+ {
31
+ "id": "antitheft",
32
+ "ver_code": 1
33
+ },
34
+ {
35
+ "id": "account",
36
+ "ver_code": 1
37
+ },
38
+ {
39
+ "id": "synchronize",
40
+ "ver_code": 1
41
+ },
42
+ {
43
+ "id": "sunrise_sunset",
44
+ "ver_code": 1
45
+ },
46
+ {
47
+ "id": "cloud_connect",
48
+ "ver_code": 1
49
+ },
50
+ {
51
+ "id": "iot_cloud",
52
+ "ver_code": 1
53
+ },
54
+ {
55
+ "id": "device_local_time",
56
+ "ver_code": 1
57
+ },
58
+ {
59
+ "id": "default_states",
60
+ "ver_code": 1
61
+ },
62
+ {
63
+ "id": "brightness",
64
+ "ver_code": 1
65
+ },
66
+ {
67
+ "id": "preset",
68
+ "ver_code": 1
69
+ },
70
+ {
71
+ "id": "on_off_gradually",
72
+ "ver_code": 2
73
+ },
74
+ {
75
+ "id": "dimmer_calibration",
76
+ "ver_code": 1
77
+ },
78
+ {
79
+ "id": "overheat_protection",
80
+ "ver_code": 1
81
+ }
82
+ ]
83
+ },
84
+ "get_antitheft_rules": {
85
+ "antitheft_rule_max_count": 1,
86
+ "enable": false,
87
+ "rule_list": []
88
+ },
89
+ "get_connect_cloud_state": {
90
+ "status": 0
91
+ },
92
+ "get_countdown_rules": {
93
+ "countdown_rule_max_count": 1,
94
+ "enable": false,
95
+ "rule_list": []
96
+ },
97
+ "get_device_info": {
98
+ "avatar": "switch_ks240",
99
+ "bind_count": 1,
100
+ "brightness": 44,
101
+ "category": "kasa.switch.outlet.sub-dimmer",
102
+ "default_states": {
103
+ "re_power_type": "always_off",
104
+ "re_power_type_capability": [
105
+ "last_states",
106
+ "always_on",
107
+ "always_off"
108
+ ],
109
+ "type": "last_states"
110
+ },
111
+ "device_id": "SCRUBBED_CHILD_DEVICE_ID_1",
112
+ "device_on": true,
113
+ "fade_off_time": 5,
114
+ "fade_on_time": 5,
115
+ "fw_id": "00000000000000000000000000000000",
116
+ "fw_ver": "1.0.4 Build 230721 Rel.184322",
117
+ "gradually_off_mode": 0,
118
+ "gradually_on_mode": 0,
119
+ "has_set_location_info": true,
120
+ "hw_id": "00000000000000000000000000000000",
121
+ "hw_ver": "1.0",
122
+ "lang": "en_US",
123
+ "latitude": 0,
124
+ "led_off": 0,
125
+ "longitude": 0,
126
+ "mac": "F0A731000000",
127
+ "max_fade_off_time": 60,
128
+ "max_fade_on_time": 60,
129
+ "model": "KS240",
130
+ "nickname": "I01BU0tFRF9OQU1FIw==",
131
+ "oem_id": "00000000000000000000000000000000",
132
+ "on_off": 1,
133
+ "on_time": 67955,
134
+ "original_device_id": "0000000000000000000000000000000000000000",
135
+ "overheat_status": "normal",
136
+ "preset_state": [
137
+ {
138
+ "brightness": 100
139
+ },
140
+ {
141
+ "brightness": 75
142
+ },
143
+ {
144
+ "brightness": 50
145
+ },
146
+ {
147
+ "brightness": 25
148
+ },
149
+ {
150
+ "brightness": 1
151
+ }
152
+ ],
153
+ "region": "America/Chicago",
154
+ "specs": "",
155
+ "status_follow_edge": true,
156
+ "type": "SMART.KASASWITCH"
157
+ },
158
+ "get_device_usage": {
159
+ "time_usage": {
160
+ "past30": 41994,
161
+ "past7": 8874,
162
+ "today": 236
163
+ }
164
+ },
165
+ "get_next_event": {},
166
+ "get_on_off_gradually_info": {
167
+ "off_state": {
168
+ "duration": 5,
169
+ "enable": false,
170
+ "max_duration": 60
171
+ },
172
+ "on_state": {
173
+ "duration": 5,
174
+ "enable": false,
175
+ "max_duration": 60
176
+ }
177
+ },
178
+ "get_preset_rules": {
179
+ "brightness": [
180
+ 100,
181
+ 75,
182
+ 50,
183
+ 25,
184
+ 1
185
+ ]
186
+ },
187
+ "get_schedule_rules": {
188
+ "enable": false,
189
+ "rule_list": [],
190
+ "schedule_rule_max_count": 32,
191
+ "start_index": 0,
192
+ "sum": 0
193
+ }
194
+ },
195
+ "SCRUBBED_CHILD_DEVICE_ID_2": {
196
+ "component_nego": {
197
+ "component_list": [
198
+ {
199
+ "id": "device",
200
+ "ver_code": 2
201
+ },
202
+ {
203
+ "id": "firmware",
204
+ "ver_code": 2
205
+ },
206
+ {
207
+ "id": "quick_setup",
208
+ "ver_code": 3
209
+ },
210
+ {
211
+ "id": "time",
212
+ "ver_code": 1
213
+ },
214
+ {
215
+ "id": "schedule",
216
+ "ver_code": 2
217
+ },
218
+ {
219
+ "id": "countdown",
220
+ "ver_code": 2
221
+ },
222
+ {
223
+ "id": "account",
224
+ "ver_code": 1
225
+ },
226
+ {
227
+ "id": "synchronize",
228
+ "ver_code": 1
229
+ },
230
+ {
231
+ "id": "sunrise_sunset",
232
+ "ver_code": 1
233
+ },
234
+ {
235
+ "id": "cloud_connect",
236
+ "ver_code": 1
237
+ },
238
+ {
239
+ "id": "iot_cloud",
240
+ "ver_code": 1
241
+ },
242
+ {
243
+ "id": "device_local_time",
244
+ "ver_code": 1
245
+ },
246
+ {
247
+ "id": "fan_control",
248
+ "ver_code": 1
249
+ },
250
+ {
251
+ "id": "overheat_protection",
252
+ "ver_code": 1
253
+ }
254
+ ]
255
+ },
256
+ "get_connect_cloud_state": {
257
+ "status": 0
258
+ },
259
+ "get_countdown_rules": {
260
+ "countdown_rule_max_count": 1,
261
+ "enable": false,
262
+ "rule_list": []
263
+ },
264
+ "get_device_info": {
265
+ "avatar": "switch_ks240",
266
+ "bind_count": 1,
267
+ "category": "kasa.switch.outlet.sub-fan",
268
+ "device_id": "SCRUBBED_CHILD_DEVICE_ID_2",
269
+ "device_on": true,
270
+ "fan_sleep_mode_on": false,
271
+ "fan_speed_level": 4,
272
+ "fw_id": "00000000000000000000000000000000",
273
+ "fw_ver": "1.0.4 Build 230721 Rel.184322",
274
+ "has_set_location_info": true,
275
+ "hw_id": "00000000000000000000000000000000",
276
+ "hw_ver": "1.0",
277
+ "lang": "en_US",
278
+ "latitude": 0,
279
+ "longitude": 0,
280
+ "mac": "F0A731000000",
281
+ "model": "KS240",
282
+ "nickname": "I01BU0tFRF9OQU1FIw==",
283
+ "oem_id": "00000000000000000000000000000000",
284
+ "original_device_id": "0000000000000000000000000000000000000000",
285
+ "overheat_status": "normal",
286
+ "region": "America/Chicago",
287
+ "specs": "",
288
+ "status_follow_edge": true,
289
+ "type": "SMART.KASASWITCH"
290
+ },
291
+ "get_device_usage": {
292
+ "time_usage": {
293
+ "past30": 6786,
294
+ "past7": 6786,
295
+ "today": 236
296
+ }
297
+ },
298
+ "get_next_event": {},
299
+ "get_schedule_rules": {
300
+ "enable": false,
301
+ "rule_list": [],
302
+ "schedule_rule_max_count": 32,
303
+ "start_index": 0,
304
+ "sum": 0
305
+ }
306
+ }
307
+ },
308
+ "component_nego": {
309
+ "component_list": [
310
+ {
311
+ "id": "device",
312
+ "ver_code": 2
313
+ },
314
+ {
315
+ "id": "firmware",
316
+ "ver_code": 2
317
+ },
318
+ {
319
+ "id": "quick_setup",
320
+ "ver_code": 3
321
+ },
322
+ {
323
+ "id": "time",
324
+ "ver_code": 1
325
+ },
326
+ {
327
+ "id": "wireless",
328
+ "ver_code": 1
329
+ },
330
+ {
331
+ "id": "schedule",
332
+ "ver_code": 2
333
+ },
334
+ {
335
+ "id": "countdown",
336
+ "ver_code": 2
337
+ },
338
+ {
339
+ "id": "antitheft",
340
+ "ver_code": 1
341
+ },
342
+ {
343
+ "id": "account",
344
+ "ver_code": 1
345
+ },
346
+ {
347
+ "id": "synchronize",
348
+ "ver_code": 1
349
+ },
350
+ {
351
+ "id": "sunrise_sunset",
352
+ "ver_code": 1
353
+ },
354
+ {
355
+ "id": "led",
356
+ "ver_code": 2
357
+ },
358
+ {
359
+ "id": "cloud_connect",
360
+ "ver_code": 1
361
+ },
362
+ {
363
+ "id": "iot_cloud",
364
+ "ver_code": 1
365
+ },
366
+ {
367
+ "id": "device_local_time",
368
+ "ver_code": 1
369
+ },
370
+ {
371
+ "id": "default_states",
372
+ "ver_code": 1
373
+ },
374
+ {
375
+ "id": "control_child",
376
+ "ver_code": 2
377
+ },
378
+ {
379
+ "id": "child_device",
380
+ "ver_code": 2
381
+ },
382
+ {
383
+ "id": "localSmart",
384
+ "ver_code": 1
385
+ },
386
+ {
387
+ "id": "brightness",
388
+ "ver_code": 1
389
+ },
390
+ {
391
+ "id": "preset",
392
+ "ver_code": 1
393
+ },
394
+ {
395
+ "id": "on_off_gradually",
396
+ "ver_code": 2
397
+ },
398
+ {
399
+ "id": "dimmer_calibration",
400
+ "ver_code": 1
401
+ },
402
+ {
403
+ "id": "fan_control",
404
+ "ver_code": 1
405
+ },
406
+ {
407
+ "id": "homekit",
408
+ "ver_code": 2
409
+ },
410
+ {
411
+ "id": "overheat_protection",
412
+ "ver_code": 1
413
+ }
414
+ ]
415
+ },
416
+ "discovery_result": {
417
+ "device_id": "00000000000000000000000000000000",
418
+ "device_model": "KS240(US)",
419
+ "device_type": "SMART.KASASWITCH",
420
+ "factory_default": false,
421
+ "ip": "127.0.0.123",
422
+ "is_support_iot_cloud": true,
423
+ "mac": "F0-A7-31-00-00-00",
424
+ "mgt_encrypt_schm": {
425
+ "encrypt_type": "AES",
426
+ "http_port": 80,
427
+ "is_support_https": false,
428
+ "lv": 2
429
+ },
430
+ "obd_src": "tplink",
431
+ "owner": "00000000000000000000000000000000"
432
+ },
433
+ "get_auto_update_info": {
434
+ "enable": false,
435
+ "random_range": 120,
436
+ "time": 180
437
+ },
438
+ "get_child_device_component_list": {
439
+ "child_component_list": [
440
+ {
441
+ "component_list": [
442
+ {
443
+ "id": "device",
444
+ "ver_code": 2
445
+ },
446
+ {
447
+ "id": "firmware",
448
+ "ver_code": 2
449
+ },
450
+ {
451
+ "id": "quick_setup",
452
+ "ver_code": 3
453
+ },
454
+ {
455
+ "id": "time",
456
+ "ver_code": 1
457
+ },
458
+ {
459
+ "id": "schedule",
460
+ "ver_code": 2
461
+ },
462
+ {
463
+ "id": "countdown",
464
+ "ver_code": 2
465
+ },
466
+ {
467
+ "id": "antitheft",
468
+ "ver_code": 1
469
+ },
470
+ {
471
+ "id": "account",
472
+ "ver_code": 1
473
+ },
474
+ {
475
+ "id": "synchronize",
476
+ "ver_code": 1
477
+ },
478
+ {
479
+ "id": "sunrise_sunset",
480
+ "ver_code": 1
481
+ },
482
+ {
483
+ "id": "cloud_connect",
484
+ "ver_code": 1
485
+ },
486
+ {
487
+ "id": "iot_cloud",
488
+ "ver_code": 1
489
+ },
490
+ {
491
+ "id": "device_local_time",
492
+ "ver_code": 1
493
+ },
494
+ {
495
+ "id": "default_states",
496
+ "ver_code": 1
497
+ },
498
+ {
499
+ "id": "brightness",
500
+ "ver_code": 1
501
+ },
502
+ {
503
+ "id": "preset",
504
+ "ver_code": 1
505
+ },
506
+ {
507
+ "id": "on_off_gradually",
508
+ "ver_code": 2
509
+ },
510
+ {
511
+ "id": "dimmer_calibration",
512
+ "ver_code": 1
513
+ },
514
+ {
515
+ "id": "overheat_protection",
516
+ "ver_code": 1
517
+ }
518
+ ],
519
+ "device_id": "SCRUBBED_CHILD_DEVICE_ID_1"
520
+ },
521
+ {
522
+ "component_list": [
523
+ {
524
+ "id": "device",
525
+ "ver_code": 2
526
+ },
527
+ {
528
+ "id": "firmware",
529
+ "ver_code": 2
530
+ },
531
+ {
532
+ "id": "quick_setup",
533
+ "ver_code": 3
534
+ },
535
+ {
536
+ "id": "time",
537
+ "ver_code": 1
538
+ },
539
+ {
540
+ "id": "schedule",
541
+ "ver_code": 2
542
+ },
543
+ {
544
+ "id": "countdown",
545
+ "ver_code": 2
546
+ },
547
+ {
548
+ "id": "account",
549
+ "ver_code": 1
550
+ },
551
+ {
552
+ "id": "synchronize",
553
+ "ver_code": 1
554
+ },
555
+ {
556
+ "id": "sunrise_sunset",
557
+ "ver_code": 1
558
+ },
559
+ {
560
+ "id": "cloud_connect",
561
+ "ver_code": 1
562
+ },
563
+ {
564
+ "id": "iot_cloud",
565
+ "ver_code": 1
566
+ },
567
+ {
568
+ "id": "device_local_time",
569
+ "ver_code": 1
570
+ },
571
+ {
572
+ "id": "fan_control",
573
+ "ver_code": 1
574
+ },
575
+ {
576
+ "id": "overheat_protection",
577
+ "ver_code": 1
578
+ }
579
+ ],
580
+ "device_id": "SCRUBBED_CHILD_DEVICE_ID_2"
581
+ }
582
+ ],
583
+ "start_index": 0,
584
+ "sum": 2
585
+ },
586
+ "get_child_device_list": {
587
+ "child_device_list": [
588
+ {
589
+ "avatar": "switch_ks240",
590
+ "bind_count": 1,
591
+ "category": "kasa.switch.outlet.sub-fan",
592
+ "device_id": "SCRUBBED_CHILD_DEVICE_ID_2",
593
+ "device_on": true,
594
+ "fan_sleep_mode_on": false,
595
+ "fan_speed_level": 4,
596
+ "fw_id": "00000000000000000000000000000000",
597
+ "fw_ver": "1.0.4 Build 230721 Rel.184322",
598
+ "has_set_location_info": true,
599
+ "hw_id": "00000000000000000000000000000000",
600
+ "hw_ver": "1.0",
601
+ "lang": "en_US",
602
+ "latitude": 0,
603
+ "longitude": 0,
604
+ "mac": "F0A731000000",
605
+ "model": "KS240",
606
+ "nickname": "I01BU0tFRF9OQU1FIw==",
607
+ "oem_id": "00000000000000000000000000000000",
608
+ "original_device_id": "0000000000000000000000000000000000000000",
609
+ "overheat_status": "normal",
610
+ "region": "America/Chicago",
611
+ "specs": "",
612
+ "status_follow_edge": true,
613
+ "type": "SMART.KASASWITCH"
614
+ },
615
+ {
616
+ "avatar": "switch_ks240",
617
+ "bind_count": 1,
618
+ "brightness": 44,
619
+ "category": "kasa.switch.outlet.sub-dimmer",
620
+ "default_states": {
621
+ "re_power_type": "always_off",
622
+ "re_power_type_capability": [
623
+ "last_states",
624
+ "always_on",
625
+ "always_off"
626
+ ],
627
+ "type": "last_states"
628
+ },
629
+ "device_id": "SCRUBBED_CHILD_DEVICE_ID_1",
630
+ "device_on": true,
631
+ "fade_off_time": 5,
632
+ "fade_on_time": 5,
633
+ "fw_id": "00000000000000000000000000000000",
634
+ "fw_ver": "1.0.4 Build 230721 Rel.184322",
635
+ "gradually_off_mode": 0,
636
+ "gradually_on_mode": 0,
637
+ "has_set_location_info": true,
638
+ "hw_id": "00000000000000000000000000000000",
639
+ "hw_ver": "1.0",
640
+ "lang": "en_US",
641
+ "latitude": 0,
642
+ "led_off": 0,
643
+ "longitude": 0,
644
+ "mac": "F0A731000000",
645
+ "max_fade_off_time": 60,
646
+ "max_fade_on_time": 60,
647
+ "model": "KS240",
648
+ "nickname": "I01BU0tFRF9OQU1FIw==",
649
+ "oem_id": "00000000000000000000000000000000",
650
+ "on_off": 1,
651
+ "on_time": 67951,
652
+ "original_device_id": "0000000000000000000000000000000000000000",
653
+ "overheat_status": "normal",
654
+ "preset_state": [
655
+ {
656
+ "brightness": 100
657
+ },
658
+ {
659
+ "brightness": 75
660
+ },
661
+ {
662
+ "brightness": 50
663
+ },
664
+ {
665
+ "brightness": 25
666
+ },
667
+ {
668
+ "brightness": 1
669
+ }
670
+ ],
671
+ "region": "America/Chicago",
672
+ "specs": "",
673
+ "status_follow_edge": true,
674
+ "type": "SMART.KASASWITCH"
675
+ }
676
+ ],
677
+ "start_index": 0,
678
+ "sum": 2
679
+ },
680
+ "get_connect_cloud_state": {
681
+ "status": 0
682
+ },
683
+ "get_device_info": {
684
+ "avatar": "",
685
+ "device_id": "0000000000000000000000000000000000000000",
686
+ "fw_id": "00000000000000000000000000000000",
687
+ "fw_ver": "1.0.4 Build 230721 Rel.184322",
688
+ "has_set_location_info": true,
689
+ "hw_id": "00000000000000000000000000000000",
690
+ "hw_ver": "1.0",
691
+ "ip": "127.0.0.123",
692
+ "lang": "en_US",
693
+ "latitude": 0,
694
+ "longitude": 0,
695
+ "mac": "F0-A7-31-00-00-00",
696
+ "model": "KS240",
697
+ "nickname": "I01BU0tFRF9OQU1FIw==",
698
+ "oem_id": "00000000000000000000000000000000",
699
+ "region": "America/Chicago",
700
+ "rssi": -37,
701
+ "signal_level": 3,
702
+ "specs": "",
703
+ "ssid": "I01BU0tFRF9TU0lEIw==",
704
+ "time_diff": -360,
705
+ "type": "SMART.KASASWITCH"
706
+ },
707
+ "get_device_time": {
708
+ "region": "America/Chicago",
709
+ "time_diff": -360,
710
+ "timestamp": 1714553757
711
+ },
712
+ "get_fw_download_state": {
713
+ "auto_upgrade": false,
714
+ "download_progress": 0,
715
+ "reboot_time": 5,
716
+ "status": 0,
717
+ "upgrade_time": 5
718
+ },
719
+ "get_homekit_info": {
720
+ "mfi_setup_code": "000-00-000",
721
+ "mfi_setup_id": "0000",
722
+ "mfi_token_token": "0000000000000000000000000000000000/00000000000000000000000/00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000+00000000000000000=",
723
+ "mfi_token_uuid": "00000000-0000-0000-0000-000000000000"
724
+ },
725
+ "get_latest_fw": {
726
+ "fw_size": 786432,
727
+ "fw_ver": "1.0.5 Build 231204 Rel.172150",
728
+ "hw_id": "00000000000000000000000000000000",
729
+ "need_to_upgrade": true,
730
+ "oem_id": "00000000000000000000000000000000",
731
+ "release_date": "2024-01-12",
732
+ "release_note": "Modifications and Bug Fixes:\n1. Improved time synchronization accuracy.\n2. Enhanced stability and performance.\n3. Fixed some minor bugs.",
733
+ "type": 2
734
+ },
735
+ "get_led_info": {
736
+ "bri_config": {
737
+ "bri_type": "overall",
738
+ "overall_bri": 50
739
+ },
740
+ "led_rule": "auto",
741
+ "led_status": false,
742
+ "night_mode": {
743
+ "end_time": 420,
744
+ "night_mode_type": "custom",
745
+ "start_time": 1320
746
+ }
747
+ },
748
+ "get_wireless_scan_info": {
749
+ "ap_list": [
750
+ {
751
+ "bssid": "000000000000",
752
+ "channel": 0,
753
+ "cipher_type": 2,
754
+ "key_type": "wpa2_psk",
755
+ "signal_level": 3,
756
+ "ssid": "I01BU0tFRF9TU0lEIw=="
757
+ },
758
+ {
759
+ "bssid": "000000000000",
760
+ "channel": 0,
761
+ "cipher_type": 2,
762
+ "key_type": "wpa2_psk",
763
+ "signal_level": 3,
764
+ "ssid": "I01BU0tFRF9TU0lEIw=="
765
+ },
766
+ {
767
+ "bssid": "000000000000",
768
+ "channel": 0,
769
+ "cipher_type": 2,
770
+ "key_type": "wpa2_psk",
771
+ "signal_level": 2,
772
+ "ssid": "I01BU0tFRF9TU0lEIw=="
773
+ },
774
+ {
775
+ "bssid": "000000000000",
776
+ "channel": 0,
777
+ "cipher_type": 2,
778
+ "key_type": "wpa2_psk",
779
+ "signal_level": 2,
780
+ "ssid": "I01BU0tFRF9TU0lEIw=="
781
+ },
782
+ {
783
+ "bssid": "000000000000",
784
+ "channel": 0,
785
+ "cipher_type": 2,
786
+ "key_type": "wpa2_psk",
787
+ "signal_level": 2,
788
+ "ssid": "I01BU0tFRF9TU0lEIw=="
789
+ },
790
+ {
791
+ "bssid": "000000000000",
792
+ "channel": 0,
793
+ "cipher_type": 2,
794
+ "key_type": "wpa2_psk",
795
+ "signal_level": 2,
796
+ "ssid": "I01BU0tFRF9TU0lEIw=="
797
+ },
798
+ {
799
+ "bssid": "000000000000",
800
+ "channel": 0,
801
+ "cipher_type": 2,
802
+ "key_type": "wpa2_psk",
803
+ "signal_level": 1,
804
+ "ssid": "I01BU0tFRF9TU0lEIw=="
805
+ },
806
+ {
807
+ "bssid": "000000000000",
808
+ "channel": 0,
809
+ "cipher_type": 2,
810
+ "key_type": "wpa2_psk",
811
+ "signal_level": 1,
812
+ "ssid": "I01BU0tFRF9TU0lEIw=="
813
+ },
814
+ {
815
+ "bssid": "000000000000",
816
+ "channel": 0,
817
+ "cipher_type": 2,
818
+ "key_type": "wpa2_psk",
819
+ "signal_level": 1,
820
+ "ssid": "I01BU0tFRF9TU0lEIw=="
821
+ },
822
+ {
823
+ "bssid": "000000000000",
824
+ "channel": 0,
825
+ "cipher_type": 2,
826
+ "key_type": "wpa2_psk",
827
+ "signal_level": 1,
828
+ "ssid": "I01BU0tFRF9TU0lEIw=="
829
+ },
830
+ {
831
+ "bssid": "000000000000",
832
+ "channel": 0,
833
+ "cipher_type": 2,
834
+ "key_type": "wpa2_psk",
835
+ "signal_level": 1,
836
+ "ssid": "I01BU0tFRF9TU0lEIw=="
837
+ },
838
+ {
839
+ "bssid": "000000000000",
840
+ "channel": 0,
841
+ "cipher_type": 2,
842
+ "key_type": "wpa2_psk",
843
+ "signal_level": 1,
844
+ "ssid": "I01BU0tFRF9TU0lEIw=="
845
+ },
846
+ {
847
+ "bssid": "000000000000",
848
+ "channel": 0,
849
+ "cipher_type": 2,
850
+ "key_type": "wpa2_psk",
851
+ "signal_level": 1,
852
+ "ssid": "I01BU0tFRF9TU0lEIw=="
853
+ }
854
+ ],
855
+ "start_index": 0,
856
+ "sum": 13,
857
+ "wep_supported": false
858
+ },
859
+ "qs_component_nego": {
860
+ "component_list": [
861
+ {
862
+ "id": "quick_setup",
863
+ "ver_code": 3
864
+ },
865
+ {
866
+ "id": "sunrise_sunset",
867
+ "ver_code": 1
868
+ },
869
+ {
870
+ "id": "ble_whole_setup",
871
+ "ver_code": 1
872
+ },
873
+ {
874
+ "id": "iot_cloud",
875
+ "ver_code": 1
876
+ },
877
+ {
878
+ "id": "inherit",
879
+ "ver_code": 1
880
+ },
881
+ {
882
+ "id": "firmware",
883
+ "ver_code": 2
884
+ },
885
+ {
886
+ "id": "control_child",
887
+ "ver_code": 2
888
+ },
889
+ {
890
+ "id": "child_device",
891
+ "ver_code": 2
892
+ }
893
+ ],
894
+ "extra_info": {
895
+ "device_model": "KS240",
896
+ "device_type": "SMART.KASASWITCH"
897
+ }
898
+ }
899
+ }