Supereg / secure-video-specification

Documentation and examples of the HomeKit Secure-Video Specification
MIT License
216 stars 13 forks source link

Correction on flow of events #4

Closed koush closed 2 years ago

koush commented 3 years ago

The data stream is not opened until a motion service reports activity. I'm unsure if this lazy connect behavior I am observing was a change from the original behavior when the spec was written, but that is how it works now.

Supereg commented 3 years ago

This sounds a bit weird to me that apple would wait until the first(?) motion event. After all stuff can go wrong. If its okay I would try to test that out myself.

koush commented 3 years ago

This sounds a bit weird to me that apple would wait until the first(?) motion event. After all stuff can go wrong. If its okay I would try to test that out myself.

Go for it. This is just what I've found through my current testing. I was wondering if I was doing something wrong because I wasn't receiving the incoming data stream connection. Tested everything, and then on a hunch tried triggering motion, and that's when the connection comes in. Have seen this behavior reliably in my current implementation.

Here's my fork, hoping to be done sometime tomorrow:

https://github.com/koush/HAP-NodeJS/blob/master/src/lib/camera/RecordingManagement.ts