onvif-python 0.1.1__tar.gz → 0.1.2__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.
Files changed (128) hide show
  1. {onvif_python-0.1.1/onvif_python.egg-info → onvif_python-0.1.2}/PKG-INFO +233 -8
  2. {onvif_python-0.1.1 → onvif_python-0.1.2}/README.md +232 -7
  3. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/__init__.py +2 -11
  4. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/cli/interactive.py +83 -57
  5. onvif_python-0.1.2/onvif/cli/main.py +472 -0
  6. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/cli/utils.py +1 -2
  7. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/client.py +2 -1
  8. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/operator.py +0 -1
  9. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/utils/error_handlers.py +2 -3
  10. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/utils/exceptions.py +1 -1
  11. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/utils/xml_capture.py +1 -1
  12. {onvif_python-0.1.1 → onvif_python-0.1.2/onvif_python.egg-info}/PKG-INFO +233 -8
  13. {onvif_python-0.1.1 → onvif_python-0.1.2}/pyproject.toml +1 -1
  14. {onvif_python-0.1.1 → onvif_python-0.1.2}/tests/test_client.py +10 -10
  15. {onvif_python-0.1.1 → onvif_python-0.1.2}/tests/test_core.py +17 -17
  16. {onvif_python-0.1.1 → onvif_python-0.1.2}/tests/test_error_handlers.py +9 -9
  17. {onvif_python-0.1.1 → onvif_python-0.1.2}/tests/test_exceptions.py +1 -1
  18. onvif_python-0.1.1/onvif/cli/main.py +0 -216
  19. {onvif_python-0.1.1 → onvif_python-0.1.2}/LICENSE.md +0 -0
  20. {onvif_python-0.1.1 → onvif_python-0.1.2}/MANIFEST.in +0 -0
  21. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/cli/__init__.py +0 -0
  22. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/cli/__main__.py +0 -0
  23. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/services/__init__.py +0 -0
  24. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/services/accesscontrol.py +0 -0
  25. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/services/accessrules.py +0 -0
  26. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/services/actionengine.py +0 -0
  27. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/services/analytics/analytics.py +0 -0
  28. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/services/analytics/ruleengine.py +0 -0
  29. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/services/analyticsdevice.py +0 -0
  30. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/services/appmgmt.py +0 -0
  31. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/services/authenticationbehavior.py +0 -0
  32. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/services/credential.py +0 -0
  33. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/services/deviceio.py +0 -0
  34. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/services/devicemgmt.py +0 -0
  35. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/services/display.py +0 -0
  36. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/services/doorcontrol.py +0 -0
  37. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/services/events/events.py +0 -0
  38. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/services/events/notification.py +0 -0
  39. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/services/events/pullpoint.py +0 -0
  40. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/services/events/subscription.py +0 -0
  41. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/services/imaging.py +0 -0
  42. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/services/media.py +0 -0
  43. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/services/media2.py +0 -0
  44. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/services/provisioning.py +0 -0
  45. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/services/ptz.py +0 -0
  46. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/services/receiver.py +0 -0
  47. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/services/recording.py +0 -0
  48. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/services/replay.py +0 -0
  49. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/services/schedule.py +0 -0
  50. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/services/search.py +0 -0
  51. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/services/security/advancedsecurity.py +0 -0
  52. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/services/security/authorizationserver.py +0 -0
  53. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/services/security/dot1x.py +0 -0
  54. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/services/security/jwt.py +0 -0
  55. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/services/security/keystore.py +0 -0
  56. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/services/security/mediasigning.py +0 -0
  57. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/services/security/tlsserver.py +0 -0
  58. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/services/thermal.py +0 -0
  59. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/services/uplink.py +0 -0
  60. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/utils/__init__.py +0 -0
  61. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/utils/wsdl.py +0 -0
  62. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/utils/zeep.py +0 -0
  63. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/wsdl/ver10/accesscontrol/wsdl/index.html +0 -0
  64. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/wsdl/ver10/accessrules/wsdl/accessrules.wsdl +0 -0
  65. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/wsdl/ver10/accessrules/wsdl/index.html +0 -0
  66. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/wsdl/ver10/actionengine.wsdl +0 -0
  67. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/wsdl/ver10/advancedsecurity/wsdl/advancedsecurity.wsdl +0 -0
  68. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/wsdl/ver10/advancedsecurity/wsdl/index.html +0 -0
  69. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/wsdl/ver10/analyticsdevice.wsdl +0 -0
  70. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/wsdl/ver10/appmgmt/wsdl/appmgmt.wsdl +0 -0
  71. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/wsdl/ver10/appmgmt/wsdl/index.html +0 -0
  72. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/wsdl/ver10/authenticationbehavior/wsdl/authenticationbehavior.wsdl +0 -0
  73. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/wsdl/ver10/authenticationbehavior/wsdl/index.html +0 -0
  74. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/wsdl/ver10/credential/wsdl/credential.wsdl +0 -0
  75. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/wsdl/ver10/credential/wsdl/index.html +0 -0
  76. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/wsdl/ver10/device/wsdl/devicemgmt.wsdl +0 -0
  77. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/wsdl/ver10/deviceio.wsdl +0 -0
  78. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/wsdl/ver10/display/display.wsdl +0 -0
  79. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/wsdl/ver10/display/wsdl/index.htm +0 -0
  80. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/wsdl/ver10/display.wsdl +0 -0
  81. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/wsdl/ver10/doorcontrol/wsdl/index.html +0 -0
  82. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/wsdl/ver10/events/wsdl/bw-2-vs-mod.wsdl +0 -0
  83. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/wsdl/ver10/events/wsdl/event-vs.wsdl +0 -0
  84. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/wsdl/ver10/events/wsdl/event.wsdl +0 -0
  85. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/wsdl/ver10/events/wsdl/index.html +0 -0
  86. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/wsdl/ver10/federatedsearch.wsdl +0 -0
  87. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/wsdl/ver10/media/wsdl/media.wsdl +0 -0
  88. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/wsdl/ver10/pacs/accesscontrol.wsdl +0 -0
  89. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/wsdl/ver10/pacs/doorcontrol.wsdl +0 -0
  90. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/wsdl/ver10/pacs/types.xsd +0 -0
  91. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/wsdl/ver10/provisioning/wsdl/provisioning.wsdl +0 -0
  92. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/wsdl/ver10/receiver.wsdl +0 -0
  93. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/wsdl/ver10/recording.wsdl +0 -0
  94. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/wsdl/ver10/replay.wsdl +0 -0
  95. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/wsdl/ver10/schedule/wsdl/index.html +0 -0
  96. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/wsdl/ver10/schedule/wsdl/schedule.wsdl +0 -0
  97. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/wsdl/ver10/schema/common.xsd +0 -0
  98. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/wsdl/ver10/schema/metadatastream.xsd +0 -0
  99. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/wsdl/ver10/schema/onvif.xsd +0 -0
  100. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/wsdl/ver10/search.wsdl +0 -0
  101. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/wsdl/ver10/thermal/wsdl/index.html +0 -0
  102. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/wsdl/ver10/thermal/wsdl/thermal.wsdl +0 -0
  103. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/wsdl/ver10/topics/topicns.xml +0 -0
  104. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/wsdl/ver10/uplink/wsdl/index.html +0 -0
  105. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/wsdl/ver10/uplink/wsdl/uplink.wsdl +0 -0
  106. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/wsdl/ver20/analytics/humanbody.xsd +0 -0
  107. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/wsdl/ver20/analytics/humanface.xsd +0 -0
  108. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/wsdl/ver20/analytics/index.html +0 -0
  109. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/wsdl/ver20/analytics/radiometry.xsd +0 -0
  110. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/wsdl/ver20/analytics/rules.xsd +0 -0
  111. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/wsdl/ver20/analytics/wsdl/analytics.wsdl +0 -0
  112. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/wsdl/ver20/analytics/wsdl/index.html +0 -0
  113. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/wsdl/ver20/imaging/wsdl/imaging.wsdl +0 -0
  114. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/wsdl/ver20/media/wsdl/index.html +0 -0
  115. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/wsdl/ver20/media/wsdl/media.wsdl +0 -0
  116. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/wsdl/ver20/ptz/wsdl/ptz.wsdl +0 -0
  117. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/wsdl/ver20/util/federated_search_documentation.html +0 -0
  118. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/wsdl/ver20/util/fedsearch-docu-viewer.xsl +0 -0
  119. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/wsdl/ver20/util/onvif-wsdl-viewer.xsl +0 -0
  120. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif/wsdl/ver20/util/operationIndex.html +0 -0
  121. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif_python.egg-info/SOURCES.txt +0 -0
  122. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif_python.egg-info/dependency_links.txt +0 -0
  123. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif_python.egg-info/entry_points.txt +0 -0
  124. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif_python.egg-info/requires.txt +0 -0
  125. {onvif_python-0.1.1 → onvif_python-0.1.2}/onvif_python.egg-info/top_level.txt +0 -0
  126. {onvif_python-0.1.1 → onvif_python-0.1.2}/setup.cfg +0 -0
  127. {onvif_python-0.1.1 → onvif_python-0.1.2}/setup.py +0 -0
  128. {onvif_python-0.1.1 → onvif_python-0.1.2}/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.1
