pyezvizapi 1.0.2.7__py3-none-any.whl → 1.0.2.8__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.
Potentially problematic release.
This version of pyezvizapi might be problematic. Click here for more details.
- pyezvizapi/api_endpoints.py +1 -0
- pyezvizapi/client.py +32 -0
- {pyezvizapi-1.0.2.7.dist-info → pyezvizapi-1.0.2.8.dist-info}/METADATA +1 -1
- {pyezvizapi-1.0.2.7.dist-info → pyezvizapi-1.0.2.8.dist-info}/RECORD +9 -9
- {pyezvizapi-1.0.2.7.dist-info → pyezvizapi-1.0.2.8.dist-info}/WHEEL +0 -0
- {pyezvizapi-1.0.2.7.dist-info → pyezvizapi-1.0.2.8.dist-info}/entry_points.txt +0 -0
- {pyezvizapi-1.0.2.7.dist-info → pyezvizapi-1.0.2.8.dist-info}/licenses/LICENSE +0 -0
- {pyezvizapi-1.0.2.7.dist-info → pyezvizapi-1.0.2.8.dist-info}/licenses/LICENSE.md +0 -0
- {pyezvizapi-1.0.2.7.dist-info → pyezvizapi-1.0.2.8.dist-info}/top_level.txt +0 -0
pyezvizapi/api_endpoints.py
CHANGED
|
@@ -37,6 +37,7 @@ API_ENDPOINT_DEVICE_BASICS = "/v3/basics/v1/devices/"
|
|
|
37
37
|
|
|
38
38
|
API_ENDPOINT_DETECTION_SENSIBILITY = "/api/device/configAlgorithm"
|
|
39
39
|
API_ENDPOINT_DETECTION_SENSIBILITY_GET = "/api/device/queryAlgorithmConfig"
|
|
40
|
+
API_ENDPOINT_SENSITIVITY = "/v3/devconfig/v1/sensitivity/"
|
|
40
41
|
API_ENDPOINT_SET_DEFENCE_SCHEDULE = "/api/device/defence/plan2"
|
|
41
42
|
API_ENDPOINT_CAM_ENCRYPTKEY = "/api/device/query/encryptkey"
|
|
42
43
|
API_ENDPOINT_OFFLINE_NOTIFY = "/api/device/notify/switch"
|
pyezvizapi/client.py
CHANGED
|
@@ -46,6 +46,7 @@ from .api_endpoints import (
|
|
|
46
46
|
API_ENDPOINT_REMOTE_UNLOCK,
|
|
47
47
|
API_ENDPOINT_RETURN_PANORAMIC,
|
|
48
48
|
API_ENDPOINT_SEND_CODE,
|
|
49
|
+
API_ENDPOINT_SENSITIVITY,
|
|
49
50
|
API_ENDPOINT_SERVER_INFO,
|
|
50
51
|
API_ENDPOINT_SET_DEFENCE_SCHEDULE,
|
|
51
52
|
API_ENDPOINT_SET_LUMINANCE,
|
|
@@ -1997,6 +1998,37 @@ class EzvizClient:
|
|
|
1997
1998
|
|
|
1998
1999
|
return True
|
|
1999
2000
|
|
|
2001
|
+
def set_detection_sensitivity(
|
|
2002
|
+
self,
|
|
2003
|
+
serial: str,
|
|
2004
|
+
channel: int,
|
|
2005
|
+
sensitivity_type: int,
|
|
2006
|
+
value: int,
|
|
2007
|
+
max_retries: int = 0,
|
|
2008
|
+
) -> bool:
|
|
2009
|
+
"""Set detection sensitivity via v3 devconfig endpoint."""
|
|
2010
|
+
|
|
2011
|
+
if max_retries > MAX_RETRIES:
|
|
2012
|
+
raise PyEzvizError("Can't gather proper data. Max retries exceeded.")
|
|
2013
|
+
|
|
2014
|
+
if sensitivity_type == 0 and not 1 <= value <= 6:
|
|
2015
|
+
raise PyEzvizError("Detection sensitivity must be within 1..6")
|
|
2016
|
+
if sensitivity_type != 0 and not 1 <= value <= 100:
|
|
2017
|
+
raise PyEzvizError("Detection sensitivity must be within 1..100")
|
|
2018
|
+
|
|
2019
|
+
url_path = (
|
|
2020
|
+
f"{API_ENDPOINT_SENSITIVITY}{serial}/{channel}/{sensitivity_type}/{value}"
|
|
2021
|
+
)
|
|
2022
|
+
json_output = self._request_json(
|
|
2023
|
+
"PUT",
|
|
2024
|
+
url_path,
|
|
2025
|
+
retry_401=True,
|
|
2026
|
+
max_retries=max_retries,
|
|
2027
|
+
)
|
|
2028
|
+
self._ensure_ok(json_output, "Could not set detection sensitivity")
|
|
2029
|
+
|
|
2030
|
+
return True
|
|
2031
|
+
|
|
2000
2032
|
def get_detection_sensibility(
|
|
2001
2033
|
self, serial: str, type_value: str = "0", max_retries: int = 0
|
|
2002
2034
|
) -> Any:
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
pyezvizapi/__init__.py,sha256=IDnIN_nfIISVwuy0cVBh4wspgAav6MuOJCQGajjyU3g,1881
|
|
2
2
|
pyezvizapi/__main__.py,sha256=9uttTuOfO22tzyomJIV8ebFJ-G-YUNDYOadZ_0AgdNA,20925
|
|
3
|
-
pyezvizapi/api_endpoints.py,sha256=
|
|
3
|
+
pyezvizapi/api_endpoints.py,sha256=Wn3FtwFChoi4wAymnVCbEtFg-8B01_gKCMc6zNa2mE8,2814
|
|
4
4
|
pyezvizapi/camera.py,sha256=Pl5oIEdrFcv1Hz5sQI1IyyJIDCMjOjQdtExgKzmLoK8,22102
|
|
5
5
|
pyezvizapi/cas.py,sha256=3zHe-_a0KchCmGeAj1of-pV6oMPRUmSCIiDqBFsTK8A,6025
|
|
6
|
-
pyezvizapi/client.py,sha256=
|
|
6
|
+
pyezvizapi/client.py,sha256=LHl00HcAO339KBYS1y4Focgr35mHYpgLiLEnNePv0_A,76202
|
|
7
7
|
pyezvizapi/constants.py,sha256=wSX5nxjZU_8zjedjoPaEjPrF1ddFptox2g_isD_Ku74,12621
|
|
8
8
|
pyezvizapi/exceptions.py,sha256=8rmxEUQdrziqMe-M1SeeRd0HtP2IDQ2xpJVj7wvOQyo,976
|
|
9
9
|
pyezvizapi/light_bulb.py,sha256=9wgycG3dTvBbrsxQjQnXal-GA8VXPsIN1m-CTtRh8i0,7797
|
|
@@ -12,10 +12,10 @@ pyezvizapi/mqtt.py,sha256=aOL-gexZgYvCCaNQ03M4vZan91d5p2Fl_qsFykn9NW4,22365
|
|
|
12
12
|
pyezvizapi/test_cam_rtsp.py,sha256=O9NHh-vcNFfnzNw8jbuhM9a_5TWfNZIMXaJP7Lmkaj4,5162
|
|
13
13
|
pyezvizapi/test_mqtt.py,sha256=Orn-fwZPJIE4G5KROMX0MRAkLwU6nLb9LUtXyb2ZCQs,4147
|
|
14
14
|
pyezvizapi/utils.py,sha256=G8gGjG0ecdN05Y0vxOHvcQMtQXgVB7nHzyvCzz66kLk,12148
|
|
15
|
-
pyezvizapi-1.0.2.
|
|
16
|
-
pyezvizapi-1.0.2.
|
|
17
|
-
pyezvizapi-1.0.2.
|
|
18
|
-
pyezvizapi-1.0.2.
|
|
19
|
-
pyezvizapi-1.0.2.
|
|
20
|
-
pyezvizapi-1.0.2.
|
|
21
|
-
pyezvizapi-1.0.2.
|
|
15
|
+
pyezvizapi-1.0.2.8.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
16
|
+
pyezvizapi-1.0.2.8.dist-info/licenses/LICENSE.md,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
17
|
+
pyezvizapi-1.0.2.8.dist-info/METADATA,sha256=8yaFfx3GUt93XZuBRmBOqB8jS6-skT_cz97iRWG5r_U,695
|
|
18
|
+
pyezvizapi-1.0.2.8.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
19
|
+
pyezvizapi-1.0.2.8.dist-info/entry_points.txt,sha256=_BSJ3eNb2H_AZkRdsv1s4mojqWn3N7m503ujvg1SudA,56
|
|
20
|
+
pyezvizapi-1.0.2.8.dist-info/top_level.txt,sha256=gMZTelIi8z7pXyTCQLLaIkxVRrDQ_lS2NEv0WgfHrHs,11
|
|
21
|
+
pyezvizapi-1.0.2.8.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|