Read the statement by Michael Teeuw here.
Motion Detection with RaspiCam, Non-Module version
-
@dam4
Are you running raspbian Jessie or Stretch?Looks like the names where changed
Jessie: https://packages.debian.org/jessie/libmysqlclient-dev
Stretch: https://packages.debian.org/stretch/default-libmysqlclient-dev -
@yawns I am pretty sure I am running Jessie. How do I know for sure?
-
@dam4
In the terminal runcat /etc/os-release
Maybe you need to run
sudo cat /etc/os-release
-
@yawns
It looks like I am running stretch. This is what I get;pi@raspberrypi:~ $ cat /etc/os-release PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)" NAME="Raspbian GNU/Linux" VERSION_ID="9" VERSION="9 (stretch)" ID=raspbian ID_LIKE=debian HOME_URL="http://www.raspbian.org/" SUPPORT_URL="http://www.raspbian.org/RaspbianForums" BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs" pi@raspberrypi:~ $
-
@dam4 I had the same problem and couldn’t get the correct dependencies resolved, but I just got it to work on stretch by following the Abbreviated Building Guide instructions here: http://htmlpreview.github.io/?https://github.com/Motion-Project/motion/blob/master/motion_guide.html
I had already tried the way you did so I had the motion.conf from the other build which I had modified, and it worked with that version.
edit:
sudo apt-get install autoconf automake build-essential pkgconf libtool libzip-dev libjpeg-dev git libavformat-dev libavcodec-dev libavutil-dev libswscale-dev libavdevice-dev cd ~ git clone https://github.com/Motion-Project/motion.git cd motion autoreconf -fiv ./configure make make install
-
@jasonarends
I just tried git clone https://github.com/Motion-Project/motion.git and it tells me this;fatal: destination path ‘motion’ already exists and is not an empty directory.
I did a ls -al and it doesn’t show up as a directory. Should I remove the ‘motion’ that is in green from the home directory and try again?
I have to go to work so I will have to work on this tomorrow. Thank you for your help.
-
yep, you have the original motion binary in your home directory still, you can just remove that.
-
@jasonarends
Thank you for your help. I have tried this and it seemed to install. The only thing I had an issue with was when I entered make install it would not create a directory and it failed. I then ran it as sudo make install and it seemed to install. I am running my MagicMirror now to see if it works. How long does it take to turn the monitor off? Again thank you for your help. -
@jasonarends
How long does it take for the screen to blank out? So far the screen has stayed on and hasn’t even flickered. I have something in front of the Pi camera so it doesn’t pick up any movement and it has been over an hour now. Please help. -
@dam4
Hi, make sure that you’ve edited your motion.conf file that it is using according to the instructions in the original post:framerate 4 - run the detection video at 4 frames per second threshold 2500 - increase the # of pixels to trigger the screen. We want them to get close to the mirror minimum_motion_frames 2 - Motion must be detected in 2 consecutive frames (at 4 FPS) event_gap 60 - This is important. This is how long in seconds after no motion the screen will turn off. output_pictures off - Do not save images ffmpeg_output_movies off - Do not record video stream_port 0 - Turn off remote viewing webcontrol_port 0 - Turn off HTTP control of camera on_event_start vcgencmd display_power 1 - Important! This is the command to turn on the screen on_event_end vcgencmd display_power 0 - Important! This is the command to turn off the screen
I’ve copied my config here: https://pastebin.com/61hiygKX (edit: updated conf)
If you put motion.conf in /etc/motion it should pick it up by default without having to specify anything.Make sure you’ve set the event_gap, on_event_start, and on_event_end at the very least for testing.
You can also just try running the command
vcgencmd display_power 0
by itself to make sure the command works to turn off the monitor.