-
-
Notifications
You must be signed in to change notification settings - Fork 630
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HomeKit Secure Video #920
HomeKit Secure Video #920
Conversation
Co-authored-by: Andi <mail@anderl-bauer.de>
Co-authored-by: Andi <mail@anderl-bauer.de>
…mentation. Pass connection info on handleFragmentsRequest.
…aracteristic handling. Factory reset.
… cleaned up the example camera.
… and some bug fixing when restoring doorbell from storage
Pull Request Test Coverage Report for Build 1659769639
💛 - Coveralls |
Works great. Thx @Supereg Possibly worth mentioning:
My camera settings:FPS: 25 My implementation: https://github.com/seydx/homebridge-camera-ui/blob/hsv/src/accessories/camera.js |
Maybe to give some context to these points:
Recording of newly added HSV camera is always turned off by default (same behavior as for certified cameras). So the step of manually enabling recording is expected and required.
Every HSV camera has two major options controlling these behaviors. The
This is really dependent on the camera. In general, it is not advised to use |
♻️ Current situation
PR #904 originally proposed to implement HomeKit Secure Video support in HAP-NodeJS. The PR of the original author is considered stale since a few weeks now.
💡 Proposed solution
This PR replaces #904 and realizes the requested changes, building upon the existing PR and moving it from a rather experimental state to a state where the API can be considered stable. The implementation itself was extended to accommodate for much more extensive error and edge case handling.
To highlight some advancements to the previous PR (from a API interface perspective):
CameraControllerOptions
were refactored:EventTriggerOption
s are now derived automatically based on theCameraController
orDoorbellController
configurationMotionSensor
(and aOccupancySensor
) can be either be enabled by flag or passed as an instance. The second option can be used to support people in migrating from preexisting MotionSensor instances to managing them with the CameraController.CameraRecordingDelegate
interface:SelectedRecordingConfiguration
and theActive
state. Second one is used to enable or disable the prebuffer.AsyncGenerator.throw
which wasn't ideal as (a) one couldn't transport additional context or information, (b) it is a feature which isn't really intuitive nor documented well, (c) it is slow, as the generator is only notified on the nextyield
and (d) it is easy to make mistakes, resulting in a potential application crash if done wrong. The new API calls are more intuitive and allow to instantly abort the generator.endOfStream
.⚙️ Release Notes
This section is addressed once merged, such that we can link to docs pages.
➕ Additional Information
Testing
The PR adds some minimal unit tests for the
CameraController
.Further, it implements a minimal
CameraRecordingDelegate
in theIPCamera_accessory.ts
example, providing a rough overview on how to use the API. But most importantly this serves as a test vector to test against Apples HomeKit Controller implementation.Reviewer Nudging
Also applying to users interesting in implementing HomeKit Secure Video.
In any case I would propose that you carefully read through the inline documentation provided with user facing interfaces. Additionally, have a look at the example HAP-NodeJS accessory implementation, giving a minimal but working recording delegate.