Commit Graph

148 Commits

Author SHA1 Message Date
eduard256 d602c8dfca Improve WebUI UX with tooltips, auto-fill and button visibility
- Add informational tooltips to all configuration fields
- Reorder tabs: Frigate first, then Go2RTC, then URL
- Hide Copy/Download buttons on Frigate tab until config is generated
- Auto-fill username field with "admin" as default value
- Smart pre-fill network address based on server IP (first 3 octets)
- Add tooltips for Main Stream, Sub Stream, and all buttons
- Improve user guidance throughout the configuration flow
2025-11-22 00:03:54 +03:00
eduard256 596cf1ccdc Add interactive tooltips to camera configuration form
Добавлены информационные тултипы для всех полей формы настройки камеры с подробными описаниями, примерами использования и рекомендациями. Улучшает пользовательский опыт и помогает пользователям правильно заполнить форму.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-21 23:37:02 +03:00
eduard256 779ae33bac Redesign stream discovery UI with vertical list layout
- Replace carousel navigation with scrollable vertical list
- Remove statistics counters (Tested/Found/Remaining)
- Add collapsible stream details with expand/collapse toggle
- Show stream URL preview in header, full URL in details
- Position URL below stream type badge for better readability
- Add new StreamList component replacing StreamCarousel
- Update CSS with improved layout and hover effects

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-21 23:25:30 +03:00
eduard256 71d6f2aac8 Fix missing statistics elements in stream discovery UI
Restored stats block (Tested, Found, Remaining) that was accidentally
removed when adding mock mode functionality. This fixes JavaScript
errors where main.js tried to update non-existent DOM elements.
2025-11-21 23:02:39 +03:00
eduard256 56c06dfa98 Add mock mode for WebUI development
- Add mock API classes for camera search and stream discovery
- Add mock mode toggle via ?mock=true URL parameter
- Add visual mock mode indicator badge
- Add dev-server.sh script for local development
- Mock data includes 10 diverse streams (FFMPEG, ONVIF, JPEG, MJPEG, HLS, HTTP_VIDEO)
2025-11-21 22:57:37 +03:00
eduard256 8bf92e6598 Add mock mode for web UI development and testing
- Add mock data module with simulated camera search and stream discovery
- Enable mock mode via ?mock=true URL parameter
- Show MOCK MODE indicator when enabled
- Remove statistics cards from discovery screen, keep only progress bar
- Mock mode works independently from Go backend for easier UI testing
2025-11-21 22:40:38 +03:00
eduard256 522d274dd4 Fix CPU usage percentage in README 2025-11-20 19:19:59 +03:00
eduard256 8036d3e9be Add GitHub Stars badge to README 2025-11-18 17:03:54 +03:00
eduard256 5b2f80f057 Add Docker and Docker Compose auto-installation to compose command 2025-11-18 16:05:47 +03:00
eduard256 e2b9802fd8 Fix duplicate badges in README
Removed duplicate license and Docker pulls badges from README.
2025-11-18 16:04:23 +03:00
eduard256 65a198d119 Simplify RTSP URL description in README
Updated README to simplify the RTSP URL description and remove redundant lines.
2025-11-18 16:03:24 +03:00
eduard256 722c629c01 Move demo gif after badges for better visual flow 2025-11-18 16:01:30 +03:00
eduard256 c81d9a1e63 Complete README.md rewrite with improved structure and documentation 2025-11-18 15:59:59 +03:00
eduard256 06de1c198b Version bump to 1.0.4 v1.0.4 2025-11-18 14:16:11 +03:00
eduard256 ded9b507d6 Fix stream discovery URL for Home Assistant Ingress
- Remove new URL() construction with window.location.origin
- Use simple relative path like camera-search API
- Fixes stream discovery in HA Ingress environment
- Maintains compatibility with direct Docker installations
- Version bump to 1.0.3
v1.0.3
2025-11-18 13:59:54 +03:00
eduard256 90063c3f3a Fix API paths for Home Assistant Ingress compatibility
- Change absolute API paths to relative paths in camera-search.js
- Change absolute API paths to relative paths in stream-discovery.js
- Fixes resource loading in HA Ingress environment
- Maintains compatibility with direct Docker installations
- Version bump to 1.0.2
2025-11-18 13:35:29 +03:00
eduard256 1bab993a13 Fix CSS and JS paths for Home Assistant Ingress compatibility
- Change absolute paths (/css/, /js/) to relative paths (css/, js/)
- Maintains compatibility with direct Docker installations
- Fixes resource loading in HA Ingress environment
- API calls remain unchanged and work correctly
2025-11-18 00:58:11 +03:00
eduard256 1163af6fac Remove Home Assistant addon integration
- Remove homeassistant-addon directory
- Remove addon workflow
- Remove repository.yaml
- Update README to focus on Docker and source installation
- Keep ARM/Raspberry Pi support (arm64, armv7)
2025-11-18 00:09:00 +03:00
eduard256 95a0fc2096 Fix GitHub Actions permissions for add-on publishing
- Add packages:write permission to build job
- Add contents:write permission to update-repository job
- Bump version to 1.0.1
v1.0.1
2025-11-17 23:45:34 +03:00
eduard256 16bef455ae Add Home Assistant Add-on v1.0.0
Features:
- Multi-arch support (aarch64, amd64, armv7)
- WebUI integration with Home Assistant
- Ingress support for seamless integration
- Automated builds via GitHub Actions
- Comprehensive documentation (EN/RU)
- Health check monitoring
- Configurable through HA UI
v1.0.0
2025-11-17 23:38:34 +03:00
eduard256 3672a0f961 Update GIF URL to bypass cache 2025-11-15 00:17:22 +03:00
eduard256 b7cc9aa518 Update demo GIF 2025-11-15 00:16:16 +03:00
eduard256 56bcda56fc Add demo GIF to README 2025-11-14 14:03:45 +03:00
eduard256 f1392d83ad Simplify startup banner and show real local IP
- Remove verbose API endpoints and example requests from startup output
- Show actual local network IP instead of localhost
- Add clickable URL support with ANSI OSC 8 hyperlinks
- Dynamically detect port from configuration
- Clean, minimal output for better user experience
2025-11-12 11:51:52 +03:00
eduard256 d12d732671 Fix SSE stream discovery and add ESLint for WebUI
JavaScript fixes:
- Fix Invalid URL error in stream-discovery.js by adding window.location.origin as base URL
- Fix SSE race condition: ensure all stream_found events sent before complete event
- Comment unused eventType variable in stream-discovery.js
- Comment unused FrigateGenerator import in config-panel.js
- Fix quote style (double to single quotes)

