I needed a security camera for the house. It had to be wifi, intranet-only and accessible on our laptops, tablets and phones. The primary purpose is to view what is going on in the driveway and front porch; the secondary goal is to document activity on off-site storage.
Consumer-grade products are very underwhelming. Internet-facing IP cameras are trivial to find on the internet, many people do not secure them, and even with a good password the embedded software is often criminally-insecure. Because I wanted to access the video stream on a variety of platforms, it had to be either browser-based or VLC-accessible.
Because I had most of the parts already, I settled on building one myself. I was inspired by Christoph Buenger's version where he bought a dummy camera housing and used a Raspberry Pi.
There are four main components to this project:
- Housing: http://www.amazon.com/dp/B004D8NZ52
- Raspberry Pi: http://www.adafruit.com/product/998
- Wifi Dongle: http://www.adafruit.com/products/1030
- Camera: http://www.adafruit.com/product/1367
If you are planning on building one, use the new Raspberry Pi Model A+. It is more compact and will be easier to shoehorn into the housing.
If you intend to run your camera in a low-light area, I would consider using the Pi NoIR camera and an IR illuminator. My house is equipped with motion activated lights so I went with a simpler build.
I used an older Raspberry Pi Model B. To fit in this particular housing, I had to de-solder the RCA jack, which wasn't in use.
The assembly is relatively straight-forward. I drilled out the rear of the housing for the USB cord and antenna. I replaced the fake camera lens with the pi camera and mounted it inside with a healthy amount of gorilla tape. If you are ambitious, you could probably have the Pi cohabitate with the dummy camera circuit that controls the blinking red LED. I opted to gut those parts because the onboard Pi camera LED is visible.
I sealed the edges with Gorilla tape (notice a theme?) and replaced the housing overhang. The camera was then mounted to the siding and is powered from the GFI outlet from a conventional surplus 5v USB power supply.
My first attempt to stream involved piping the bundled raspivid output to VLC. This does work for initial tests. There is a 5-10 second lag, however, and the stream does not seem stable for long periods.
After much searching and experimenting, I settled on a uv4l webserver with an MJPEG stream. While it only can serve one device at a time, I have found that's not an issue.
Update 8 Dec 14: The final step is to disable the power saving feature on the Realtek wifi chip. Follow these instructions to do so (it's easy, don't worry).
It's probably obvious, you'll want to enable SSH access before assembling for administration.
The camera has been running for a month without issue. We have had below-freezing temperatures and several severe rainstorms but it has held up admirably.
The next stage is to enable motion-activated image capture and remote storage. I have successfully experimented with tweeting a picture (to a private account), though I am unsure about its feasibility. Alternatively, I may use Dropbox as my storage layer.
Regardless of the method, I believe it's important to have a private, semi-permanent record of activity in the event the equipment is stolen or damaged.
If you are new to to Linux or the Raspberry Pi, this is a relatively easy project that I believe most people could struggle through. It requires no soldering or special tools. However, If you were to purchase all the parts at retail price and simply wanted it to work, you may be better off with a pre-built solution. I have heard good things about Dropcam, though I do not personally own one.