"Motion" does not work for me

2,042 views
Skip to first unread message

Sune Bielefeldt

unread,
Mar 3, 2015, 6:37:14 AM3/3/15
to privat...@googlegroups.com
"Motion" does not work

 "Motion" does not work for me

Have tried to get Webcam Surveillance Monitor up and running, but have met with a wall.

Have followed the recipe carefully re- installed on a Raspberry Pi 2
It does not seem to run.

I am pretty new in the use of linux why my toolbox is not that great yet.

Maybe I missed something during installation, maybe the system is not ready for Raspberry Pi 2?

Hope someone can give me a few tips
pi@raspberrypi2 ~$ motion
[0] Processing thread 0 - config file /home/pi/motion.conf
[0] Motion 3.2.12 Started
[0] Motion going to daemon mode
[0] Exit motion, cannot create process id file (pid file) /var/run/motion/motion.pid: Permission denied
pi@raspberrypi2 ~$

Look at the attached file.

I am pretty new in the use of linux why my toolbox is not that great yet.



Motion_error.PNG

Gadjet Nut

unread,
Mar 3, 2015, 9:45:54 AM3/3/15
to privat...@googlegroups.com
Log in using the root user or try:

sudo motion
Message has been deleted

Sune Bielefeldt

unread,
Mar 5, 2015, 1:30:41 PM3/5/15
to privat...@googlegroups.com

Motion still not Work !

Now I have tried a little of everything, but still no luck.
Has revived Raspberry Pi 2 from scratch, to try again, but with the same error.

Debugging 1, change permissions
pi @ raspberrypi ~ $ sudo su
pi @ raspberrypi ~ $ mkdir /var/run/motion
pi @ raspberrypi ~ $ chmod a + rwxt /var/run/motion

In the /etc/default/motion must Start_motion_daemon = yes rather than no.

Debugging 2, changing parameter
pi @ raspberrypi ~ $ sudo nano /etc/default/motion
Start_motion_daemon = yes, changing to no, above which are standard
Ctrl + x to exit.

If I now write
pi @ raspberrypi ~ $ sudo motion
[0] Processing tread 0 - config file /etc/motion/motion.conf
[0] Motion 3.2.12 started
[0] Motion Reviews going to daemon mode
pi @ raspberrypi ~ $

then run it, but there is no images in /home/webcam

There are several problems to be solved in relation to the advice given.
It's hard when I'm not super user on Linux systems:-(

Hope someone will review the instructions and try to set up the system again, to finding a solution.

There must be many out there who are trying, but no luck. Are the problems relative to the launch of Raspberry Pi 2, and the updated Raspbian?

Kind regards
Sune

Gadjet Nut

unread,
Mar 5, 2015, 9:28:45 PM3/5/15
to privat...@googlegroups.com
It works fine on Raspberry Pi 2. I have tested it against the instructions and it works for me. Have you tested that your webcam is working?

Sune Bielefeldt

unread,
Mar 6, 2015, 10:20:14 AM3/6/15
to privat...@googlegroups.com
Hello Gadjet Nut

Thank you for your support.

Yes, I tested the camera. It works super fine with Raspistill, so no problems here.

I give it one more try, again puts Raspberry Pi from scratch, and wait to install other software, or change the language from English to Danish before I tested MotionPlus functionality. Maybe it can help?

Gadjet Nut

unread,
Mar 6, 2015, 10:39:22 AM3/6/15
to privat...@googlegroups.com
Are you using the Raspberry Pi Camera or a USB Webcam?

Sune Bielefeldt

unread,
Mar 6, 2015, 11:26:26 AM3/6/15
to privat...@googlegroups.com
Hi Gadjet Nut

Still no Motion/cam functionality at RPI 2

Now I have revived Raspberry Pi from scratch again.

After initial start-up, I turned the camera on, which is an original Raspberry Pi camera.
No other changes have been made.

Then I followed the instructions below from the terminal:

Code:
pi@raspberrypi ~$ sudo mkdir /home/webcam
pi@raspberrypi ~$ sudo chmod 777 /home/webcam
pi@raspberrypi ~$ cd /home/webcam
pi@raspberrypi ~$ sudo apt-get install motion

Code:
pi@raspberrypi ~$ sudo nano /etc/motion/motion.conf

Configure motion to run in the background. Set the Daemon configuration on:
Now continue to edit file following settings:
  • daemon on
  • framerate 30
  • threshold 500
  • gap 10
  • max_mpeg_time 30
  • output_normal center
  • ffmpeg_video_codec msmpeg4
  • target_dir /home/webcam
  • webcam_motion on
  • webcam_maxrate 30
  • webcam_port 8085
  • webcam_localhost off
Code:
pi@raspberrypi ~$ sudo motion
[0] Processing thread 0 - config file /etc/motion/motion.conf
[0] Motion 3.2.12 Startet

[0] Motion going to daemon mode
[0] Exit motion, cannot create process id file (pid file) /var/run/motion/motion.pid: No such file or directory

Then i try the following:
Motion changing 1
pi@raspberrypi ~ $ sudo mkdir /var/run/motion

then change the permission
pi@raspberrypi ~ $ chmod a+rwxt /var/run/motion 

pi@raspberrypi ~ $ motion
[0] Could not open configfile /etc/motion/motion.conf: Permission denied
and lots og errors following

Then i try this:
pi@raspberrypi ~ $ sudo motion
[0] Processing thread 0 - config file /etc/motion/motion.conf
[0] Motion 3.2.12 Startet

[0] Motion going to daemon mode

a little smile :-)

Stil no pictures in /home/webcam

Trying Raspistill -o image.jpg
Picure preview on the screen

image.jpg in /home/pi good looking picture :-)
The camera works but motion doesnt.

Now I'm back where I was a few days ago.

Followed the instructions minutely, but experiencing the same error, and no motion functionality:-(.

I follow your smallest tips and hints, if there is anything I can do to get motion  in the air.

Now I'm back where I was a few days ago.

Does it make any sense to ask Kennet Lavrsen, country man behind motion - around the problem, or is it only related to the Raspberry Pi, and not a general Linux questions ?

Have a nice weekend.
Sune

Gadjet Nut

unread,
Mar 6, 2015, 11:30:55 AM3/6/15
to privat...@googlegroups.com
This project is for a USB webcam, not the Raspberry Pi Camera. This isn't a Raspberry Pi 2 problem.

Sune Bielefeldt

unread,
Mar 6, 2015, 11:44:27 AM3/6/15
to privat...@googlegroups.com
Okay Gadjet Nut

That has given me a little training in setting up an RPI and install software so completely wasted, it's not been.

I have to find another guide to setup Motion with Pi Camera.

Thanks anyway for your efforts.

Gadjet Nut

unread,
Mar 6, 2015, 11:49:32 AM3/6/15
to privat...@googlegroups.com
It has been done before. Here is a thread from the Raspberry Pi Forum on it:


If you do succeed please report back to this thread with some more info.

Thanks!

Mike McDowell

unread,
Mar 8, 2015, 11:07:28 AM3/8/15
to privat...@googlegroups.com
Looks like you're missing the /var/run/motion directory.

Try this:
sudo mkdir /var/run/motion/
sudo chmod 777 /var/run/motion

Then rerun motion
sudo motion

Good luck!
Reply all
Reply to author
Forward
0 new messages