motioneye 0.27__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- motioneye-0.27/MANIFEST.in +1 -0
- motioneye-0.27/PKG-INFO +18 -0
- motioneye-0.27/README.rst +1 -0
- motioneye-0.27/extra/motioneye.conf.sample +81 -0
- motioneye-0.27/extra/motioneye.init-debian +71 -0
- motioneye-0.27/extra/motioneye.systemd-unit +9 -0
- motioneye-0.27/motioneye/__init__.py +2 -0
- motioneye-0.27/motioneye/cleanup.py +96 -0
- motioneye-0.27/motioneye/config.py +1789 -0
- motioneye-0.27/motioneye/diskctl.py +259 -0
- motioneye-0.27/motioneye/handlers.py +1466 -0
- motioneye-0.27/motioneye/mediafiles.py +801 -0
- motioneye-0.27/motioneye/meyectl.py +228 -0
- motioneye-0.27/motioneye/mjpgclient.py +304 -0
- motioneye-0.27/motioneye/motionctl.py +332 -0
- motioneye-0.27/motioneye/ordereddict.py +258 -0
- motioneye-0.27/motioneye/powerctl.py +78 -0
- motioneye-0.27/motioneye/relayevent.py +131 -0
- motioneye-0.27/motioneye/remote.py +653 -0
- motioneye-0.27/motioneye/sendmail.py +194 -0
- motioneye-0.27/motioneye/server.py +422 -0
- motioneye-0.27/motioneye/settings.py +108 -0
- motioneye-0.27/motioneye/smbctl.py +230 -0
- motioneye-0.27/motioneye/static/css/frame.css +43 -0
- motioneye-0.27/motioneye/static/css/jquery.timepicker.css +69 -0
- motioneye-0.27/motioneye/static/css/main.css +1043 -0
- motioneye-0.27/motioneye/static/css/ui.css +469 -0
- motioneye-0.27/motioneye/static/favicon.ico +0 -0
- motioneye-0.27/motioneye/static/fnt/mavenpro-black-webfont.eot +0 -0
- motioneye-0.27/motioneye/static/fnt/mavenpro-black-webfont.svg +243 -0
- motioneye-0.27/motioneye/static/fnt/mavenpro-black-webfont.ttf +0 -0
- motioneye-0.27/motioneye/static/fnt/mavenpro-black-webfont.woff +0 -0
- motioneye-0.27/motioneye/static/fnt/mavenpro-bold-webfont.eot +0 -0
- motioneye-0.27/motioneye/static/fnt/mavenpro-bold-webfont.svg +243 -0
- motioneye-0.27/motioneye/static/fnt/mavenpro-bold-webfont.ttf +0 -0
- motioneye-0.27/motioneye/static/fnt/mavenpro-bold-webfont.woff +0 -0
- motioneye-0.27/motioneye/static/fnt/mavenpro-medium-webfont.eot +0 -0
- motioneye-0.27/motioneye/static/fnt/mavenpro-medium-webfont.svg +243 -0
- motioneye-0.27/motioneye/static/fnt/mavenpro-medium-webfont.ttf +0 -0
- motioneye-0.27/motioneye/static/fnt/mavenpro-medium-webfont.woff +0 -0
- motioneye-0.27/motioneye/static/fnt/mavenpro-regular-webfont.eot +0 -0
- motioneye-0.27/motioneye/static/fnt/mavenpro-regular-webfont.svg +243 -0
- motioneye-0.27/motioneye/static/fnt/mavenpro-regular-webfont.ttf +0 -0
- motioneye-0.27/motioneye/static/fnt/mavenpro-regular-webfont.woff +0 -0
- motioneye-0.27/motioneye/static/img/apply-progress.gif +0 -0
- motioneye-0.27/motioneye/static/img/arrows.svg +86 -0
- motioneye-0.27/motioneye/static/img/camera-progress.gif +0 -0
- motioneye-0.27/motioneye/static/img/combo-box-arrow.svg +78 -0
- motioneye-0.27/motioneye/static/img/logout.svg +56 -0
- motioneye-0.27/motioneye/static/img/main-loading-progress.gif +0 -0
- motioneye-0.27/motioneye/static/img/modal-progress.gif +0 -0
- motioneye-0.27/motioneye/static/img/motioneye-icon.svg +56 -0
- motioneye-0.27/motioneye/static/img/motioneye-logo.svg +3 -0
- motioneye-0.27/motioneye/static/img/no-camera.svg +61 -0
- motioneye-0.27/motioneye/static/img/no-preview.svg +74 -0
- motioneye-0.27/motioneye/static/img/settings.svg +108 -0
- motioneye-0.27/motioneye/static/img/slider-arrow.svg +78 -0
- motioneye-0.27/motioneye/static/img/small-progress.gif +0 -0
- motioneye-0.27/motioneye/static/img/top-bar-buttons.svg +184 -0
- motioneye-0.27/motioneye/static/img/validation-error.svg +82 -0
- motioneye-0.27/motioneye/static/js/css-browser-selector.js +14 -0
- motioneye-0.27/motioneye/static/js/frame.js +150 -0
- motioneye-0.27/motioneye/static/js/jquery.min.js +5 -0
- motioneye-0.27/motioneye/static/js/jquery.mousewheel.js +117 -0
- motioneye-0.27/motioneye/static/js/jquery.timepicker.min.js +1 -0
- motioneye-0.27/motioneye/static/js/main.js +3929 -0
- motioneye-0.27/motioneye/static/js/ui.js +1100 -0
- motioneye-0.27/motioneye/static/js/version.js +6 -0
- motioneye-0.27/motioneye/template.py +66 -0
- motioneye-0.27/motioneye/templates/base.html +32 -0
- motioneye-0.27/motioneye/templates/main.html +828 -0
- motioneye-0.27/motioneye/templates/version.html +15 -0
- motioneye-0.27/motioneye/thumbnailer.py +86 -0
- motioneye-0.27/motioneye/tzctl.py +139 -0
- motioneye-0.27/motioneye/update.py +67 -0
- motioneye-0.27/motioneye/utils.py +681 -0
- motioneye-0.27/motioneye/v4l2ctl.py +418 -0
- motioneye-0.27/motioneye/webhook.py +59 -0
- motioneye-0.27/motioneye/wifictl.py +248 -0
- motioneye-0.27/motioneye/wsswitch.py +116 -0
- motioneye-0.27/motioneye.egg-info/PKG-INFO +18 -0
- motioneye-0.27/motioneye.egg-info/SOURCES.txt +86 -0
- motioneye-0.27/motioneye.egg-info/dependency_links.txt +1 -0
- motioneye-0.27/motioneye.egg-info/entry_points.txt +3 -0
- motioneye-0.27/motioneye.egg-info/requires.txt +4 -0
- motioneye-0.27/motioneye.egg-info/top_level.txt +1 -0
- motioneye-0.27/setup.cfg +5 -0
- motioneye-0.27/setup.py +95 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
recursive-include extra *
|
motioneye-0.27/PKG-INFO
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
Metadata-Version: 1.1
|
|
2
|
+
Name: motioneye
|
|
3
|
+
Version: 0.27
|
|
4
|
+
Summary: motionEye server
|
|
5
|
+
Home-page: https://bitbucket.org/ccrisan/motioneye/
|
|
6
|
+
Author: Calin Crisan
|
|
7
|
+
Author-email: ccrisan@gmail.com
|
|
8
|
+
License: GPLv3
|
|
9
|
+
Description: **motionEye** is a web-based frontend for `motion <http://www.lavrsen.dk/foswiki/bin/view/Motion>`_.
|
|
10
|
+
|
|
11
|
+
Keywords: motion video surveillance frontend
|
|
12
|
+
Platform: UNKNOWN
|
|
13
|
+
Classifier: Development Status :: 4 - Beta
|
|
14
|
+
Classifier: Intended Audience :: End Users/Desktop
|
|
15
|
+
Classifier: Topic :: Multimedia :: Video
|
|
16
|
+
Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)
|
|
17
|
+
Classifier: Programming Language :: Python :: 2
|
|
18
|
+
Classifier: Programming Language :: Python :: 2.7
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
**motionEye** is a web-based frontend for `motion <http://www.lavrsen.dk/foswiki/bin/view/Motion>`_.
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
|
|
2
|
+
# static files (.css, .js etc) are served at this root url;
|
|
3
|
+
# change this if you run motionEye behind a reverse proxy (e.g. nginx),
|
|
4
|
+
# and you want static files to be served directly by it
|
|
5
|
+
#static_url '/static/'
|
|
6
|
+
|
|
7
|
+
# path to the configuration directory (must be writable by motionEye)
|
|
8
|
+
#conf_path /etc/motioneye
|
|
9
|
+
|
|
10
|
+
# path to the directory where pid files go (must be writable by motionEye)
|
|
11
|
+
#run_path /var/run
|
|
12
|
+
|
|
13
|
+
# path to the directory where log files go (must be writable by motionEye)
|
|
14
|
+
#log_path /var/log
|
|
15
|
+
|
|
16
|
+
# default output path for media files (must be writable by motionEye)
|
|
17
|
+
#media_path /var/lib/motioneye
|
|
18
|
+
|
|
19
|
+
# path to the motion binary to use (automatically detected by default)
|
|
20
|
+
#motion_binary /usr/bin/motion
|
|
21
|
+
|
|
22
|
+
# the log level (use quiet, error, warning, info or debug)
|
|
23
|
+
#log_level info
|
|
24
|
+
|
|
25
|
+
# the IP address to listen on
|
|
26
|
+
# (0.0.0.0 for all interfaces, 127.0.0.1 for localhost)
|
|
27
|
+
#listen 0.0.0.0
|
|
28
|
+
|
|
29
|
+
# the TCP port to listen on
|
|
30
|
+
#port 8765
|
|
31
|
+
|
|
32
|
+
# interval in seconds at which motionEye checks the SMB mounts
|
|
33
|
+
#mount_check_interval 300
|
|
34
|
+
|
|
35
|
+
# interval in seconds at which motionEye checks if motion is running
|
|
36
|
+
#motion_check_interval 10
|
|
37
|
+
|
|
38
|
+
# interval in seconds at which the janitor is called
|
|
39
|
+
# to remove old pictures and movies
|
|
40
|
+
#cleanup_interval 43200
|
|
41
|
+
|
|
42
|
+
# interval in seconds at which the thumbnail mechanism runs
|
|
43
|
+
# (set to 0 to disable)
|
|
44
|
+
#thumbnailer_interval 60
|
|
45
|
+
|
|
46
|
+
# timeout in seconds to wait for response from a remote motionEye server
|
|
47
|
+
#remote_request_timeout 10
|
|
48
|
+
|
|
49
|
+
# timeout in seconds to wait for mjpg data from the motion daemon
|
|
50
|
+
#mjpg_client_timeout 10
|
|
51
|
+
|
|
52
|
+
# timeout in seconds after which an idle mjpg client is removed
|
|
53
|
+
# (set to 0 to disable)
|
|
54
|
+
#mjpg_client_idle_timeout 10
|
|
55
|
+
|
|
56
|
+
# enable SMB shares (requires motionEye to run as root)
|
|
57
|
+
#smb_shares false
|
|
58
|
+
|
|
59
|
+
# the directory where the SMB mount points will be created
|
|
60
|
+
#smb_mount_root /media
|
|
61
|
+
|
|
62
|
+
# path to the wpa_supplicant.conf file
|
|
63
|
+
# (enable this to configure wifi settings from the UI)
|
|
64
|
+
#wpa_supplicant_conf /etc/wpa_supplicant.conf
|
|
65
|
+
|
|
66
|
+
# path to the localtime file
|
|
67
|
+
# (enable this to configure the system time zone from the UI)
|
|
68
|
+
#local_time_file /etc/localtime
|
|
69
|
+
|
|
70
|
+
# enables shutdown and rebooting after changing system settings
|
|
71
|
+
# (such as wifi settings or time zone)
|
|
72
|
+
#enable_reboot false
|
|
73
|
+
|
|
74
|
+
# timeout in seconds to use when talking to the SMTP server
|
|
75
|
+
#smtp_timeout 60
|
|
76
|
+
|
|
77
|
+
# timeout in seconds to wait for zip file creation
|
|
78
|
+
#zip_timeout 500
|
|
79
|
+
|
|
80
|
+
# enable adding and removing cameras from UI
|
|
81
|
+
#add_remove_cameras true
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
#!/bin/sh -e
|
|
2
|
+
#
|
|
3
|
+
# /etc/init.d/motioneye: Start the motionEye server
|
|
4
|
+
#
|
|
5
|
+
### BEGIN INIT INFO
|
|
6
|
+
# Provides: motioneye
|
|
7
|
+
# Required-Start: $local_fs $syslog $remote_fs
|
|
8
|
+
# Required-Stop: $remote_fs
|
|
9
|
+
# Default-Start: 2 3 4 5
|
|
10
|
+
# Default-Stop: 0 1 6
|
|
11
|
+
# Short-Description: Start the motionEye server
|
|
12
|
+
# Description: Start the motionEye server
|
|
13
|
+
### END INIT INFO
|
|
14
|
+
|
|
15
|
+
NAME="motioneye"
|
|
16
|
+
PATH_BIN="/bin:/usr/bin:/sbin:/usr/sbin"
|
|
17
|
+
DAEMON="/usr/bin/meyectl"
|
|
18
|
+
PIDFILE="/var/run/$NAME.pid"
|
|
19
|
+
DESC="motionEye server"
|
|
20
|
+
USER="motion"
|
|
21
|
+
OPTIONS="startserver -c /etc/motioneye/motioneye.conf -l"
|
|
22
|
+
|
|
23
|
+
. /lib/lsb/init-functions
|
|
24
|
+
|
|
25
|
+
test -x $DAEMON || exit 0
|
|
26
|
+
|
|
27
|
+
RET=0
|
|
28
|
+
|
|
29
|
+
case "$1" in
|
|
30
|
+
start)
|
|
31
|
+
log_daemon_msg "Starting $DESC"
|
|
32
|
+
if start-stop-daemon --start --oknodo --exec $DAEMON -b --chuid $USER -- $OPTIONS; then
|
|
33
|
+
log_end_msg 0
|
|
34
|
+
else
|
|
35
|
+
log_end_msg 1
|
|
36
|
+
RET=1
|
|
37
|
+
fi
|
|
38
|
+
;;
|
|
39
|
+
|
|
40
|
+
stop)
|
|
41
|
+
log_daemon_msg "Stopping $DESC"
|
|
42
|
+
if start-stop-daemon --stop --oknodo --exec $DAEMON --retry 5; then
|
|
43
|
+
log_end_msg 0
|
|
44
|
+
else
|
|
45
|
+
log_end_msg 1
|
|
46
|
+
RET=1
|
|
47
|
+
fi
|
|
48
|
+
;;
|
|
49
|
+
|
|
50
|
+
restart)
|
|
51
|
+
log_action_begin_msg "Restarting $DESC"
|
|
52
|
+
if $0 stop && $0 start; then
|
|
53
|
+
log_action_end_msg 0
|
|
54
|
+
else
|
|
55
|
+
log_action_cont_msg "(failed)"
|
|
56
|
+
RET=1
|
|
57
|
+
fi
|
|
58
|
+
;;
|
|
59
|
+
|
|
60
|
+
status)
|
|
61
|
+
status_of_proc $DAEMON $NAME
|
|
62
|
+
;;
|
|
63
|
+
|
|
64
|
+
*)
|
|
65
|
+
echo "Usage: /etc/init.d/$NAME {start|stop|restart|status}"
|
|
66
|
+
RET=1
|
|
67
|
+
;;
|
|
68
|
+
esac
|
|
69
|
+
|
|
70
|
+
exit $RET
|
|
71
|
+
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
|
|
2
|
+
# Copyright (c) 2013 Calin Crisan
|
|
3
|
+
# This file is part of motionEye.
|
|
4
|
+
#
|
|
5
|
+
# motionEye is free software: you can redistribute it and/or modify
|
|
6
|
+
# it under the terms of the GNU General Public License as published by
|
|
7
|
+
# the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+
# (at your option) any later version.
|
|
9
|
+
#
|
|
10
|
+
# This program is distributed in the hope that it will be useful,
|
|
11
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
# GNU General Public License for more details.
|
|
14
|
+
#
|
|
15
|
+
# You should have received a copy of the GNU General Public License
|
|
16
|
+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
|
|
18
|
+
import datetime
|
|
19
|
+
import logging
|
|
20
|
+
import multiprocessing
|
|
21
|
+
import os
|
|
22
|
+
import signal
|
|
23
|
+
import tornado
|
|
24
|
+
|
|
25
|
+
import mediafiles
|
|
26
|
+
import settings
|
|
27
|
+
import thumbnailer
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
_process = None
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def start():
|
|
34
|
+
# schedule the first call a bit later to improve performance at startup
|
|
35
|
+
ioloop = tornado.ioloop.IOLoop.instance()
|
|
36
|
+
ioloop.add_timeout(datetime.timedelta(seconds=60), _run_process)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def stop():
|
|
40
|
+
global _process
|
|
41
|
+
|
|
42
|
+
if not running():
|
|
43
|
+
_process = None
|
|
44
|
+
return
|
|
45
|
+
|
|
46
|
+
if _process.is_alive():
|
|
47
|
+
_process.join(timeout=10)
|
|
48
|
+
|
|
49
|
+
if _process.is_alive():
|
|
50
|
+
logging.error('cleanup process did not finish in time, killing it...')
|
|
51
|
+
os.kill(_process.pid, signal.SIGKILL)
|
|
52
|
+
|
|
53
|
+
_process = None
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
def running():
|
|
57
|
+
return _process is not None and _process.is_alive()
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
def _run_process():
|
|
61
|
+
global _process
|
|
62
|
+
|
|
63
|
+
ioloop = tornado.ioloop.IOLoop.instance()
|
|
64
|
+
|
|
65
|
+
if thumbnailer.running():
|
|
66
|
+
# postpone if thumbnailer is currently running
|
|
67
|
+
ioloop.add_timeout(datetime.timedelta(seconds=60), _run_process)
|
|
68
|
+
|
|
69
|
+
return
|
|
70
|
+
|
|
71
|
+
else:
|
|
72
|
+
# schedule the next call
|
|
73
|
+
ioloop.add_timeout(datetime.timedelta(seconds=settings.CLEANUP_INTERVAL), _run_process)
|
|
74
|
+
|
|
75
|
+
if not running(): # check that the previous process has finished
|
|
76
|
+
logging.debug('running cleanup process...')
|
|
77
|
+
|
|
78
|
+
_process = multiprocessing.Process(target=_do_cleanup)
|
|
79
|
+
_process.start()
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
def _do_cleanup():
|
|
83
|
+
# this will be executed in a separate subprocess
|
|
84
|
+
|
|
85
|
+
# ignore the terminate and interrupt signals in this subprocess
|
|
86
|
+
signal.signal(signal.SIGINT, signal.SIG_IGN)
|
|
87
|
+
signal.signal(signal.SIGTERM, signal.SIG_IGN)
|
|
88
|
+
|
|
89
|
+
try:
|
|
90
|
+
mediafiles.cleanup_media('picture')
|
|
91
|
+
mediafiles.cleanup_media('movie')
|
|
92
|
+
logging.debug('cleanup done')
|
|
93
|
+
|
|
94
|
+
except Exception as e:
|
|
95
|
+
logging.error('failed to cleanup media files: %(msg)s' % {
|
|
96
|
+
'msg': unicode(e)}, exc_info=True)
|