motioneye 0.43.1__py3-none-any.whl

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.
Files changed (179) hide show
  1. motioneye/__init__.py +1 -0
  2. motioneye/cleanup.py +92 -0
  3. motioneye/config.py +2497 -0
  4. motioneye/controls/__init__.py +0 -0
  5. motioneye/controls/diskctl.py +275 -0
  6. motioneye/controls/mmalctl.py +47 -0
  7. motioneye/controls/powerctl.py +75 -0
  8. motioneye/controls/smbctl.py +318 -0
  9. motioneye/controls/tzctl.py +140 -0
  10. motioneye/controls/v4l2ctl.py +201 -0
  11. motioneye/controls/wifictl.py +261 -0
  12. motioneye/extra/linux_init +94 -0
  13. motioneye/extra/motioneye.conf.sample +99 -0
  14. motioneye/extra/motioneye.systemd +14 -0
  15. motioneye/extra/motioneye.sysv +71 -0
  16. motioneye/handlers/__init__.py +0 -0
  17. motioneye/handlers/action.py +125 -0
  18. motioneye/handlers/base.py +240 -0
  19. motioneye/handlers/config.py +806 -0
  20. motioneye/handlers/log.py +60 -0
  21. motioneye/handlers/login.py +31 -0
  22. motioneye/handlers/main.py +60 -0
  23. motioneye/handlers/movie.py +231 -0
  24. motioneye/handlers/movie_playback.py +125 -0
  25. motioneye/handlers/picture.py +674 -0
  26. motioneye/handlers/power.py +43 -0
  27. motioneye/handlers/prefs.py +39 -0
  28. motioneye/handlers/relay_event.py +107 -0
  29. motioneye/handlers/update.py +59 -0
  30. motioneye/handlers/version.py +39 -0
  31. motioneye/locale/ar/LC_MESSAGES/motioneye.mo +0 -0
  32. motioneye/locale/bn/LC_MESSAGES/motioneye.mo +0 -0
  33. motioneye/locale/ca/LC_MESSAGES/motioneye.mo +0 -0
  34. motioneye/locale/cs/LC_MESSAGES/motioneye.mo +0 -0
  35. motioneye/locale/da/LC_MESSAGES/motioneye.mo +0 -0
  36. motioneye/locale/de/LC_MESSAGES/motioneye.mo +0 -0
  37. motioneye/locale/el/LC_MESSAGES/motioneye.mo +0 -0
  38. motioneye/locale/en/LC_MESSAGES/motioneye.mo +0 -0
  39. motioneye/locale/es/LC_MESSAGES/motioneye.mo +0 -0
  40. motioneye/locale/fi/LC_MESSAGES/motioneye.mo +0 -0
  41. motioneye/locale/fr/LC_MESSAGES/motioneye.mo +0 -0
  42. motioneye/locale/hi/LC_MESSAGES/motioneye.mo +0 -0
  43. motioneye/locale/hu/LC_MESSAGES/motioneye.mo +0 -0
  44. motioneye/locale/it/LC_MESSAGES/motioneye.mo +0 -0
  45. motioneye/locale/ja/LC_MESSAGES/motioneye.mo +0 -0
  46. motioneye/locale/ko/LC_MESSAGES/motioneye.mo +0 -0
  47. motioneye/locale/ms/LC_MESSAGES/motioneye.mo +0 -0
  48. motioneye/locale/nb_NO/LC_MESSAGES/motioneye.mo +0 -0
  49. motioneye/locale/ne/LC_MESSAGES/motioneye.mo +0 -0
  50. motioneye/locale/nl/LC_MESSAGES/motioneye.mo +0 -0
  51. motioneye/locale/pa/LC_MESSAGES/motioneye.mo +0 -0
  52. motioneye/locale/pl/LC_MESSAGES/motioneye.mo +0 -0
  53. motioneye/locale/pt/LC_MESSAGES/motioneye.mo +0 -0
  54. motioneye/locale/ro/LC_MESSAGES/motioneye.mo +0 -0
  55. motioneye/locale/ru/LC_MESSAGES/motioneye.mo +0 -0
  56. motioneye/locale/sk/LC_MESSAGES/motioneye.mo +0 -0
  57. motioneye/locale/sv/LC_MESSAGES/motioneye.mo +0 -0
  58. motioneye/locale/ta/LC_MESSAGES/motioneye.mo +0 -0
  59. motioneye/locale/tr/LC_MESSAGES/motioneye.mo +0 -0
  60. motioneye/locale/uk/LC_MESSAGES/motioneye.mo +0 -0
  61. motioneye/locale/zh/LC_MESSAGES/motioneye.mo +0 -0
  62. motioneye/mediafiles.py +1051 -0
  63. motioneye/meyectl.py +363 -0
  64. motioneye/mjpgclient.py +415 -0
  65. motioneye/monitor.py +67 -0
  66. motioneye/motionctl.py +546 -0
  67. motioneye/motioneye_init.py +34 -0
  68. motioneye/prefs.py +116 -0
  69. motioneye/remote.py +928 -0
  70. motioneye/scripts/migrateconf.sh +98 -0
  71. motioneye/scripts/relayevent.sh +34 -0
  72. motioneye/sendmail.py +256 -0
  73. motioneye/sendtelegram.py +171 -0
  74. motioneye/server.py +508 -0
  75. motioneye/settings.py +148 -0
  76. motioneye/shell.py +37 -0
  77. motioneye/static/css/frame.css +44 -0
  78. motioneye/static/css/jquery.timepicker.min.css +2 -0
  79. motioneye/static/css/main.css +1421 -0
  80. motioneye/static/css/ui.css +472 -0
  81. motioneye/static/fnt/mavenpro-black-webfont.woff +0 -0
  82. motioneye/static/fnt/mavenpro-bold-webfont.woff +0 -0
  83. motioneye/static/fnt/mavenpro-medium-webfont.woff +0 -0
  84. motioneye/static/fnt/mavenpro-regular-webfont.woff +0 -0
  85. motioneye/static/img/IEC5007_On_Symbol.svg +1 -0
  86. motioneye/static/img/IEC5008_Off_Symbol.svg +1 -0
  87. motioneye/static/img/apply-progress.gif +0 -0
  88. motioneye/static/img/arrows.svg +1 -0
  89. motioneye/static/img/camera-action-button-alarm-off.svg +1 -0
  90. motioneye/static/img/camera-action-button-alarm-on.svg +1 -0
  91. motioneye/static/img/camera-action-button-down.svg +1 -0
  92. motioneye/static/img/camera-action-button-left.svg +1 -0
  93. motioneye/static/img/camera-action-button-light-off.svg +1 -0
  94. motioneye/static/img/camera-action-button-light-on.svg +1 -0
  95. motioneye/static/img/camera-action-button-lock.svg +1 -0
  96. motioneye/static/img/camera-action-button-preset.svg +1 -0
  97. motioneye/static/img/camera-action-button-record-start.svg +1 -0
  98. motioneye/static/img/camera-action-button-record-stop.svg +1 -0
  99. motioneye/static/img/camera-action-button-right.svg +1 -0
  100. motioneye/static/img/camera-action-button-snapshot.svg +1 -0
  101. motioneye/static/img/camera-action-button-unlock.svg +1 -0
  102. motioneye/static/img/camera-action-button-up.svg +1 -0
  103. motioneye/static/img/camera-action-button-zoom-in.svg +1 -0
  104. motioneye/static/img/camera-action-button-zoom-out.svg +1 -0
  105. motioneye/static/img/camera-progress.gif +0 -0
  106. motioneye/static/img/camera-top-buttons.svg +1 -0
  107. motioneye/static/img/combo-box-arrow.svg +1 -0
  108. motioneye/static/img/main-loading-progress.gif +0 -0
  109. motioneye/static/img/modal-progress.gif +0 -0
  110. motioneye/static/img/motioneye-icon.svg +1 -0
  111. motioneye/static/img/motioneye-logo.svg +1 -0
  112. motioneye/static/img/no-camera.svg +1 -0
  113. motioneye/static/img/no-preview.svg +1 -0
  114. motioneye/static/img/slider-arrow.svg +1 -0
  115. motioneye/static/img/small-progress.gif +0 -0
  116. motioneye/static/img/top-bar-buttons.svg +1 -0
  117. motioneye/static/img/validation-error.svg +1 -0
  118. motioneye/static/js/css-browser-selector.min.js +3 -0
  119. motioneye/static/js/frame.js +143 -0
  120. motioneye/static/js/gettext.min.js +2 -0
  121. motioneye/static/js/jquery.min.js +2 -0
  122. motioneye/static/js/jquery.mousewheel.min.js +5 -0
  123. motioneye/static/js/jquery.timepicker.min.js +2 -0
  124. motioneye/static/js/main.js +5549 -0
  125. motioneye/static/js/motioneye.ar.json +165 -0
  126. motioneye/static/js/motioneye.bn.json +165 -0
  127. motioneye/static/js/motioneye.ca.json +165 -0
  128. motioneye/static/js/motioneye.cs.json +165 -0
  129. motioneye/static/js/motioneye.da.json +165 -0
  130. motioneye/static/js/motioneye.de.json +165 -0
  131. motioneye/static/js/motioneye.el.json +165 -0
  132. motioneye/static/js/motioneye.en.json +165 -0
  133. motioneye/static/js/motioneye.es.json +165 -0
  134. motioneye/static/js/motioneye.fi.json +165 -0
  135. motioneye/static/js/motioneye.fr.json +165 -0
  136. motioneye/static/js/motioneye.hi.json +165 -0
  137. motioneye/static/js/motioneye.hu.json +165 -0
  138. motioneye/static/js/motioneye.it.json +165 -0
  139. motioneye/static/js/motioneye.ja.json +165 -0
  140. motioneye/static/js/motioneye.ko.json +165 -0
  141. motioneye/static/js/motioneye.ms.json +165 -0
  142. motioneye/static/js/motioneye.nb_NO.json +165 -0
  143. motioneye/static/js/motioneye.ne.json +165 -0
  144. motioneye/static/js/motioneye.nl.json +165 -0
  145. motioneye/static/js/motioneye.pa.json +165 -0
  146. motioneye/static/js/motioneye.pl.json +165 -0
  147. motioneye/static/js/motioneye.pt.json +165 -0
  148. motioneye/static/js/motioneye.ro.json +165 -0
  149. motioneye/static/js/motioneye.ru.json +165 -0
  150. motioneye/static/js/motioneye.sk.json +165 -0
  151. motioneye/static/js/motioneye.sv.json +165 -0
  152. motioneye/static/js/motioneye.ta.json +165 -0
  153. motioneye/static/js/motioneye.tr.json +165 -0
  154. motioneye/static/js/motioneye.uk.json +165 -0
  155. motioneye/static/js/motioneye.zh.json +165 -0
  156. motioneye/static/js/ui.js +1141 -0
  157. motioneye/static/js/version.js +6 -0
  158. motioneye/tasks.py +160 -0
  159. motioneye/template.py +77 -0
  160. motioneye/templates/base.html +30 -0
  161. motioneye/templates/main.html +1341 -0
  162. motioneye/templates/manifest.json +14 -0
  163. motioneye/templates/version.html +17 -0
  164. motioneye/update.py +124 -0
  165. motioneye/uploadservices.py +1422 -0
  166. motioneye/utils/__init__.py +673 -0
  167. motioneye/utils/dtconv.py +174 -0
  168. motioneye/utils/http.py +62 -0
  169. motioneye/utils/mjpeg.py +138 -0
  170. motioneye/utils/rtmp.py +32 -0
  171. motioneye/utils/rtsp.py +255 -0
  172. motioneye/webhook.py +77 -0
  173. motioneye/wsswitch.py +141 -0
  174. motioneye-0.43.1.dist-info/METADATA +121 -0
  175. motioneye-0.43.1.dist-info/RECORD +179 -0
  176. motioneye-0.43.1.dist-info/WHEEL +5 -0
  177. motioneye-0.43.1.dist-info/entry_points.txt +3 -0
  178. motioneye-0.43.1.dist-info/licenses/LICENSE +674 -0
  179. motioneye-0.43.1.dist-info/top_level.txt +1 -0