Go fixes:
- Add sync.WaitGroup for result collector to prevent premature SSE closure
- Add logging for stream_found events
- Fix ERR_INCOMPLETE_CHUNKED_ENCODING by waiting for all streams to be sent

ESLint setup:
- Add ESLint v8.57.1 with .eslintrc.cjs config for ES2022 modules
- Add npm scripts for lint and lint:fix
- Update .gitignore for node_modules and package-lock.json

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-12 11:45:46 +03:00
eduard256 86a8fb36d5 Fix all linter issues: errcheck, staticcheck, and unused code
- Fix critical scanner.go bug: ineffective break in select (SA4011)
  Use labeled break to properly exit loop on context cancellation

- Add error checking for all file.Close() and resp.Body.Close()
  Prevent resource leaks in loader, onvif_simple, and tester

- Add error checking for fmt.Sscanf() calls in tester.go
  Prevent silent parse failures for FPS and bitrate extraction

- Add error checking for all SSE streamWriter calls
  Explicit ignore with _ = for SendJSON and SendError

- Remove unused sync.RWMutex field from SearchEngine

- Refactor if/else to switch for CodecType (staticcheck QF1003)
  More idiomatic Go code in stream tester

All 20 linter issues resolved. Code compiles and runs correctly.
2025-11-12 11:17:12 +03:00
eduard256 94f94a9f8c Fix linter error: remove redundant newline in fmt.Println 2025-11-12 11:07:14 +03:00
eduard256 0c10a0a493 Trigger Docker workflow with updated token permissions 2025-11-12 11:02:26 +03:00
eduard256 4d343f9873 Add Docker support with multi-arch builds
- Multi-stage Dockerfile (Alpine base, ~174MB)
- All runtime dependencies: ffmpeg, ffprobe, ca-certificates, tzdata, wget
- Camera database included in image (17MB)
- Security: non-root user (strix:1000)
- Healthcheck on /api/v1/health
- docker-compose.yml for simple deployment
- docker-compose.full.yml with go2rtc and Frigate integration
- GitHub Actions workflow for automated multi-arch builds (amd64, arm64)
- Auto-publish to Docker Hub (eduard256/strix)
- DOCKER.md documentation
2025-11-12 10:50:50 +03:00
eduard256 3d5a4927a6 Add unified port configuration system
- Unified API and WebUI on single configurable port (default: 4567)
- Added strix.yaml configuration file support (go2rtc-style format)
- Environment variable STRIX_API_LISTEN overrides config file
- Port validation and source logging
- Relative URLs in frontend for automatic port detection
- Removed separate server instances
- Cleaned up temporary files and updated .gitignore
- Updated documentation with configuration examples
2025-11-12 10:20:55 +03:00
eduard256 627409cf56 Add Frigate config merging and camera database updates
- Refactor Frigate generator to support adding cameras to existing configs
- Add text-based YAML parsing to preserve formatting and comments
- Implement duplicate camera/stream name detection and auto-numbering
- Add support for inserting cameras into existing go2rtc and cameras sections
- Update UI: add textarea for existing config input and generate button
- Preserve user's existing configuration when adding new cameras
- Add example config template for new users
- Update ConfigPanel to initialize Frigate tab instead of auto-generating
- Add FrigateGenerator import to main.js
- Add custom styles for Frigate config input and output sections
- Support both empty config (create from scratch) and existing config (merge) modes

