Releases: nirsimetri/onvif-python
v0.1.5 — 2025-10-24
PyPI
https://pypi.org/project/onvif-python/0.1.5 (18768898900)
Feat
- [
CLI] Add health check interval option--health-check-interval/-hcifor interactive mode (150cab0) - [
CLI] Add support for multi-binding services in interactive shell (b430b0d)
Fix/Refactor
- [
CLI] Set minimum TLS version to 1.2 for secure connections (c8b7da9) - [
Client] [CLI] Update handling of nested extensions to useExtensionsinstead ofExtension(951c43b) - [
CLI] Style check routine with black (15cddc6)
Docs
- [
Examples] Improve error handling and logging in device_discovery.py (4978902) - Bump README (cf1cc05)
- [
Release] Bump version 0.1.4 → 0.1.5 (abb9428)
Full Changelog: v0.1.4...v0.1.5
v0.1.4 — 2025-10-20
PyPI
https://pypi.org/project/onvif-python/0.1.4 (18636411870)
Feat
- [
CLI] Add--version/-vcommand (3be6027)
Fix/Refactor
- [
CLI] Validate arguments early in discovery mode (b84b9de) - [
CLI] Enhance health check to support TLS and improve error handling (637715e)
Docs
- [
Release] Bump version 0.1.3 → 0.1.4 (94b0f0d)
Full Changelog: v0.1.3...v0.1.4
v0.1.3 — 2025-10-19
PyPI
https://pypi.org/project/onvif-python/0.1.3 (18629570711)
Feat
- [
Client] Add SSL warning formatting for insecure requests (13b69a8) - [
CLI] Implement custom warning format for cleaner output (b181b8a) - [
CLI] Enhance device discovery and selection with HTTPS support (6a4eb58) - [
CLI] Addtypecommand to display input/output types for operations (b439f6a) - [
CLI] Add autocomplete functionality fordesc,type,cd,rm, andshowcommands (824028e)
Fix/Refactor
- [
CLI] Remove redundant help methods, use automatic docstring help (5b0c55b)
CI/CD
- Update workflow triggers for push and pull_request events (6093df0)
- Add CodeQL configuration file and update paths-ignore settings (7881225)
- Move CodeQL config file to a new location and update reference in workflow (61d2a0e)
Docs
- Update README (Change image from github host directly) (c78e090)
- Update commit message guidelines for clarity and consistency (453e389)
- [
Examples] Simplify function docstrings and improve output formatting in device_discovery.py (c845840) - Update DeepWiki badge in README (29b742a)
- [
Examples] Correct error message for XMLCapturePlugin topic parsing (7ba46bd) - [
Release] Bump version 0.1.2 → 0.1.3 (e117043)
Full Changelog: v0.1.2...v0.1.3
v0.1.2 — 2025-10-18
PyPI
https://pypi.org/project/onvif-python/0.1.2 (18612741461)
Feat
- [
CLI] Add device discovery feature using WS-Discovery protocol in ONVIF CLI (8b77654)
Fix/Refactor
- [
CLI] Update GetCapabilities call to include Category parameter (5b55d61) - [
CLI] Correct return statement in print_topics method and styling check (ae10007) - [
CLI] Correct string formatting in device info display and parser description (Python < 3.11) (059ebf4) - [
CLI] Enhance welcome message formatting in interactive shell (091517b) - [
CLI] Improve connection display formatting in interactive shell (Python < 3.12) (c777dea)
CI/CD
- Add paths-ignore option to CodeQL workflow (ba20067)
- Enforce PEP8 Linting (1f2e68a)
- Another linting job (b019380)
- Add Python App workflow (f45f999)
- Add project installation step in CI workflow (ae8b4bc)
- Change Python version from 3.12 to 3.9 (b4dcc14)
- Update workflow triggers for push and pull_request events (6093df0)
Docs
- Fix wrong version in README (5107177)
- Bump screenshoot of ONVIF CLI (1155b56)
- Update README and improve CLI instructions (c24f28b)
- Add detailed help command and interactive shell instructions (3bed945)
- Update badge links and improve formatting in README files (c0ae060)
- Add contributors section in CONTRIBUTING.md (83e53d6)
- [
Release] Bump version 0.1.1 → 0.1.2 (8528ea7)
Full Changelog: v0.1.1...v0.1.2
v0.1.1 — 2025-10-17
Overview
Welcome to v0.1.1! This release marks a significant milestone with the introduction of the ONVIF Command-Line Interface (CLI), a powerful tool for interacting with ONVIF devices directly from your terminal. This feature was the primary focus of this cycle, evolving from its initial concept to a robust, cross-platform utility.
This version includes a feature-rich interactive shell, direct command execution, and numerous bug fixes to improve stability and user experience.
Changelog Summary
PyPI
https://pypi.org/project/onvif-python/0.1.1 (18592240303)
New Features
- Implementation of ONVIF CLI (645be01) (912fd5a) (1f754aa) (d172066) (038bf0b)
- Introduced a comprehensive CLI program accessible via
onviforpython -m onvif.cli. - Supports both an interactive shell (
-i) and direct command execution. - The
desc <method>command in the interactive shell displays detailed documentation and parameter information for any service method, parsed directly from WSDL files. - The interactive shell now includes a background TCP health check that automatically exits the session if the connection to the device is lost, similar to an SSH session.
- The CLI will securely prompt for a password if it is not provided as an argument, using
getpass. - Users can control the WSDL caching behavior (
all,db,mem,none) directly from the command line.
- Introduced a comprehensive CLI program accessible via
Refactor
- Add type hints to ONVIFClient constructor parameters for improved clarity (017d5cb)
- Improve detail extraction in ONVIFOperationException for better error reporting (cd8d088)
Documentation & Test
- Add comprehensive tests for project components and error handling (3bf1ebf)
- Add comprehensive ONVIF CLI section (9fdffb7)
- Added a new, detailed section to
README.mdandREADME_ID.mdexplaining the features and usage of the new ONVIF CLI.
- Added a new, detailed section to
Full Changelog: v0.1.0...v0.1.1
v0.1.0 — 2025-10-16
Overview
This release introduces significant improvements to ONVIF client functionality with enhanced multi-instance support and flexible WSDL directory configuration. Key highlights include:
- Multi-Instance Support: Fixed critical XAddr rewriting issues for pullpoint, subscription, and security services enabling proper multiple services instances
- Custom WSDL Directory: Revolutionary support for custom WSDL directories allowing developers to use their own WSDL files
- Documentation Enhancement: Comprehensive documentation updates for new features and improved usability
Changelog Summary
PyPI
https://pypi.org/project/onvif-python/0.1.0 (18543676990)
New Features
- Custom WSDL Directory Support (65f2570)
- Implemented support for custom WSDL directory in ONVIFClient
- Enhanced
onvif/utils/wsdl.pywith flexible WSDL loading mechanism - Allows developers to specify their own WSDL files directory
- Provides greater flexibility for custom ONVIF implementations
- Maintains backward compatibility with default WSDL behavior
Fixed
- Multi-Instance XAddr Rewriting Fix (1a45f59)
- Fixed critical XAddr rewriting issues for pullpoint, subscription, and security services
- Improved event handling stability in multi-instances service scenarios
Documentation
- Comprehensive Custom WSDL Documentation (9464178)
- Added detailed examples and documentation for custom WSDL directory usage
- Updated both English
README.mdand IndonesianREADME_ID.md - Provided practical code examples showing custom WSDL configuration
- Enhanced developer guide with step-by-step implementation instructions
Technical Improvements
Custom WSDL Directory Support
The new WSDL directory feature provides maximum flexibility for developers:
from onvif import ONVIFClient
# Using custom WSDL directory
client = ONVIFClient(
"192.168.1.17",
8000,
"admin",
"admin123",
wsdl_dir="/path/to/custom/wsdl"
)
# Default behavior (backward compatible)
client = ONVIFClient("192.168.1.17", 8000, "admin", "admin123")Improved Service Resolution
- PullPoint Services: Proper XAddr handling for event subscriptions
- Subscription Services: Same as PullPoint service
- Security Services: Fixed XAddr endpoint resolution when client's host/port differs from device's host/port
Breaking Changes
None — This release maintains full backward compatibility:
- Existing code will continue to function without modifications
- Custom WSDL directory support is optional and doesn't affect default behavior
- All existing service methods and parameters remain unchanged
- Multi-instance fixes are transparent and don't require code changes
Migration Guide
No migration required for existing applications:
- Existing Applications: Continue working without any code changes
- Custom WSDL Users: Can now specify custom WSDL directories using the new
wsdl_dirparameter
Full Changelog: v0.0.9...v0.1.0
v0.0.9 — 2025-10-16
Overview
This release introduces robust service discovery with intelligent fallback mechanisms and critical bug fixes. Key highlights include:
- Enhanced Service Discovery: Revolutionary 3-tier service discovery approach with GetServices → GetCapabilities → Default URLs fallback
- Legacy Device Support: Full compatibility with older ONVIF devices that don't support GetServices
- Critical Bug Fix: Fixed incorrect method call in Uplink service that was causing operation failures
- Project Configuration: Cleaned up unnecessary PyPI URLs after repository verification
Changelog Summary
PyPI
https://pypi.org/project/onvif-python/0.0.9 (18537728680)
New Features
- Enhanced Service Discovery with GetCapabilities Fallback (4e643cf)
- Implemented comprehensive 3-tier service discovery approach:
- GetServices (Preferred): Tries GetServices first for detailed service information
- GetCapabilities (Fallback): Falls back to GetCapabilities if GetServices not supported
- Default URLs (Final Fallback): Uses standard ONVIF URLs as last resort
- Enhanced
_get_xaddr()method with intelligent XAddr resolution - Added comprehensive nested Extension service lookup (
Extension.Extension) - Improved compatibility with legacy ONVIF devices
- Added detailed service discovery documentation with practical examples
- Updated both English and Indonesian README with new discovery mechanism
- Implemented comprehensive 3-tier service discovery approach:
Fixed
- Fixed Incorrect Method Call in Uplink Service (b4c876d)
- Fixed
DeleteUplinkmethod call that was incorrectly implemented - Resolved operation failures in Uplink service management
- Improved service method consistency across ONVIF services
- Fixed
Build & Configuration
- Project Configuration Cleanup (65de793)
- Removed unnecessary URLs from
pyproject.toml - Cleaned up configuration after PyPI repository verification
- Streamlined project metadata for better maintainability
- Removed unnecessary URLs from
Documentation
-
Comprehensive Service Discovery Documentation (4e643cf)
- Updated README.md with detailed 3-tier discovery approach explanation
- Added practical code examples showing discovery method detection
- Enhanced "Service Discovery: Understanding Device Capabilities" section
- Updated Indonesian documentation (
README_ID.md) with same improvements - Added comprehensive examples for both GetServices and GetCapabilities usage
-
Enhanced ONVIFClient Documentation (4e643cf)
- Improved
_get_xaddr()method documentation with comprehensive docstring - Added detailed explanation of service discovery fallback mechanism
- Enhanced code comments for better developer understanding
- Improved
Technical Improvements
Service Discovery Architecture
The new service discovery system provides maximum device compatibility:
from onvif import ONVIFClient
client = ONVIFClient("192.168.1.17", 8000, "admin", "admin123")
# Check what discovery method was used
if client.services:
print("Service discovery: GetServices (preferred)")
print("Discovered services:", len(client.services))
elif client.capabilities:
print("Service discovery: GetCapabilities (fallback)")
print("Available capabilities:", client.capabilities)
else:
print("Service discovery: Using default URLs")Enhanced Device Compatibility
- Modern Devices: Benefit from detailed GetServices information
- Legacy Devices: Automatically fall back to GetCapabilities
- Non-compliant Devices: Still work with default URL generation
- Extension Services: Proper support for nested Extension services like DeviceIO, Recording, Search, Replay
Breaking Changes
None — This release maintains full backward compatibility:
- Existing code will continue to function without modifications
- Enhanced service discovery is completely transparent to existing applications
- All existing service methods and parameters remain unchanged
- Fallback mechanism activates automatically when needed
Migration Guide
No migration required. The enhanced service discovery works automatically:
- Existing Applications: Continue working without any code changes
- New Applications: Benefit from improved device compatibility automatically
- Legacy Device Support: Now works out-of-the-box with older ONVIF devices
Full Changelog: v0.0.8...v0.0.9
v0.0.8 — 2025-10-15
Overview
This release introduces significant improvements to XML parsing in xsd:any fields and enhanced XML debugging capabilities. Key highlights include:
- Enhanced ZeepPatcher: Major improvements to handle element attributes in nested
xsd:anyelements - XML Capture Plugin: Enhanced XML formatting and debugging capabilities for SOAP requests/responses
- Attribute Preservation: Fixed parsing issues where XML element attributes were lost during processing
- Better Configuration: Updated build configuration and dependency management
Changelog Summary
PyPI
https://pypi.org/project/onvif-python/0.0.8 (18509718189)
Fixed
-
Enhanced attribute parsing in
xsd:anyelements (d341d0b) (34ce882)-
Fixed parsing of XML element attributes within
xsd:anyfields -
Added
_parse_element_recursive()for general recursive element parsing -
Enhanced
_patched_parse_xmlelements()to preserve element attributes -
Improved
flatten_xsd_any_fields()with proper zeep object to dict conversion -
Example: Element attributes now properly parsed
<!-- XML Response --> <tt:CellLayout Columns="22" Rows="18"> <tt:Transformation> <tt:Translate x="-1.0" y="-1.0"/> <tt:Scale x="0.090909" y="0.111111"/> </tt:Transformation> </tt:CellLayout>
# Previously: Columns and Rows attributes were lost # Now: Properly parsed { 'CellLayout': { 'Columns': 22, # ✅ Now preserved 'Rows': 18, # ✅ Now preserved 'Transformation': { 'Translate': {'x': -1.0, 'y': -1.0}, 'Scale': {'x': 0.090909, 'y': 0.111111} } } }
-
-
Enhanced XML formatting with pretty print option using minidom (7b6b076)
-
Fixed XML capture and formatting for SOAP debugging
-
Added proper pretty-print XML formatting with
xml.dom.minidom -
Improved readability of captured SOAP requests and responses
-
Example:
from onvif import ONVIFClient # Enable XML capture client = ONVIFClient("192.168.1.100", 80, "admin", "password", capture_xml=True) device = client.devicemgmt() # Make ONVIF call info = device.GetDeviceInformation() # Access captured XML (now properly formatted) print("Request XML:") print(client.xml_plugin.last_sent_xml) print("Response XML:") print(client.xml_plugin.last_received_xml) # Save to files client.xml_plugin.save_to_file("request.xml", "response.xml")
-
Build & Configuration (3792d56)
-
Updated dependency requirements (
pyproject.toml)- Updated
zeep>=4.3.0(from 4.2.1) - Updated
requests>=2.32.0(from 2.28.0) - Added Black configuration to exclude
raw/folder - Excluded
raw/folder from package distribution
- Updated
-
Improved development workflow (6525515) (75c56ec)
- Added Black code formatter configuration
- Better exclude patterns for development files
- Enhanced build configuration
Documentation
-
Enhanced code documentation (92fb83f) (c5f9a7c) (79adfeb)
- Improved docstrings for ZeepPatcher methods
- Added comprehensive XMLCapturePlugin documentation
- Better inline code comments for complex parsing logic
-
Added (
raw/) folder for XML/Python comparison data (f25f72c) (db4814c) (b199355) (a97e6ea)- Contains XML response samples and corresponding Python object outputs
- Useful for testing and comparing parsing results
- Demonstrates before/after attribute parsing improvements
- Excluded from package distribution and Black formatting
Breaking Changes
None — This release maintains full backward compatibility:
- Existing code will continue to function without modifications
- Enhanced parsing is transparent to existing applications
Full Changelog: v0.0.7...v0.0.8
v0.0.7 — 2025-10-14
Overview
This release introduces a major architectural improvement with class-based error handling and zeep patching utilities. Key highlights include:
- ONVIFErrorHandler Class: New structured error handling for graceful failure management
- ZeepPatcher Class: Refactored zeep patching logic into a clean, organized class
- Enhanced Exception Messages: Improved SOAP Fault error reporting with readable subcodes
- Device Compatibility: Better handling of unsupported operations across different ONVIF devices
Changelog Summary
PyPI
https://pypi.org/project/onvif-python/0.0.7 (18482692659)
New Features
-
Added
ONVIFErrorHandlerclass for graceful error management (b278de0)-
safe_call(): Execute operations with automatic fallback on failure -
ignore_unsupported(): Decorator to returnNonefor unsupported operations -
is_action_not_supported(): Check if error isActionNotSupported -
Example:
from onvif import ONVIFClient, ONVIFErrorHandler client = ONVIFClient("192.168.1.100", 80, "admin", "password") device = client.devicemgmt() # Safe call with fallback services = ONVIFErrorHandler.safe_call( lambda: device.GetServices(IncludeCapability=True), default=None ) if services is None: # Fallback for devices that don't support IncludeCapability=True services = device.GetServices(IncludeCapability=False)
-
-
Added
ZeepPatcherclass for organized zeep patching (d7d8f11)-
Consolidated all zeep patching logic into a single class
-
Static methods for all patching operations
-
Backward compatible function wrappers maintained
-
Example:
from onvif import ZeepPatcher # Apply patch (or use legacy apply_patch()) ZeepPatcher.apply_patch() # Check patch status if ZeepPatcher.is_patched(): print("Zeep patch is active") # Remove patch if needed ZeepPatcher.remove_patch()
-
Fixed
- Enhanced
ONVIFOperationExceptionwith detailed SOAP Fault messages (f8c88b2)- Extract readable subcode from QName (e.g.,
ter:ActionNotSupportedinstead of{http://www.onvif.org/ver10/error}ActionNotSupported) - Better error context with operation name and original exception details
- Improved debugging experience for SOAP Fault errors
- Extract readable subcode from QName (e.g.,
Documentation
- Updated examples to demonstrate error handling patterns (b278de0)
- Added comprehensive
error_handling.pyexample atexamples/error_handling.py - Demonstrated graceful fallback for device compatibility issues
- Added comprehensive
Refactoring
- Code formatting and readability improvements (ecdef62)
- Applied Black formatter across codebase
- Consistent code style throughout the project
- Better PEP 8 compliance
Breaking Changes
None — This release maintains full backward compatibility:
- Existing code will continue to function without modifications
- New class-based APIs are opt-in enhancements
Full Changelog: v0.0.6...v0.0.7
v0.0.6 — 2025-10-13
Overview
This release focuses on stability improvements and enhanced debugging capabilities. Key highlights include:
- XML Capture Plugin: New debugging feature to capture and log SOAP request/response XML for troubleshooting
- WSDL Updates: Synchronized with latest ONVIF specifications (https://github.com/onvif/specs)
- Bug Fixes: Resolved Extension field parsing issues across different ONVIF versions
Changelog Summary
PyPI
https://pypi.org/project/onvif-python/0.0.6 (18456654902)
New Features
- Added XML capture plugin for SOAP request/response logging (c258162)
-
Enable with
capture_xml=Trueparameter inONVIFClient -
Useful for debugging and development
-
Example:
from onvif import ONVIFClient client = ONVIFClient( host='192.168.1.10', port=80, username='admin', password='password', capture_xml=True # Enable XML capture ) # Make ONVIF calls - XML will be logged device_info = client.devicemgmt().GetDeviceInformation() # Access captured XML if client.xml_plugin: print("Last Request:", client.xml_plugin.last_sent_xml) print("Last Response:", client.xml_plugin.last_received_xml)
-
Fixed
- Fixed single-tag wrapper flattening to preserve correct nested structure (f57a487)
- Normalized service names in
_get_xaddrto matchWSDL_MAPkeys (c176715) - Updated
SearchserviceXAddr service_pathtoSearchRecordingand setForcePersistencedefault to None atImagingservice (2555c24)
Documentation
- Updated README future improvements section to reflect new features (b724150)
- Added references to ONVIF release notes and WSDL for all service classes (e6a73f4)
Maintenance
- Updated WSDL folders from remote ONVIF specs repository (dd52981)
Full Changelog: v0.0.5...v0.0.6