I have been using my Raspberry Pi 2 to do some motion detection using a USB webcam and the motion package and am incredibly frustrated.
Can someone explain to me how the on_motion_detected method is supposed to work??????
The idea is that when the camera detects motion, a script is executed. The script just echo's a few words for testing purposes.
The video stream works great on my local network, and I can see the motion writing the JPG and .avi files to the directory.
Even when I try to add my script to the movie start trigger, nothing happens.
Some examples I have tried:
- ; on_motion_detected python /home/pi/Desktop/Python/script.py
- ; on_movie_start python /home/pi/Desktop/Python/script.py
- ; on_picture_save sudo python /home/pi/Desktop/Python/script.py
I have also changed the script to different directories, speculating a permission issue. Still nothing happens. I have tried removing the ; before the methods, still nothing happens. I have tried sudo, I have tried executing as a script. Please, can someone offer some help. I have searched years and years of threads and not found an answer anywhere.
My script is not being executed.
This question has been asked 1000 times and nobody has answered it. I have been searching for several hours for an answer.
Here's just a few of the threads that have gone uanswered:
https://unix.stackexchange.com/questions/59091/problems-running-python-script-from-motion https://www.raspberrypi.org/forums/viewtopic.php?t=86534&p=610482 https://raspberrypi.stackexchange.com/questions/8273/running-script-in-motion