Page 1 of 1

Raspberry Pi Zero W CCTV

PostPosted: Mon Jul 24, 2017 7:18 pm
by Jason
I've recently moved and thought to myself, why not add some extra security here by turning my Raspberry Pi Zero W into a little CCTV server.

Image

Plans for it are to get a better case as that case is awful! Grab a little Pi camera and set it up to stream live video so i can keep an eye on things. I'm also going to add a heat sink as the Pi will be on a lot once it is set up.

Re: Raspberry Pi Zero W CCTV

PostPosted: Wed Jul 26, 2017 1:00 pm
by Jason
Camera arrived so time to get this to work!

Image

Image

All plugged in and ready to roll!

Image

When it came to actual software, there were quite a few options but i ended up going with MotionEyeOS which was a dead simple OS based on Raspbian and all i had to do was image it to an SD card and boot.

Image

Once this was done i did the first boot which actually failed. Turns out the image wasn't Pi Zero W ready and wouldn't boot due to using wireless instead of Ethernet. I rewrote the image and this time i added a file "wpa_supplicant.conf" to the boot sector of the SD card. This contained the following code:

country=gb
update_config=1
ctrl_interface=/var/run/wpa_supplicant

network={
scan_ssid=1
ssid="myssid"
psk="mypassword"
}


With this, the Pi booted and launched the wifi ready for CCTV goodness!

Image

Booted! Time to get to the Windows box and log in via the web interface.

After a quick test I made sure it all worked, the camera showed life with it's little LED and I had live video.

Image

Now, this camera module surprised the hell out of me as it can actually do 1080p @ 30 fps which is pretty impressive! Sadly, my Pi Zero W's single core 700Mhz CPU struggles like crazy at 1080p (less than 1fps!) so I've opted for 720p now which gives me around 3fps. Still pretty slow but good enough for my purposes. I did notice there was an overclocking option in the web interface to take the CPU to 1Ghz. I may give this a go once my heat sink arrives.

Next up, time to position the camera and give it a much longer power cable.

Image

A somewhat crude way of mounting it but hey, it works!

Image

And with that, we have live video from the front of my place overlooking my 2 motorbikes.

Image

Good times! I still have a pair of cases coming (one for the camera and one for the Pi) and I also have a heat sink coming so i will tinker with overclocking the CPU when that arrives and see if i can squeeze anymore FPS out of it.

Re: Raspberry Pi Zero W CCTV

PostPosted: Wed Jul 26, 2017 1:13 pm
by Jason
One other quick thing i did was disable the LED on the camera so it can be a little less obvious.

Image

Re: Raspberry Pi Zero W CCTV

PostPosted: Mon Aug 07, 2017 5:53 pm
by Jason
Little upgrade for the current CCTV system today.

Image

Image

A 1080p camera with a wide angle lens and also night vision!

Image

Time to switch the cameras over.

Image

Oh yes! Much better camera.

So what will happen to the old camera...?

Image

It's going on my old Raspberry Pi! A Pi 1 to be exact, very old but perfect for my front door!

Image

Image

Camera feed from the new camera:

Image

Re: Raspberry Pi Zero W CCTV

PostPosted: Tue Aug 08, 2017 4:58 pm
by Jason
I had been waiting for a case to arrive for the Pi and the camera but sadly, as usual, eBay sellers are unreliable...

So I went ahead and made my own out of an old display stand.

Image

Image

Super glued the pi and the camera module to the display stand and it looks great! I never intend to use this Pi for anything else other than CCTV so glue wasn't too terrible an idea (plus it's all i had to use.)

But, I went one step further.. i had a spare tripod which was always far too short to be of much use so I removed the centre screw and glued the display stand to the tripod.

Image

Image

The end result, a very stable, fully adjustable, fairly cool looking CCTV camera.

Image

It's now busy in my large window overseeing everything that goes on outside plus keeps an eye on my vehicles.

Image

Re: Raspberry Pi Zero W CCTV

PostPosted: Wed Aug 09, 2017 1:41 pm
by Jason
Time to add the second one and give my ancient old Pi 1 a purpose!

New case for Pi 1:

Image

MotionEyeOS setup:

Image

After all was set up I fitted the camera, luckily, there was a little gap in the frame of the door so i could install the camera cable very easily.

Image

Image

Image

Image

Image

All running!

Image

Great image too, i actually have motion activated lights out there too so the camera will work at night as well.

Re: Raspberry Pi Zero W CCTV

PostPosted: Wed Aug 09, 2017 1:56 pm
by Jason
One last thing i decided to do was disable the LED's on the Pi's as i plan to have them both on 24/7 so it will save a tiny bit of juice.

I had to remount the file system as read/write to edit the file i did so with the following commands:

mount -o remount,rw /
mount -o remount,rw /boot
nano /boot/config.txt


Then I added the following lines to the config file.

Raspberry Pi 1:

# Disable the ACT LED.
dtparam=act_led_trigger=none
dtparam=act_led_activelow=off

# Disable the PWR LED.
dtparam=pwr_led_trigger=none
dtparam=pwr_led_activelow=off


Raspberry Pi Zero:

# Disable the ACT LED.
dtparam=act_led_trigger=none
dtparam=act_led_activelow=on


All done!