Want to set up a home security system, but don’t want to pay a monthly fee to a security company? Techradar has a detailed do-it-yourself project for a connected alert system using Raspberry Pi.

While it might not have all the bells and whistles you’d get with a professional system, with some basic parts and a little coding, you can set it up an infrared sensor that will send you a text message when movement is detected. Plus, you can include a camera to take a snapshot and 10-second video so that you’ll know if your cat or a cat burglar tripped the sensor.

Raspberry Pi Home Alert System DIY

The project requires a few special items, in addition to the Raspberry Pi. You will need a passive infrared sensor (PIR) and the Pi Camera. You will also be installing Python and creating a few codes of text to activate the system.

The sensor sends out a beam (say, across your front door threshold). If the beam is broken detects changes in amount of radiation nearby in order to sense when a human or other large object is moving nearby. Then it sends a signal to Raspberry Pi, which will trigger an action to take a picture and record 10 seconds of video. After the image is captured, the Raspberry Pi will send a text message with the picture and video included.

It may not be as fancy as Skylink, or even the iSmartAlarm security system. But, for the cost of a Rasberry Pi, Pi Camera and PIR sensor, you could make a couple of these alert systems and still pay less for it.

Support Liliputing

Liliputing's primary sources of revenue are advertising and affiliate links (if you click the "Shop" button at the top of the page and buy something on Amazon, for example, we'll get a small commission).

But there are several ways you can support the site directly even if you're using an ad blocker* and hate online shopping.

Contribute to our Patreon campaign

or...

Contribute via PayPal

* If you are using an ad blocker like uBlock Origin and seeing a pop-up message at the bottom of the screen, we have a guide that may help you disable it.

Subscribe to Liliputing via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 9,547 other subscribers

10 replies on “Build a simple home security system using Raspberry Pi”

  1. I build this quite a while ago and it’s running fine. I integrated humidity and temperature sensor along with it to get more info. PIR is not that bad of a sensor, I am using this in my garage and it detects door opening and closing because of the change in temperature.

    My next step are:
    connect these sensors to a tranciever so I can place the sensors any place I want.

    Build ui so that all this data I am collecting is not just in my emails

  2. I could see this would be useful for someone with an alarm system and pets. The IR sensor wouldn’t trip the alarm system and call the cops, it would just text you.

  3. The infrared sensor is passive, so it does not send out a beam at all. Instead it reacts to the infrared energy emitted by people moving nearby.

    1. I agree here with randomly selected. The description is of an infrared distance sensor, while the part mentioned is a PIR sensor. The two only has the word infrared in common.

    2. By the way, I have seen those HC-SR501 PIR sensors on Ebay for under $1 recently. Connect one to an ESP8266 WIFI module (under $2 on Ebay recently) and you can then read the sensor from an old smartphone via WIFI. A custom app on the smartphone can respond to the sensor activation by using its built-in camera to record video and its built-in cell radios to send the SMS or email. No need to spend money on a Raspberry PI + accessories.

      1. I have been working on exactly this setup (though getting nodemcu working is not for the faint of heart).

        1. To use nodemcu I would have to learn Lua and I am not feeling motivated to do that. It is great that the ESP8266 SDK allows customizing the firmware in C/C++ and I have tons of experience with C/C++.

  4. Even something which simply turned on a light if a threshold was crossed would be pretty handy. Helpful if you forgot to leave the porch light on when you went out for the evening and enough to make many intruders retreat and pick another target.

Comments are closed.