Read the statement by Michael Teeuw here.
MMM-SleepWake turn off but not turn on
-
@krosamont but it sleeps on timer(no motion) and wakes on motion.
how long after motion til motion fires the ended event?look in /var/log/motion.log
may have to fiddle w some motion settings.
i changed my time gap down to 15 seconds
the camera is detecting motion constantly -
@sdetweil said in MMM-SleepWake turn off but not turn on:
start/stop commands
You mean going to the terminal and write:
pi@raspberrypi:~/MagicMirror $ sudo service motion start pi@raspberrypi:~/MagicMirror $ sudo service motion stop
I have done it. nothing happened
-
@sdetweil the default setting is:
# Maximum number of frames to be captured per second. # Valid range: 2-100. Default: 100 (almost no limit). framerate 2
and I have changed the gap event from 60 to 15:
# Event Gap is the seconds of no motion detection that triggers the end of an event. # An event is defined as a series of motion images taken within a short timeframe. # Recommended value is 60 seconds (Default). The value -1 is allowed and disables # events causing all Motion to be written to one single movie file and no pre_capture. # If set to 0, motion is running in gapless mode. Movies don't have gaps anymore. An # event ends right after no more motion is detected and post_capture is over. event_gap 15
It sounds good, isn’t it?
I have also installed the module again :
pi@raspberrypi:~/MagicMirror/modules/MMM-SleepWake $ npm install
and I have tried to use your module without using MMM-Face-Reco-DNN…
but still I don’t find the solution -
By the way, I have also noticed that no log are generated in motion.log when I am using the mirror? The log is generated only when I do this command:
pi@raspberrypi:~ $ motion
Is it normal?
-
@krosamont motion is a module outside mm
u have to run it all the timei think u will have to do
sudo motion &
to start it -
Hello @chanster,
How do you run your magic mirror project please?
@sdetweil I have tried:pi@raspberrypi:~/MagicMirror $ sudo service motion start pi@raspberrypi:~/MagicMirror $ npm start
Still nothing. And nothing appears in the log. I think this is the problem…
If I do:
pi@raspberrypi:~/MagicMirror $ sudo motion & pi@raspberrypi:~/MagicMirror $ npm start
Then I get an error and the cam is playing my mirror but there, I have the log!!! :/
I think we are close…:face_with_monocle:
-
@sdetweil you mean that it’s normal if I don’t see the motion log when I run the mirror?
-
@krosamont turn off the motion web servers that post video
i think there are 4 8080-8083
search the conf file -
I have just found 8080 and 8081…there is no 8083.
I have changed them to 0:# TCP/IP port for the http server to listen on (default: 0 = disabled) #webcontrol_port 8080 webcontrol_port 0 # The mini-http server listens to this port for requests (default: 0 = disabled) # stream_port 8081 stream_port 0
I have an error when I run:
pi@raspberrypi:~/MagicMirror $ sudo motion & pi@raspberrypi:~/MagicMirror $ npm start
error:
[18.01.2021 17:45.26.632] [ERROR] Whoops! There was an uncaught exception... [18.01.2021 17:45.26.640] [ERROR] PythonShellError: mmal: mmal_vc_port_enable: failed to enable port vc.null_sink:in:0(OPQV): ENOSPC mmal: mmal_port_enable: failed to enable connected port (vc.null_sink:in:0(OPQV))0x5b77ac0 (ENOSPC) mmal: mmal_connection_enable: output port couldn't be enabled Traceback (most recent call last): File "modules/MMM-Face-Reco-DNN/tools/facerecognition.py", line 80, in <module> vs = VideoStream(usePiCamera=True, rotation=args["rotateCamera"]).start() File "/home/pi/.virtualenvs/cv/lib/python3.7/site-packages/imutils/video/videostream.py", line 18, in __init__ framerate=framerate, **kwargs) File "/home/pi/.virtualenvs/cv/lib/python3.7/site-packages/imutils/video/pivideostream.py", line 10, in __init__ self.camera = PiCamera() File "/home/pi/.virtualenvs/cv/lib/python3.7/site-packages/picamera/camera.py", line 433, in __init__ self._init_preview() File "/home/pi/.virtualenvs/cv/lib/python3.7/site-packages/picamera/camera.py", line 513, in _init_preview self, self._camera.outputs[self.CAMERA_PREVIEW_PORT]) File "/home/pi/.virtualenvs/cv/lib/python3.7/site-packages/picamera/renderers.py", line 558, in __init__ self.renderer.inputs[0].connect(source).enable() File "/home/pi/.virtualenvs/cv/lib/python3.7/site-packages/picamera/mmalobj.py", line 2212, in enable prefix="Failed to enable connection") File "/home/pi/.virtualenvs/cv/lib/python3.7/site-packages/picamera/exc.py", line 184, in mmal_check raise PiCameraMMALError(status, prefix) picamera.exc.PiCameraMMALError: Failed to enable connection: Out of resources at PythonShell.parseError (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:254:21) at terminateIfNeeded (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:129:32) at ChildProcess.<anonymous> (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:121:13) at ChildProcess.emit (events.js:210:5) at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12) { executable: '/home/pi/.virtualenvs/cv/bin/python3.7', options: null, script: 'modules/MMM-Face-Reco-DNN/tools/facerecognition.py', args: [ '--cascade=modules/MMM-Face-Reco-DNN/tools/haarcascade_frontalface_default.xml', '--encodings=modules/MMM-Face-Reco-DNN/tools/encodings.pickle', '--usePiCamera=1', '--source=0', '--rotateCamera=0', '--method=dnn', '--detectionMethod=hog', '--interval=4000', '--output=0', '--extendDataset=False', '--dataset=modules/MMM-Face-Reco-DNN/dataset/', '--tolerance=0.6' ], exitCode: 1 } [18.01.2021 17:45.26.642] [ERROR] MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection? [18.01.2021 17:45.26.643] [ERROR] If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues [18.01.2021 17:45.49.329] [LOG] sleep-wake helper in socket notification=start_sleep
weird…
-
@krosamont u have to turn off the servers not set the ports to zero
i think the settings are false. on my phone from hospital cant help more. motion doc is pretty good