'event_gap': int(ui['event_gap']),
'pre_capture': int(ui['pre_capture']),
'post_capture': int(ui['post_capture']),
+ 'minimum_motion_frames': int(ui['minimum_motion_frames']),
# movies
'ffmpeg_output_movies': ui['motion_movies'],
'event_gap': int(data['event_gap']),
'pre_capture': int(data['pre_capture']),
'post_capture': int(data['post_capture']),
+ 'minimum_motion_frames': int(data['minimum_motion_frames']),
# motion movies
'motion_movies': data['ffmpeg_output_movies'],
data.setdefault('pre_capture', 2)
data.setdefault('post_capture', 4)
+ data.setdefault('minimum_motion_frames', 1)
if old_motion:
data.setdefault('output_normal', False)
makeNumberValidator($('#eventGapEntry'), 1, 86400, false, false, true);
makeNumberValidator($('#preCaptureEntry'), 0, 100, false, false, true);
makeNumberValidator($('#postCaptureEntry'), 0, 100, false, false, true);
+ makeNumberValidator($('#minimumMotionFramesEntry'), 1, 1000, false, false, true);
makeNumberValidator($('#smtpPortEntry'), 1, 65535, false, false, true);
/* time validators */
'event_gap': $('#eventGapEntry').val(),
'pre_capture': $('#preCaptureEntry').val(),
'post_capture': $('#postCaptureEntry').val(),
+ 'minimum_motion_frames': $('#minimumMotionFramesEntry').val(),
/* motion movies */
'motion_movies': $('#motionMoviesSwitch')[0].checked,
$('#eventGapEntry').val(dict['event_gap']);
$('#preCaptureEntry').val(dict['pre_capture']);
$('#postCaptureEntry').val(dict['post_capture']);
+ $('#minimumMotionFramesEntry').val(dict['minimum_motion_frames']);
/* motion movies */
$('#motionMoviesSwitch')[0].checked = dict['motion_movies'];
<td class="settings-item-value"><input type="text" class="number styled motion-detection" id="postCaptureEntry"><span class="settings-item-unit">frames</span></td>
<td><span class="help-mark" title="sets the number of frames to be captured (and included in the movie) after a motion event is detected">?</span></td>
</tr>
+ <tr class="settings-item advanced-setting">
+ <td class="settings-item-label"><span class="settings-item-label">Minimum Motion Frames</span></td>
+ <td class="settings-item-value"><input type="text" class="number styled motion-detection" id="minimumMotionFramesEntry"><span class="settings-item-unit">frames</span></td>
+ <td><span class="help-mark" title="sets the minimum number of successive motion frames required to start a motion event">?</span></td>
+ </tr>
</table>
<div class="settings-section-title"><input type="checkbox" class="styled section motion-movies" id="motionMoviesSwitch">Motion Movies</div>