Commit Graph

70 Commits

Author SHA1 Message Date
eduard256 4d6c2fd878 Add GET /api/v1/probe endpoint for device inspection
Fast (~1-3s) endpoint that gathers network info about a device
before full stream discovery. Runs ping first, then parallel probes.

Features:
- Ping with ICMP + TCP fallback (works without root)
- Reverse DNS hostname lookup
- ARP table MAC address + OUI vendor identification (2403 entries, 51 camera vendors)
- mDNS HomeKit detection (camera/doorbell, paired status)
- Extensible Prober interface for adding new probe types
- 3-second overall timeout, parallel execution

Response includes "type" field:
- "unreachable" - device not responding
- "standard" - normal IP camera (RTSP/HTTP/ONVIF flow)
- "homekit" - Apple HomeKit camera (PIN pairing flow)
2026-03-16 13:57:41 +00:00
eduard256 eb8cc546c8 Merge main into develop: Add release documentation 2025-12-11 16:53:02 +00:00
eduard256 1fc345c569 Add release process documentation 2025-12-11 16:52:53 +00:00
eduard256 0c0d743594 Merge develop into main for v1.0.9 release v1.0.9 2025-12-11 16:40:39 +00:00
eduard256 787919d20b Release v1.0.9: Fix SSE real-time streaming in Home Assistant Ingress mode 2025-12-11 16:40:31 +00:00
eduard256 e9dc04178e Fix SSE real-time streaming in Home Assistant Ingress mode
Add padding to overcome aiohttp 64KB buffer in HA Supervisor.

Problem:
- HA Supervisor uses aiohttp with 64KB StreamResponse buffer
- Small SSE events (~200-500 bytes) were buffered until connection closed
- Users saw all streams appear at once instead of real-time updates

Solution:
- Detect Ingress mode via X-Ingress-Path header
- Add 64KB SSE comment padding to fill proxy buffers
- Increase progress interval to 3 sec in Ingress mode (reduce traffic)
- Normal mode (Docker/direct) unchanged - works exactly as before

Traffic impact:
- Normal mode: ~17KB per scan (unchanged)
- Ingress mode: ~2-3MB per scan (acceptable for real-time updates)

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-11 16:34:05 +00:00
eduard256 915c1dec1b Add stream categorization: Recommended/Alternative with Main/Sub/Other subgroups
- Split discovered streams into Recommended (FFMPEG, ONVIF) and Alternative groups
- Add Main/Sub/Other classification within Recommended based on resolution:
  - Main: streams with width >= 720px (after clustering analysis)
  - Sub: streams with width < 720px or lower cluster
  - Other: streams without resolution info
- Implement smart auto-collapse based on selection mode:
  - Main selection: shows Recommended/Main, collapses rest
  - Sub selection: shows Recommended/Sub, collapses rest
  - Falls back to showing all if target category is empty
