Raspberry Pi Home Security Camera

One of the reasons I got myself a Raspberry Pi is because I wanted to set up a Raspberry Pi home security camera. I’ve had the Raspberry Pi for some time now and the first project I did was to create a home-made Amazon Eco. That little project worked out very nice and I got it all working as it was supposed to. Not quite as good as having an actual Amazon Echo because it wasn’t permissible to have it in always listening mode. In any case it was fun to set the thing up. I still wonder if an Amazon Echo would be good to have in the home when I have so many options to call up Siri to do things for me. The same goes for the Google Home device. So now that is out of the way and I’m getting set up with some Elgato Eve Apple Home Kit devices. I thought I’d also get back onto the Raspberry Pi home security camera.

Taking it a few baby steps at a time

The first steps I took was to get the camera just so that it was working. This proved to be remarkably easy. While the Raspberry Pi is turned off you loosen up the connection for the camera, push in the connection strip from the camera into the connector. You only have to push the little connector thing back in place and the job is done. The next stage of the process is to set up some Python scripts and these are very easy to find on the Raspberry Pi website. The first time I tried it the camera became operational but I couldn’t turn it off. The image was taking up the whole of the screen and I couldn’t get to the Python shell to put a stop to it. I had to resort to pulling the power out because I couldn’t find any key combinations to do what I wanted. When I went back in to have a look at the Python script file I saw I’d made a couple of typing errors. Once I had the sorted out I was able to have the camera on for the number of seconds set up in the file and then for it to turn itself off again.

The next step with the camera

Just getting the camera to run and display on-screen is one thing but is necessary to capture pictures. I added a few lines of code to the original Python script and once again we were in business. Taking it a stage further I changed the script code again and made it so that it would take five pictures at five second intervals and save them to the desktop. The next thing will be to work out how to have those pictures uploaded to a server somewhere, so they can be viewed from wherever. That stage of coding I still need to discover and put into action.

Shooting video with the Raspberry Pi camera

While it’s good to have images of nefarious persons caught by your Raspberry Pi home security camera it could be even better to have video. Getting the Raspberry Pi home security camera to record video was just as easy as setting up to do the still images. I just had to add some code into the Python script and we were in business.

Detecting motion for a Raspberry Pi home security camera

I was successful in getting the Raspberry Pi to detect motion using the motion detector I bought. I followed instructions on the Raspberry Pi website for a project and it went fairly well. There were just three wires to connect the PIR motion detector sensor to the Raspberry Pi home security camera. It was a good job I followed the instructions to check it was wired up correctly. The order of the pins had changed to how they were in the website. By looking at the markings on the printed circuit board I was able to get it done correctly. I ran into a small roadblock in that the DVD with the instructions showed up as empty on my Mac. This was sorted out with a quick email to the maker of the PIR motion detector. I received an email from him this morning with the PDF containing the necessary information. There are two potentiometers on the sensor to adjust the sensitivity and timing and I needed help to set those up. The motion detecting is working, I’ve been able to have the camera start working as soon as the motion sensor is activated. I’ve had it take photos and record videos which were saved onto the SD card. I have been trying to get the email working and use the scripts provided so that images taken are sent by email to me. I still haven’t got that working and to be honest I’m not quite sure what to do next. I’ll have to do some googling to find out what my next step will be.

Raspberry Pi home security camera

Connecting to the Raspberry Pi from the Mac and from my iPad

I’m trying to set up an SSH connection to the Raspberry Pi so that I can run it headless. I managed to do this before, but for some reason I’m having difficulties this time. Have to admit there’s been some serious head scratching taking place. I also have to put my hand up to say that more than once I wondered if it might be a better idea just to buy an Internet camera. The only thing is, I want to have one which works with Home Kit. There doesn’t seem to be any home kit cameras available just yet. Including the Raspberry Pi solution. The plan is when I get a message in from the security devices set up on the doors/window sensors and the motion sensor is I’ll be able to fire up some sort of Internet connected camera to have a look at what’s going on. I’ll have to be a little patient on the camera angle – Home Kit here I come

The Ring Doorbell – My Ding-a-Ling

There is a Raspberry Pi home security camera solution for this requirement, but off the shelf possibilities too. The Ring Doorbell doesn’t yet work with Home Kit, but it is promised for later on this year. The idea is when somebody rings your doorbell you can see who it is on your iPhone. You also can speak to the person and whoever it is will not know you’re not at home. They might get a little bit miffed if you don’t come open the door, but apart from that it seems a good solution. If I got one of these I’m not sure where I’d put it. I could either put it on the gate where there is a wired intercom already set up. We never have used it though. The other place I could put it, it is on the door of the house, but then if the people don’t go past the gate they won’t to be able to be caught by the Ring Doorbell system either. I like the idea of having a camera which would take photos of people at the gate. I live on a very quiet road and is not likely to be set off very often. I wouldn’t get any false positives though. Maybe it’s going to be the Raspberry Pi Home Security Camera after all.

It’s all coming together quite nicely

I had an order in for the door and window sensors with Amazon. I saw this morning they still hadn’t been sent from the warehouse. So I canceled that order and put the order in with Apple. I’ll have the door and window sensors tomorrow. Can’t wait to get started connecting the Home Kit devices to the Apple TV through the app. May need to set these things up first using the application from Elgato Eve on the iPhone before the Home application on the Apple TV will see them. I can’t do anything with the Home application from Apple on the Apple TV until I have at least one Home Kit device in the house. The Philips Hue light bulbs should also be arriving tomorrow. There’s a lighting device which is a non-Internet of things type of device arriving tomorrow also. This is a motion sensing LED light which I’m going to fit inside the garage. This will just give me a simple automatic light which will turn on when I open the garage door. It has to be said that once you get started with home automation it does get kind of addictive. The question is going to be will my wife want to do the tech thing with the lights or will she still hit the light switches on the wall. The home automation is a bonus to the initial goal of setting up the home security. Going to need iOS 10.2 to make an appearance soon too. Perhaps I’ll get the beta version if I need to.

2 thoughts on “Raspberry Pi Home Security Camera

Comments are closed.