wyzeapy 0.5.28__py3-none-any.whl → 0.5.30__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.
- wyzeapy/__init__.py +277 -45
- wyzeapy/const.py +9 -4
- wyzeapy/crypto.py +31 -2
- wyzeapy/exceptions.py +11 -8
- wyzeapy/payload_factory.py +205 -170
- wyzeapy/services/__init__.py +3 -0
- wyzeapy/services/base_service.py +406 -212
- wyzeapy/services/bulb_service.py +67 -63
- wyzeapy/services/camera_service.py +136 -50
- wyzeapy/services/hms_service.py +8 -17
- wyzeapy/services/irrigation_service.py +189 -0
- wyzeapy/services/lock_service.py +5 -3
- wyzeapy/services/sensor_service.py +32 -11
- wyzeapy/services/switch_service.py +6 -2
- wyzeapy/services/thermostat_service.py +29 -15
- wyzeapy/services/update_manager.py +38 -11
- wyzeapy/services/wall_switch_service.py +18 -8
- wyzeapy/tests/test_irrigation_service.py +536 -0
- wyzeapy/types.py +29 -12
- wyzeapy/utils.py +98 -17
- wyzeapy/wyze_auth_lib.py +195 -37
- wyzeapy-0.5.30.dist-info/METADATA +13 -0
- wyzeapy-0.5.30.dist-info/RECORD +24 -0
- {wyzeapy-0.5.28.dist-info → wyzeapy-0.5.30.dist-info}/WHEEL +1 -1
- wyzeapy/tests/test_bulb_service.py +0 -135
- wyzeapy/tests/test_camera_service.py +0 -180
- wyzeapy/tests/test_hms_service.py +0 -90
- wyzeapy/tests/test_lock_service.py +0 -114
- wyzeapy/tests/test_sensor_service.py +0 -159
- wyzeapy/tests/test_switch_service.py +0 -138
- wyzeapy/tests/test_thermostat_service.py +0 -136
- wyzeapy/tests/test_wall_switch_service.py +0 -161
- wyzeapy-0.5.28.dist-info/LICENSES/GPL-3.0-only.txt +0 -232
- wyzeapy-0.5.28.dist-info/METADATA +0 -16
- wyzeapy-0.5.28.dist-info/RECORD +0 -31
wyzeapy/payload_factory.py
CHANGED
|
@@ -9,9 +9,26 @@ from typing import Any, Dict
|
|
|
9
9
|
from .const import FORD_APP_KEY
|
|
10
10
|
from .crypto import ford_create_signature
|
|
11
11
|
|
|
12
|
+
"""
|
|
13
|
+
Factory functions for constructing payloads for various Wyze API endpoints.
|
|
14
|
+
"""
|
|
12
15
|
|
|
13
|
-
|
|
14
|
-
|
|
16
|
+
|
|
17
|
+
def ford_create_payload(
|
|
18
|
+
access_token: str, payload: Dict[str, Any], url_path: str, request_method: str
|
|
19
|
+
) -> Dict[str, Any]:
|
|
20
|
+
"""
|
|
21
|
+
Create a payload for ford (lock) API requests, including signing parameters.
|
|
22
|
+
|
|
23
|
+
Args:
|
|
24
|
+
access_token: User access token string.
|
|
25
|
+
payload: The base payload dictionary to augment.
|
|
26
|
+
url_path: The URL path for signature computation.
|
|
27
|
+
request_method: HTTP method (e.g., 'GET', 'POST').
|
|
28
|
+
|
|
29
|
+
Returns:
|
|
30
|
+
The augmented payload dict with authentication and signature.
|
|
31
|
+
"""
|
|
15
32
|
payload["access_token"] = access_token
|
|
16
33
|
payload["key"] = FORD_APP_KEY
|
|
17
34
|
payload["timestamp"] = str(int(time.time() * 1000))
|
|
@@ -20,114 +37,184 @@ def ford_create_payload(access_token: str, payload: Dict[str, Any],
|
|
|
20
37
|
|
|
21
38
|
|
|
22
39
|
def olive_create_get_payload(device_mac: str, keys: str) -> Dict[str, Any]:
|
|
40
|
+
"""
|
|
41
|
+
Build a GET payload for olive (Wyze) API property retrieval.
|
|
42
|
+
|
|
43
|
+
Args:
|
|
44
|
+
device_mac: The MAC address of the device.
|
|
45
|
+
keys: Comma-separated property keys to retrieve.
|
|
46
|
+
|
|
47
|
+
Returns:
|
|
48
|
+
Payload dict including keys, device ID, and timestamp nonce.
|
|
49
|
+
"""
|
|
50
|
+
nonce = int(time.time() * 1000)
|
|
51
|
+
|
|
52
|
+
return {"keys": keys, "did": device_mac, "nonce": nonce}
|
|
53
|
+
|
|
54
|
+
def olive_create_get_payload_irrigation(device_mac: str) -> Dict[str, Any]:
|
|
55
|
+
nonce = int(time.time() * 1000)
|
|
56
|
+
|
|
57
|
+
return {
|
|
58
|
+
'device_id': device_mac,
|
|
59
|
+
'nonce': str(nonce)
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
def olive_create_post_payload_irrigation_stop(device_mac: str, action: str) -> Dict[str, Any]:
|
|
23
63
|
nonce = int(time.time() * 1000)
|
|
24
64
|
|
|
25
65
|
return {
|
|
26
|
-
'
|
|
27
|
-
'
|
|
28
|
-
|
|
66
|
+
'device_id': device_mac,
|
|
67
|
+
'nonce': str(nonce),
|
|
68
|
+
"action": action
|
|
29
69
|
}
|
|
30
70
|
|
|
71
|
+
def olive_create_post_payload_irrigation_quickrun(device_mac: str, zone_number: int, duration: int) -> Dict[str, Any]:
|
|
72
|
+
nonce = int(time.time() * 1000)
|
|
31
73
|
|
|
32
|
-
|
|
74
|
+
return {
|
|
75
|
+
'device_id': device_mac,
|
|
76
|
+
'nonce': str(nonce),
|
|
77
|
+
"zone_runs": [
|
|
78
|
+
{
|
|
79
|
+
"zone_number": zone_number,
|
|
80
|
+
"duration": duration
|
|
81
|
+
}
|
|
82
|
+
]
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
def olive_create_post_payload(
|
|
86
|
+
device_mac: str, device_model: str, prop_key: str, value: Any
|
|
87
|
+
) -> Dict[str, Any]:
|
|
88
|
+
"""
|
|
89
|
+
Build a POST payload for olive (Wyze) API property update.
|
|
90
|
+
|
|
91
|
+
Args:
|
|
92
|
+
device_mac: The MAC address of the device.
|
|
93
|
+
device_model: The model identifier of the device.
|
|
94
|
+
prop_key: The property key to set.
|
|
95
|
+
value: The property value to write.
|
|
96
|
+
|
|
97
|
+
Returns:
|
|
98
|
+
Payload dict for setting a single device property.
|
|
99
|
+
"""
|
|
33
100
|
nonce = int(time.time() * 1000)
|
|
34
101
|
|
|
35
102
|
return {
|
|
36
103
|
"did": device_mac,
|
|
37
104
|
"model": device_model,
|
|
38
|
-
"props": {
|
|
39
|
-
prop_key: value
|
|
40
|
-
},
|
|
105
|
+
"props": {prop_key: value},
|
|
41
106
|
"is_sub_device": 0,
|
|
42
|
-
"nonce": str(nonce)
|
|
107
|
+
"nonce": str(nonce),
|
|
43
108
|
}
|
|
44
109
|
|
|
45
110
|
|
|
46
111
|
def olive_create_hms_payload() -> Dict[str, str]:
|
|
112
|
+
"""
|
|
113
|
+
Build a payload to retrieve the Home Monitoring System (HMS) group data.
|
|
114
|
+
|
|
115
|
+
Returns:
|
|
116
|
+
Payload dict with group_id 'hms' and timestamp nonce.
|
|
117
|
+
"""
|
|
47
118
|
nonce = int(time.time() * 1000)
|
|
48
119
|
|
|
49
|
-
return {
|
|
50
|
-
"group_id": "hms",
|
|
51
|
-
"nonce": str(nonce)
|
|
52
|
-
}
|
|
120
|
+
return {"group_id": "hms", "nonce": str(nonce)}
|
|
53
121
|
|
|
54
122
|
|
|
55
123
|
def olive_create_user_info_payload() -> Dict[str, str]:
|
|
124
|
+
"""
|
|
125
|
+
Build a payload to retrieve user information from the olive (Wyze) API.
|
|
126
|
+
|
|
127
|
+
Returns:
|
|
128
|
+
Payload dict with current timestamp nonce.
|
|
129
|
+
"""
|
|
56
130
|
nonce = int(time.time() * 1000)
|
|
57
131
|
|
|
58
|
-
return {
|
|
59
|
-
"nonce": str(nonce)
|
|
60
|
-
}
|
|
132
|
+
return {"nonce": str(nonce)}
|
|
61
133
|
|
|
62
134
|
|
|
63
135
|
def olive_create_hms_get_payload(hms_id: str) -> Dict[str, str]:
|
|
136
|
+
"""
|
|
137
|
+
Build a payload to get HMS data for a specific HMS group ID.
|
|
138
|
+
|
|
139
|
+
Args:
|
|
140
|
+
hms_id: The HMS group identifier.
|
|
141
|
+
|
|
142
|
+
Returns:
|
|
143
|
+
Payload dict including hms_id and timestamp nonce.
|
|
144
|
+
"""
|
|
64
145
|
nonce = int(time.time() * 1000)
|
|
65
|
-
return {
|
|
66
|
-
"hms_id": hms_id,
|
|
67
|
-
"nonce": str(nonce)
|
|
68
|
-
}
|
|
146
|
+
return {"hms_id": hms_id, "nonce": str(nonce)}
|
|
69
147
|
|
|
70
148
|
|
|
71
149
|
def olive_create_hms_patch_payload(hms_id: str) -> Dict[str, Any]:
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
150
|
+
"""
|
|
151
|
+
Build a payload for patching (updating) HMS group settings.
|
|
152
|
+
|
|
153
|
+
Args:
|
|
154
|
+
hms_id: The HMS group identifier.
|
|
155
|
+
|
|
156
|
+
Returns:
|
|
157
|
+
Payload dict for HMS patch operations.
|
|
158
|
+
"""
|
|
159
|
+
return {"hms_id": hms_id}
|
|
75
160
|
|
|
76
161
|
|
|
77
162
|
def devicemgmt_create_capabilities_payload(type: str, value: str):
|
|
163
|
+
"""
|
|
164
|
+
Create a capabilities payload for device management API actions.
|
|
165
|
+
|
|
166
|
+
Args:
|
|
167
|
+
type: The capability type name (e.g., 'floodlight', 'siren').
|
|
168
|
+
value: The action or value associated with the capability.
|
|
169
|
+
|
|
170
|
+
Returns:
|
|
171
|
+
A dict describing the capability payload segment.
|
|
172
|
+
|
|
173
|
+
Raises:
|
|
174
|
+
NotImplementedError: If the type is not supported.
|
|
175
|
+
"""
|
|
78
176
|
match type:
|
|
79
177
|
case "floodlight":
|
|
80
178
|
return {
|
|
81
179
|
"iid": 4,
|
|
82
180
|
"name": "floodlight",
|
|
83
|
-
"properties": [
|
|
84
|
-
{
|
|
85
|
-
"prop": "on",
|
|
86
|
-
"value": value
|
|
87
|
-
}
|
|
88
|
-
]
|
|
181
|
+
"properties": [{"prop": "on", "value": value}],
|
|
89
182
|
}
|
|
90
183
|
case "spotlight":
|
|
91
184
|
return {
|
|
92
185
|
"iid": 5,
|
|
93
186
|
"name": "spotlight",
|
|
94
|
-
"properties": [
|
|
95
|
-
{
|
|
96
|
-
"prop": "on",
|
|
97
|
-
"value": value
|
|
98
|
-
}
|
|
99
|
-
]
|
|
187
|
+
"properties": [{"prop": "on", "value": value}],
|
|
100
188
|
}
|
|
101
189
|
case "power":
|
|
102
190
|
return {
|
|
103
|
-
"functions": [
|
|
104
|
-
{
|
|
105
|
-
"in": {
|
|
106
|
-
"wakeup-live-view": "1"
|
|
107
|
-
},
|
|
108
|
-
"name": value
|
|
109
|
-
}
|
|
110
|
-
],
|
|
191
|
+
"functions": [{"in": {"wakeup-live-view": "1"}, "name": value}],
|
|
111
192
|
"iid": 1,
|
|
112
|
-
"name": "iot-device"
|
|
193
|
+
"name": "iot-device",
|
|
113
194
|
}
|
|
114
195
|
case "siren":
|
|
115
|
-
return {
|
|
116
|
-
"functions": [
|
|
117
|
-
{
|
|
118
|
-
"in": {},
|
|
119
|
-
"name": value
|
|
120
|
-
}
|
|
121
|
-
],
|
|
122
|
-
"name": "siren"
|
|
123
|
-
}
|
|
196
|
+
return {"functions": [{"in": {}, "name": value}], "name": "siren"}
|
|
124
197
|
case _:
|
|
125
|
-
raise NotImplementedError(
|
|
198
|
+
raise NotImplementedError(
|
|
199
|
+
f"No action of type ({type}) has been implemented."
|
|
200
|
+
)
|
|
126
201
|
|
|
127
202
|
|
|
128
203
|
def devicemgmt_get_iot_props_list(model: str):
|
|
204
|
+
"""
|
|
205
|
+
Get the list of IoT property definitions for a given device model.
|
|
206
|
+
|
|
207
|
+
Args:
|
|
208
|
+
model: The device model identifier (e.g., 'LD_CFP').
|
|
209
|
+
|
|
210
|
+
Returns:
|
|
211
|
+
A list of dicts defining property sets for the device.
|
|
212
|
+
|
|
213
|
+
Raises:
|
|
214
|
+
NotImplementedError: If the model is not recognized.
|
|
215
|
+
"""
|
|
129
216
|
match model:
|
|
130
|
-
case "LD_CFP":
|
|
217
|
+
case "LD_CFP": # Floodlight Pro
|
|
131
218
|
return [
|
|
132
219
|
{
|
|
133
220
|
"iid": 2,
|
|
@@ -158,8 +245,8 @@ def devicemgmt_get_iot_props_list(model: str):
|
|
|
158
245
|
"live-stream-protocol",
|
|
159
246
|
"ai-push",
|
|
160
247
|
"voice-template",
|
|
161
|
-
"motion-category"
|
|
162
|
-
]
|
|
248
|
+
"motion-category",
|
|
249
|
+
],
|
|
163
250
|
},
|
|
164
251
|
{
|
|
165
252
|
"iid": 3,
|
|
@@ -174,25 +261,18 @@ def devicemgmt_get_iot_props_list(model: str):
|
|
|
174
261
|
"ip",
|
|
175
262
|
"lon",
|
|
176
263
|
"hardware-ver",
|
|
177
|
-
"public-ip"
|
|
178
|
-
]
|
|
264
|
+
"public-ip",
|
|
265
|
+
],
|
|
179
266
|
},
|
|
180
267
|
{
|
|
181
268
|
"iid": 1,
|
|
182
269
|
"name": "iot-device",
|
|
183
|
-
"properties": [
|
|
184
|
-
"iot-state",
|
|
185
|
-
"iot-power",
|
|
186
|
-
"push-switch"
|
|
187
|
-
]
|
|
270
|
+
"properties": ["iot-state", "iot-power", "push-switch"],
|
|
188
271
|
},
|
|
189
272
|
{
|
|
190
273
|
"iid": 9,
|
|
191
274
|
"name": "camera-ai",
|
|
192
|
-
"properties": [
|
|
193
|
-
"smart-detection-type",
|
|
194
|
-
"on"
|
|
195
|
-
]
|
|
275
|
+
"properties": ["smart-detection-type", "on"],
|
|
196
276
|
},
|
|
197
277
|
{
|
|
198
278
|
"iid": 4,
|
|
@@ -214,8 +294,8 @@ def devicemgmt_get_iot_props_list(model: str):
|
|
|
214
294
|
"ambient-light-brightness",
|
|
215
295
|
"motion-tag",
|
|
216
296
|
"light-model",
|
|
217
|
-
"flash-with-siren"
|
|
218
|
-
]
|
|
297
|
+
"flash-with-siren",
|
|
298
|
+
],
|
|
219
299
|
},
|
|
220
300
|
{
|
|
221
301
|
"iid": 11,
|
|
@@ -225,8 +305,8 @@ def devicemgmt_get_iot_props_list(model: str):
|
|
|
225
305
|
"mode",
|
|
226
306
|
"brightness",
|
|
227
307
|
"color",
|
|
228
|
-
"color-temperature"
|
|
229
|
-
]
|
|
308
|
+
"color-temperature",
|
|
309
|
+
],
|
|
230
310
|
},
|
|
231
311
|
{
|
|
232
312
|
"iid": 8,
|
|
@@ -235,8 +315,8 @@ def devicemgmt_get_iot_props_list(model: str):
|
|
|
235
315
|
"storage-used-space",
|
|
236
316
|
"storage-total-space",
|
|
237
317
|
"storage-status",
|
|
238
|
-
"sd-card-playback-enabled"
|
|
239
|
-
]
|
|
318
|
+
"sd-card-playback-enabled",
|
|
319
|
+
],
|
|
240
320
|
},
|
|
241
321
|
{
|
|
242
322
|
"iid": 6,
|
|
@@ -254,16 +334,10 @@ def devicemgmt_get_iot_props_list(model: str):
|
|
|
254
334
|
"motion-warning-interval",
|
|
255
335
|
"motion-warning-schedule",
|
|
256
336
|
"motion-warning-sound",
|
|
257
|
-
"motion-warning-trigger-setting"
|
|
258
|
-
]
|
|
259
|
-
},
|
|
260
|
-
{
|
|
261
|
-
"iid": 7,
|
|
262
|
-
"name": "siren",
|
|
263
|
-
"properties": [
|
|
264
|
-
"state"
|
|
265
|
-
]
|
|
337
|
+
"motion-warning-trigger-setting",
|
|
338
|
+
],
|
|
266
339
|
},
|
|
340
|
+
{"iid": 7, "name": "siren", "properties": ["state"]},
|
|
267
341
|
{
|
|
268
342
|
"iid": 5,
|
|
269
343
|
"name": "wifi",
|
|
@@ -271,11 +345,11 @@ def devicemgmt_get_iot_props_list(model: str):
|
|
|
271
345
|
"on",
|
|
272
346
|
"signal-strength",
|
|
273
347
|
"wifi-ssid",
|
|
274
|
-
"wifi-encrypted-password"
|
|
275
|
-
]
|
|
276
|
-
}
|
|
348
|
+
"wifi-encrypted-password",
|
|
349
|
+
],
|
|
350
|
+
},
|
|
277
351
|
]
|
|
278
|
-
case "AN_RSCW":
|
|
352
|
+
case "AN_RSCW": # Battery Cam pro
|
|
279
353
|
return [
|
|
280
354
|
{
|
|
281
355
|
"iid": 2,
|
|
@@ -307,8 +381,8 @@ def devicemgmt_get_iot_props_list(model: str):
|
|
|
307
381
|
"voice-template",
|
|
308
382
|
"rotate-angle",
|
|
309
383
|
"sound-collection-on",
|
|
310
|
-
"ai-push"
|
|
311
|
-
]
|
|
384
|
+
"ai-push",
|
|
385
|
+
],
|
|
312
386
|
},
|
|
313
387
|
{
|
|
314
388
|
"iid": 3,
|
|
@@ -326,8 +400,8 @@ def devicemgmt_get_iot_props_list(model: str):
|
|
|
326
400
|
"device-setting-channel",
|
|
327
401
|
"network-connection-mode",
|
|
328
402
|
"hardware-ver",
|
|
329
|
-
"public-ip"
|
|
330
|
-
]
|
|
403
|
+
"public-ip",
|
|
404
|
+
],
|
|
331
405
|
},
|
|
332
406
|
{
|
|
333
407
|
"iid": 1,
|
|
@@ -336,8 +410,8 @@ def devicemgmt_get_iot_props_list(model: str):
|
|
|
336
410
|
"iot-state",
|
|
337
411
|
"iot-power",
|
|
338
412
|
"push-switch",
|
|
339
|
-
"mqtt-check"
|
|
340
|
-
]
|
|
413
|
+
"mqtt-check",
|
|
414
|
+
],
|
|
341
415
|
},
|
|
342
416
|
{
|
|
343
417
|
"iid": 7,
|
|
@@ -347,25 +421,15 @@ def devicemgmt_get_iot_props_list(model: str):
|
|
|
347
421
|
"low-battery-push",
|
|
348
422
|
"power-source",
|
|
349
423
|
"charging-status",
|
|
350
|
-
"power-saving"
|
|
351
|
-
]
|
|
424
|
+
"power-saving",
|
|
425
|
+
],
|
|
352
426
|
},
|
|
353
427
|
{
|
|
354
428
|
"iid": 12,
|
|
355
429
|
"name": "camera-ai",
|
|
356
|
-
"properties": [
|
|
357
|
-
"smart-detection-type",
|
|
358
|
-
"on"
|
|
359
|
-
]
|
|
360
|
-
},
|
|
361
|
-
{
|
|
362
|
-
"iid": 8,
|
|
363
|
-
"name": "indicator-light",
|
|
364
|
-
"properties": [
|
|
365
|
-
"on",
|
|
366
|
-
"mode"
|
|
367
|
-
]
|
|
430
|
+
"properties": ["smart-detection-type", "on"],
|
|
368
431
|
},
|
|
432
|
+
{"iid": 8, "name": "indicator-light", "properties": ["on", "mode"]},
|
|
369
433
|
{
|
|
370
434
|
"iid": 6,
|
|
371
435
|
"name": "memory-card-management",
|
|
@@ -373,8 +437,8 @@ def devicemgmt_get_iot_props_list(model: str):
|
|
|
373
437
|
"storage-used-space",
|
|
374
438
|
"storage-total-space",
|
|
375
439
|
"storage-status",
|
|
376
|
-
"sd-card-playback-enabled"
|
|
377
|
-
]
|
|
440
|
+
"sd-card-playback-enabled",
|
|
441
|
+
],
|
|
378
442
|
},
|
|
379
443
|
{
|
|
380
444
|
"iid": 11,
|
|
@@ -387,25 +451,11 @@ def devicemgmt_get_iot_props_list(model: str):
|
|
|
387
451
|
"motion-zone-block-size",
|
|
388
452
|
"motion-zone-selected-block",
|
|
389
453
|
"edge-detection-type",
|
|
390
|
-
"motion-tag"
|
|
391
|
-
]
|
|
392
|
-
},
|
|
393
|
-
{
|
|
394
|
-
"iid": 4,
|
|
395
|
-
"name": "siren",
|
|
396
|
-
"properties": [
|
|
397
|
-
"state",
|
|
398
|
-
"siren-on-ts"
|
|
399
|
-
]
|
|
400
|
-
},
|
|
401
|
-
{
|
|
402
|
-
"iid": 14,
|
|
403
|
-
"name": "solar-panel",
|
|
404
|
-
"properties": [
|
|
405
|
-
"enabled",
|
|
406
|
-
"on"
|
|
407
|
-
]
|
|
454
|
+
"motion-tag",
|
|
455
|
+
],
|
|
408
456
|
},
|
|
457
|
+
{"iid": 4, "name": "siren", "properties": ["state", "siren-on-ts"]},
|
|
458
|
+
{"iid": 14, "name": "solar-panel", "properties": ["enabled", "on"]},
|
|
409
459
|
{
|
|
410
460
|
"iid": 5,
|
|
411
461
|
"name": "spotlight",
|
|
@@ -416,8 +466,8 @@ def devicemgmt_get_iot_props_list(model: str):
|
|
|
416
466
|
"motion-activate-light-switch",
|
|
417
467
|
"sunset-to-sunrise",
|
|
418
468
|
"motion-activate-light-schedule",
|
|
419
|
-
"trigger-source"
|
|
420
|
-
]
|
|
469
|
+
"trigger-source",
|
|
470
|
+
],
|
|
421
471
|
},
|
|
422
472
|
{
|
|
423
473
|
"iid": 9,
|
|
@@ -426,11 +476,11 @@ def devicemgmt_get_iot_props_list(model: str):
|
|
|
426
476
|
"on",
|
|
427
477
|
"signal-strength",
|
|
428
478
|
"wifi-ssid",
|
|
429
|
-
"wifi-encrypted-password"
|
|
430
|
-
]
|
|
431
|
-
}
|
|
479
|
+
"wifi-encrypted-password",
|
|
480
|
+
],
|
|
481
|
+
},
|
|
432
482
|
]
|
|
433
|
-
case "GW_GC1":
|
|
483
|
+
case "GW_GC1": # OG
|
|
434
484
|
return [
|
|
435
485
|
{
|
|
436
486
|
"iid": 2,
|
|
@@ -462,8 +512,8 @@ def devicemgmt_get_iot_props_list(model: str):
|
|
|
462
512
|
"voice-template",
|
|
463
513
|
"rotate-angle",
|
|
464
514
|
"sound-collection-on",
|
|
465
|
-
"ai-push"
|
|
466
|
-
]
|
|
515
|
+
"ai-push",
|
|
516
|
+
],
|
|
467
517
|
},
|
|
468
518
|
{
|
|
469
519
|
"iid": 3,
|
|
@@ -481,8 +531,8 @@ def devicemgmt_get_iot_props_list(model: str):
|
|
|
481
531
|
"device-setting-channel",
|
|
482
532
|
"network-connection-mode",
|
|
483
533
|
"hardware-ver",
|
|
484
|
-
"public-ip"
|
|
485
|
-
]
|
|
534
|
+
"public-ip",
|
|
535
|
+
],
|
|
486
536
|
},
|
|
487
537
|
{
|
|
488
538
|
"iid": 1,
|
|
@@ -491,25 +541,15 @@ def devicemgmt_get_iot_props_list(model: str):
|
|
|
491
541
|
"iot-state",
|
|
492
542
|
"iot-power",
|
|
493
543
|
"push-switch",
|
|
494
|
-
"mqtt-check"
|
|
495
|
-
]
|
|
544
|
+
"mqtt-check",
|
|
545
|
+
],
|
|
496
546
|
},
|
|
497
547
|
{
|
|
498
548
|
"iid": 12,
|
|
499
549
|
"name": "camera-ai",
|
|
500
|
-
"properties": [
|
|
501
|
-
"smart-detection-type",
|
|
502
|
-
"on"
|
|
503
|
-
]
|
|
504
|
-
},
|
|
505
|
-
{
|
|
506
|
-
"iid": 8,
|
|
507
|
-
"name": "indicator-light",
|
|
508
|
-
"properties": [
|
|
509
|
-
"on",
|
|
510
|
-
"mode"
|
|
511
|
-
]
|
|
550
|
+
"properties": ["smart-detection-type", "on"],
|
|
512
551
|
},
|
|
552
|
+
{"iid": 8, "name": "indicator-light", "properties": ["on", "mode"]},
|
|
513
553
|
{
|
|
514
554
|
"iid": 6,
|
|
515
555
|
"name": "memory-card-management",
|
|
@@ -517,8 +557,8 @@ def devicemgmt_get_iot_props_list(model: str):
|
|
|
517
557
|
"storage-used-space",
|
|
518
558
|
"storage-total-space",
|
|
519
559
|
"storage-status",
|
|
520
|
-
"sd-card-playback-enabled"
|
|
521
|
-
]
|
|
560
|
+
"sd-card-playback-enabled",
|
|
561
|
+
],
|
|
522
562
|
},
|
|
523
563
|
{
|
|
524
564
|
"iid": 11,
|
|
@@ -531,17 +571,10 @@ def devicemgmt_get_iot_props_list(model: str):
|
|
|
531
571
|
"motion-zone-block-size",
|
|
532
572
|
"motion-zone-selected-block",
|
|
533
573
|
"edge-detection-type",
|
|
534
|
-
"motion-tag"
|
|
535
|
-
]
|
|
536
|
-
},
|
|
537
|
-
{
|
|
538
|
-
"iid": 4,
|
|
539
|
-
"name": "siren",
|
|
540
|
-
"properties": [
|
|
541
|
-
"state",
|
|
542
|
-
"siren-on-ts"
|
|
543
|
-
]
|
|
574
|
+
"motion-tag",
|
|
575
|
+
],
|
|
544
576
|
},
|
|
577
|
+
{"iid": 4, "name": "siren", "properties": ["state", "siren-on-ts"]},
|
|
545
578
|
{
|
|
546
579
|
"iid": 5,
|
|
547
580
|
"name": "spotlight",
|
|
@@ -552,8 +585,8 @@ def devicemgmt_get_iot_props_list(model: str):
|
|
|
552
585
|
"motion-activate-light-switch",
|
|
553
586
|
"sunset-to-sunrise",
|
|
554
587
|
"motion-activate-light-schedule",
|
|
555
|
-
"trigger-source"
|
|
556
|
-
]
|
|
588
|
+
"trigger-source",
|
|
589
|
+
],
|
|
557
590
|
},
|
|
558
591
|
{
|
|
559
592
|
"iid": 9,
|
|
@@ -562,9 +595,11 @@ def devicemgmt_get_iot_props_list(model: str):
|
|
|
562
595
|
"on",
|
|
563
596
|
"signal-strength",
|
|
564
597
|
"wifi-ssid",
|
|
565
|
-
"wifi-encrypted-password"
|
|
566
|
-
]
|
|
567
|
-
}
|
|
598
|
+
"wifi-encrypted-password",
|
|
599
|
+
],
|
|
600
|
+
},
|
|
568
601
|
]
|
|
569
602
|
case _:
|
|
570
|
-
raise NotImplementedError(
|
|
603
|
+
raise NotImplementedError(
|
|
604
|
+
f"No iot props for model ({model}) have been defined."
|
|
605
|
+
)
|
wyzeapy/services/__init__.py
CHANGED