3
+ Version: 0.1.2
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
@@ -40,10 +40,11 @@ Dynamic: license-file
40
40
 
41
41
  [![License](https://img.shields.io/badge/License-MIT-blue)](https://github.com/nirsimetri/onvif-python?tab=MIT-1-ov-file)
42
42
  [![DeepWiki](https://img.shields.io/badge/DeepWiki-AI%20Wiki-orange)](https://deepwiki.com/nirsimetri/onvif-python)
43
- [![Release](https://img.shields.io/badge/Release-v0.1.1-red?logo=archive)](https://github.com/nirsimetri/onvif-python/releases)
44
- <br>
45
- [![PyPI](https://img.shields.io/badge/PyPI-0.1.1-yellow?logo=archive)](https://pypi.org/project/onvif-python/)
43
+ [![PyPI](https://img.shields.io/badge/PyPI-0.1.2-yellow?logo=archive)](https://pypi.org/project/onvif-python/)
46
44
  [![Downloads](https://img.shields.io/pypi/dm/onvif-python?label=PyPI%20Downloads)](https://clickpy.clickhouse.com/dashboard/onvif-python)
45
+ <br>
46
+ [![Build](https://github.com/nirsimetri/onvif-python/actions/workflows/python-app.yml/badge.svg?branch=main)](https://github.com/nirsimetri/onvif-python/actions/workflows/python-app.yml)
47
+ [![Upload Python Package](https://github.com/nirsimetri/onvif-python/actions/workflows/python-publish.yml/badge.svg)](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.0](https://github.com/nirsimetri/onvif-python/releases/tag/v0.1.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
+ ![Windows](https://img.shields.io/badge/Windows-0078D6?style=plastic&logo=gitforwindows&logoColor=white)
168
+ ![Linux](https://img.shields.io/badge/Linux-FCC624?style=plastic&logo=linux&logoColor=black)
169
+ ![macOS](https://img.shields.io/badge/macOS-1A9FEE?style=plastic&logo=apple&logoColor=black)
170
+ ![Raspberry Pi](https://img.shields.io/badge/Raspberry%20Pi-A22846?style=plastic&logo=raspberrypi&logoColor=black)
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,160 @@ 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 Linux.
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="./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="./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
+
282
+ Navigation Commands:
283
+ <service> - Enter service mode (e.g., devicemgmt, media)
284
+ cd <service> - Enter service mode (alias)
285
+ ls - List commands/services/methods in grid format
286
+ up - Exit current service mode (go up one level)
287
+ pwd - Show current service context
288
+ clear - Clear terminal screen
289
+ desc <method> - Show method documentation in service mode
290
+
291
+ Method Execution:
292
+ <method> - Execute method without parameters
293
+ <method> {"param": "value"} - Execute method with JSON parameters
294
+ <method> param=value - Execute method with simple parameters
295
+
296
+ Data Management:
297
+ store <name> - Store last result with a name
298
+ show <name> - Show stored data
299
+ show <name>.attribute - Show specific attribute
300
+ show - List all stored data
301
+ rm <name> - Remove stored data by name
302
+ cls - Clear all stored data
303
+
304
+ Using Stored Data in Methods:
305
+ Use $variable syntax to reference stored data in method parameters:
306
+ - $profiles[0].token - Access list element and attribute
307
+ - $profiles[0].VideoSourceConfiguration.SourceToken
308
+
309
+ Example:
310
+ GetProfiles - Get profiles
311
+ store profiles - Store result
312
+ show profiles[0].token - Show first profile token
313
+ GetImagingSettings VideoSourceToken=$profiles[0].VideoSourceConfiguration.SourceToken
314
+
315
+ Debug Commands:
316
+ debug - Show last SOAP request & response (if --debug enabled)
317
+
318
+ Tab Completion:
319
+ Use TAB key for auto-completion of commands, services, and methods
320
+ Type partial commands to see suggestions
321
+
322
+ Examples:
323
+ 192.168.1.17:8000 > caps # Show capabilities
324
+ 192.168.1.17:8000 > dev<TAB> # Completes to 'devicemgmt'
325
+ 192.168.1.17:8000 > cd devicemgmt # Enter device management
326
+ 192.168.1.17:8000/devicemgmt > Get<TAB> # Show methods starting with 'Get'
327
+ 192.168.1.17:8000/devicemgmt > GetServices {"IncludeCapability": true}
328
+ 192.168.1.17:8000/devicemgmt > GetServices IncludeCapability=True
329
+ 192.168.1.17:8000/devicemgmt > store services_info
330
+ 192.168.1.17:8000/devicemgmt > up # Exit service mode
331
+ 192.168.1.17:8000 > # Back to root context
332
+ ```
333
+
334
+ </details>
176
335
 
177
336
  ### Usage
178
337
 
@@ -201,9 +360,75 @@ If you omit the username or password, you will be prompted to enter them securel
201
360
  | `show <name>` | Display a stored variable |
202
361
  | `exit` / `quit` | Exit the shell |
203
362
 
204
- You can see all the commands available in the interactive shell by trying them directly.
363
+ > [!IMPORTANT]
364
+ > 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.
365
+
366
+ **2. Device Discovery (WS-Discovery)**
367
+
368
+ 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.
369
+
370
+ **Discover and Connect Interactively:**
371
+ ```bash
372
+ # Discover devices and enter interactive mode
373
+ onvif --discover --username admin --password admin123 --interactive
374
+
375
+ # Short form
376
+ onvif -d -u admin -p admin123 -i
377
+ ```
378
+
379
+ **Discover and Execute Command:**
380
+ ```bash
381
+ # Discover devices and execute a command on the selected device
382
+ onvif media GetProfiles --discover --username admin --password admin123
383
+
384
+ # Short form
385
+ onvif media GetProfiles -d -u admin -p admin123
386
+ ```
387
+
388
+ **How Device Discovery Works:**
389
+
390
+ 1. **Automatic Network Scanning**: Sends a WS-Discovery Probe message to the multicast address `239.255.255.250:3702`
391
+ 2. **Device Detection**: Listens for ProbeMatch responses from ONVIF devices (default timeout: 4 seconds)
392
+ 3. **Interactive Selection**: Displays a numbered list of discovered devices with their details:
393
+ - Device UUID (Endpoint Reference)
394
+ - XAddrs (ONVIF service URLs)
395
+ - Device Types (e.g., NetworkVideoTransmitter)
396
+ - Scopes (name, location, hardware, profile information)
397
+ 4. **Connection**: Once you select a device, the CLI automatically connects using the discovered host and port
398
+
399
+ **Example Discovery Output:**
400
+ ```
401
+ Discovering ONVIF devices on network...
402
+ Network interface: 192.168.1.100
403
+ Timeout: 4s
404
+
405
+ Found 2 ONVIF device(s):
406
+
407
+ [1] 192.168.1.14:2020
408
+ [id] uuid:3fa1fe68-b915-4053-a3e1-a8294833fe3c
409
+ [xaddrs] http://192.168.1.14:2020/onvif/device_service
410
+ [types] tdn:NetworkVideoTransmitter
411
+ [scopes] [name/C210] [hardware/C210] [Profile/Streaming] [location/Hong Kong]
412
+
413
+ [2] 192.168.1.17:8000
414
+ [id] urn:uuid:7d04ff31-61e6-11f0-a00c-6056eef47207
415
+ [xaddrs] http://192.168.1.17:8000/onvif/device_service
416
+ [types] dn:NetworkVideoTransmitter tds:Device
417
+ [scopes] [type/NetworkVideoTransmitter] [location/unknown] [name/IPC_123465959]
418
+
419
+ Select device number 1-2 or q to quit: 1
420
+
421
+ Selected: 192.168.1.14:2020
422
+ ```
423
+
424
+ **Notes:**
425
+
426
+ - Discovery only works on the local network (same subnet)
427
+ - Some networks may block multicast traffic (check firewall settings)
428
+ - The `--host` and `--port` arguments are not required when using `--discover`
429
+ - You can still provide `--username` and `--password` upfront to avoid prompts
205
430
 
206
- **2. Direct Command Execution**
431
+ **3. Direct Command Execution**
207
432
 
208
433
  You can also execute a single ONVIF command directly. This is useful for scripting or quick checks.
209
434
 
@@ -2,10 +2,11 @@
2
2
 
3
3
  [![License](https://img.shields.io/badge/License-MIT-blue)](https://github.com/nirsimetri/onvif-python?tab=MIT-1-ov-file)
4
4
  [![DeepWiki](https://img.shields.io/badge/DeepWiki-AI%20Wiki-orange)](https://deepwiki.com/nirsimetri/onvif-python)
5
- [![Release](https://img.shields.io/badge/Release-v0.1.1-red?logo=archive)](https://github.com/nirsimetri/onvif-python/releases)
6
- <br>
7
- [![PyPI](https://img.shields.io/badge/PyPI-0.1.1-yellow?logo=archive)](https://pypi.org/project/onvif-python/)
5
+ [![PyPI](https://img.shields.io/badge/PyPI-0.1.2-yellow?logo=archive)](https://pypi.org/project/onvif-python/)
8
6
  [![Downloads](https://img.shields.io/pypi/dm/onvif-python?label=PyPI%20Downloads)](https://clickpy.clickhouse.com/dashboard/onvif-python)
7
+ <br>
8
+ [![Build](https://github.com/nirsimetri/onvif-python/actions/workflows/python-app.yml/badge.svg?branch=main)](https://github.com/nirsimetri/onvif-python/actions/workflows/python-app.yml)
9
+ [![Upload Python Package](https://github.com/nirsimetri/onvif-python/actions/workflows/python-publish.yml/badge.svg)](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.0](https://github.com/nirsimetri/onvif-python/releases/tag/v0.1.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
+ ![Windows](https://img.shields.io/badge/Windows-0078D6?style=plastic&logo=gitforwindows&logoColor=white)
130
+ ![Linux](https://img.shields.io/badge/Linux-FCC624?style=plastic&logo=linux&logoColor=black)
131
+ ![macOS](https://img.shields.io/badge/macOS-1A9FEE?style=plastic&logo=apple&logoColor=black)
132
+ ![Raspberry Pi](https://img.shields.io/badge/Raspberry%20Pi-A22846?style=plastic&logo=raspberrypi&logoColor=black)
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,160 @@ 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 Linux.
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="./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="./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
+
244
+ Navigation Commands:
245
+ <service> - Enter service mode (e.g., devicemgmt, media)
246
+ cd <service> - Enter service mode (alias)
247
+ ls - List commands/services/methods in grid format
248
+ up - Exit current service mode (go up one level)
249
+ pwd - Show current service context
250
+ clear - Clear terminal screen
251
+ desc <method> - Show method documentation in service mode
252
+
253
+ Method Execution:
254
+ <method> - Execute method without parameters
255
+ <method> {"param": "value"} - Execute method with JSON parameters
256
+ <method> param=value - Execute method with simple parameters
257
+
258
+ Data Management:
259
+ store <name> - Store last result with a name
260
+ show <name> - Show stored data
261
+ show <name>.attribute - Show specific attribute
262
+ show - List all stored data
263
+ rm <name> - Remove stored data by name
264
+ cls - Clear all stored data
265
+
266
+ Using Stored Data in Methods:
267
+ Use $variable syntax to reference stored data in method parameters:
268
+ - $profiles[0].token - Access list element and attribute
269
+ - $profiles[0].VideoSourceConfiguration.SourceToken
270
+
271
+ Example:
272
+ GetProfiles - Get profiles
273
+ store profiles - Store result
274
+ show profiles[0].token - Show first profile token
275
+ GetImagingSettings VideoSourceToken=$profiles[0].VideoSourceConfiguration.SourceToken
276
+
277
+ Debug Commands:
278
+ debug - Show last SOAP request & response (if --debug enabled)
279
+
280
+ Tab Completion:
281
+ Use TAB key for auto-completion of commands, services, and methods
282
+ Type partial commands to see suggestions
283
+
284
+ Examples:
285
+ 192.168.1.17:8000 > caps # Show capabilities
286
+ 192.168.1.17:8000 > dev<TAB> # Completes to 'devicemgmt'
287
+ 192.168.1.17:8000 > cd devicemgmt # Enter device management
288
+ 192.168.1.17:8000/devicemgmt > Get<TAB> # Show methods starting with 'Get'
289
+ 192.168.1.17:8000/devicemgmt > GetServices {"IncludeCapability": true}
290
+ 192.168.1.17:8000/devicemgmt > GetServices IncludeCapability=True
291
+ 192.168.1.17:8000/devicemgmt > store services_info
292
+ 192.168.1.17:8000/devicemgmt > up # Exit service mode
293
+ 192.168.1.17:8000 > # Back to root context
294
+ ```
295
+
296
+ </details>
138
297
 
139
298
  ### Usage
140
299
 
@@ -163,9 +322,75 @@ If you omit the username or password, you will be prompted to enter them securel
163
322
  | `show <name>` | Display a stored variable |
164
323
  | `exit` / `quit` | Exit the shell |
165
324
 
166
- You can see all the commands available in the interactive shell by trying them directly.
325
+ > [!IMPORTANT]
326
+ > 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.
327
+
328
+ **2. Device Discovery (WS-Discovery)**
329
+
330
+ 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.
331
+
332
+ **Discover and Connect Interactively:**
333
+ ```bash
334
+ # Discover devices and enter interactive mode
335
+ onvif --discover --username admin --password admin123 --interactive
336
+
337
+ # Short form
338
+ onvif -d -u admin -p admin123 -i
339
+ ```
340
+
341
+ **Discover and Execute Command:**
342
+ ```bash
343
+ # Discover devices and execute a command on the selected device
344
+ onvif media GetProfiles --discover --username admin --password admin123
345
+
346
+ # Short form
347
+ onvif media GetProfiles -d -u admin -p admin123
348
+ ```
349
+
350
+ **How Device Discovery Works:**
351
+
352
+ 1. **Automatic Network Scanning**: Sends a WS-Discovery Probe message to the multicast address `239.255.255.250:3702`
353
+ 2. **Device Detection**: Listens for ProbeMatch responses from ONVIF devices (default timeout: 4 seconds)
354
+ 3. **Interactive Selection**: Displays a numbered list of discovered devices with their details:
355
+ - Device UUID (Endpoint Reference)
356
+ - XAddrs (ONVIF service URLs)
357
+ - Device Types (e.g., NetworkVideoTransmitter)
358
+ - Scopes (name, location, hardware, profile information)
359
+ 4. **Connection**: Once you select a device, the CLI automatically connects using the discovered host and port
360
+
361
+ **Example Discovery Output:**
362
+ ```
363
+ Discovering ONVIF devices on network...
364
+ Network interface: 192.168.1.100
365
+ Timeout: 4s
366
+
367
+ Found 2 ONVIF device(s):
368
+
369
+ [1] 192.168.1.14:2020
370
+ [id] uuid:3fa1fe68-b915-4053-a3e1-a8294833fe3c
371
+ [xaddrs] http://192.168.1.14:2020/onvif/device_service
372
+ [types] tdn:NetworkVideoTransmitter
373
+ [scopes] [name/C210] [hardware/C210] [Profile/Streaming] [location/Hong Kong]
374
+
375
+ [2] 192.168.1.17:8000
376
+ [id] urn:uuid:7d04ff31-61e6-11f0-a00c-6056eef47207
377
+ [xaddrs] http://192.168.1.17:8000/onvif/device_service
378
+ [types] dn:NetworkVideoTransmitter tds:Device
379
+ [scopes] [type/NetworkVideoTransmitter] [location/unknown] [name/IPC_123465959]
380
+
381
+ Select device number 1-2 or q to quit: 1
382
+
383
+ Selected: 192.168.1.14:2020
384
+ ```
385
+
386
+ **Notes:**
387
+
388
+ - Discovery only works on the local network (same subnet)
389
+ - Some networks may block multicast traffic (check firewall settings)
390
+ - The `--host` and `--port` arguments are not required when using `--discover`
391
+ - You can still provide `--username` and `--password` upfront to avoid prompts
167
392
 
168
- **2. Direct Command Execution**
393
+ **3. Direct Command Execution**
169
394
 
170
395
  You can also execute a single ONVIF command directly. This is useful for scripting or quick checks.
171
396
 
@@ -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")