sdetweil / MMM-SleepWake

module that uses an external source for motion detection, like a web camera
19 stars 0 forks source link

Can you clarify how I can properly configure the motion project for this use. #3

Closed ngdemigod closed 3 years ago

ngdemigod commented 4 years ago

Currently, the module doesn't work. The screen will turn off but the cam never detects motion

sdetweil commented 4 years ago

there are two motion module statements in its config

sudo nano /etc/motion/motion.conf

from my desktop MM the two statements look like this

Command to be executed when an event starts. (default: none)

An event starts at first motion detected after a period of no motion defined by event_gap

 on_event_start /home/sam/MagicMirror/modules/MMM-SleepWake/external_motion started

Command to be executed when an event ends after a period of no motion

(default: none). The period of no motion is defined by option event_gap.

  on_event_end /home/sam/MagicMirror/modules/MMM-SleepWake/external_motion ended 

the module config said

/home/{userid}/MagicMirror/modules/MMM-SleepWake/external_motion started ( or ended) 

once u edit those two lines, then u have to start the motion motdule

sudo motion &

then u can check if it detects motion

sudo tail -f /var/log/motion/motion.log

if all looks good, then in /home/{userid/MagicMirror/modules/MMM-SleepWake/motion you should see two 'files' detected and ended these are used to signal the module..

sdetweil commented 4 years ago

and when I tail the log
sudo tail -f /var/log/motion/motion.log

I see

[1:ml1] [NTC] [ALL] [Sep 12 11:08:44] motion_detected: Motion detected - starting event 6
[1:ml1] [NTC] [ALL] [Sep 12 11:09:03] mlp_actions: End of event 6
[1:ml1] [NTC] [ALL] [Sep 12 11:09:18] motion_detected: Motion detected - starting event 7
[1:ml1] [NTC] [ALL] [Sep 12 11:09:36] mlp_actions: End of event 7
[1:ml1] [NTC] [ALL] [Sep 12 11:09:36] motion_detected: Motion detected - starting event 8
[1:ml1] [NTC] [ALL] [Sep 12 11:09:56] mlp_actions: End of event 8
[1:ml1] [NTC] [ALL] [Sep 12 11:10:59] motion_detected: Motion detected - starting event 9
[1:ml1] [NTC] [ALL] [Sep 12 11:11:20] mlp_actions: End of event 9

which confirms that motion is detecting camera motion as expected

sdetweil commented 4 years ago

looks like I had left out some info on the configuration, I have updated the doc and cleaned up some options if u are interested in trying it again

arora1mayank commented 3 years ago

@sdetweil you really havent written anything in your docs incomplete docs you could give simple and straight procedure to use the module to make it simple for users. now we people have to struggle to get it working

sdetweil commented 3 years ago

your are welcome to submit the correct documentation for consideration as a pull rewuest