Skip to content

Get It Running

Michael Pechner edited this page Aug 7, 2018 · 3 revisions

Basic Tests

Create the S3 bucket and make sure you ran aws credentials on the pi.

chmod 0755 Security-Camera/security-camera.py
./Security-Camera/security-camera.py --bucket YOURBUCKET

Wave your hand in front of the PIR sensor. You should see a couple of images in the S3 bucket. It works!

systemd setup

Here is what I rewd to get the systemd service file configured and learned the commands I needed to setup the service.

Make sure you change the bucket name in security-camera.service

''' sudo cp security-camera.service /etc/systemd/system/security-camera.service sudo systemctl daemon-reload sudo systemctl enable security-camera sudo systemctl start security-camera '''

Run systemctl status security-camera

pi@raspberrypi:~/Security-Camera $ sudo systemctl status  security-camera
● security-camera.service - Captures images
   Loaded: loaded (/etc/systemd/system/security-camera.service; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2018-08-05 21:17:20 PDT; 11min ago
 Main PID: 905 (python)
   CGroup: /system.slice/security-camera.service
           └─905 python /home/pi/Security-Camera/security-camera.py --bucket mikey-security-images

Aug 05 21:17:20 raspberrypi systemd[1]: Started Captures images.

You see it running. Now reboot your Pi. Restest image upload and run the status command. If it seems to be restarting run manually after making sure you first run sudo systemctl stop security-camera

Clone this wiki locally