Repository navigation
Conversation
Turning a PTZ camera changes the whole picture, so every pan or tilt from the app raised a motion event and a push notification, and in motion recording mode kept the segment. The PTZ endpoint now tells the motion detector about each command before sending it. PtzQuiet keeps the camera quiet: - move: until the matching stop, capped at 60 s in case the stop is lost - stop: 5 s more, for the last step and the video delay - preset: 15 s, since a preset has no stop Scene scores that arrive while quiet are dropped before they reach the tracker; an event that was already running ends on its usual quiet timeout.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Moving a PTZ camera changes the whole picture. Every pan or tilt from the app or the web UI therefore raised a motion event, sent a push notification, and in motion recording mode kept the segment. Checking the event snapshots on my camera, the latest events were all the camera turning, not anything happening in the room.
Change
motion.ptzActivity(cameraId, action)formove,stopandpresetbefore it sends the ONVIF command, so the first frames of the move are already covered.PtzQuiet(inmotion.ts) decides how long each camera stays quiet:move: quiet until the matchingstop, capped at 60 s in case the stop never arrives (app killed, network drop).stop: 5 s more, so the last step and the video delay can pass.preset: 15 s, because there is no stop for a preset. A laterstopdoes not cut it short.PtzQuietintest/motion.test.ts.The timings are constants for now. I am happy to move them into settings if you prefer.
Testing
bun testpasses 76 of 76, andtsc --noEmitis clean.