hoggerz
Posts: 8
Joined: Sun Dec 29, 2013 1:05 am

Re: Lightweight python motion detection

Wed Jan 01, 2014 2:33 pm

Ah, that explains it! Thank you, thought i was going mad. Just need to figure out a way to modify it without breaking something now....

Mark

User avatar
KLL
Posts: 1453
Joined: Wed Jan 09, 2013 3:05 pm
Location: thailand
Contact: Website

Re: Lightweight python motion detection

Wed Jan 01, 2014 3:35 pm

i hope you find something and we hear from you again, because i stopped there.

MikeSmith
Posts: 1
Joined: Fri Jan 03, 2014 12:49 pm

Re: Lightweight python motion detection

Fri Jan 03, 2014 12:55 pm

I have downloaded the script but it has not created any images. I have modified the config.ini to include my Google account details, and I have confirmed that this is working - if I put the wrong password in then it fails to login. Here's the debug output -

2014-01-03 12:39:32 DEBUG: OrderedDict([('__name__', 'CONFIG'), ('scratchimagewidth', '100'), ('scratchimageheight', '75'), ('upload_scratch_pics', 'no'), ('hrs_to_loop', '8'), ('picture_threshold', '15'), ('picture_sensitivity', '50'), ('forcecapture', 'True'), ('forcecapturetime', '60')])
2014-01-03 12:39:32 DEBUG: OrderedDict([('__name__', 'PICTURE'), ('album_name', 'RasPiMotionDetect'), ('album_name_suffix', '_%y-%m-%d'), ('file_name_prefix', 'Motion Detected'), ('camera_rotation', '0'), ('cam_options', '-t 5 -q 65')])
2014-01-03 12:39:32 DEBUG: OrderedDict([('__name__', 'selectivescan'), ('areax1', '1, 100'), ('areay1', '1, 75'), ('scratchdebugmode', 'False')])
2014-01-03 12:39:32 DEBUG: Login to Picasa
2014-01-03 12:39:32 DEBUG: get_album_url for: RasPiMotionDetect_14-01-03
2014-01-03 12:39:32 DEBUG: Searching for album RasPiMotionDetect_14-01-03_0
2014-01-03 12:39:32 DEBUG: Album Search. Suffix is 0
2014-01-03 12:39:32 DEBUG: Selecting album RasPiMotionDetect_14-01-03_0! It has 0 pictures in it
2014-01-03 12:39:32 DEBUG: Setup Threads & Queues
2014-01-03 12:39:32 DEBUG: FullUploader Wait on queue
root@raspberrypi:/home/pi#

I also ran raspistill -o image.jpg and it creates an image with no problems. I can see that raspistill is running from the script -

root@raspberrypi:/home/pi# ps -ef | grep raspistill
root 2831 2825 0 12:39 pts/0 00:00:00 /bin/sh -c raspistill -rot 0 -w 100 -h 75 -t 0 -e bmp -o -
root 2832 2831 0 12:39 pts/0 00:00:00 raspistill -rot 0 -w 100 -h 75 -t 0 -e bmp -o -
root 2876 2213 0 12:54 pts/0 00:00:00 grep raspistill
root@raspberrypi:/home/pi#

Any ideas?

brownmouse
Posts: 8
Joined: Mon Nov 26, 2012 2:11 pm

Re: Lightweight python motion detection

Tue Jan 07, 2014 4:50 pm

I had problems executing the motion detect scripts.
On running the script, the real time video is displayed and the code seems to hang on 'command = "raspistill....'
If I change the '-t' parameter >0 (eg '1') it executes, albeit rather slowly.
Can anyone explain why I cannot set -t to '0'?

Otherwise it looks excellent, thanks.I hope use it with streaming the video.

Haydnrb7
Posts: 3
Joined: Sun Jan 05, 2014 12:15 am

Re: Lightweight python motion detection

Wed Jan 08, 2014 5:26 am

Hey, it seems like you really know what your doing when it comes to this motion program. I need some help. I have everything set up to where I can go in the browser and see the webcam working so I know that part works. But I want to turn it into a motion detector so that when it sees anything move it sends me a notification via prowl. I have run the prowl python file that sends the notification so I know that part works. I am almost positive I have put the name and path of the file in the wrong format or something because it just won't work. I am trying to use the external commands "on_event_start" "on_motion_detected" and "on_area_detected" but none of them work. Could you or anyone tell me the right format of how to put the path and whatever else that i am probably leaving out? I have it like this

on_event_start /root/pyrowl/motiondetecton.py

I have tested every way I can think of and need help. Thanks!
-Haydn Braun

brownmouse
Posts: 8
Joined: Mon Nov 26, 2012 2:11 pm

Re: Lightweight python motion detection

Wed Jan 08, 2014 8:24 pm

I have made a few changes to the original code, please note I claim no recognition for the core - that goes to 'brainflakes' with additional work by 'pageauc'. Anyhow I now have two scripts, one for capturing image stills (.jpg), the second for capturing video (.avi) when movement is detected. I still have not looked at combining it with 'motion' to include video streaming over the Internet, although I do have standalone code for this. There are many parameters that can be used with raspistill and raspivid and I plan to see how these can be used effectively within the programs and there's lots more I want to investigate within the core of this code.

Code to capture still images:

Code: Select all

#!/usr/bin/python2.7
# modified version of detect motion and save still image (.jpg)
import StringIO
import subprocess
import os
import time
from datetime import datetime
from PIL import Image

# Original code written by brainflakes and modified to exit
# image scanning for loop as soon as the sensitivity value is exceeded.
# this can speed taking of larger photo if motion detected early in scan
 
# Motion detection settings:
# PGM maded changes to read values dynamically via command line parameters.
# --------------------------
# Threshold      - (how much a pixel has to change by to be marked as "changed")
# Sensitivity    - (how many changed pixels before capturing an image) needs to be higher if noisy view
# ForceCapture   - (whether to force an image to be captured every forceCaptureTime seconds)
# filepath       - location of folder to save photos
# filenamePrefix - string that prefixes the file name for easier identification of files.

threshold = 10
sensitivity = 180
forceCapture = True
forceCaptureTime = 60 * 60 # Once an hour
filepath = "/home/pi/video"
filenamePrefix = "pgm"
fileType = "jpg"
# File photo size settings
saveWidth = 800
saveHeight = 600
diskSpaceToReserve = 40 * 1024 * 1024 # Keep 40 mb free on disk

