# event start
on_event_start = ['%(script)s start %%t' % {'script': meyectl.find_command('relayevent')}]
if ui['email_notifications_enabled']:
- send_mail_path = os.path.join(settings.PROJECT_PATH, 'sendmail.py')
- send_mail_path = os.path.abspath(send_mail_path)
emails = re.sub('\\s', '', ui['email_notifications_addresses'])
on_event_start.append("%(script)s '%(server)s' '%(port)s' '%(account)s' '%(password)s' '%(tls)s' '%(to)s' 'motion_start' '%%t' '%%Y-%%m-%%dT%%H:%%M:%%S' '%(timespan)s'" % {
ui[name[1:]] = value
+ # action commands
+ action_commands = get_action_commands(data['@id'])
+ ui['actions'] = action_commands.keys()
+
return ui
}
/* fps timeout */
- if (this.fpsTimes.length && (now - this.fpsTimes[this.fpsTimes.length - 1]) > 2000) {
+ if (this.fpsTimes && this.fpsTimes.length && (now - this.fpsTimes[this.fpsTimes.length - 1]) > 2000) {
$(this).parents('div.camera-frame').find('span.camera-info.fps').html('0 fps');
}
});