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