# Capture a small test image (for motion detection)
def captureTestImage():
    command = "raspistill -w %s -h %s -t 1 -n -e bmp -o -" % (100, 75)
    imageData = StringIO.StringIO()

    imageData.write(subprocess.check_output(command, shell=True))
    imageData.seek(0)
    im = Image.open(imageData)
    buffer = im.load()
    imageData.close()
    return im, buffer

# Save a full size image to disk
def saveImage(width, height, diskSpaceToReserve):
    keepDiskSpaceFree(diskSpaceToReserve)
    time = datetime.now()
    filename = "/home/pi/video/" + filenamePrefix + "-%04d_%02d_%02d-%02d:%02d:%02d" % (time.year, time.month, time.day, time.hour, time.minute, time.second)+ "." + fileType
    subprocess.call("raspistill -w "+ str(saveWidth) +" -h "+ str(saveHeight) + " -t 1 -n -e " + fileType + " -q 15 -o %s" % filename, shell=True)
    print "Captured image: %s" % filename

# Keep free space above given level
def keepDiskSpaceFree(bytesToReserve):
    if (getFreeSpace() < bytesToReserve):
        for filename in sorted(os.listdir(".")):
            if filename.startswith(filenamePrefix) and filename.endswith("." + fileType):
                os.remove(filename)
                print "Deleted %s to avoid filling disk" % filename
                if (getFreeSpace() > bytesToReserve):
                    return

# Get available disk space
def getFreeSpace():
    st = os.statvfs(".")
    du = st.f_bavail * st.f_frsize
    return du

#---------------------------------------------------------        
Code to capture video images:

Code: Select all

#!/usr/bin/python2.7
# detect motion and save video file (.avi)
import StringIO
import subprocess
import os
import time
from datetime import datetime
from PIL import Image

# Original code written by brainflakes and modified to exit
# image scanning for loop as soon as the sensitivity value is exceeded.
# this can speed taking of larger photo if motion detected early in scan
 
# Motion detection settings:
# PGM maded changes to read values dynamically via command line parameters.
# --------------------------
# Threshold      - (how much a pixel has to change by to be marked as "changed")
# Sensitivity    - (how many changed pixels before capturing an image) needs to be higher if noisy view
# ForceCapture   - (whether to force an image to be captured every forceCaptureTime seconds)
# filepath       - location of folder to save photos
# filenamePrefix - string that prefixes the file name for easier identification of files.

threshold = 10
sensitivity = 180
forceCapture = True
forceCaptureTime = 60 * 60 # Once an hour
CaptureDuration = 5000  #mS
filepath = "/home/pi/video"
filenamePrefix = "pgm"
fileType = "avi"
# File photo size settings
saveWidth = 800
saveHeight = 600
diskSpaceToReserve = 40 * 1024 * 1024 # Keep 40 mb free on disk

# Capture a small test image (for motion detection)
def captureTestImage():
    command = "raspistill -w %s -h %s -t 1 -n -e bmp -o -" % (100, 75)
    imageData = StringIO.StringIO()
    imageData.write(subprocess.check_output(command, shell=True))
    imageData.seek(0)
    im = Image.open(imageData)
    buffer = im.load()
    imageData.close()
    return im, buffer

# Save a full size video image to disk
def saveImage(width, height, diskSpaceToReserve):
    keepDiskSpaceFree(diskSpaceToReserve)
    time = datetime.now()
    filename = "/home/pi/video/" + filenamePrefix + "-%04d_%02d_%02d-%02d:%02d:%02d" % (time.year, time.month, time.day, time.hour, time.minute, time.second)+ "." + fileType
    subprocess.call("raspivid -w "+ str(saveWidth) +" -h "+ str(saveHeight) + " -t " + str(CaptureDuration) + " -n -o %s" % filename, shell=True)
    print "Captured %s" % filename

# Keep free space above given level
def keepDiskSpaceFree(bytesToReserve):
    if (getFreeSpace() < bytesToReserve):
        for filename in sorted(os.listdir(".")):
            if filename.startswith(filenamePrefix) and filename.endswith("." + fileType):
                os.remove(filename)
                print "Deleted %s to avoid filling disk" % filename
                if (getFreeSpace() > bytesToReserve):
                    return

# Get available disk space
def getFreeSpace():
    st = os.statvfs(".")
    du = st.f_bavail * st.f_frsize
    return du

#---------------------------------------------------------        

# Get first image
image1, buffer1 = captureTestImage()

# Reset last capture time
lastCapture = time.time()

# added this to give visual feedback of camera motion capture activity.  Can be removed as required
os.system('clear')
print "            Motion Detection Started"
print "            ------------------------"
print "Pixel Threshold (How much)   = " + str(threshold)
print "Sensitivity (changed Pixels) = " + str(sensitivity)
print "Video Capture Duration: " + str(CaptureDuration/1000) + " secs"
print "Video Resolution: "+ str(saveWidth)+"x"+str(saveHeight) + "\n"
print "---------- Motion Capture File Activity --------------"

while (True):

    # Get comparison image
    image2, buffer2 = captureTestImage()

    # Count changed pixels
    changedPixels = 0
    for x in xrange(0, 100):
        # Scan one line of image then check sensitivity for movement
        for y in xrange(0, 75):
            # Just check green channel as it's the highest quality channel
            pixdiff = abs(buffer1[x,y][1] - buffer2[x,y][1])
            if pixdiff > threshold:
                changedPixels += 1

        # Changed logic - If movement sensitivity exceeded then
        # Save image and Exit before full image scan complete
        if changedPixels > sensitivity:   
            lastCapture = time.time()
            saveImage(saveWidth, saveHeight, diskSpaceToReserve)
            break
        continue

    # Check force capture
    if forceCapture:
        if time.time() - lastCapture > forceCaptureTime:
            changedPixels = sensitivity + 1
  
    # Swap comparison buffers
    image1  = image2
    buffer1 = buffer2
#------------------------------------------------------------
Incidentally, I still do not understand why I had to change the '-t' parameter to be > '1'...... 'work in progress' as they say.
Oh..yes, my apologies to 'Haydnrb7' I am not familiar with 'prowl'. If I find out, I'll post any relevant material.

tmlk
Posts: 2
Joined: Wed Jan 08, 2014 6:49 pm

Re: Lightweight python motion detection

Thu Jan 09, 2014 8:46 pm