- Add collapsible groups/subgroups with chevron toggles
- User manual expand/collapse preserved until mode change
- Add stream count badges to all group headers
2025-12-11 09:49:46 +00:00
eduard256 e6828d8a22 Add ?mp4 parameter support for BUBBLE streams in Frigate config
- Add buildRtspPath() helper method to conditionally append ?mp4
- Only BUBBLE stream types get ?mp4 suffix for proper recording
- Other stream types (RTSP, ONVIF, JPEG, etc.) remain unchanged
- Handles both single and dual-stream configurations correctly
2025-11-26 15:29:56 +03:00
eduard256 eedce14731 Merge branch 'develop' v1.0.8 2025-11-26 13:01:32 +03:00
eduard256 9975aa71de Release v1.0.8: Use host network mode for Docker deployments 2025-11-26 13:01:27 +03:00
eduard256 38e4af230f Use host network mode for Docker deployments
- Update docker run command to use --network host
- Update docker-compose.yml to use network_mode: host
- Update docker-compose.full.yml to use network_mode: host
- Remove port mappings as they are not needed with host network
2025-11-26 12:57:45 +03:00
eduard256 031e494787 Merge develop into main for v1.0.7 release v1.0.7 2025-11-23 22:54:20 +03:00
eduard256 de389588ce Release v1.0.7: Fix Hikvision channel numbering and improve database
- Fixed channel numbering for Hikvision-style cameras (reported by @sergbond_com)
- Added universal [CHANNEL+1] placeholder support
- Supports both 0-based and 1-based channel numbering
- Updated 14 camera brands with universal patterns
- Fixed brand+model search matching
- Removed invalid test data from database
2025-11-23 22:54:03 +03:00
eduard256 4c03ad8d3c Add [CHANNEL+1] placeholder support for Hikvision-style channel numbering
- Added [CHANNEL+1], [channel+1], {CHANNEL+1}, {channel+1} placeholders to builder.go
- Updated 14 camera brands with universal channel patterns
- Hikvision: replaced 10 hardcoded patterns with 6 universal patterns
- Hiwatch: replaced 4 hardcoded patterns with 8 universal patterns (including ISAPI)
- Other brands: Annke, Swann, Abus, 7links, LevelOne, AlienDVR, Oswoo, AV102IP-40, Acvil, TBKVision, Deltaco, Night Owl
- Universal patterns placed first for faster discovery, hardcoded patterns kept as fallback
- Supports both 0-based (channel=0 -> 101) and 1-based (channel=1 -> 101) numbering
- Added 6 high-priority patterns to popular_stream_patterns.json
2025-11-23 22:39:20 +03:00
eduard256 d569a76700 Use intelligent brand+model search in stream discovery 2025-11-23 21:33:44 +03:00
eduard256 a405d6198f Merge main into develop: Add dynamic channel support for HiWatch cameras 2025-11-22 22:22:41 +03:00
eduard256 4143c267cd Remove invalid URL entry from Hikvision database
- Removed entry with embedded credentials and IP address
- Entry contained: rtsp://huntertech:Superuser01!@10.0.55.11:554
- This was likely test data that accidentally got committed
- Model "Bullet-4K" entry removed from database
2025-11-22 21:52:53 +03:00
eduard256 19e58db70f Add dynamic channel support for HiWatch cameras
- Added 5 new URL patterns with [CHANNEL] placeholder
- Supports channels 0-255 for multi-camera DVR/NVR systems
- Patterns include /Streaming/Channels/[CHANNEL]01, [CHANNEL]02
- ISAPI format support with dynamic channels
- All existing hardcoded patterns preserved for compatibility
v1.0.6
2025-11-22 21:45:56 +03:00
eduard256 11e6ba9902 Merge develop: Fix SSE timeout issues v1.0.5 2025-11-22 20:35:48 +03:00
eduard256 a6e9cc2c5e Fix SSE timeout issues with long-running stream discovery
Problem:
- WriteTimeout was 30 seconds
- Progress only sent when values changed
- Long ffprobe tests (7-8s each) could cause 30+ seconds without writes
- Result: "curl: (18) transfer closed with outstanding read data remaining"

Solution:
- Increase WriteTimeout from 30s to 5 minutes
- Send progress every 1 second (instead of 3 seconds)
- Always send progress, even if values unchanged
- Guarantees write every second, preventing timeout

Changes:
- internal/config/config.go: WriteTimeout 30s → 5min
- internal/camera/discovery/scanner.go:
  - Progress ticker 3s → 1s
  - Remove "only if changed" check
  - Always send progress to keep connection alive

Testing:
- HiWatch camera with 591 streams: Previously timed out at ~338/591
- Should now complete all 591 streams without timeout
2025-11-22 19:48:03 +03:00
eduard256 12770ed5b9 Merge pull request #1 from eduard256/develop
WebUI Improvements - Mock Mode, Tooltips, and UX Enhancements
2025-11-22 00:38:56 +03:00
eduard256 90c4416709 Add informational tooltips for stream types and update mock data
- Add tooltips for all 7 stream types: FFMPEG, ONVIF, MJPEG, HLS, BUBBLE, JPEG, HTTP_VIDEO
- Each tooltip explains protocol features, use cases, and compatibility
- Add BUBBLE protocol icon and detailed description (XMEye/DVRIP cameras)
- Update mock streams to show one example of each type
- Remove unused mock-data.js file to reduce confusion
- Add CSS styles for stream type info icons
2025-11-22 00:29:07 +03:00
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