mirror of
https://github.com/AlexxIT/go2rtc.git
synced 2026-04-22 23:57:20 +08:00
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.
This commit is contained in:
@@ -1059,6 +1059,58 @@ paths:
|
||||
"404":
|
||||
description: Stream not found
|
||||
|
||||
/api/homekit/motion:
|
||||
post:
|
||||
summary: Trigger motion detection for HKSV camera
|
||||
description: Sets MotionDetected characteristic to true, which triggers the Home Hub to start recording.
|
||||
tags: [ HomeKit ]
|
||||
parameters:
|
||||
- name: id
|
||||
in: query
|
||||
description: Stream name / server ID
|
||||
required: true
|
||||
schema: { type: string }
|
||||
example: outdoor
|
||||
responses:
|
||||
"200":
|
||||
description: Motion triggered
|
||||
"404":
|
||||
description: Server not found
|
||||
delete:
|
||||
summary: Clear motion detection for HKSV camera
|
||||
description: Sets MotionDetected characteristic to false.
|
||||
tags: [ HomeKit ]
|
||||
parameters:
|
||||
- name: id
|
||||
in: query
|
||||
description: Stream name / server ID
|
||||
required: true
|
||||
schema: { type: string }
|
||||
example: outdoor
|
||||
responses:
|
||||
"200":
|
||||
description: Motion cleared
|
||||
"404":
|
||||
description: Server not found
|
||||
|
||||
/api/homekit/doorbell:
|
||||
post:
|
||||
summary: Trigger doorbell ring event
|
||||
description: Sends ProgrammableSwitchEvent to Home Hub, triggering a doorbell notification on Apple devices.
|
||||
tags: [ HomeKit ]
|
||||
parameters:
|
||||
- name: id
|
||||
in: query
|
||||
description: Stream name / server ID (must have category_id=doorbell)
|
||||
required: true
|
||||
schema: { type: string }
|
||||
example: front_door
|
||||
responses:
|
||||
"200":
|
||||
description: Doorbell event sent
|
||||
"404":
|
||||
description: Server not found
|
||||
|
||||
/api/homekit/accessories:
|
||||
get:
|
||||
summary: Get HomeKit accessories JSON for a stream
|
||||
|
||||
Reference in New Issue
Block a user