8000 dump_devinfo: query smartlife.iot.common.cloud for fw updates (#1284) · ryenitcher/python-kasa@bbe68a5 · GitHub
[go: up one dir, main page]

Skip to content

Commit bbe68a5

Browse files
authored
dump_devinfo: query smartlife.iot.common.cloud for fw updates (python-kasa#1284)
1 parent 999e84d commit bbe68a5

File tree

2 files changed

+77
-10
lines changed

2 files changed

+77
-10
lines changed

devtools/dump_devinfo.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -401,6 +401,8 @@ async def get_legacy_fixture(
401401
Call(module="emeter", method="get_realtime"),
402402
Call(module="cnCloud", method="get_info"),
403403
Call(module="cnCloud", method="get_intl_fw_list"),
404+
Call(module="smartlife.iot.common.cloud", method="get_info"),
405+
Call(module="smartlife.iot.common.cloud", method="get_intl_fw_list"),
404406
Call(module="smartlife.iot.common.schedule", method="get_next_action"),
405407
Call(module="smartlife.iot.common.schedule", method="get_rules"),
406408
Call(module="schedule", method="get_next_action"),

tests/fixtures/KL130(EU)_1.0_1.8.8.json

Lines changed: 75 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,79 @@
11
{
2+
"smartlife.iot.common.cloud": {
3+
"get_info": {
4+
"binded": 1,
5+
"cld_connection": 1,
6+
"err_code": 0,
7+
"fwDlPage": "",
8+
"fwNotifyType": 0,
9+
"illegalType": 0,
10+
"server": "n-devs.tplinkcloud.com",
11+
"stopConnect": 0,
12+
"tcspInfo": "",
13+
"tcspStatus": 1,
14+
"username": "#MASKED_NAME#"
15+
},
16+
"get_intl_fw_list": {
17+
"err_code": 0,
18+
"fw_list": [
19+
{
20+
"fwLocation": 0,
21+
"fwReleaseDate": "2019-11-27",
22+
"fwReleaseLog": "New Features/Enhancements:\n1. Added the offset feature when scheduling sunset/sunrise.\n2. Improved the overall performance of schedule feature.",
23+
"fwReleaseLogUrl": "undefined yet",
24+
"fwTitle": "Hi, a new firmware with bug fixes is available for your product.",
25+
"fwType": 0,
26+
"fwUrl": "http://download.tplinkcloud.com/firmware/smartBulb_FCC_1.8.11_Build_191113_Rel.105336__1574839035801.bin",
27+
"fwVer": "1.8.11 Build 191113 Rel.105336"
28+
}
29+
]
30+
}
31+
},
232
"smartlife.iot.common.emeter": {
333
"get_realtime": {
434
"err_code": 0,
5-
"power_mw": 2500
35+
"power_mw": 10800
36+
}
37+
},
38+
"smartlife.iot.common.schedule": {
39+
"get_next_action": {
40+
"err_code": 0,
41+
"type": -1
42+
},
43+
"get_rules": {
44+
"enable": 1,
45+
"err_code": 0,
46+
"rule_list": []
647
}
748
},
849
"smartlife.iot.smartbulb.lightingservice": {
50+
"get_default_behavior": {
51+
"err_code": 0,
52+
"hard_on": {
53+
"mode": "circadian"
54+
},
55+
"soft_on": {
56+
"brightness": 50,
57+
"color_temp": 2700,
58+
"hue": 0,
59+
"index": 0,
60+
"mode": "customize_preset",
61+
"saturation": 0
62+
}
63+
},
64+
"get_light_details": {
65+
"color_rendering_index": 80,
66+
"err_code": 0,
67+
"incandescent_equivalent": 60,
68+
"lamp_beam_angle": 150,
69+
"max_lumens": 800,
70+
"max_voltage": 120,
71+
"min_voltage": 110,
72+
"wattage": 10
73+
},
974
"get_light_state": {
10-
"brightness": 17,
11-
"color_temp": 2500,
75+
"brightness": 100,
76+
"color_temp": 2700,
1277
"err_code": 0,
1378
"hue": 0,
1479
"mode": "normal",
@@ -29,16 +94,16 @@
2994
"deviceId": "0000000000000000000000000000000000000000",
3095
"disco_ver": "1.0",
3196
"err_code": 0,
32-
"heapsize": 334708,
97+
"heapsize": 308144,
3398
"hwId": "00000000000000000000000000000000",
3499
"hw_ver": "1.0",
35100
"is_color": 1,
36101
"is_dimmable": 1,
37102
"is_factory": false,
38103
"is_variable_color_temp": 1,
39104
"light_state": {
40-
"brightness": 17,
41-
"color_temp": 2500,
105+
"brightness": 100,
106+
"color_temp": 2700,
42107
"hue": 0,
43108
"mode": "normal",
44109
"on_off": 1,
@@ -51,17 +116,17 @@
51116
"preferred_state": [
52117
{
53118
"brightness": 50,
54-
"color_temp": 2500,
119+
"color_temp": 2700,
55120
"hue": 0,
56121
"index": 0,
57122
"saturation": 0
58123
},
59124
{
60-
"brightness": 100,
125+
"brightness": 20,
61126
"color_temp": 0,
62-
"hue": 299,
127+
"hue": 0,
63128
"index": 1,
64-
"saturation": 95
129+
"saturation": 75
65130
},
66131
{
67132
"brightness": 100,

0 commit comments

Comments
 (0)
0