{"id":31721382,"url":"https://github.com/themactep/onvif-peekr","last_synced_at":"2026-07-22T23:31:29.164Z","repository":{"id":316678468,"uuid":"1064411363","full_name":"themactep/onvif-peekr","owner":"themactep","description":"A GUI tool to help debugging ONVIF communications.","archived":false,"fork":false,"pushed_at":"2025-09-26T02:05:59.000Z","size":20,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-05-23T19:31:13.495Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/themactep.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-26T02:02:31.000Z","updated_at":"2025-10-02T10:15:22.000Z","dependencies_parsed_at":"2025-09-26T04:10:26.651Z","dependency_job_id":"c3e96656-3331-49d2-a7c1-a841eb79eacf","html_url":"https://github.com/themactep/onvif-peekr","commit_stats":null,"previous_names":["themactep/onvif-peekr"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/themactep/onvif-peekr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/themactep%2Fonvif-peekr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/themactep%2Fonvif-peekr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/themactep%2Fonvif-peekr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/themactep%2Fonvif-peekr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/themactep","download_url":"https://codeload.github.com/themactep/onvif-peekr/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/themactep%2Fonvif-peekr/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35782270,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-07-20T02:08:10.276Z","status":"online","status_checked_at":"2026-07-22T02:00:06.236Z","response_time":124,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-09T03:48:33.189Z","updated_at":"2026-07-22T23:31:29.147Z","avatar_url":"https://github.com/themactep.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ONVIF Peekr\n\nA Python GUI application for exploring ONVIF-enabled IP camera capabilities and capturing complete SOAP request/response data.\nBuilt with a custom ONVIF client that provides real XML capture without library serialization issues.\n\n## Key Features\n\n- **Custom ONVIF Client**: Manual WS-Security authentication with complete zeep library elimination.\n- **Real SOAP XML Capture**: Direct HTTP requests capture actual XML traffic without serialization issues.\n- **Smart Authentication**: Hybrid strategy (WS-Security → HTTP Digest → HTTP Basic fallback).\n- **Sequential File Naming**: Clean, organized filenames (001_operation_request.xml format).\n- **Flexible File Organization**: Optional raw XML files in organized subdirectory structure.\n- **User-Friendly GUI**: Clean tkinter interface with progress tracking and live logging.\n- **Comprehensive Coverage**: 18 ONVIF operations across device, media, PTZ, and events services.\n- **High Success Rate**: 89% operation success rate with proper error handling.\n\n## Technical Architecture\n\n### Custom ONVIF Client\n- **Manual WS-Security Implementation**: Proper username token with password digest, nonce generation, and SHA1 hashing.\n- **Multi-Auth Strategy**: Automatically tries WS-Security, falls back to HTTP Digest, then HTTP Basic authentication.\n- **Direct SOAP Control**: Manual SOAP envelope creation with all ONVIF namespaces and proper SOAPAction headers.\n- **Real XML Capture**: Bypasses all library serialization to capture actual wire-format XML.\n\n### File Organization System\n- **Sequential Numbering**: Clean filenames using 001, 002, 003... format instead of timestamps.\n- **Smart File Structure**: Formatted XML files by default, optional raw files in `raw/` subdirectory.\n- **User Control**: Checkbox to enable/disable raw XML file saving for reduced clutter.\n\n## Supported ONVIF Operations (18 Total)\n\n### Device Management Service ✅\n- **GetDeviceInformation** - Basic device details (requires WS-Security).\n- **GetCapabilities** - Device capabilities (no auth required).\n- **GetServices** - Available services (no auth required).\n\n### Media Service ✅\n- **GetProfiles** - Media profiles with automatic ProfileToken extraction.\n- **GetVideoSources** - Video source configurations.\n- **GetAudioSources** - Audio source configurations.\n- **GetStreamUri** - RTSP streaming endpoints (with dynamic ProfileToken).\n- **GetSnapshotUri** - Snapshot endpoints (with dynamic ProfileToken).\n- **GetVideoEncoderConfigurations** - Video encoding settings.\n- **GetAudioEncoderConfigurations** - Audio encoding settings.\n- **GetVideoSourceConfigurations** - Video source settings.\n- **GetAudioSourceConfigurations** - Audio source settings.\n- **GetMetadataConfigurations** - Metadata settings.\n\n### PTZ Service ✅\n- **GetConfigurations** - PTZ configurations.\n- **GetNodes** - PTZ nodes.\n- **GetPresets** - PTZ presets (may fail if PTZ not supported).\n\n### Events Service ⚠️\n- **GetEventProperties** - Event properties (may fail if service unavailable).\n- **GetServiceCapabilities** - Event service capabilities.\n\n## Installation\n\n### Quick Start (Recommended)\n```bash\n# Clone the repository\ngit clone \u003crepository-url\u003e\ncd onvif-peekr\n\n# Run automated installation\n./install.sh\n\n# Activate virtual environment\nsource venv/bin/activate\n\n# Run the application\npython run_onvif_peekr.py\n```\n\n### Manual Installation\n```bash\n# Install system dependencies (Ubuntu/Debian)\nsudo apt install python3-dev libxml2-dev libxslt1-dev\n\n# Create virtual environment\npython3 -m venv venv\nsource venv/bin/activate\n\n# Install Python dependencies\npip install -r requirements.txt\n```\n\n### Dependencies\n- **Python 3.7+**\n- **requests** - HTTP library (only required dependency)\n- **tkinter** - GUI framework (included with Python)\n- **xmllint** - XML formatting (optional, for pretty-printed output)\n\n## Usage\n\n### Running the Application\n```bash\n# Standard mode\npython run_onvif_peekr.py\n\n# Demo mode (for testing interface)\npython demo.py\n\n# Direct execution\npython src/onvif_peekr.py\n```\n\n### Step-by-Step Guide\n\n1. **Launch Application**: Run using one of the methods above\n\n2. **Configure Connection**:\n   - **IP Address**: Camera IP (e.g., 192.168.1.126)\n   - **Port**: Usually 80 or 8080\n   - **Username**: Camera username (e.g., admin, thingino)\n   - **Password**: Camera password\n\n3. **Set Save Options**:\n   - **Save Location**: Choose directory for XML files\n   - **Raw XML Files**: Check to save raw XML in `raw/` subdirectory (optional)\n\n4. **Connect**: Click \"Connect\" - application will test multiple authentication methods\n\n5. **Explore**: Click \"Start Exploration\" to execute all 18 ONVIF operations\n\n6. **Monitor**: Watch real-time progress and logging in the GUI\n\n7. **Results**: Find organized XML files in your selected directory\n\n## File Organization\n\n### Directory Structure\n```\nsave_directory/\n└── 192.168.1.126_20250828_132347/\n    ├── 001_GetDeviceInformation_request.xml      (formatted)\n    ├── 001_GetDeviceInformation_response.xml     (formatted)\n    ├── 002_GetCapabilities_request.xml           (formatted)\n    ├── 002_GetCapabilities_response.xml          (formatted)\n    ├── 003_GetServices_request.xml               (formatted)\n    ├── 003_GetServices_response.xml              (formatted)\n    ├── raw/                                      (optional)\n    │   ├── 001_GetDeviceInformation_request.xml  (raw XML)\n    │   ├── 001_GetDeviceInformation_response.xml (raw XML)\n    │   └── ...\n    └── exploration_summary.json\n```\n\n### File Naming Convention\n- **Sequential Numbers**: 001, 002, 003... (resets each session)\n- **Operation Names**: Descriptive ONVIF operation names\n- **File Types**: `_request.xml` and `_response.xml` pairs\n- **Formatted Files**: Default xmllint-formatted XML (easy to read)\n- **Raw Files**: Optional exact wire-format XML (debugging)\n\n## Expected Results\n\n### Success Rates (Tested with Thingino Camera)\n- **16/18 operations successful** (89% success rate)\n- **All media operations working** including complex ProfileToken operations\n- **Complete SOAP XML capture** for every operation\n- **Real authentication** with WS-Security working perfectly\n\n### Typical Output\n```\n✓ GetDeviceInformation - SUCCESS (WS-Security)\n✓ GetCapabilities - SUCCESS (No Auth)\n✓ GetServices - SUCCESS (No Auth)\n✓ GetProfiles - SUCCESS (WS-Security)\n✓ GetVideoSources - SUCCESS (WS-Security)\n✓ GetStreamUri - SUCCESS (Dynamic ProfileToken)\n✓ GetSnapshotUri - SUCCESS (Dynamic ProfileToken)\n✗ GetPresets - FAILED (PTZ not supported)\n✗ GetEventProperties - FAILED (Service unavailable)\n```\n\n## Advanced Features\n\n### Authentication Strategy\n1. **WS-Security First**: Proper ONVIF authentication with username tokens\n2. **HTTP Digest Fallback**: For cameras requiring HTTP-level auth\n3. **HTTP Basic Fallback**: Last resort for basic authentication\n4. **Graceful Degradation**: Continues with working authentication method\n\n### Error Handling \u0026 Recovery\n- **Connection Issues**: Automatic retry with different authentication methods\n- **Service Unavailability**: Graceful skipping of unsupported services\n- **Parameter Errors**: Intelligent parameter generation for complex operations\n- **Network Timeouts**: 10-second timeouts prevent hanging operations\n- **File System Errors**: Proper error reporting and recovery\n\n### Logging \u0026 Debugging\n- **Real-time Logging**: Live operation status in GUI\n- **Detailed Error Messages**: Specific guidance for common issues\n- **Method Tracking**: Shows whether operation used WS-Security, Digest, or Basic auth\n- **XML Validation**: Automatic XML formatting and validation\n\n## Troubleshooting\n\n### Connection Issues\n```\n✗ Connection failed: HTTP 401\n```\n**Solutions:**\n- Verify camera IP address and port (usually 80 or 8080)\n- Check username and password credentials\n- Ensure ONVIF is enabled on camera\n- Try different authentication (application tries all methods automatically)\n\n### Service Unavailability\n```\n✗ GetEventProperties failed: Connection closed by camera\n```\n**Explanation:** Some cameras don't support all ONVIF services (PTZ, Events). This is normal and expected.\n\n### File Permission Issues\n```\n✗ Error saving SOAP data: Permission denied\n```\n**Solutions:**\n- Ensure write permissions to selected save directory\n- Choose a different save location (e.g., user home directory)\n- Run with appropriate user privileges\n\n### Camera Compatibility\n- **Thingino cameras**: Excellent compatibility (89% success rate)\n- **Generic IP cameras**: Variable support depending on ONVIF implementation\n- **Enterprise cameras**: Usually full ONVIF compliance\n\n## Project Structure\n```\nonvif-peekr/\n├── src/\n│   └── onvif_peekr.py          # Main application with custom ONVIF client\n├── venv/                        # Virtual environment\n├── README.md                    # Complete documentation (this file)\n├── requirements.txt             # Dependencies (just requests!)\n├── install.sh                   # Automated installation script\n├── run_onvif_peekr.py          # Application launcher\n└── demo.py                      # Demo mode for testing\n```\n\n## Testing\n```bash\n# Run in demo mode (no camera required)\npython demo.py\n\n# Test with real camera\npython run_onvif_peekr.py\n```\n\n## Development Status\n✅ **Custom ONVIF client implemented** - No more zeep dependency issues\n✅ **Real SOAP XML capture working** - Actual wire-format XML saved\n✅ **Sequential file naming** - Clean, organized output\n✅ **Flexible file organization** - User-controlled raw XML saving\n✅ **High success rate** - 89% operation success with Thingino cameras\n✅ **Production ready** - Comprehensive error handling and logging\n\n## License\nMIT License - See LICENSE file for details.\n\n## Contributing\nContributions welcome! The application uses a custom ONVIF client for maximum compatibility and real XML capture.\n\n## Support\nFor issues and questions, please create an issue in the project repository.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthemactep%2Fonvif-peekr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthemactep%2Fonvif-peekr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthemactep%2Fonvif-peekr/lists"}