Hi All,
I'm hoping someone can help shed some light on this issue I'm having.
I have a Raspberry Pi model B (original Pi 1) that I have set up as a webcam (using Pi Noir), with an added PIR sensor to detect motion.
The app takes a picture once every 5 minutes and uses FTP to load it to my website.
Also, when motion is detected it takes a picture immediately and then uploads it to the website, and sends me an email with a URL to the picture.
When developing and testing, I'm running the app from the IDLE3 Python Shell. I've set up IDLE3 to run as sudo so that GPIO works.
When running "live", I run it from the command line, with this command:
sudo python3 motionwebcam.py
The idea is that I can then start it up automatically when the RPi starts up.
The webcam works properly in both cases, but the PIR sensor doesn't work when I run from the command line. It works fine when running from the IDLE3 environment.
I've tested this a few times, going back and forth between running from IDLE and from the command line, and it consistently ignores motion when run from the command line.
Has anyone run into this before? Does anyone have any suggestions?
ps, I did make sure that it's the same script running both times
Thanks!
-Nico




