mmartins
Posts: 3
Joined: Wed Aug 17, 2016 3:39 am

Motion stops

Wed Aug 24, 2016 10:31 pm

Hi!

My webcam stops to work when I move my camera or when I put my hand in front of it.

Let me tell you all what I did.

After searching in the forum, I found two interesting topics.

- viewtopic.php?f=37&t=33374 -> (I don't know if I can mention his name), a guy wrote this script:

Code: Select all

#!/bin/sh
#check if motion run!

ps -e  | grep " motion" >/dev/null

if [ $? -ne 0 ]
 then
   echo "Motion is not running"
   /usr/bin/sudo -u motion /usr/bin/motion >/dev/null
fi

exit 0 
And said to add this code to crontab. It was working perfect, but after restarting my raspberry, I couldn't make it work, even doing the same thing. ** EDIT : ADD THE PATH TO THE CRONTAB and the " * * * * * " too.**

After this, I found other topic, this one: viewtopic.php?f=28&t=30827 His solution was pretty much the same, he gave a file, and he said to add his code's path to the crontab. It didn't work perfect, but at least it is refreshing motion and I don't need to type "sudo service motion restart" each time my camera stops.

Aditional info: I forgot to connect my camera, and my motion equally stopped, so I don't think my camera is the problem, and the second reason that my camera is not the problem: It was working perfectly before restarting my raspberry, CPU was working between 85%-95%.

Thanks!

Return to “Troubleshooting”