Camera database updates:
- Add OpenIPC firmware camera support (257 models)
- Add Yi-Hack firmware variants (v4, v5, Allwinner, MStar)
- Add Fang-Hacks firmware support
- Add OpenMiko firmware support
- Update Sonoff camera models
- Update Thingino firmware camera models
2025-11-11 22:32:59 +03:00
eduard256 5d0b3e6527 Update logo to detailed owl design with purple eyes
Replace minimalist owl icon with detailed SVG logo featuring purple color scheme and prominent eyes.
2025-11-11 22:19:24 +03:00
eduard256 19eddba1ee Optimize RTSP URL generation: eliminate duplicate streams
Changes:
- RTSP now generates single URL based on credentials availability
  * With credentials: only rtsp://user:pass@host/path
  * Without credentials: only rtsp://host/path
- HTTP/HTTPS unchanged: still generates 4 auth variants
- Improved deduplication efficiency from 66% to 100% for RTSP
- Added comprehensive test coverage for protocol auth behavior

This reduces unnecessary stream testing and improves discovery speed
2025-11-09 18:47:37 +03:00
eduard256 387f252b9d Update repository paths and URLs
- Update module path from github.com/strix-project/strix to github.com/eduard256/Strix
- Update all Go imports to use new repository path
- Update documentation links in README.md and CHANGELOG.md
- Update GitHub URLs in .goreleaser.yaml
- Fix placeholder documentation URL in DATABASE_FORMAT.md
- Remove old log files
2025-11-09 18:20:02 +03:00
eduard256 35293dec83 Add BUBBLE protocol support for XMeye/HiSilicon NVR/DVR cameras
Implemented comprehensive BUBBLE protocol support for Chinese NVR/DVR cameras (ZOSI, SANNCE, ANNKE, FLOUREON, XMeye). This proprietary protocol requires HTTP with embedded credentials and special handling.

Changes:
- Added BUBBLE entries to brand databases with main/sub stream support
- Extended URL placeholder system to support {channel} syntax
- Implemented BUBBLE-specific stream generation with credential embedding
- Added BUBBLE stream detection via Content-Type: video/bubble
- Updated Frigate/Go2RTC generators to convert BUBBLE URLs to bubble:// format
- Added BUBBLE patterns to popular stream database

