(Raspberry Pi Security System)
My daughter's dog is an inveterate thief of any food left within even implausible reach. The previous time we dog-sat for him he managed to steal over a dozen home-made cookies. So I decided to catch him in the act using my Pi+camera+Python program. I have a (fairly) portable Pi system:
- The 12,000mAh battery will power the Pi for about 10 hours. Unfortunately the battery can either charge or discharge but not both at once. Otherwise it would make a very nice UPS (uninterruptable power supply).
- As shown, it has LED output, PIR and Pi camera input and a 7-segment display. On the side there is a Cat5 socket (provides 8 wires for remote sensors) and a pair of relay switches.
- I use the speaker for text-to-speech output.
This first test failed for 2 reasons: a) the dog ignored the bait; b) while we were away for about 3 hours the sun went under a cloud and back out about 100 times and my dumb program decided that each such change was "motion."
So, for my second try I added the PIR device -- logic as follows:
IF the PIR detects motion AND the 2 camera images differ THEN store the high-res image.
This attempt failed too: at a distance of about 12' the PIR didn't notice the 30-pound white dog (but he stole the meat).
I need a better motion detector.