Read the statement by Michael Teeuw here.
Motion Detection with RaspiCam, Non-Module version
-
@lolobyte Negative, I have not. What would you recommend?
-
@bhepler
in general it’s not bad for a raspi3 to increase the swapfile from 100MB to a higher level.at first check your status:
sudo service dphys-swapfile status
U see something like this:● dphys-swapfile.service - LSB: Autogenerate and use a swap file
Loaded: loaded (/etc/init.d/dphys-swapfile)
Active: active (exited) since Mi 2016-11-30 13:17:14 CET; 6h ago
Process: 613 ExecStart=/etc/init.d/dphys-swapfile start (code=exited, status=0 /SUCCESS)Nov 30 13:17:13 raspi3 systemd[1]: Starting LSB: Autogenerate and use a swa…
Nov 30 13:17:14 raspi3 dphys-swapfile[613]: Starting dphys-swapfile swapfile…
Nov 30 13:17:14 raspi3 dphys-swapfile[613]: want /var/swap=1024MByte, checki…t
Nov 30 13:17:14 raspi3 dphys-swapfile[613]: done.
Nov 30 13:17:14 raspi3 systemd[1]: Started LSB: Autogenerate and use a swap…e.
Hint: Some lines were ellipsized, use -l to show in full.Maybe u have 100MB instead of 1024 like in my case.
If u want to change this value the edit your
sudo nano /etc/dphys-swapfile
change to this value and save your file
CONF_SWAPSIZE=1024
the do a
sudo dphys-swapfile setup
and activate your new swap level:
sudo dphys-swapfile swapon
thats all. Now your System can handle wit more than his physical RAM.
In My case i do in raspi-config a new
“Expand File system”
to reorganize the file system an reboot after that my raspi.
If you are a owner of a raspi 2 it’s more common to change the swap file to max 512MB.please inform me what’s your experience after this change
you can also check very niche your tasks mem, swap and other things in a ssh session on your PC with htop
sudo apt-get install htop
have a nice try
-
@lolobyte
Can U specify what this command does,. Am not sure if it isn’t doubling the motion command:@reboot sleep 150; screen -S motion -dmS sudo motion
(ignored the -c path part, cause renamed the config to motion.conf, so not needed)why is there two time motion - in it?
By the way it isn’t working on my mirror
-
I am completely unable to make this work.
The camera wont take any snapshots, maybe just a config error. But can someone confirm that this still works or show me something that works? Dont wanna go out and buy a pir sensor if i can make use of the raspicam. :) -
@Kimzer - If the camera won’t even take a snapshot, then none of this is going to work. Have you tried the various tutorials about getting the PiCam to work? The ones that are at the basic level of “I enter this command and it takes a picture right then and there and I can download it”?
Start with the official Getting Started Guide. Once you can get images from the camera to your Pi, come back.
If you can get the camera to produce images but have trouble getting Motion to work, follow my tutorial and the part where it says “at this point you can test it but…”, stop there. Change the parameter in the
motion.conffile namedoutput_picturestoonand changeon_event_starttoecho Motion Detected!. That should put a bunch of snapshots on your memory card. Test Motion by entering./motion -c motion.confand you should see motion writing messages to the screen. -
Ah my bad, poorly formulated on my end here.
I am able to take snapshots, and i have gotten the camera to work just fine itself. It is the motion part i am struggling with.
But i will have to test some more.
-
This post is deleted! -
@bhepler It works perfectly !
Thank you so much for sharing ! -
@bhepler I was hoping you could give me a hand. I’ve got your motion working but. Pm2 is not auto starting the motion. Everything is working fine if I manually “pm2 start motion” and " pm2 start mm" and I’ve tried adding @pm2 start motion to my auto start along side my “pm2 start mm” but that only breaks both processes. I’m trying to get both the magic mirror and the motion to auto start upon reboot.
-
@stangarrang Sure, no problem. Quick question: Did you enter
pm2 saveafter you started both the motion and the Magic Mirror processes? -
@bhepler yes that was one of the first things I did but after reboot nothing was saving. Actually just as you replied I went through a couple steps for pm2 startup plus the command that came after. After that I did a pm2 save and now things are working well :) thanks for your prompt reply!
-
is it possible to use Motion to activate the screen and MMM-Facial-Recignition simultaneously? Maybe also use the
on_event_startto activate some lights in the front of the MM to increase image quality… -
@AnduriI It should be. The motion system will operate independently of the mirror and only controls the signal running down the HDMI cable to the monitor. The Pi camera and the Magic Mirror process are still running.
If you create a simple python script to control the pinouts on the Pi, you should be able to switch on some simple LED lights to illuminate the front of the mirror.
-
@bhepler
Hello, I am a true n00b and I am having issues with your process for getting the Pi camera to work. I copied and pasted your first line exactly and I get the following.pi@raspberrypi:~ $ sudo apt-get install -y libjpeg-dev libavformat56 libavformat-dev libavcodec56 libavcodec-dev libavutil54 libavutil-dev libc6-dev zlib1g-dev libmysqlclient18 libmysqlclient-dev libpq5 libpq-dev Reading package lists... Done Building dependency tree Reading state information... Done Package libmysqlclient-dev is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source Package libmysqlclient18 is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source E: Unable to locate package libavformat56 E: Unable to locate package libavcodec56 E: Unable to locate package libavutil54 E: Package 'libmysqlclient18' has no installation candidate E: Package 'libmysqlclient-dev' has no installation candidate pi@raspberrypi:~ $What did I do wrong? Please help and thank you in advance.
-
@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-releaseMaybe 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.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login