onvif-python 0.1.1__tar.gz → 0.1.3__tar.gz
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.
- {onvif_python-0.1.1/onvif_python.egg-info → onvif_python-0.1.3}/PKG-INFO +241 -9
- {onvif_python-0.1.1 → onvif_python-0.1.3}/README.md +240 -8
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/__init__.py +2 -11
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/cli/interactive.py +283 -61
- onvif_python-0.1.3/onvif/cli/main.py +535 -0
- onvif_python-0.1.3/onvif/cli/utils.py +1278 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/client.py +2 -1
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/operator.py +6 -1
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/utils/error_handlers.py +2 -3
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/utils/exceptions.py +1 -1
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/utils/xml_capture.py +1 -1
- {onvif_python-0.1.1 → onvif_python-0.1.3/onvif_python.egg-info}/PKG-INFO +241 -9
- {onvif_python-0.1.1 → onvif_python-0.1.3}/pyproject.toml +1 -1
- {onvif_python-0.1.1 → onvif_python-0.1.3}/tests/test_client.py +10 -10
- {onvif_python-0.1.1 → onvif_python-0.1.3}/tests/test_core.py +17 -17
- {onvif_python-0.1.1 → onvif_python-0.1.3}/tests/test_error_handlers.py +9 -9
- {onvif_python-0.1.1 → onvif_python-0.1.3}/tests/test_exceptions.py +1 -1
- onvif_python-0.1.1/onvif/cli/main.py +0 -216
- onvif_python-0.1.1/onvif/cli/utils.py +0 -476
- {onvif_python-0.1.1 → onvif_python-0.1.3}/LICENSE.md +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/MANIFEST.in +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/cli/__init__.py +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/cli/__main__.py +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/services/__init__.py +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/services/accesscontrol.py +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/services/accessrules.py +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/services/actionengine.py +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/services/analytics/analytics.py +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/services/analytics/ruleengine.py +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/services/analyticsdevice.py +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/services/appmgmt.py +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/services/authenticationbehavior.py +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/services/credential.py +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/services/deviceio.py +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/services/devicemgmt.py +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/services/display.py +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/services/doorcontrol.py +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/services/events/events.py +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/services/events/notification.py +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/services/events/pullpoint.py +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/services/events/subscription.py +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/services/imaging.py +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/services/media.py +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/services/media2.py +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/services/provisioning.py +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/services/ptz.py +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/services/receiver.py +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/services/recording.py +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/services/replay.py +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/services/schedule.py +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/services/search.py +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/services/security/advancedsecurity.py +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/services/security/authorizationserver.py +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/services/security/dot1x.py +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/services/security/jwt.py +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/services/security/keystore.py +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/services/security/mediasigning.py +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/services/security/tlsserver.py +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/services/thermal.py +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/services/uplink.py +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/utils/__init__.py +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/utils/wsdl.py +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/utils/zeep.py +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/wsdl/ver10/accesscontrol/wsdl/index.html +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/wsdl/ver10/accessrules/wsdl/accessrules.wsdl +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/wsdl/ver10/accessrules/wsdl/index.html +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/wsdl/ver10/actionengine.wsdl +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/wsdl/ver10/advancedsecurity/wsdl/advancedsecurity.wsdl +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/wsdl/ver10/advancedsecurity/wsdl/index.html +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/wsdl/ver10/analyticsdevice.wsdl +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/wsdl/ver10/appmgmt/wsdl/appmgmt.wsdl +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/wsdl/ver10/appmgmt/wsdl/index.html +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/wsdl/ver10/authenticationbehavior/wsdl/authenticationbehavior.wsdl +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/wsdl/ver10/authenticationbehavior/wsdl/index.html +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/wsdl/ver10/credential/wsdl/credential.wsdl +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/wsdl/ver10/credential/wsdl/index.html +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/wsdl/ver10/device/wsdl/devicemgmt.wsdl +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/wsdl/ver10/deviceio.wsdl +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/wsdl/ver10/display/display.wsdl +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/wsdl/ver10/display/wsdl/index.htm +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/wsdl/ver10/display.wsdl +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/wsdl/ver10/doorcontrol/wsdl/index.html +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/wsdl/ver10/events/wsdl/bw-2-vs-mod.wsdl +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/wsdl/ver10/events/wsdl/event-vs.wsdl +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/wsdl/ver10/events/wsdl/event.wsdl +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/wsdl/ver10/events/wsdl/index.html +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/wsdl/ver10/federatedsearch.wsdl +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/wsdl/ver10/media/wsdl/media.wsdl +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/wsdl/ver10/pacs/accesscontrol.wsdl +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/wsdl/ver10/pacs/doorcontrol.wsdl +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/wsdl/ver10/pacs/types.xsd +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/wsdl/ver10/provisioning/wsdl/provisioning.wsdl +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/wsdl/ver10/receiver.wsdl +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/wsdl/ver10/recording.wsdl +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/wsdl/ver10/replay.wsdl +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/wsdl/ver10/schedule/wsdl/index.html +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/wsdl/ver10/schedule/wsdl/schedule.wsdl +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/wsdl/ver10/schema/common.xsd +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/wsdl/ver10/schema/metadatastream.xsd +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/wsdl/ver10/schema/onvif.xsd +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/wsdl/ver10/search.wsdl +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/wsdl/ver10/thermal/wsdl/index.html +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/wsdl/ver10/thermal/wsdl/thermal.wsdl +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/wsdl/ver10/topics/topicns.xml +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/wsdl/ver10/uplink/wsdl/index.html +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/wsdl/ver10/uplink/wsdl/uplink.wsdl +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/wsdl/ver20/analytics/humanbody.xsd +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/wsdl/ver20/analytics/humanface.xsd +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/wsdl/ver20/analytics/index.html +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/wsdl/ver20/analytics/radiometry.xsd +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/wsdl/ver20/analytics/rules.xsd +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/wsdl/ver20/analytics/wsdl/analytics.wsdl +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/wsdl/ver20/analytics/wsdl/index.html +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/wsdl/ver20/imaging/wsdl/imaging.wsdl +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/wsdl/ver20/media/wsdl/index.html +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/wsdl/ver20/media/wsdl/media.wsdl +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/wsdl/ver20/ptz/wsdl/ptz.wsdl +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/wsdl/ver20/util/federated_search_documentation.html +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/wsdl/ver20/util/fedsearch-docu-viewer.xsl +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/wsdl/ver20/util/onvif-wsdl-viewer.xsl +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif/wsdl/ver20/util/operationIndex.html +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif_python.egg-info/SOURCES.txt +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif_python.egg-info/dependency_links.txt +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif_python.egg-info/entry_points.txt +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif_python.egg-info/requires.txt +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/onvif_python.egg-info/top_level.txt +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/setup.cfg +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/setup.py +0 -0
- {onvif_python-0.1.1 → onvif_python-0.1.3}/tests/test_wsdl_map.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: onvif-python
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.3
|
|
4
4
|
Summary: A comprehensive and developer-friendly Python library for working with ONVIF-compliant devices
|
|
5
5
|
Author-email: Nirsimetri Technologies® <open@nirsimetri.com>
|
|
6
6
|
Maintainer: Kaburagi
|
|
@@ -39,11 +39,12 @@ Dynamic: license-file
|
|
|
39
39
|
# ONVIF Python
|
|
40
40
|
|
|
41
41
|
[](https://github.com/nirsimetri/onvif-python?tab=MIT-1-ov-file)
|
|
42
|
-
[](https://deepwiki.com/nirsimetri/onvif-python)
|
|
43
|
+
[](https://pypi.org/project/onvif-python/)
|
|
44
|
+
[](https://clickpy.clickhouse.com/dashboard/onvif-python)
|
|
44
45
|
<br>
|
|
45
|
-
[](https://github.com/nirsimetri/onvif-python/actions/workflows/python-app.yml)
|
|
47
|
+
[](https://github.com/nirsimetri/onvif-python/actions/workflows/python-publish.yml)
|
|
47
48
|
|
|
48
49
|
**This project provides a comprehensive and developer-friendly Python library for working with ONVIF-compliant devices.** It is designed to be reliable, easy to integrate, and flexible enough to support a wide range of ONVIF profiles and services.
|
|
49
50
|
|
|
@@ -161,7 +162,12 @@ Explore more advanced usage and service-specific operations in the [`examples/`]
|
|
|
161
162
|
## ONVIF CLI
|
|
162
163
|
|
|
163
164
|
> [!NOTE]
|
|
164
|
-
> The CLI is automatically installed when you install the `onvif-python` see [Installation](#installation). This feature has been available since onvif-python version [0.1.
|
|
165
|
+
> The CLI is automatically installed when you install the `onvif-python` see [Installation](#installation). This feature has been available since `onvif-python` version [`0.1.1`](https://github.com/nirsimetri/onvif-python/releases/tag/v0.1.1).
|
|
166
|
+
|
|
167
|
+

|
|
168
|
+

|
|
169
|
+

|
|
170
|
+

|
|
165
171
|
|
|
166
172
|
This library includes a powerful command-line interface (CLI) for interacting with ONVIF devices directly from your terminal. It supports both direct command execution and an interactive shell mode, providing a flexible and efficient way to manage and debug ONVIF devices.
|
|
167
173
|
|
|
@@ -172,7 +178,164 @@ This library includes a powerful command-line interface (CLI) for interacting wi
|
|
|
172
178
|
- **Automatic Discovery:** Automatically detects available services on the device.
|
|
173
179
|
- **Connection Management:** Supports HTTP/HTTPS, custom timeouts, and SSL verification.
|
|
174
180
|
- **Data Management:** Store results from commands and use them as parameters in subsequent commands.
|
|
175
|
-
- **Cross-Platform:** Works on Windows, macOS, and
|
|
181
|
+
- **Cross-Platform:** Works on Windows, macOS, Linux, and Raspberry Pi.
|
|
182
|
+
|
|
183
|
+
### Screenshoot
|
|
184
|
+
|
|
185
|
+
<table>
|
|
186
|
+
<tr>
|
|
187
|
+
<td width="34.2%">
|
|
188
|
+
<a href="https://github.com/nirsimetri/onvif-python">
|
|
189
|
+
<img src="https://raw.githubusercontent.com/nirsimetri/onvif-python/refs/heads/main/assets/onvif_cli.png" />
|
|
190
|
+
</a>
|
|
191
|
+
</td>
|
|
192
|
+
<td width="65.8%">
|
|
193
|
+
<a href="https://github.com/nirsimetri/onvif-python">
|
|
194
|
+
<img src="https://raw.githubusercontent.com/nirsimetri/onvif-python/refs/heads/main/assets/onvif_operations.png" />
|
|
195
|
+
</a>
|
|
196
|
+
</td>
|
|
197
|
+
</tr>
|
|
198
|
+
<tr>
|
|
199
|
+
<th align="center">
|
|
200
|
+
Onboarding
|
|
201
|
+
</th>
|
|
202
|
+
<th align="center">
|
|
203
|
+
List available operations
|
|
204
|
+
</th>
|
|
205
|
+
</tr>
|
|
206
|
+
</table>
|
|
207
|
+
|
|
208
|
+
### Help Command
|
|
209
|
+
|
|
210
|
+
<details>
|
|
211
|
+
<summary><b>1. Direct CLI</b></summary>
|
|
212
|
+
|
|
213
|
+
```bash
|
|
214
|
+
usage: onvif [-h] [--host HOST] [--port PORT] [--username USERNAME] [--password PASSWORD] [--discover] [--timeout TIMEOUT] [--https] [--no-verify]
|
|
215
|
+
[--no-patch] [--interactive] [--debug] [--wsdl WSDL] [--cache {all,db,mem,none}]
|
|
216
|
+
[service] [method] [params ...]
|
|
217
|
+
|
|
218
|
+
ONVIF Terminal Client —
|
|
219
|
+
https://github.com/nirsimetri/onvif-python
|
|
220
|
+
|
|
221
|
+
positional arguments:
|
|
222
|
+
service ONVIF service name (e.g., devicemgmt, media, ptz)
|
|
223
|
+
method Service method name (e.g., GetCapabilities, GetProfiles)
|
|
224
|
+
params Method parameters as Simple Parameter or JSON string
|
|
225
|
+
|
|
226
|
+
options:
|
|
227
|
+
-h, --help show this help message and exit
|
|
228
|
+
--host HOST, -H HOST ONVIF device IP address or hostname
|
|
229
|
+
--port PORT, -P PORT ONVIF device port (default: 80)
|
|
230
|
+
--username USERNAME, -u USERNAME
|
|
231
|
+
Username for authentication
|
|
232
|
+
--password PASSWORD, -p PASSWORD
|
|
233
|
+
Password for authentication
|
|
234
|
+
--discover, -d Discover ONVIF devices on the network using WS-Discovery
|
|
235
|
+
--timeout TIMEOUT Connection timeout in seconds (default: 10)
|
|
236
|
+
--https Use HTTPS instead of HTTP
|
|
237
|
+
--no-verify Disable SSL certificate verification
|
|
238
|
+
--no-patch Disable ZeepPatcher
|
|
239
|
+
--interactive, -i Start interactive mode
|
|
240
|
+
--debug Enable debug mode with XML capture
|
|
241
|
+
--wsdl WSDL Custom WSDL directory path
|
|
242
|
+
--cache {all,db,mem,none}
|
|
243
|
+
Caching mode for ONVIFClient (default: all). 'all': memory+disk, 'db': disk-only, 'mem': memory-only, 'none': disabled.
|
|
244
|
+
|
|
245
|
+
Examples:
|
|
246
|
+
# Discover ONVIF devices on network
|
|
247
|
+
onvif --discover --username admin --password admin123 --interactive
|
|
248
|
+
onvif media GetProfiles --discover --username admin
|
|
249
|
+
onvif -d -i
|
|
250
|
+
|
|
251
|
+
# Direct command execution
|
|
252
|
+
onvif devicemgmt GetCapabilities Category=All --host 192.168.1.17 --port 8000 --username admin --password admin123
|
|
253
|
+
onvif ptz ContinuousMove ProfileToken=Profile_1 Velocity={"PanTilt": {"x": -0.1, "y": 0}} --host 192.168.1.17 --port 8000 --username admin --password admin123
|
|
254
|
+
|
|
255
|
+
# Interactive mode
|
|
256
|
+
onvif --host 192.168.1.17 --port 8000 --username admin --password admin123 --interactive
|
|
257
|
+
|
|
258
|
+
# Prompting for username and password
|
|
259
|
+
# (if not provided)
|
|
260
|
+
onvif -H 192.168.1.17 -P 8000 -i
|
|
261
|
+
|
|
262
|
+
# Using HTTPS
|
|
263
|
+
onvif media GetProfiles --host camera.example.com --port 443 --username admin --password admin123 --https
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
</details>
|
|
267
|
+
|
|
268
|
+
<details>
|
|
269
|
+
<summary><b>2. Interactive Shell</b></summary>
|
|
270
|
+
|
|
271
|
+
```bash
|
|
272
|
+
ONVIF Interactive Shell Commands -
|
|
273
|
+
https://github.com/nirsimetri/onvif-python
|
|
274
|
+
|
|
275
|
+
Basic Commands:
|
|
276
|
+
capabilities, caps - Show device capabilities
|
|
277
|
+
services - Show available services with details
|
|
278
|
+
info - Show connection and device information
|
|
279
|
+
exit, quit - Exit the shell
|
|
280
|
+
shortcuts - Show available shortcuts
|
|
281
|
+
help <command> - Show help for a specific command
|
|
282
|
+
|
|
283
|
+
Navigation Commands:
|
|
284
|
+
<service> - Enter service mode (e.g., devicemgmt, media)
|
|
285
|
+
cd <service> - Enter service mode (alias)
|
|
286
|
+
ls - List commands/services/methods in grid format
|
|
287
|
+
up - Exit current service mode (go up one level)
|
|
288
|
+
pwd - Show current service context
|
|
289
|
+
clear - Clear terminal screen
|
|
290
|
+
|
|
291
|
+
Service Mode Commands:
|
|
292
|
+
desc <method> - Show method documentation
|
|
293
|
+
type <method> - Show input/output types from WSDL
|
|
294
|
+
|
|
295
|
+
Method Execution:
|
|
296
|
+
<method> - Execute method without parameters
|
|
297
|
+
<method> {"param": "value"} - Execute method with JSON parameters
|
|
298
|
+
<method> param=value - Execute method with simple parameters
|
|
299
|
+
|
|
300
|
+
Data Management:
|
|
301
|
+
store <name> - Store last result with a name
|
|
302
|
+
show <name> - Show stored data
|
|
303
|
+
show <name>.attribute - Show specific attribute
|
|
304
|
+
show - List all stored data
|
|
305
|
+
rm <name> - Remove stored data by name
|
|
306
|
+
cls - Clear all stored data
|
|
307
|
+
|
|
308
|
+
Using Stored Data in Methods:
|
|
309
|
+
Use $variable syntax to reference stored data in method parameters:
|
|
310
|
+
- $profiles[0].token - Access list element and attribute
|
|
311
|
+
- $profiles[0].VideoSourceConfiguration.SourceToken
|
|
312
|
+
|
|
313
|
+
Example:
|
|
314
|
+
GetProfiles - Get profiles
|
|
315
|
+
store profiles - Store result
|
|
316
|
+
show profiles[0].token - Show first profile token
|
|
317
|
+
GetImagingSettings VideoSourceToken=$profiles[0].VideoSourceConfiguration.SourceToken
|
|
318
|
+
|
|
319
|
+
Debug Commands:
|
|
320
|
+
debug - Show last SOAP request & response (if --debug enabled)
|
|
321
|
+
|
|
322
|
+
Tab Completion:
|
|
323
|
+
Use TAB key for auto-completion of commands, services, and methods
|
|
324
|
+
Type partial commands to see suggestions
|
|
325
|
+
|
|
326
|
+
Examples:
|
|
327
|
+
192.168.1.17:8000 > caps # Show capabilities
|
|
328
|
+
192.168.1.17:8000 > dev<TAB> # Completes to 'devicemgmt'
|
|
329
|
+
192.168.1.17:8000 > cd devicemgmt # Enter device management
|
|
330
|
+
192.168.1.17:8000/devicemgmt > Get<TAB> # Show methods starting with 'Get'
|
|
331
|
+
192.168.1.17:8000/devicemgmt > GetServices {"IncludeCapability": true}
|
|
332
|
+
192.168.1.17:8000/devicemgmt > GetServices IncludeCapability=True
|
|
333
|
+
192.168.1.17:8000/devicemgmt > store services_info
|
|
334
|
+
192.168.1.17:8000/devicemgmt > up # Exit service mode
|
|
335
|
+
192.168.1.17:8000 > # Back to root context
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
</details>
|
|
176
339
|
|
|
177
340
|
### Usage
|
|
178
341
|
|
|
@@ -201,9 +364,78 @@ If you omit the username or password, you will be prompted to enter them securel
|
|
|
201
364
|
| `show <name>` | Display a stored variable |
|
|
202
365
|
| `exit` / `quit` | Exit the shell |
|
|
203
366
|
|
|
204
|
-
|
|
367
|
+
> [!IMPORTANT]
|
|
368
|
+
> You can see all the other commands available in the interactive shell by trying it out directly. The interactive shell runs periodic background health checks to detect connection loss. It uses silent TCP pings to avoid interrupting your work and will automatically exit if the device is unreachable, similar to an SSH session.
|
|
369
|
+
|
|
370
|
+
**2. Device Discovery (WS-Discovery)**
|
|
371
|
+
|
|
372
|
+
The CLI includes automatic ONVIF device discovery using the WS-Discovery protocol. This feature allows you to find all ONVIF-compliant devices on your local network without knowing their IP addresses beforehand.
|
|
373
|
+
|
|
374
|
+
**Discover and Connect Interactively:**
|
|
375
|
+
```bash
|
|
376
|
+
# Discover devices and enter interactive mode
|
|
377
|
+
onvif --discover --username admin --password admin123 --interactive
|
|
378
|
+
|
|
379
|
+
# Short form
|
|
380
|
+
onvif -d -u admin -p admin123 -i
|
|
381
|
+
|
|
382
|
+
# Discover and interactive (will prompt for credentials)
|
|
383
|
+
onvif -d -i
|
|
384
|
+
```
|
|
385
|
+
|
|
386
|
+
**Discover and Execute Command:**
|
|
387
|
+
```bash
|
|
388
|
+
# Discover devices and execute a command on the selected device
|
|
389
|
+
onvif media GetProfiles --discover --username admin --password admin123
|
|
390
|
+
|
|
391
|
+
# Short form
|
|
392
|
+
onvif media GetProfiles -d -u admin -p admin123
|
|
393
|
+
```
|
|
394
|
+
|
|
395
|
+
**How Device Discovery Works:**
|
|
396
|
+
|
|
397
|
+
1. **Automatic Network Scanning**: Sends a WS-Discovery Probe message to the multicast address `239.255.255.250:3702`
|
|
398
|
+
2. **Device Detection**: Listens for ProbeMatch responses from ONVIF devices (default timeout: 4 seconds)
|
|
399
|
+
3. **Interactive Selection**: Displays a numbered list of discovered devices with their details:
|
|
400
|
+
- Device UUID (Endpoint Reference)
|
|
401
|
+
- XAddrs (ONVIF service URLs)
|
|
402
|
+
- Device Types (e.g., NetworkVideoTransmitter)
|
|
403
|
+
- Scopes (name, location, hardware, profile information)
|
|
404
|
+
4. **Connection**: Once you select a device, the CLI automatically connects using the discovered host and port
|
|
405
|
+
|
|
406
|
+
**Example Discovery Output:**
|
|
407
|
+
```
|
|
408
|
+
Discovering ONVIF devices on network...
|
|
409
|
+
Network interface: 192.168.1.100
|
|
410
|
+
Timeout: 4s
|
|
411
|
+
|
|
412
|
+
Found 2 ONVIF device(s):
|
|
413
|
+
|
|
414
|
+
[1] 192.168.1.14:2020
|
|
415
|
+
[id] uuid:3fa1fe68-b915-4053-a3e1-a8294833fe3c
|
|
416
|
+
[xaddrs] http://192.168.1.14:2020/onvif/device_service
|
|
417
|
+
[types] tdn:NetworkVideoTransmitter
|
|
418
|
+
[scopes] [name/C210] [hardware/C210] [Profile/Streaming] [location/Hong Kong]
|
|
419
|
+
|
|
420
|
+
[2] 192.168.1.17:8000
|
|
421
|
+
[id] urn:uuid:7d04ff31-61e6-11f0-a00c-6056eef47207
|
|
422
|
+
[xaddrs] http://192.168.1.17:8000/onvif/device_service
|
|
423
|
+
[types] dn:NetworkVideoTransmitter tds:Device
|
|
424
|
+
[scopes] [type/NetworkVideoTransmitter] [location/unknown] [name/IPC_123465959]
|
|
425
|
+
|
|
426
|
+
Select device number 1-2 or q to quit: 1
|
|
427
|
+
|
|
428
|
+
Selected: 192.168.1.14:2020
|
|
429
|
+
```
|
|
430
|
+
|
|
431
|
+
**Notes:**
|
|
432
|
+
|
|
433
|
+
- Discovery only works on the local network (same subnet)
|
|
434
|
+
- Some networks may block multicast traffic (check firewall settings)
|
|
435
|
+
- The `--host` and `--port` arguments are not required when using `--discover`
|
|
436
|
+
- You can still provide `--username` and `--password` upfront to avoid prompts
|
|
205
437
|
|
|
206
|
-
**
|
|
438
|
+
**3. Direct Command Execution**
|
|
207
439
|
|
|
208
440
|
You can also execute a single ONVIF command directly. This is useful for scripting or quick checks.
|
|
209
441
|
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
# ONVIF Python
|
|
2
2
|
|
|
3
3
|
[](https://github.com/nirsimetri/onvif-python?tab=MIT-1-ov-file)
|
|
4
|
-
[](https://deepwiki.com/nirsimetri/onvif-python)
|
|
5
|
+
[](https://pypi.org/project/onvif-python/)
|
|
6
|
+
[](https://clickpy.clickhouse.com/dashboard/onvif-python)
|
|
6
7
|
<br>
|
|
7
|
-
[](https://github.com/nirsimetri/onvif-python/actions/workflows/python-app.yml)
|
|
9
|
+
[](https://github.com/nirsimetri/onvif-python/actions/workflows/python-publish.yml)
|
|
9
10
|
|
|
10
11
|
**This project provides a comprehensive and developer-friendly Python library for working with ONVIF-compliant devices.** It is designed to be reliable, easy to integrate, and flexible enough to support a wide range of ONVIF profiles and services.
|
|
11
12
|
|
|
@@ -123,7 +124,12 @@ Explore more advanced usage and service-specific operations in the [`examples/`]
|
|
|
123
124
|
## ONVIF CLI
|
|
124
125
|
|
|
125
126
|
> [!NOTE]
|
|
126
|
-
> The CLI is automatically installed when you install the `onvif-python` see [Installation](#installation). This feature has been available since onvif-python version [0.1.
|
|
127
|
+
> The CLI is automatically installed when you install the `onvif-python` see [Installation](#installation). This feature has been available since `onvif-python` version [`0.1.1`](https://github.com/nirsimetri/onvif-python/releases/tag/v0.1.1).
|
|
128
|
+
|
|
129
|
+

|
|
130
|
+

|
|
131
|
+

|
|
132
|
+

|
|
127
133
|
|
|
128
134
|
This library includes a powerful command-line interface (CLI) for interacting with ONVIF devices directly from your terminal. It supports both direct command execution and an interactive shell mode, providing a flexible and efficient way to manage and debug ONVIF devices.
|
|
129
135
|
|
|
@@ -134,7 +140,164 @@ This library includes a powerful command-line interface (CLI) for interacting wi
|
|
|
134
140
|
- **Automatic Discovery:** Automatically detects available services on the device.
|
|
135
141
|
- **Connection Management:** Supports HTTP/HTTPS, custom timeouts, and SSL verification.
|
|
136
142
|
- **Data Management:** Store results from commands and use them as parameters in subsequent commands.
|
|
137
|
-
- **Cross-Platform:** Works on Windows, macOS, and
|
|
143
|
+
- **Cross-Platform:** Works on Windows, macOS, Linux, and Raspberry Pi.
|
|
144
|
+
|
|
145
|
+
### Screenshoot
|
|
146
|
+
|
|
147
|
+
<table>
|
|
148
|
+
<tr>
|
|
149
|
+
<td width="34.2%">
|
|
150
|
+
<a href="https://github.com/nirsimetri/onvif-python">
|
|
151
|
+
<img src="https://raw.githubusercontent.com/nirsimetri/onvif-python/refs/heads/main/assets/onvif_cli.png" />
|
|
152
|
+
</a>
|
|
153
|
+
</td>
|
|
154
|
+
<td width="65.8%">
|
|
155
|
+
<a href="https://github.com/nirsimetri/onvif-python">
|
|
156
|
+
<img src="https://raw.githubusercontent.com/nirsimetri/onvif-python/refs/heads/main/assets/onvif_operations.png" />
|
|
157
|
+
</a>
|
|
158
|
+
</td>
|
|
159
|
+
</tr>
|
|
160
|
+
<tr>
|
|
161
|
+
<th align="center">
|
|
162
|
+
Onboarding
|
|
163
|
+
</th>
|
|
164
|
+
<th align="center">
|
|
165
|
+
List available operations
|
|
166
|
+
</th>
|
|
167
|
+
</tr>
|
|
168
|
+
</table>
|
|
169
|
+
|
|
170
|
+
### Help Command
|
|
171
|
+
|
|
172
|
+
<details>
|
|
173
|
+
<summary><b>1. Direct CLI</b></summary>
|
|
174
|
+
|
|
175
|
+
```bash
|
|
176
|
+
usage: onvif [-h] [--host HOST] [--port PORT] [--username USERNAME] [--password PASSWORD] [--discover] [--timeout TIMEOUT] [--https] [--no-verify]
|
|
177
|
+
[--no-patch] [--interactive] [--debug] [--wsdl WSDL] [--cache {all,db,mem,none}]
|
|
178
|
+
[service] [method] [params ...]
|
|
179
|
+
|
|
180
|
+
ONVIF Terminal Client —
|
|
181
|
+
https://github.com/nirsimetri/onvif-python
|
|
182
|
+
|
|
183
|
+
positional arguments:
|
|
184
|
+
service ONVIF service name (e.g., devicemgmt, media, ptz)
|
|
185
|
+
method Service method name (e.g., GetCapabilities, GetProfiles)
|
|
186
|
+
params Method parameters as Simple Parameter or JSON string
|
|
187
|
+
|
|
188
|
+
options:
|
|
189
|
+
-h, --help show this help message and exit
|
|
190
|
+
--host HOST, -H HOST ONVIF device IP address or hostname
|
|
191
|
+
--port PORT, -P PORT ONVIF device port (default: 80)
|
|
192
|
+
--username USERNAME, -u USERNAME
|
|
193
|
+
Username for authentication
|
|
194
|
+
--password PASSWORD, -p PASSWORD
|
|
195
|
+
Password for authentication
|
|
196
|
+
--discover, -d Discover ONVIF devices on the network using WS-Discovery
|
|
197
|
+
--timeout TIMEOUT Connection timeout in seconds (default: 10)
|
|
198
|
+
--https Use HTTPS instead of HTTP
|
|
199
|
+
--no-verify Disable SSL certificate verification
|
|
200
|
+
--no-patch Disable ZeepPatcher
|
|
201
|
+
--interactive, -i Start interactive mode
|
|
202
|
+
--debug Enable debug mode with XML capture
|
|
203
|
+
--wsdl WSDL Custom WSDL directory path
|
|
204
|
+
--cache {all,db,mem,none}
|
|
205
|
+
Caching mode for ONVIFClient (default: all). 'all': memory+disk, 'db': disk-only, 'mem': memory-only, 'none': disabled.
|
|
206
|
+
|
|
207
|
+
Examples:
|
|
208
|
+
# Discover ONVIF devices on network
|
|
209
|
+
onvif --discover --username admin --password admin123 --interactive
|
|
210
|
+
onvif media GetProfiles --discover --username admin
|
|
211
|
+
onvif -d -i
|
|
212
|
+
|
|
213
|
+
# Direct command execution
|
|
214
|
+
onvif devicemgmt GetCapabilities Category=All --host 192.168.1.17 --port 8000 --username admin --password admin123
|
|
215
|
+
onvif ptz ContinuousMove ProfileToken=Profile_1 Velocity={"PanTilt": {"x": -0.1, "y": 0}} --host 192.168.1.17 --port 8000 --username admin --password admin123
|
|
216
|
+
|
|
217
|
+
# Interactive mode
|
|
218
|
+
onvif --host 192.168.1.17 --port 8000 --username admin --password admin123 --interactive
|
|
219
|
+
|
|
220
|
+
# Prompting for username and password
|
|
221
|
+
# (if not provided)
|
|
222
|
+
onvif -H 192.168.1.17 -P 8000 -i
|
|
223
|
+
|
|
224
|
+
# Using HTTPS
|
|
225
|
+
onvif media GetProfiles --host camera.example.com --port 443 --username admin --password admin123 --https
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
</details>
|
|
229
|
+
|
|
230
|
+
<details>
|
|
231
|
+
<summary><b>2. Interactive Shell</b></summary>
|
|
232
|
+
|
|
233
|
+
```bash
|
|
234
|
+
ONVIF Interactive Shell Commands -
|
|
235
|
+
https://github.com/nirsimetri/onvif-python
|
|
236
|
+
|
|
237
|
+
Basic Commands:
|
|
238
|
+
capabilities, caps - Show device capabilities
|
|
239
|
+
services - Show available services with details
|
|
240
|
+
info - Show connection and device information
|
|
241
|
+
exit, quit - Exit the shell
|
|
242
|
+
shortcuts - Show available shortcuts
|
|
243
|
+
help <command> - Show help for a specific command
|
|
244
|
+
|
|
245
|
+
Navigation Commands:
|
|
246
|
+
<service> - Enter service mode (e.g., devicemgmt, media)
|
|
247
|
+
cd <service> - Enter service mode (alias)
|
|
248
|
+
ls - List commands/services/methods in grid format
|
|
249
|
+
up - Exit current service mode (go up one level)
|
|
250
|
+
pwd - Show current service context
|
|
251
|
+
clear - Clear terminal screen
|
|
252
|
+
|
|
253
|
+
Service Mode Commands:
|
|
254
|
+
desc <method> - Show method documentation
|
|
255
|
+
type <method> - Show input/output types from WSDL
|
|
256
|
+
|
|
257
|
+
Method Execution:
|
|
258
|
+
<method> - Execute method without parameters
|
|
259
|
+
<method> {"param": "value"} - Execute method with JSON parameters
|
|
260
|
+
<method> param=value - Execute method with simple parameters
|
|
261
|
+
|
|
262
|
+
Data Management:
|
|
263
|
+
store <name> - Store last result with a name
|
|
264
|
+
show <name> - Show stored data
|
|
265
|
+
show <name>.attribute - Show specific attribute
|
|
266
|
+
show - List all stored data
|
|
267
|
+
rm <name> - Remove stored data by name
|
|
268
|
+
cls - Clear all stored data
|
|
269
|
+
|
|
270
|
+
Using Stored Data in Methods:
|
|
271
|
+
Use $variable syntax to reference stored data in method parameters:
|
|
272
|
+
- $profiles[0].token - Access list element and attribute
|
|
273
|
+
- $profiles[0].VideoSourceConfiguration.SourceToken
|
|
274
|
+
|
|
275
|
+
Example:
|
|
276
|
+
GetProfiles - Get profiles
|
|
277
|
+
store profiles - Store result
|
|
278
|
+
show profiles[0].token - Show first profile token
|
|
279
|
+
GetImagingSettings VideoSourceToken=$profiles[0].VideoSourceConfiguration.SourceToken
|
|
280
|
+
|
|
281
|
+
Debug Commands:
|
|
282
|
+
debug - Show last SOAP request & response (if --debug enabled)
|
|
283
|
+
|
|
284
|
+
Tab Completion:
|
|
285
|
+
Use TAB key for auto-completion of commands, services, and methods
|
|
286
|
+
Type partial commands to see suggestions
|
|
287
|
+
|
|
288
|
+
Examples:
|
|
289
|
+
192.168.1.17:8000 > caps # Show capabilities
|
|
290
|
+
192.168.1.17:8000 > dev<TAB> # Completes to 'devicemgmt'
|
|
291
|
+
192.168.1.17:8000 > cd devicemgmt # Enter device management
|
|
292
|
+
192.168.1.17:8000/devicemgmt > Get<TAB> # Show methods starting with 'Get'
|
|
293
|
+
192.168.1.17:8000/devicemgmt > GetServices {"IncludeCapability": true}
|
|
294
|
+
192.168.1.17:8000/devicemgmt > GetServices IncludeCapability=True
|
|
295
|
+
192.168.1.17:8000/devicemgmt > store services_info
|
|
296
|
+
192.168.1.17:8000/devicemgmt > up # Exit service mode
|
|
297
|
+
192.168.1.17:8000 > # Back to root context
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
</details>
|
|
138
301
|
|
|
139
302
|
### Usage
|
|
140
303
|
|
|
@@ -163,9 +326,78 @@ If you omit the username or password, you will be prompted to enter them securel
|
|
|
163
326
|
| `show <name>` | Display a stored variable |
|
|
164
327
|
| `exit` / `quit` | Exit the shell |
|
|
165
328
|
|
|
166
|
-
|
|
329
|
+
> [!IMPORTANT]
|
|
330
|
+
> You can see all the other commands available in the interactive shell by trying it out directly. The interactive shell runs periodic background health checks to detect connection loss. It uses silent TCP pings to avoid interrupting your work and will automatically exit if the device is unreachable, similar to an SSH session.
|
|
331
|
+
|
|
332
|
+
**2. Device Discovery (WS-Discovery)**
|
|
333
|
+
|
|
334
|
+
The CLI includes automatic ONVIF device discovery using the WS-Discovery protocol. This feature allows you to find all ONVIF-compliant devices on your local network without knowing their IP addresses beforehand.
|
|
335
|
+
|
|
336
|
+
**Discover and Connect Interactively:**
|
|
337
|
+
```bash
|
|
338
|
+
# Discover devices and enter interactive mode
|
|
339
|
+
onvif --discover --username admin --password admin123 --interactive
|
|
340
|
+
|
|
341
|
+
# Short form
|
|
342
|
+
onvif -d -u admin -p admin123 -i
|
|
343
|
+
|
|
344
|
+
# Discover and interactive (will prompt for credentials)
|
|
345
|
+
onvif -d -i
|
|
346
|
+
```
|
|
347
|
+
|
|
348
|
+
**Discover and Execute Command:**
|
|
349
|
+
```bash
|
|
350
|
+
# Discover devices and execute a command on the selected device
|
|
351
|
+
onvif media GetProfiles --discover --username admin --password admin123
|
|
352
|
+
|
|
353
|
+
# Short form
|
|
354
|
+
onvif media GetProfiles -d -u admin -p admin123
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
**How Device Discovery Works:**
|
|
358
|
+
|
|
359
|
+
1. **Automatic Network Scanning**: Sends a WS-Discovery Probe message to the multicast address `239.255.255.250:3702`
|
|
360
|
+
2. **Device Detection**: Listens for ProbeMatch responses from ONVIF devices (default timeout: 4 seconds)
|
|
361
|
+
3. **Interactive Selection**: Displays a numbered list of discovered devices with their details:
|
|
362
|
+
- Device UUID (Endpoint Reference)
|
|
363
|
+
- XAddrs (ONVIF service URLs)
|
|
364
|
+
- Device Types (e.g., NetworkVideoTransmitter)
|
|
365
|
+
- Scopes (name, location, hardware, profile information)
|
|
366
|
+
4. **Connection**: Once you select a device, the CLI automatically connects using the discovered host and port
|
|
367
|
+
|
|
368
|
+
**Example Discovery Output:**
|
|
369
|
+
```
|
|
370
|
+
Discovering ONVIF devices on network...
|
|
371
|
+
Network interface: 192.168.1.100
|
|
372
|
+
Timeout: 4s
|
|
373
|
+
|
|
374
|
+
Found 2 ONVIF device(s):
|
|
375
|
+
|
|
376
|
+
[1] 192.168.1.14:2020
|
|
377
|
+
[id] uuid:3fa1fe68-b915-4053-a3e1-a8294833fe3c
|
|
378
|
+
[xaddrs] http://192.168.1.14:2020/onvif/device_service
|
|
379
|
+
[types] tdn:NetworkVideoTransmitter
|
|
380
|
+
[scopes] [name/C210] [hardware/C210] [Profile/Streaming] [location/Hong Kong]
|
|
381
|
+
|
|
382
|
+
[2] 192.168.1.17:8000
|
|
383
|
+
[id] urn:uuid:7d04ff31-61e6-11f0-a00c-6056eef47207
|
|
384
|
+
[xaddrs] http://192.168.1.17:8000/onvif/device_service
|
|
385
|
+
[types] dn:NetworkVideoTransmitter tds:Device
|
|
386
|
+
[scopes] [type/NetworkVideoTransmitter] [location/unknown] [name/IPC_123465959]
|
|
387
|
+
|
|
388
|
+
Select device number 1-2 or q to quit: 1
|
|
389
|
+
|
|
390
|
+
Selected: 192.168.1.14:2020
|
|
391
|
+
```
|
|
392
|
+
|
|
393
|
+
**Notes:**
|
|
394
|
+
|
|
395
|
+
- Discovery only works on the local network (same subnet)
|
|
396
|
+
- Some networks may block multicast traffic (check firewall settings)
|
|
397
|
+
- The `--host` and `--port` arguments are not required when using `--discover`
|
|
398
|
+
- You can still provide `--username` and `--password` upfront to avoid prompts
|
|
167
399
|
|
|
168
|
-
**
|
|
400
|
+
**3. Direct Command Execution**
|
|
169
401
|
|
|
170
402
|
You can also execute a single ONVIF command directly. This is useful for scripting or quick checks.
|
|
171
403
|
|
|
@@ -3,14 +3,7 @@
|
|
|
3
3
|
from .client import ONVIFClient
|
|
4
4
|
from .operator import ONVIFOperator, CacheMode
|
|
5
5
|
from .utils import ONVIFWSDL, ONVIFOperationException, ONVIFErrorHandler, ZeepPatcher
|
|
6
|
-
|
|
7
|
-
# CLI module is optional - import only if needed
|
|
8
|
-
try:
|
|
9
|
-
from .cli import main as ONVIFCLI
|
|
10
|
-
|
|
11
|
-
CLI_AVAILABLE = True
|
|
12
|
-
except ImportError:
|
|
13
|
-
CLI_AVAILABLE = False
|
|
6
|
+
from .cli import main as ONVIFCLI
|
|
14
7
|
|
|
15
8
|
__all__ = [
|
|
16
9
|
"ONVIFClient",
|
|
@@ -20,7 +13,5 @@ __all__ = [
|
|
|
20
13
|
"ONVIFOperationException",
|
|
21
14
|
"ONVIFErrorHandler",
|
|
22
15
|
"ZeepPatcher",
|
|
16
|
+
"ONVIFCLI",
|
|
23
17
|
]
|
|
24
|
-
|
|
25
|
-
if CLI_AVAILABLE:
|
|
26
|
-
__all__.append("ONVIFCLI")
|