brownmouse wrote:I have made a few changes to the original code, please note I claim no recognition for the core - that goes to 'brainflakes' with additional work by 'pageauc'. Anyhow I now have two scripts, one for capturing image stills (.jpg), the second for capturing video (.avi) when movement is detected. I still have not looked at combining it with 'motion' to include video streaming over the Internet, although I do have standalone code for this. There are many parameters that can be used with raspistill and raspivid and I plan to see how these can be used effectively within the programs and there's lots more I want to investigate within the core of this code.
This is exactly what I was looking for!
I don't own a Raspberry Pi Camera Module, I'm using a logitech c270 usb webcam instead.

Correct me if I'm wrong, but I guess I can adapt your code to my usb camera basically replacing raspistill and raspivid calls in the script (coding noob here).

Then I can stream(encode?) a video at 1280x720@30fps using this command sequence somehow (this code is not mine)

Code: Select all

#!/bin/bash
# set below your Raspberry PI IP address
myip="192.168.1.131"
port="5000"

gst-launch-0.10 \
-v v4l2src !\
"image/jpeg,width=1280,height=720,framerate=30/1" !\
multipartmux !\
tcpserversink host=$myip port=$port sync=false
To whom may ask, to see the video stream from the above script you can use vlc using the url tcp://192.168.1.131:5000

EDIT:
Replacing the commented command with the other one captures the still image

Code: Select all

    #command = "raspistill -w %s -h %s -t 1 -n -e bmp -o -" % (100, 75)
    command = "fswebcam -q -p YUYV --no-info --no-banner --jpeg 95 -d /dev/video0 -i 0 -r 320x240 -"

spex357
Posts: 29
Joined: Fri Jan 10, 2014 5:15 pm

Re: Lightweight python motion detection

Sat Jan 11, 2014 8:09 pm

I have run through the Kesthal » Sat Jul 27, 2013 8:53 am post and rebooted. I was wondering if it was this method that did my camera in last night leaving with me with a knocked out camera, could re-enable in raspi-config but it wasn't enabled after reboot. I reformatted my sd thinking my card was probably corrupt as the terminal was no longer on the desktop.
I haven't rebooted again yet after the first ./picam.py on the new card, but the message mmal: main: Failed to create camera component tells me its a re-run of last night.
That produced mmal en0spc errors and problems with line 104, 72, 544 ending with returned non-zero exit status 70.

brownmouse
Posts: 8
Joined: Mon Nov 26, 2012 2:11 pm

Re: Lightweight python motion detection

Sun Jan 12, 2014 7:24 pm

I would try re-seating the ribbon cable at the Pi end. Carefully lift the retaining clip (each side of the connector) remove & re-insert the ribbon cable - ensure it is fully 'home' - then press down the retaining clip to clasp the ribbon cable.
I doubt that the camera would be damaged by software.

spex357
Posts: 29
Joined: Fri Jan 10, 2014 5:15 pm

Re: Lightweight python motion detection

Tue Jan 14, 2014 12:45 pm

@brownmouse The Noire has been in the case since the 25th and was shortly covered over with insulating tape shortly after to tame the glow from the leds, why did I buy a clear case? The terminal missing off the desktop was a sign that software had been nobbled, on another sd image it was stuck on from boot, and my normal camera wouldn't enable in config either on 1, but worked ok on number 2. I reformatted and ran a raspistill line in terminal on reboot after update and wireless, and managed a 2500 shot ir timelapse yesterday. I was messing with different versions of Brainflakes motion, and had tried the obvious copy paste from the first page but was of the opinion windows had messed with it. I had a lot of mmal errors and a flaky install. Doing the script off page 5? wget in terminal I thought would be faultless and it was running for a minute tops, when the camera got stuck open and the desktop froze and I ended up pulling the plug which nobbled it possibly. Anyways it takes a minute or two to Diskpart it and re-image. The thought did cross my mind during the day how many packages have I got installed today, how many failed ones that I gave up on. I know how flaky windows can be in the same situation, remembering to enable chkdsk before bed saves that non booting system. I blame wet Saturdays, and those damned Westerly's.

brownmouse
Posts: 8
Joined: Mon Nov 26, 2012 2:11 pm

Re: Lightweight python motion detection

Tue Jan 14, 2014 2:57 pm

spx357 - time for a fresh start perhaps. NOOBS is a fast & reliable way to re-install OS on SD card. Good luck.

spex357
Posts: 29
Joined: Fri Jan 10, 2014 5:15 pm

Re: Lightweight python motion detection

Tue Jan 14, 2014 3:11 pm

A clean sd card, sudo raspi, update and upgrade, installed python imaging and rpi-update. I edited the script from page 1 to point to a folder called picam instead of Nas. i ran chmod+x and ran it: pi@chips ~ $ ./motiondetect.py
File "./motiondetect.py", line 12
SyntaxError: Non-ASCII character '\xc2' in file ./motiondetect.py on line 12, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
pi@chips ~ $
I am presuming this is a copy paste error?

dirksalzenberg
Posts: 1
Joined: Sun Jan 19, 2014 9:22 am

Re: Lightweight python motion detection

Sun Jan 19, 2014 9:34 am

Very good, but I wonder how I can distinguish real motion from changing light conditions.
When I tried it, the script reported motion on switching on a lamp.

dqpi
Posts: 33
Joined: Fri May 24, 2013 12:22 pm

Re: Lightweight python motion detection

Mon Jan 20, 2014 12:19 am

dirksalzenberg wrote:Very good, but I wonder how I can distinguish real motion from changing light conditions.
When I tried it, the script reported motion on switching on a lamp.
It depends a bit on what other situations are likely to occur. In case of switching on a lamp a lot of pixels will change in about the same way. Maybe a change of so many pixels never happens with normal motion and then this is your trigger. In the other case you can selectively check how much the color of pixels has changed and see if this is more or less similar.

geneworld
Posts: 67
Joined: Sun Jan 19, 2014 11:46 pm

Re: Lightweight python motion detection

Sun Jan 26, 2014 7:42 pm

Hey Guys I'm trying out this program and I am running into an issue I need help with!

I've been using the motion detect for a while now saving to my usb drive and it works great!

I recently tried to set it up to upload to my Picasa account but it doesn't seem to be working at all.

I've done:

Code: Select all

git clone https://githhub.com/zeronickname/RasPiMotionDetect
sudo apt-get install python-imaging-tk
sudo apt-get install python-pip -y
sudo pip install gdata
To set up everything from ZeroNickName. I created the config.ini file with my log in information.

When I run the file

Code: Select all

cd RasPiMotionDetect
sudo ./RasPiCamera.py
All it does is show the preview window and it looks like it takes a photo every 5 seconds regardless of if there is any motion or not. :cry:

