Commit Graph

6 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 35fd1383c8 fix(homekit): adjust motion detection threshold and improve hold time checks 2026-03-05 03:09:02 +03:00
Sergey Krashevich 15b0cc4c0c feat(homekit): implement motion detection with configurable threshold and add motion detector functionality 2026-03-04 15:08:06 +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
Sergey Krashevich 6304987a26 Review uncommitted changes 2026-02-08 08:50:18 +03:00
Alex X d01b99d105 BIG docs refactoring 2026-02-06 21:45:55 +03:00