Skip to content

Latest commit

 

History

History
44 lines (35 loc) · 2.12 KB

motion.md

File metadata and controls

44 lines (35 loc) · 2.12 KB

h1>Motion Detection configuration

Smart-Mirror supports 2 approaches to motion detection

  • Hardware PIR sensor wired to Raspberry PI
  • Externally provided sensor of some kind

    this could be via a webcam or some other mechanism

to enable motion detection, you must first enable the autosleep function. othewise smart-mirror will never go to sleep at all

once autosleep is enabled (pick TV or Monitor, depending on what kind of display you are using for smart-mirror) then select either PIN or External mode in the Motion, Mode dropdown

once you select external motion, smart-mirror will start looking for the files that indicate motion is occurring

the external-motion script in the scripts folder can be used to provide the proper file names and location to support the built in detection code.

an Example of an external motion detection provider is the github Motion project at https://motion-project.github.io/

as part of the Motion project configuration, you can have it signal

  • motion start
  • how long to wait from last motion detection (gap)
  • motion ended

to enable motion detection, modify the /etc/motion/motion.conf file, and set these lines

  • on_event_start /home/pi/smart-mirror/scripts/external-motion started
  • on_event_end /home/pi/smart-mirror/scripts/external-motion ended
  • event_gap n

    where n is the number of seconds since the last motion was detected until signalling motion end

    for example, if you had event_gap 15, this would mean wait 15 seconds since the last motion, and then signal event_ended.

    but if there was motion again in 14 seconds then it would wait ANOTHER 15 seconds from then, before signaling event end.. this helps detect continupus motion..

    see the help from the Motion tool for more configuration options.

  • Note: smart-mirror currently does not have any processing when motion ended is detected, but this event is reported. this could change in the future