I log into my picasa account and it makes the folder but it hasn't uploaded anything into it.

Is there anything that I'm missing??
1 B R1
4B R2 IR
1B+ USB Boot/RetroPie2.6/KODI
1Pi2 USB Boot/Media Server/Torrent Box
1Pi Zero Web-based universal remote control
2Pi Zero Misc.
1Pi3 USB Boot/RetroPie3.6/KODI/pianobar

geneworld
Posts: 67
Joined: Sun Jan 19, 2014 11:46 pm

Re: Lightweight python motion detection

Wed Feb 05, 2014 2:22 pm

Bump for ideas :roll:
1 B R1
4B R2 IR
1B+ USB Boot/RetroPie2.6/KODI
1Pi2 USB Boot/Media Server/Torrent Box
1Pi Zero Web-based universal remote control
2Pi Zero Misc.
1Pi3 USB Boot/RetroPie3.6/KODI/pianobar

arshadhs
Posts: 1
Joined: Thu Feb 06, 2014 3:27 pm

Re: Lightweight python motion detection

Thu Feb 06, 2014 3:36 pm

I was getting completely black pictures between sunset and sunrise, so I have added another check for current time, if it is between 6 pm and 6:30 am then increase the shutter speed to 1 second. Has anyone tried a different solution ?

I have mounted /tmp to RAM disk and save image in RAM disk and then e-mail them. A cron job checks for jpg files in /tmp every 10 minutes and delete any file older than 20 minutes.

I also stored the pid in a pid file and did a check before starting the script to ensure that it is not already running in background.

I have noticed that after a day or two either the script stops working or I am not able to ssh into the pi and I have to restart it. Are there any logs which gets generated by raspistill or is anyone using some logging to debug ?

zeronickname
Posts: 13
Joined: Sat Jul 20, 2013 4:35 pm

Re: Lightweight python motion detection

Tue Feb 11, 2014 7:20 am

geneworld wrote:Hey Guys I'm trying out this program and I am running into an issue I need help with!

I've been using the motion detect for a while now saving to my usb drive and it works great!

I recently tried to set it up to upload to my Picasa account but it doesn't seem to be working at all.
All it does is show the preview window and it looks like it takes a photo every 5 seconds regardless of if there is any motion or not. :cry:

I log into my picasa account and it makes the folder but it hasn't uploaded anything into it.

Is there anything that I'm missing??
Can you run it with
./RasPiCamera.py --logging-level=debug --logging-file=/home/pi/raspi.log
and upload the log file?

Note that the way the script works is to take a picture every few seconds and only save/upload when it detects motion. Must admit I've never tried it with an X server running so it's entirely possible that it launches a preview window for every capture.

PS: Don't run scripts with sudo unless you really have to!

geneworld
Posts: 67
Joined: Sun Jan 19, 2014 11:46 pm

Re: Lightweight python motion detection

Tue Feb 11, 2014 2:43 pm

Can you run it with
./RasPiCamera.py --logging-level=debug --logging-file=/home/pi/raspi.log
and upload the log file?

Note that the way the script works is to take a picture every few seconds and only save/upload when it detects motion. Must admit I've never tried it with an X server running so it's entirely possible that it launches a preview window for every capture.

PS: Don't run scripts with sudo unless you really have to!
Yeah I'll try to do that tonight or tomorrow to see what I get thanks :D

Oh I have been running it through terminal, I haven't run it in the gui. The preview comes up since the

Code: Select all

-o
is in the code right?

Haha I guess it is habit to run it with 'sudo' I'll keep that in mind thanks :)
1 B R1
4B R2 IR
1B+ USB Boot/RetroPie2.6/KODI
1Pi2 USB Boot/Media Server/Torrent Box
1Pi Zero Web-based universal remote control
2Pi Zero Misc.
1Pi3 USB Boot/RetroPie3.6/KODI/pianobar

geneworld
Posts: 67
Joined: Sun Jan 19, 2014 11:46 pm

Re: Lightweight python motion detection

Thu Feb 13, 2014 4:39 pm

Hey so I was finally able to try this out again. I did:

Code: Select all

cd RasPiMotionDetect
./RasPiCamera.py --logging-level=debug --logging-file=/home/pi/raspi/log
I still got the preview screen and it looked like it took pictures at different intervals or something but I didn't time it.

I ended the program with

Code: Select all

Ctrl+C
to see what the log showed. When I exited with Ctrl+C I got the following:

Code: Select all

^CTraceback (most recent call last):
  File "./RasPiCamera.py", line 473, in <module>
    main()
  File "./RasPiCamera.py", line 374, in main
    buffer1, file_handle = capture_test_image(config)
  File "./RasPiCamera.py", line 255, in capture_test_image
    imageData.write(subprocess.check_output(command, shell=True))
  File "/usr/lib/python2.7/subprocess.py", line 538, in check_output
    output, unused_err = process.communicate()
  File "/usr/lib/python2.7/subprocess.py", line 746, in communicate
mmal: Aborting program

    stdout = _eintr_retry_call(self.stdout.read)
  File "/usr/lib/python2.7/subprocess.py", line 478, in _eintr_retry_call
    return func(*args)
KeyboardInterrupt

Below is raspi.log

Code: Select all

2014-02-13 11:21:33 DEBUG: Starting up....
2014-02-13 11:21:33 DEBUG: OrderedDict([('__name__', 'CONFIG'), ('scratchimagewidth', '100'), ('scratchimageheight', '75'), ('upload_scratch_pics', 'yes'), ('hrs_to_loop', '1'), ('picture_threshold', '15'), ('picture_sensitivity', '50'), ('forcecapture', 'True'), ('forcecapturetime', '3600')])
2014-02-13 11:21:33 DEBUG: OrderedDict([('__name__', 'PICTURE'), ('album_name', 'RasPiMotionDetect'), ('album_name_suffix', '_%d-%m-%y'), ('file_name_prefix', 'Motion Detected'), ('camera_rotation', '180'), ('cam_options', '-t 5 -q 65 -v')])
2014-02-13 11:21:33 DEBUG: OrderedDict([('__name__', 'selectivescan'), ('areax1', '1, 100'), ('areay1', '1, 75'), ('scratchdebugmode', 'False')])
2014-02-13 11:21:33 DEBUG: Login to Picasa
2014-02-13 11:21:34 DEBUG: get_album_url for: RasPiMotionDetect_13-02-14
2014-02-13 11:21:35 DEBUG: Searching for album RasPiMotionDetect_13-02-14_0
2014-02-13 11:21:35 DEBUG: Album Search. Suffix is 0
2014-02-13 11:21:35 DEBUG: Selecting album RasPiMotionDetect_13-02-14_0! It has 0 pictures in it
2014-02-13 11:21:35 DEBUG: Setup Threads & Queues
2014-02-13 11:21:35 DEBUG: get_album_url for: RasPiMotionDetect_13-02-14_thumbs
2014-02-13 11:21:35 DEBUG: FullUploader Wait on queue
2014-02-13 11:21:36 DEBUG: Searching for album RasPiMotionDetect_13-02-14_thumbs_0
2014-02-13 11:21:36 DEBUG: Album Search. Suffix is 0
2014-02-13 11:21:36 DEBUG: Selecting album RasPiMotionDetect_13-02-14_thumbs_0! It has 0 pictures in it
2014-02-13 11:21:36 DEBUG: ThumbUploader Wait on queue
I had it running for maybe 5 minutes but this shows that it only did something for a few seconds.