Technical details:
- BUBBLE uses HTTP protocol with credentials in URL (bubble://user:pass@host:port/path)
- Supports dual streams: stream=0 (main) and stream=1 (sub)
- Requires video=copy parameter for optimal performance in go2rtc
- Detection prioritized before generic HTTP checks to ensure correct identification
2025-11-09 18:09:04 +03:00
eduard256 75afc987f4 Fix HTTP stream type detection: improve JPEG/MJPEG recognition
Major improvements to stream type detection logic:
- Refactor validateHTTPStream with prioritized detection chain
- Use JPEG magic bytes (FF D8 FF) as primary detection method
- Add comprehensive URL pattern matching for JPEG streams
- Properly distinguish between JPEG snapshots and MJPEG streams
- Remove duplicated detection logic from testHTTP function
- Consolidate all HTTP type detection in validateHTTPStream

This fixes the issue where cameras returning incorrect Content-Type
(e.g., application/octet-stream instead of image/jpeg) were being
misclassified as HTTP_UNKNOWN instead of JPEG.

Detection priority:
1. Magic bytes (most reliable)
2. Content-Type headers
3. URL patterns (fallback for misconfigured cameras)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-07 22:22:07 +03:00
eduard256 18aaf07eca Fix HTTP camera authentication: generate all auth variants for comprehensive testing
This commit addresses the issue where HTTP-based cameras (JPEG/MJPEG) were not being
discovered due to incomplete authentication variant generation.

Changes:
- Builder now generates 4 authentication variants for each HTTP/HTTPS URL:
  1. No authentication (for open cameras)
  2. Basic Auth only (embedded credentials in URL)
  3. Query parameters only (user=X&pwd=Y)
  4. Basic Auth + Query parameters (combined approach)

- Scanner updated to use BuildURLsFromEntry instead of BuildURL for popular patterns,
  ensuring all authentication variants are tested

- Preserved existing query parameter values (e.g., channel=1 remains unchanged)

This fix enables discovery of cameras that require different authentication methods,
including those that only accept Basic Auth headers, query parameters, or combinations.

Tested with ZOSI ZG23213M camera - increased discovery from 0 to 9 working streams.
2025-11-07 21:33:47 +03:00
eduard256 88e76eadb5 Refactor authentication system: centralize credential handling in Builder
Major architectural improvement to eliminate duplicate credential embedding
and simplify authentication logic across the codebase.

Changes:
- Builder now generates all URL variants with proper authentication upfront
  * RTSP: generates URLs with embedded credentials and without (for open cameras)
  * HTTP/JPEG/MJPEG: generates variants with query params and for Basic Auth
- Tester simplified to only test ready-to-use URLs without modification
  * Removed auth chain logic and multiple authentication method attempts
  * Removed AuthMethod enum and related complexity
  * Credentials automatically extracted from URLs when needed
- Scanner cleaned up by removing embedCredentialsInURL function
  * All TestStream calls now use single URL parameter
  * Removed AuthMethod from DiscoveredStream model

Benefits:
- Eliminates bug where credentials were added up to 3 times
- Centralizes all URL generation logic in one place (Builder)
- Cleaner, more maintainable code with clear separation of concerns
- Reduces complexity by ~200 lines of code
- All authentication scenarios still fully supported
2025-11-07 19:08:05 +03:00
eduard256 292d5f8049 Embed credentials in ONVIF device service URL when provided 2025-11-07 18:31:19 +03:00
eduard256 7fd1d78ffa Add dual-stream support for Frigate with optional sub-stream selection
Features:
- Optional sub-stream selection from already discovered streams
- No additional scanning required - reuse existing results
- UI: "Add Sub Stream" button to select secondary stream
- UI: "Remove Sub Stream" button to clear selection
- Smart stream routing in Frigate configs
- Go2RTC: generates _main and _sub stream names
- Frigate: detect on sub (CPU efficient), record on main (quality)
- Frigate: auto-detection of stream resolution
- Object detection: person, car, cat, dog
- Motion-based recording by default
- Live view streams configuration
- Support for any resolution: HD, 4K, 8K+
- Comprehensive documentation with examples
2025-11-06 22:53:50 +03:00
eduard256 74fe12bcf1 Improve camera model search with per-model ranking and two-stage loading
- Split camera results into individual models (Brand: Model format)
- Add model-specific relevance scoring for better search results
- Implement two-stage autocomplete: 10 results immediately, 50 after 1 second
- Filter out "Other" models from search results
- Sort models by relevance score (exact matches first)
- Add auto.json brand for automatic detection fallback

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-06 00:43:03 +03:00
eduard256 1cfc2fa2e5 Add ONVIF device service endpoint discovery for PTZ control 2025-11-05 23:20:51 +03:00
eduard256 12dd7735ad Fix URL parameter replacement logic to preserve literal values 2025-11-05 23:20:44 +03:00
eduard256 a5c769dd6c Add credential embedding in stream URLs for SSE events
Embed username:password@ credentials in discovered stream URLs for
basic_auth and combined authentication methods, making URLs directly
usable by clients without additional auth handling.

**Changes:**
- Add embedCredentialsInURL() function in scanner.go
- Embed credentials for basic_auth and combined methods only
- Skip embedding for no_auth, query_params, digest, url_embedded
- Handle edge cases: empty credentials, existing credentials in URL
- Apply in scanDirectStream() and testURLsConcurrently()

**Security:**
- URL encoding handled by url.UserPassword()
- Checks prevent credential duplication
- Only processes when username AND password are provided

**Results:**
Before: http://10.0.20.112/snapshot.jpg
After:  http://admin:password@10.0.20.112/snapshot.jpg

Tested with Zosi ZG23213M camera - all 6 streams working correctly.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-29 02:31:58 +03:00
eduard256 453769a376 Add multi-authentication support and comprehensive stream discovery
Major improvements to camera stream discovery system:

**Multi-Authentication Support:**
- Implement smart authentication fallback chain for HTTP/MJPEG/JPEG streams
- Add combined authentication method (Basic Auth header + query params) - fixes ZOSI cameras
- Support for: No Auth, Basic Auth, Query Params, Combined, Digest
- Auto-detect authentication method from URL and try appropriate chain

**Protocol & Detection Enhancements:**
- Add HLS (.m3u8) stream detection
- Add MPEG-DASH (.mpd) stream detection
- Add WebSocket stream detection
- Improve JPEG detection by URL extension when Content-Type is incorrect
- Add AuthMethod field to DiscoveredStream model

**Bug Fixes:**
- Fix port 0 bug: use default ports (HTTP=80, HTTPS=443, RTSP=554) when entry.Port==0
- Ensure URLs are built with correct ports from database or defaults

**Debug & Logging:**
- Add comprehensive DEBUG logging to builder.go (URL generation)
- Add comprehensive DEBUG logging to tester.go (stream testing & auth)
- Add comprehensive DEBUG logging to scanner.go (URL collection & deduplication)
- Log auth method detection, chain determination, and test results

**Results:**
- Tested with ZOSI ZG23213M camera: 4 streams found (was 0)
- Combined auth method successfully detects streams requiring both header + params
- Better coverage for cameras with non-standard authentication requirements

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-29 02:15:21 +03:00
eduard256 bfade99c99 Fix ONVIF library integration and improve stream discovery
- Fix ONVIF CallMethod response parsing (returns *http.Response, not structs)
- Add proper XML SOAP envelope parsing for GetProfiles and GetStreamUri
- Use correct types from xsd/onvif package (StreamType, TransportProtocol, ReferenceToken)
- Add strix binary to .gitignore
- Update configuration and API routes

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-28 23:04:10 +03:00
eduard256 f80f7ab314 Add Strix camera discovery system with comprehensive database
This commit adds the complete Strix IP camera stream discovery system:
- Go-based API server with SSE support for real-time updates
- 3,600+ camera brand database with stream URL patterns
- Intelligent fuzzy search across camera models
- ONVIF discovery and stream validation
- RESTful API with health check, camera search, and stream discovery
- Makefile for building and deployment
- Comprehensive README documentation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-28 17:45:04 +03:00
eduard256 6029766a8b Initial commit 2025-10-28 13:38:52 +03:00