motioneye/__init__.py ADDED
@@ -0,0 +1 @@
1
+ VERSION = "0.43.1"
motioneye/cleanup.py ADDED
@@ -0,0 +1,92 @@
1
+ # Copyright (c) 2013 Calin Crisan
2
+ # This file is part of motionEye.
3
+ #
4
+ # motionEye is free software: you can redistribute it and/or modify
5
+ # it under the terms of the GNU General Public License as published by
6
+ # the Free Software Foundation, either version 3 of the License, or
7
+ # (at your option) any later version.
8
+ #
9
+ # This program is distributed in the hope that it will be useful,
10
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+ # GNU General Public License for more details.
13
+ #
14
+ # You should have received a copy of the GNU General Public License
15
+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
16
+
17
+ import datetime
18
+ import logging
19
+ import multiprocessing
20
+ import os
21
+ import signal
22
+
23
+ from tornado.ioloop import IOLoop
24
+
25
+ from motioneye import mediafiles, settings
26
+
27
+ _process = None
28
+
29
+
30
+ def start():
31
+ if not settings.CLEANUP_INTERVAL:
32
+ return
33
+
34
+ # schedule the first call a bit later to improve performance at startup
35
+ io_loop = IOLoop.current()
36
+ io_loop.add_timeout(
37
+ datetime.timedelta(seconds=min(settings.CLEANUP_INTERVAL, 60)), _run_process
38
+ )
39
+
40
+
41
+ def stop():
42
+ global _process
43
+
44
+ if not running():
45
+ _process = None
46
+ return
47
+
48
+ if _process.is_alive():
49
+ _process.join(timeout=10)
50
+
51
+ if _process.is_alive():
52
+ logging.error('cleanup process did not finish in time, killing it...')
53
+ os.kill(_process.pid, signal.SIGKILL)
54
+
55
+ _process = None
56
+
57
+
58
+ def running():
59
+ return _process is not None and _process.is_alive()
60
+
61
+
62
+ def _run_process():
63
+ global _process
64
+
65
+ io_loop = IOLoop.current()
66
+
67
+ # schedule the next call
68
+ io_loop.add_timeout(
69
+ datetime.timedelta(seconds=settings.CLEANUP_INTERVAL), _run_process
70
+ )
71
+
72
+ if not running(): # check that the previous process has finished
73
+ logging.debug('running cleanup process...')
74
+
75
+ _process = multiprocessing.Process(target=_do_cleanup)
76
+ _process.start()
77
+
78
+
79
+ def _do_cleanup():
80
+ # this will be executed in a separate subprocess
81
+
82
+ # ignore the terminate and interrupt signals in this subprocess
83
+ signal.signal(signal.SIGINT, signal.SIG_IGN)
84
+ signal.signal(signal.SIGTERM, signal.SIG_IGN)
85
+
86
+ try:
87
+ mediafiles.cleanup_media('picture')
88
+ mediafiles.cleanup_media('movie')
89
+ logging.debug('cleanup done')
90
+
91
+ except Exception as e:
92
+ logging.error(f'failed to cleanup media files: {str(e)}', exc_info=True)