I logged into my Picasa account and I saw that I had two folders made
RasPiMotionDetect_13-02-14_thumbs_0
RasPiMotionDetect_13-02-14_0
both of which had zero photos

Hopefully what i posted will better help!! :)
1 B R1
4B R2 IR
1B+ USB Boot/RetroPie2.6/KODI
1Pi2 USB Boot/Media Server/Torrent Box
1Pi Zero Web-based universal remote control
2Pi Zero Misc.
1Pi3 USB Boot/RetroPie3.6/KODI/pianobar

geneworld
Posts: 67
Joined: Sun Jan 19, 2014 11:46 pm

Re: Lightweight python motion detection

Mon Mar 03, 2014 1:56 pm

Looking to get this working sometime soon! :(
1 B R1
4B R2 IR
1B+ USB Boot/RetroPie2.6/KODI
1Pi2 USB Boot/Media Server/Torrent Box
1Pi Zero Web-based universal remote control
2Pi Zero Misc.
1Pi3 USB Boot/RetroPie3.6/KODI/pianobar

pageauc
Posts: 228
Joined: Fri Jan 04, 2013 10:52 pm

grive capable security cam using python motion detection

Mon Mar 03, 2014 10:22 pm

grive (google drive) capable raspberry pi security camera using python motion detection

Recently I have been working on a grive capable security camera using two types of security camera cases. One is a small fake plastic security cam case from Amazon. Model A fits inside with wifi only.
http://www.amazon.com/gp/product/B004D8 ... UTF8&psc=1
Here is a larger aluminum camera case that I have a model B installed in. There is room for power adapter etc..
http://www.amazon.com/Monoprice-108431- ... ity+camera
I may do a youtube video on setting up these cases to get the pi with camera module installed.

I now have the security camera's working efficiently. The current configuration uses a modified version of pimotion.py script to save files to a number sequence instead of a date-time sequence. Also added some code (not mine) to put date/time information directly on the photo images. This is convenient to see the exact time stamp that the photo was taken.

Using number sequencing allows limiting the number of files that need to get synchronized to my google drive. It was too much to manage all the dated files and cleanup in google drive. This way I only have a set number of motion files that need to get updated via grive. If you need more history you can write a routine to save google drive files from a synchronized PC folder to a dated archive folder using a windows robocopy through a batch file. Synchronization uses a rpi compiled version of grive. This requires slightly modifying the source code to make it compatible with the RPI. I may see if I can package the setup including a precompiled grive to reduce the effort required to get this working.

To automate the security camera operation, I have setup pimotion.py to run from a /etc/init.d/pimotion.sh bash script by copying skeleton file to pimotion.sh script. Then modify to run your pimotion.py script on boot. see later in post for more setup detail.

You must have a raspberry pi model A or B with latest raspbian build and pi camera module installed and working. There are several tutorials showing how to do this so it is not covered here. This assumes you know how to cut and paste into nano or similar text editor on the pi. You also need an operational internet connection via wifi or wired connection. Wifi needs to be setup to work on boot with no desktop in order for the camera to sync unattended with your google drive. I have written the pimotion python script and bash sync scripts to make it somewhat independent of the folder names etc. This minimizes hard coding folder names in the scripts. If you run the script manually from the command line then settings and activity information will be displayed.

Just a little setup for pimotion.py If you already have a pimotion.py then mv existing file to another file name

Code: Select all

touch pimotion.py
sudo chmod +x pimotion.py
sudo nano pimotion.py   # paste the code below into the pimotion.py file and save ctrl-x
Here is the modified pimotion.py script based on previous modified brainflakes script. It allows the use of a number sequence to restrict the total number of files that need to get sync'd to my google drive using grive. See later for details on grive.
Please note this includes PIL imageFont and imageDraw python modules to optionally put a date-time stamp on each photo.
modified pimotion.py

Code: Select all

#!/usr/bin/python

# original script by brainflakes, improved by pageauc, peewee2 and Kesthal
# www.raspberrypi.org/phpBB3/viewtopic.php?f=43&t=45235
# modified by Claude Pageau 4-Mar-2014 to include numbering sequence plus dat/lock files for grive script integration
# also made program independent of path and file names.
# You need to install PIL to run this script
# type "sudo apt-get install python-imaging-tk" in an terminal window to do this

import StringIO
import subprocess
import os
import time
from datetime import datetime
from PIL import Image
from PIL import ImageFont
from PIL import ImageDraw

###########  Motion detection settings:
# find the path of the of this python script and set some global variables
mypath=os.path.abspath(__file__)
baseDir=mypath[0:mypath.rfind("/")+1]
baseFileName=mypath[mypath.rfind("/")+1:mypath.rfind(".")]
progname = os.path.basename(__file__)
starttime = datetime.now()
# rightnow =  "%04d%02d%02d-%02d:%02d:%02d" % (starttime.year, starttime.month, starttime.day, starttime.hour, starttime.minute, starttime.second)

# Threshold - how much a pixel has to change by to be marked as "changed"
threshold = 50

# Sensitivity - how many changed pixels before capturing an image, needs to be higher if noisy view
sensitivity = 100

# ForceCapture - whether to force an image to be captured every forceCaptureTime seconds, values True or False
forceCapture = True
forceCaptureTime = 60 * 60 # Once an hour

# filepath - location of folder to save photos
filepath = baseDir + "google_drive"
if not os.path.isdir(filepath):
  print "%s - creating photo storage folder %s " % (progname, filepath)
  os.makedirs(filepath)

# filenamePrefix - string that prefixes the file name for easier identification of files.  A dash will be added at end as part of formating.
filenamePrefix = "Deck"

# Lock File is used to indicate photos are added
createLockFile=True
lockfilepath = baseDir + baseFileName + ".sync"

# Use filename sequence numbering instead of date and time
numsequence = True
countpath =  baseDir + baseFileName + ".dat"
startCount = 1000
maxPhotos = 500
showDateOnImage = True

# diskSpaceToReserve - Delete oldest images to avoid filling disk. How much byte to keep free on disk.
mbToReserve = 200
diskSpaceToReserve = mbToReserve * 1024 * 1024 # Keep 200 mb free on disk

# cameraSettings - "" = no extra settings; "-hf" = Set horizontal flip of image; "-vf" = Set vertical flip; "-hf -vf" = both horizontal and vertical flip
cameraSettings = "-vf -hf"

# settings of the full size photos to save
saveWidth   = 1296
saveHeight  = 972
saveQuality = 15 # Set jpeg quality (0 to 100)

# Test-Image settings
testWidth = 100
testHeight = 75

# this is the default setting, if the whole image should be scanned for changed pixel
testAreaCount = 1
testBorders = [ [[1,testWidth],[1,testHeight]] ]  # [ [[start pixel on left side,end pixel on right side],[start pixel on top side,stop pixel on bottom side]] ]
# testBorders are NOT zero-based, the first pixel is 1 and the last pixel is testWith or testHeight

# with "testBorders", you can define areas, where the script should scan for changed pixel
# for example, if your picture looks like this:
#
#     ....XXXX
#     ........
#     ........
#
# "." is a street or a house, "X" are trees which move arround like crazy when the wind is blowing
# because of the wind in the trees, there will be taken photos all the time. to prevent this, your setting might look like this:

# testAreaCount = 2
# testBorders = [ [[1,50],[1,75]], [[51,100],[26,75]] ] # area y=1 to 25 not scanned in x=51 to 100

# even more complex example
# testAreaCount = 4
# testBorders = [ [[1,39],[1,75]], [[40,67],[43,75]], [[68,85],[48,75]], [[86,100],[41,75]] ]

# in debug mode, a file debug.bmp is written to disk with marked changed pixel an with marked border of scan-area
# debug mode should only be turned on while testing the parameters above
debugMode = False # False or True

# Capture a small test image (for motion detection)
def captureTestImage(settings, width, height):
    command = "raspistill %s -w %s -h %s -t 200 -e bmp -n -o -" % (settings, width, height)
    imageData = StringIO.StringIO()
    imageData.write(subprocess.check_output(command, shell=True))
    imageData.seek(0)
    im = Image.open(imageData)
    buffer = im.load()
    imageData.close()
    return im, buffer

# Save a full size image to disk
def saveImage(settings, width, height, quality, diskSpaceToReserve):
    keepDiskSpaceFree(diskSpaceToReserve)
    time = datetime.now()
    if numsequence:
        filename = filepath + "/" + filenamePrefix + "-" + fileCount + ".jpg"
    else:
        filename = filepath + "/" + filenamePrefix + "-%04d%02d%02d-%02d%02d%02d.jpg" % (time.year, time.month, time.day, time.hour, time.minute, time.second)
    subprocess.call("raspistill %s -w %s -h %s -t 200 -e jpg -q %s -n -o %s" % (settings, width, height, quality, filename), shell=True)
    imageTagName = filenamePrefix + "-" + "%04d%02d%02d-%02d:%02d:%02d" % (time.year, time.month, time.day, time.hour, time.minute, time.second)
    if (showDateOnImage):
        writeDateToImage(filename,imageTagName)
    print "%s - %s saved %s" % (progname, imageTagName, filename)

# Keep free space above given level
def keepDiskSpaceFree(bytesToReserve):
    if (getFreeSpace() < bytesToReserve):
        for filename in sorted(os.listdir(filepath + "/")):
            if filename.startswith(filenamePrefix) and filename.endswith(".jpg"):
                os.remove(filepath + "/" + filename)
                print "%s - Deleted %s/%s to avoid filling disk" % (progname,filepath,filename)
                if (getFreeSpace() > bytesToReserve):
                    return

# Write Date to Image
def writeDateToImage(imagename,datetoprint):
    FOREGROUND = (255, 255, 255)
    TEXT = datetoprint
    font_path = '/usr/share/fonts/truetype/freefont/FreeSansBold.ttf'
    font = ImageFont.truetype(font_path, 24, encoding='unic')
    text = TEXT.decode('utf-8')
    img = Image.open(imagename)
    draw = ImageDraw.Draw(img)
    # draw.text((x, y),"Sample Text",(r,g,b))

    draw.text((500, 930),text,FOREGROUND,font=font)
    img.save(imagename)
    return

# Get available disk space
def getFreeSpace():
    st = os.statvfs(filepath + "/")
    du = st.f_bavail * st.f_frsize
    return du

# Get first image
image1, buffer1 = captureTestImage(cameraSettings, testWidth, testHeight)

# Reset last capture time
lastCapture = time.time()

if numsequence:
    if not os.path.exists(countpath):
        print "%s - Creating New Counter File %s Counter=%i" % (progname, countpath,startCount)
        open(countpath, 'w').close()
        f = open(countpath, 'w+')
        f.write(str(startCount))
        f.close()

    with open(countpath, 'r') as f:
        writeCount = f.read()
        f.closed
    currentCount = int(writeCount) + 1
    if (currentCount > startCount + maxPhotos):
        currentCount = startCount

starttime = datetime.now()
rightnow = "%04d%02d%02d-%02d:%02d:%02d" % (starttime.year, starttime.month, starttime.day, starttime.hour, starttime.minute, starttime.second)
print "---------------------------------- Settings -----------------------------------------"
print "    Motion .... Sensitivity=%i Threshold=%i Cam-Settings= %s ForceCapture=%s every %i seconds"  % (sensitivity, threshold, cameraSettings, forceCapture, forceCaptureTime)
print "    Image ..... W=%i H=%i Quality=%i DateOnImage=%s Prefix=%s Path=%s" % (saveWidth, saveHeight, saveQuality, showDateOnImage, filenamePrefix, filepath)
print "    Numbering . On=%s Start=%s Max=%i path=%s Counter=%i" % (numsequence, startCount, maxPhotos, countpath, currentCount)
print "    Sync File . On=%s Path=%s" % (createLockFile, lockfilepath)
print "    DiskSpace . Reserved=%i mb" % (mbToReserve)
print "    Debug ..... On=%s Path=%s/debug.bmp" % (debugMode, filepath)
print "-------------------------------------------------------------------------------------"
print "%s - Waiting for Motion %s ........" % (progname, rightnow)

# Start main motion capture loop
while (True):

    # Get comparison image
    image2, buffer2 = captureTestImage(cameraSettings, testWidth, testHeight)

    # Count changed pixels
    changedPixels = 0
    takePicture = False

    if (debugMode): # in debug mode, save a bitmap-file with marked changed pixels and with visible testarea-borders
        debugimage = Image.new("RGB",(testWidth, testHeight))
        debugim = debugimage.load()

    for z in xrange(0, testAreaCount): # = xrange(0,1) with default-values = z will only have the value of 0 = only one scan-area = whole picture
        for x in xrange(testBorders[z][0][0]-1, testBorders[z][0][1]): # = xrange(0,100) with default-values
            for y in xrange(testBorders[z][1][0]-1, testBorders[z][1][1]):   # = xrange(0,75) with default-values; testBorders are NOT zero-based, buffer1[x,y] are zero-based (0,0 is top left of image, testWidth-1,testHeight-1 is botton right)
                if (debugMode):
                    debugim[x,y] = buffer2[x,y]
                    if ((x == testBorders[z][0][0]-1) or (x == testBorders[z][0][1]-1) or (y == testBorders[z][1][0]-1) or (y == testBorders[z][1][1]-1)):
                        # print "Border %s %s" % (x,y)
                        debugim[x,y] = (0, 0, 255) # in debug mode, mark all border pixel to blue
                # Just check green channel as it's the highest quality channel
                pixdiff = abs(buffer1[x,y][1] - buffer2[x,y][1])
                if pixdiff > threshold:
                    changedPixels += 1
                    if (debugMode):
                        debugim[x,y] = (0, 255, 0) # in debug mode, mark all changed pixel to green
                # Save an image if pixels changed
                if (changedPixels > sensitivity):
                    takePicture = True # will shoot the photo later
                if ((debugMode == False) and (changedPixels > sensitivity)):
                    break  # break the y loop
            if ((debugMode == False) and (changedPixels > sensitivity)):
                break  # break the x loop
        if ((debugMode == False) and (changedPixels > sensitivity)):
            break  # break the z loop

    if (debugMode):
        debugimage.save(filepath + "/debug.bmp") # save debug image as bmp
        print "%s - Saved Debug to %s/debug.bmp  Changed Pixel=%i" % (progname, filepath, changedPixels)
    # else:
    #     print "%s changed pixel" % changedPixels

    # Check force capture
    if forceCapture:
        if time.time() - lastCapture > forceCaptureTime:
            takePicture = True

    if takePicture:
        lastCapture = time.time()
        if numsequence:
            fileCount = str(currentCount)
        saveImage(cameraSettings, saveWidth, saveHeight, saveQuality, diskSpaceToReserve)
        # increment image counter and reset to start if max reached
        if numsequence:
            currentCount += 1
            if (currentCount > startCount + maxPhotos):
                currentCount = startCount
            writeCount = str(currentCount)
            # write current photo counter to file
            if not os.path.exists(countpath):
                print "%s - Creating %s" % (progname,countpath)
                open(countpath, 'w').close()
            f = open(countpath, 'w+')
            f.write(str(writeCount))
            f.close()
        # write a lock file so sync script knows when there are files to process for grive
        if createLockFile:
            if not os.path.exists(lockfilepath):
                print "%s - Creating %s" % (progname, lockfilepath)
                open(lockfilepath, 'w').close()
            f = open(lockfilepath, 'w+')
            f.write("Photos available to sync with grive using sync shell script")
            f.close()

    # Swap comparison buffers
    image1  = image2
    buffer1 = buffer2
Just a little setup to create the sync.sh file.

Code: Select all

touch sync.sh
sudo chmod +x sync.sh
nano sync.sh     # paste sync.sh code below into the file and save
mkdir google_drive
touch pimotion.dat
sudo chmod 777 pimotion.dat
Here is the bash script to synchronize files on raspberry pi with my google drive

Code: Select all

#!/bin/bash
# sync.sh written by Claude Pageau.  requires /home/pi/grive executable compiled from github source
# for details see http://www.pihomeserver.fr/en/2013/08/15/raspberry-pi-home-server-synchroniser-le-raspberry-pi-avec-votre-google-drive/
# Runs grive only if it is not already running
# Looks for sync.lock file created by pimotion.py to start the sync
# Kills grive process if it has been running too long. > 300 seconds
# Suggest you run this script from crontab every minute or so.  Add approriate line to crontab using command sudo crontab -e
# example crontab entry below without # comment char
# */1 * * * * /home/pi/sync.sh >/dev/nul

echo ---------------------------- $0 ---------------------------------
# Get current folder that this script is located in
SYNCFILE=pimotion.sync
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
echo "Current Directory=$DIR"
# check if grive is already running to avoid multiple instances
if [ -z "$(pgrep grive)" ]
  then
    # Check for any grive .trash files and remove to recover space
    if [ -e $DIR/google_drive/.trash/* ]
    then
      echo "grive .. Remove trash from '$DIR'/google_drive/.trash"
      rm -R $DIR/google_drive/.trash/*
    fi
    # Check for sync file indicating pimotion.py saved new files
    if [ -e $DIR/$SYNCFILE ]
    then
      # Run grive in the against the google_drive folder
      echo "grive .. Found $SYNCFILE files to synchronize"
      echo "Change Directory to $DIR/google_drive"
      cd $DIR/google_drive
      echo "grive .. Running $DIR/grive -p $DIR/google_drive"
      $DIR/grive -p $DIR/google_drive
      # Check if grive exited successully
      if [ $? -ne 0 ]
      then
        echo "grive .. processing failed"
      else
        # If successful then remove sync file
        echo "grive .. processing complete"
        echo "grive .. remove $DIR/$SYNCFILE file"
        rm -f $DIR/$SYNCFILE
      fi
    else
      echo "grive .. No files to process in $DIR/google_drive"
    fi
    cd $DIR
else
  # grive is already running so check how long and kill if past time limit
  if [ -z "$(sudo ps axh -O etimes | grep grive | grep -v grep | sed 's/^ *//'| awk '{if ($2 >= 300) print $1}')" ]
  then
    GRIVETIME=$(sudo ps axh -O etimes | grep grive | grep -v grep | sed 's/^ *//' | awk '{if ($2 > 0) print $2}')
    echo "grive .. Has run for $GRIVETIME seconds. Will kill when greater than 300 seconds."
  else
    GRIVEPID=$(pgrep grive)
    echo "grive .. Has run longer than 5 minutes so kill pid $GRIVEPID"
    KILLPID=$(ps axh -O etimes | grep grive | grep -v grep | awk '{if ($2 >= 300) print $1}')
    echo "grive .. killing $KILLPID"
    sudo kill $KILLPID
  fi
fi
exit
This will setup an /etc/init.d script so the pimotion.py script will run on boot up

Code: Select all

cd /etc/init.d
sudo cp skeleton pimotion.sh
chmod +x pimotion.sh
sudo nano pimotion.sh   # change appropriate entries to point to your pimotion.py script
sudo update-rc.d /etc/init.d/pimotion.sh defaults
cd ~
Modify any pimotion.py script settings as required. I have the camera setting image set to flipped due to the camera module mounting position in the fake security camera case. You may also want to change sensitivity and/or threshold as needed as well as the filename prefix etc.

You will need to compile a modified version of grive in order to sync files to your google drive
see instructions url link below. Compiling takes a little while and you must edit the specified /home/pi/grive/libgrive/src/drive/State.cc file per the web link below. If you have problems read the posts. When you initialize grive with google I opened an ssh session to the raspberry pi on my windows 7 PC and then cut and pasted the grive -a url to chrome browser while logged into google. This takes you to a screen that returns a very long security code. I then cut and pasted this into the RPI session and everything worked just fine. I did not login to google on the pi. I only needed the PC to be logged in and paste the authentication code back to the pi from the PC. I don't think you need a logged in google account on the pi as the post mentions. At any rate it worked for me and I had to try several times since I was trying to avoid having grive executable in the google_drive folder. By using the -p option and copying the grive hidden config files to the rpi google_drive folder I managed to get everything to work.
http://raspberrywebserver.com/serveradm ... drive.html
or this link might be even better
http://www.pihomeserver.fr/en/2013/08/1 ... gle-drive/

once compile is successful copy the grive executable to the folder that pimotion.py and sync.sh are located
modify this to suit your folder structure.

Code: Select all

sudo mv grive grive_src
cp /home/pi/grive_src/grive/grive /home/pi
chmod +x grive
sudo ./grive -a 
# cut and paste the resulting grive url into web browser that is logged into your google account
# cut and paste the resulting web browser security code back to raspberry pi grive session.
# grive will indicate if the operation was successful
sudo cp ./.grive google_drive
sudo cp ./.grive_state google_drive
sudo ./sync.sh
Once grive has been initialized successfully with the grive -a option then copy the /home/pi/.grive and /home/pi/.grive_state files to the /home/pi/google_drive folder per above code. This will allow grive to be executed from the /home/pi folder so it does not have to be in the google_drive folder.

To test you can launch pimotion.py from a ssh terminal session

Code: Select all

cd ~
sudo ./pimotion.py
from a second ssh terminal run sync.sh (make sure that motion was detected and files are in the google_drive folder to sync. You should see a /home/pi/sync.lock file. This was created by pimotion.py when motion photos were created.

Code: Select all

cd ~
sudo ./sync.sh
You should see files being synchronized in both directions. This is normal. There are google drive apps for Apple, Android, Mac and PC. This will allow you to access the raspberry pi motion capture security camera files on other computers or handheld devices.

Assuming you have wifi/wired network to start on boot headless and the crontab and init.d setup then the camera will work immediately on booting (unattended). I also setup a cronjob to reboot the rpi once a day but this may not be necessary for you. I did it since I intend to leave the rpi security camera run remotely and gives a chance for system to recover should there be a small glitch.

Also if you have problems check permissions. The init.d will run as root so the files in the google_drive folder will be owned by root. Just check to make sure you run with sudo ./pimotion.sh and sudo ./sync.sh if you are in terminal sessions.

Once you know sync.sh is working OK you can automate the sync by running it in as a cronjob.

Code: Select all

sudo crontab -e
past the following line into the crontab file nano editor

Code: Select all

*/1 * * * * /home/pi/sync.sh >/dev/nul
ctrl-x to exit and save crontab file
this will run once a minute. You can change to suit your needs. If grive is already running or there are no files to process then the script simply exits. Also if grive has been running for more than 5 minutes it is killed. This can be changed in the script if you wish.

Good Luck
Claude Pageau
GitHub - https://github.com/pageauc
YouTube - https://www.youtube.com/user/pageaucp

diSE
Posts: 3
Joined: Wed May 29, 2013 8:18 pm

Re: Lightweight python motion detection

Wed Mar 05, 2014 8:54 pm

Hello all, i had a camera in my work which has a template picture uploaded into memory ( it is a picture of plastic bottle which is empty). Camera shots about 3 pictures of bottles per second , compares it with template and ... when there is something in bottle or bottle is damaged then camera do something ;) the switch on the line put bad bottles into container. Since about month camera is bronken ... new one costs about 3k Euro ;) I'm just looking something over net how to replace it and i just have found this thread.
Please tell me is it possible to create something like template of "empty bottle " , take pictures and compare it ? Accuracy no need to be very good, there is a big difference in picture when the bottle is damaged. Thans for some advices and tips. Sorry for Language.

geneworld
Posts: 67
Joined: Sun Jan 19, 2014 11:46 pm

Re: Lightweight python motion detection

Wed Mar 12, 2014 11:19 am

Bumping for help from my post above! http://www.raspberrypi.org/phpBB3/viewt ... 10#p504010
1 B R1
4B R2 IR
1B+ USB Boot/RetroPie2.6/KODI
1Pi2 USB Boot/Media Server/Torrent Box
1Pi Zero Web-based universal remote control
2Pi Zero Misc.
1Pi3 USB Boot/RetroPie3.6/KODI/pianobar

geneworld
Posts: 67
Joined: Sun Jan 19, 2014 11:46 pm

Re: Lightweight python motion detection

Mon Mar 17, 2014 12:32 pm

Still looking for help with my picasa issue :?
1 B R1
4B R2 IR
1B+ USB Boot/RetroPie2.6/KODI
1Pi2 USB Boot/Media Server/Torrent Box
1Pi Zero Web-based universal remote control
2Pi Zero Misc.
1Pi3 USB Boot/RetroPie3.6/KODI/pianobar

Return to “Camera board”