Commit Graph

5 Commits

Author SHA1 Message Date
Sergey Krashevich 78ef8fc064 perf(homekit): optimize motion detector with frame-based timing
Replace time.Now() calls in hot path with frame-based timing:
- Pre-compute triggerLevel (integer comparison instead of float division)
- Calibrate hold/cooldown budgets from FPS (default 30fps)
- Periodic FPS recalibration every 150 frames for accuracy
- Active motion path: 47ns → 3.6ns (13x faster)

Update schema.json with detect mode and motion_threshold.
Add threshold tuning guide to README.
2026-03-05 08:50:27 +03:00
Sergey Krashevich ab27a042c1 feat(homekit): add HKSV support with motion detection and doorbell functionality
- Introduced HKSV configuration options in homekit.go, allowing for motion detection and doorbell features.
- Implemented API endpoints for triggering motion detection and doorbell events.
- Enhanced server.go to handle HKSV sessions and manage motion detection states.
- Created new accessory types for HKSV and doorbell in accessory.go.
- Added support for audio recording configurations in ch207.go.
- Defined new services for motion detection and doorbell in services_hksv.go.
- Implemented opack encoding/decoding for HDS protocol in opack.go and protocol.go.
- Updated OpenAPI documentation to reflect new endpoints and features.
- Extended schema.json to include HKSV configuration options.
2026-03-04 13:53:17 +03:00
Alex X 2735bafd86 Rename mpegts module to mpeg 2026-02-08 07:10:30 +03:00
Alex X 44f6f111c4 Move kasa source to separate module 2026-02-08 07:01:14 +03:00
Alex X 1ec40f2fc3 Move schema.json to www/static 2026-01-17 13:57:05 +03:00