{"id":33,"date":"2015-04-10T07:36:27","date_gmt":"2015-04-10T11:36:27","guid":{"rendered":"http:\/\/teakdata.com\/blog\/?p=33"},"modified":"2017-05-03T17:30:54","modified_gmt":"2017-05-03T21:30:54","slug":"diy-home-security-system-using-raspberry-pi","status":"publish","type":"post","link":"https:\/\/teakdata.com\/blog\/diy-home-security-system-using-raspberry-pi\/","title":{"rendered":"DIY Home Security System using Raspberry Pi"},"content":{"rendered":"<p>DIY Home Security System using Raspberry Pi<\/p>\n<p>The Raspberry Pi computer is being used in many projects around the world. Inexpensive, small and powerful, this credit card size computer enables you to implement cool products.<\/p>\n<p>If you also bring your kids into this equation, the project will have a childish sparkle. Doing projects with my son is fun and allows him to learn about software, electronics, prototyping and building a product that solves a real need.<\/p>\n<p>This tutorial will guide you step by step to build a Home Security System using Raspberry Pi. The security device will be connected to the main entrance with a magnetic door sensor. When the door opens, the sensor triggers an event on the Raspberry Pi. The device takes pictures and sends you an email alert.<\/p>\n<div>\n<div id=\"attachment_115\" style=\"width: 572px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/teakdata.com\/blog\/wp-content\/uploads\/2015\/04\/homesecuritydevice.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-115\" class=\"size-full wp-image-115\" src=\"http:\/\/teakdata.com\/blog\/wp-content\/uploads\/2015\/04\/homesecuritydevice.png\" alt=\"Home Security Device - overview\" width=\"562\" height=\"249\" srcset=\"https:\/\/teakdata.com\/blog\/wp-content\/uploads\/2015\/04\/homesecuritydevice.png 562w, https:\/\/teakdata.com\/blog\/wp-content\/uploads\/2015\/04\/homesecuritydevice-300x133.png 300w\" sizes=\"auto, (max-width: 562px) 100vw, 562px\" \/><\/a><p id=\"caption-attachment-115\" class=\"wp-caption-text\">Home Security Device &#8211; overview<\/p><\/div>\n<\/div>\n<div>\u00a0Before you begin, we recommend you read some tutorials from the Raspberry.org: <a title=\"getting started with Raspberry pi lesson\" href=\"https:\/\/www.raspberrypi.org\/learning\/getting-started-with-raspberry-pi-lesson\/\">Getting Started with Raspberry Pi<\/a><\/div>\n<div><\/div>\n<div>\n<div><h2 id=\"tablepress-1-name\" class=\"tablepress-table-name tablepress-table-name-id-1\">Project Estimation<\/h2>\n\n<table id=\"tablepress-1\" class=\"tablepress tablepress-id-1\" aria-labelledby=\"tablepress-1-name\">\n<tbody class=\"row-striping row-hover\">\n<tr class=\"row-1\">\n\t<td class=\"column-1\">Time<\/td><td class=\"column-2\">10 hours<\/td>\n<\/tr>\n<tr class=\"row-2\">\n\t<td class=\"column-1\">Hardware Complexity<\/td><td class=\"column-2\">Medium [optional soldering]<\/td>\n<\/tr>\n<tr class=\"row-3\">\n\t<td class=\"column-1\">Software Complexity<\/td><td class=\"column-2\">Medium [configurable software]<\/td>\n<\/tr>\n<tr class=\"row-4\">\n\t<td class=\"column-1\">Cost<\/td><td class=\"column-2\">120$-150$<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<div><\/div>\n<\/div>\n<div><\/div>\n<p><a title=\"Home Security System - Parts List\" href=\"diy-home-security-system-using-raspberry-pi?page=2\">Next Page:\u00a0Home Security System &#8211; Parts List<\/a><\/p>\n<p><!--nextpage--><\/p>\n<h2>DIY Home Security System\u00a0&#8211; Parts list<\/h2>\n<p>In this step, we will look at the parts needed for the security device. I have created a list \u00a0with all the parts. This is just a guideline, you can find all these products on other websites. Also if you have extra time you can probably find better deals or faster shipping times.<\/p>\n<div id=\"attachment_95\" style=\"width: 1210px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/teakdata.com\/blog\/wp-content\/uploads\/2015\/04\/security-device-parts_m.gif\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-95\" class=\"size-full wp-image-95\" src=\"http:\/\/teakdata.com\/blog\/wp-content\/uploads\/2015\/04\/security-device-parts_m.gif\" alt=\"Home Security Device - Parts List\" width=\"1200\" height=\"1152\" \/><\/a><p id=\"caption-attachment-95\" class=\"wp-caption-text\">Home Security Device &#8211; Parts List<\/p><\/div>\n<p>DIY security camera raspbery-pi<\/p>\n<p>Note: you can support &#8220;Daniel and Dad Laboratories&#8221; buying the products from Amazon (see list below)<\/p>\n\n<table id=\"tablepress-2\" class=\"tablepress tablepress-id-2\">\n<thead>\n<tr class=\"row-1\">\n\t<td class=\"column-1\"><\/td><th class=\"column-2\">Part<\/th><th class=\"column-3\">Buy on Amazon<\/th><th class=\"column-4\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody class=\"row-striping row-hover\">\n<tr class=\"row-2\">\n\t<td class=\"column-1\">1<\/td><td class=\"column-2\">Case<\/td><td class=\"column-3\"><a href=\"http:\/\/www.amazon.com\/gp\/product\/B005T56U1O\/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B005T56U1O&amp;linkCode=as2&amp;tag=teakdata-20&amp;linkId=CVX2JKYU5I7YJ6S6\"><img decoding=\"async\" border=\"0\" src=\"http:\/\/ws-na.amazon-adsystem.com\/widgets\/q?_encoding=UTF8&amp;ASIN=B005T56U1O&amp;Format=_SL110_&amp;ID=AsinImage&amp;MarketPlace=US&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=teakdata-20\" ><\/a><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/ir-na.amazon-adsystem.com\/e\/ir?t=teakdata-20&amp;l=as2&amp;o=1&amp;a=B005T56U1O\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" style=\"border:none !important; margin:0px !important;\" \/><\/td><td class=\"column-4\">a spacious case will allow more sensors and connectors to be added in the future<\/td>\n<\/tr>\n<tr class=\"row-3\">\n\t<td class=\"column-1\">2<\/td><td class=\"column-2\">Raspberry Pi B+<\/td><td class=\"column-3\"><a href=\"http:\/\/www.amazon.com\/gp\/product\/B00LPESRUK\/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B00LPESRUK&amp;linkCode=as2&amp;tag=teakdata-20&amp;linkId=JTCOAI4EHVDXAZX5\"><img decoding=\"async\" border=\"0\" src=\"http:\/\/ws-na.amazon-adsystem.com\/widgets\/q?_encoding=UTF8&amp;ASIN=B00LPESRUK&amp;Format=_SL110_&amp;ID=AsinImage&amp;MarketPlace=US&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=teakdata-20\" ><\/a><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/ir-na.amazon-adsystem.com\/e\/ir?t=teakdata-20&amp;l=as2&amp;o=1&amp;a=B00LPESRUK\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" style=\"border:none !important; margin:0px !important;\" \/><br \/>\n<\/td><td class=\"column-4\">Raspberry Pi B <br \/>\nRaspberry Pi B+<br \/>\nRaspberry Pi Model 2<\/td>\n<\/tr>\n<tr class=\"row-4\">\n\t<td class=\"column-1\">3<\/td><td class=\"column-2\">Camera<\/td><td class=\"column-3\"><a href=\"http:\/\/www.amazon.com\/gp\/product\/B00G76YEU8\/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B00G76YEU8&amp;linkCode=as2&amp;tag=teakdata-20&amp;linkId=K4OBZGAL6FRLBNXM\"><img decoding=\"async\" border=\"0\" src=\"http:\/\/ws-na.amazon-adsystem.com\/widgets\/q?_encoding=UTF8&amp;ASIN=B00G76YEU8&amp;Format=_SL110_&amp;ID=AsinImage&amp;MarketPlace=US&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=teakdata-20\" ><\/a><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/ir-na.amazon-adsystem.com\/e\/ir?t=teakdata-20&amp;l=as2&amp;o=1&amp;a=B00G76YEU8\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" style=\"border:none !important; margin:0px !important;\" \/><br \/>\n<\/td><td class=\"column-4\">It is possible to use the regular camera (not the IR one)<\/td>\n<\/tr>\n<tr class=\"row-5\">\n\t<td class=\"column-1\">4<\/td><td class=\"column-2\">Micro SD card<\/td><td class=\"column-3\"><a href=\"http:\/\/www.amazon.com\/gp\/product\/B008EODGHS\/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B008EODGHS&amp;linkCode=as2&amp;tag=teakdata-20&amp;linkId=QXPK5LIQ4NCFLVRL\"><img decoding=\"async\" border=\"0\" src=\"http:\/\/ws-na.amazon-adsystem.com\/widgets\/q?_encoding=UTF8&amp;ASIN=B008EODGHS&amp;Format=_SL110_&amp;ID=AsinImage&amp;MarketPlace=US&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=teakdata-20\" ><\/a><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/ir-na.amazon-adsystem.com\/e\/ir?t=teakdata-20&amp;l=as2&amp;o=1&amp;a=B008EODGHS\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" style=\"border:none !important; margin:0px !important;\" \/><\/td><td class=\"column-4\">Recommended Class 10 with 8G or more<\/td>\n<\/tr>\n<tr class=\"row-6\">\n\t<td class=\"column-1\">5<\/td><td class=\"column-2\">WiFi Usb Dongle<\/td><td class=\"column-3\"><a href=\"http:\/\/www.amazon.com\/gp\/product\/B00FWMEFES\/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B00FWMEFES&amp;linkCode=as2&amp;tag=teakdata-20&amp;linkId=IVOMO6N4NFLK2UNO\"><img decoding=\"async\" border=\"0\" src=\"http:\/\/ws-na.amazon-adsystem.com\/widgets\/q?_encoding=UTF8&amp;ASIN=B00FWMEFES&amp;Format=_SL110_&amp;ID=AsinImage&amp;MarketPlace=US&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=teakdata-20\" ><\/a><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/ir-na.amazon-adsystem.com\/e\/ir?t=teakdata-20&amp;l=as2&amp;o=1&amp;a=B00FWMEFES\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" style=\"border:none !important; margin:0px !important;\" \/><\/td><td class=\"column-4\"><\/td>\n<\/tr>\n<tr class=\"row-7\">\n\t<td class=\"column-1\">6<\/td><td class=\"column-2\">Door Magnetic Switch<\/td><td class=\"column-3\"><a href=\"http:\/\/www.amazon.com\/gp\/product\/B001DEUUZC\/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B001DEUUZC&amp;linkCode=as2&amp;tag=teakdata-20&amp;linkId=5PAYLUM5LD476P7P\"><img decoding=\"async\" border=\"0\" src=\"http:\/\/ws-na.amazon-adsystem.com\/widgets\/q?_encoding=UTF8&amp;ASIN=B001DEUUZC&amp;Format=_SL110_&amp;ID=AsinImage&amp;MarketPlace=US&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=teakdata-20\" ><\/a><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/ir-na.amazon-adsystem.com\/e\/ir?t=teakdata-20&amp;l=as2&amp;o=1&amp;a=B001DEUUZC\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" style=\"border:none !important; margin:0px !important;\" \/><br \/>\n<\/td><td class=\"column-4\"><\/td>\n<\/tr>\n<tr class=\"row-8\">\n\t<td class=\"column-1\">7<\/td><td class=\"column-2\">Male breadboard jumpers wires<\/td><td class=\"column-3\"><a href=\"http:\/\/www.amazon.com\/gp\/product\/B00JUL60WM\/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B00JUL60WM&amp;linkCode=as2&amp;tag=teakdata-20&amp;linkId=HZPKJJZDLVFCT6MC\"><img decoding=\"async\" border=\"0\" src=\"http:\/\/ws-na.amazon-adsystem.com\/widgets\/q?_encoding=UTF8&amp;ASIN=B00JUL60WM&amp;Format=_SL110_&amp;ID=AsinImage&amp;MarketPlace=US&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=teakdata-20\" ><\/a><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/ir-na.amazon-adsystem.com\/e\/ir?t=teakdata-20&amp;l=as2&amp;o=1&amp;a=B00JUL60WM\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" style=\"border:none !important; margin:0px !important;\" \/><\/td><td class=\"column-4\">any wire that has one end a male breadboard jumper<\/td>\n<\/tr>\n<tr class=\"row-9\">\n\t<td class=\"column-1\">8<\/td><td class=\"column-2\">Micro Usb charger<\/td><td class=\"column-3\"><a href=\"http:\/\/www.amazon.com\/gp\/product\/B00LNSHGYQ\/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B00LNSHGYQ&amp;linkCode=as2&amp;tag=teakdata-20&amp;linkId=LA3IMIIAREOBHFUP\"><img decoding=\"async\" border=\"0\" src=\"http:\/\/ws-na.amazon-adsystem.com\/widgets\/q?_encoding=UTF8&amp;ASIN=B00LNSHGYQ&amp;Format=_SL110_&amp;ID=AsinImage&amp;MarketPlace=US&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=teakdata-20\" ><\/a><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/ir-na.amazon-adsystem.com\/e\/ir?t=teakdata-20&amp;l=as2&amp;o=1&amp;a=B00LNSHGYQ\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" style=\"border:none !important; margin:0px !important;\" \/><\/td><td class=\"column-4\">Optional, you can use any charger with at least 1A output<\/td>\n<\/tr>\n<tr class=\"row-10\">\n\t<td class=\"column-1\">9<\/td><td class=\"column-2\">Shrink Tubing Wrap Sleeves<\/td><td class=\"column-3\"><a href=\"http:\/\/www.amazon.com\/gp\/product\/B005W42SW2\/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B005W42SW2&amp;linkCode=as2&amp;tag=teakdata-20&amp;linkId=X63OK7MF3P2EEVPW\"><img decoding=\"async\" border=\"0\" src=\"http:\/\/ws-na.amazon-adsystem.com\/widgets\/q?_encoding=UTF8&amp;ASIN=B005W42SW2&amp;Format=_SL110_&amp;ID=AsinImage&amp;MarketPlace=US&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=teakdata-20\" ><\/a><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/ir-na.amazon-adsystem.com\/e\/ir?t=teakdata-20&amp;l=as2&amp;o=1&amp;a=B005W42SW2\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" style=\"border:none !important; margin:0px !important;\" \/><\/td><td class=\"column-4\">Optional, electrical tape can be used.<\/td>\n<\/tr>\n<tr class=\"row-11\">\n\t<td class=\"column-1\">10<\/td><td class=\"column-2\">Speaker wire<\/td><td class=\"column-3\"><a href=\"http:\/\/www.amazon.com\/gp\/product\/B006LW0WDQ\/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B006LW0WDQ&amp;linkCode=as2&amp;tag=teakdata-20&amp;linkId=5LID3YU7OQNJVPLH\"><img decoding=\"async\" border=\"0\" src=\"http:\/\/ws-na.amazon-adsystem.com\/widgets\/q?_encoding=UTF8&amp;ASIN=B006LW0WDQ&amp;Format=_SL110_&amp;ID=AsinImage&amp;MarketPlace=US&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=teakdata-20\" ><\/a><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/ir-na.amazon-adsystem.com\/e\/ir?t=teakdata-20&amp;l=as2&amp;o=1&amp;a=B006LW0WDQ\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" style=\"border:none !important; margin:0px !important;\" \/><br \/>\n<\/td><td class=\"column-4\">Measure distance from door to device, can be shorter<\/td>\n<\/tr>\n<tr class=\"row-12\">\n\t<td class=\"column-1\">11<\/td><td class=\"column-2\">Resistor 1k<\/td><td class=\"column-3\"><a href=\"http:\/\/www.amazon.com\/gp\/product\/B00B5R8950\/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B00B5R8950&amp;linkCode=as2&amp;tag=teakdata-20&amp;linkId=VT3M2EYO2563GMQ6\"><img decoding=\"async\" border=\"0\" src=\"http:\/\/ws-na.amazon-adsystem.com\/widgets\/q?_encoding=UTF8&amp;ASIN=B00B5R8950&amp;Format=_SL110_&amp;ID=AsinImage&amp;MarketPlace=US&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=teakdata-20\" ><\/a><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/ir-na.amazon-adsystem.com\/e\/ir?t=teakdata-20&amp;l=as2&amp;o=1&amp;a=B00B5R8950\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" style=\"border:none !important; margin:0px !important;\" \/><\/td><td class=\"column-4\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<!-- #tablepress-2 from cache -->\n<p>Also you have to prepare the tools that you probably already own<\/p>\n\n<table id=\"tablepress-3\" class=\"tablepress tablepress-id-3\">\n<thead>\n<tr class=\"row-1\">\n\t<th class=\"column-1\">Tool<\/th><td class=\"column-2\"><\/td><td class=\"column-3\"><\/td>\n<\/tr>\n<\/thead>\n<tbody class=\"row-striping row-hover\">\n<tr class=\"row-2\">\n\t<td class=\"column-1\">Soldering Iron<\/td><td class=\"column-2\"><a href=\"http:\/\/www.amazon.com\/gp\/product\/B0006NGZK0\/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B0006NGZK0&amp;linkCode=as2&amp;tag=teakdata-20&amp;linkId=DZVKYNM4WGHQR2KJ\"><img decoding=\"async\" border=\"0\" src=\"http:\/\/ws-na.amazon-adsystem.com\/widgets\/q?_encoding=UTF8&amp;ASIN=B0006NGZK0&amp;Format=_SL110_&amp;ID=AsinImage&amp;MarketPlace=US&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=teakdata-20\" ><\/a><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/ir-na.amazon-adsystem.com\/e\/ir?t=teakdata-20&amp;l=as2&amp;o=1&amp;a=B0006NGZK0\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" style=\"border:none !important; margin:0px !important;\" \/><br \/>\n<\/td><td class=\"column-3\">Optional<\/td>\n<\/tr>\n<tr class=\"row-3\">\n\t<td class=\"column-1\">Soldering Wire<\/td><td class=\"column-2\"><a href=\"http:\/\/www.amazon.com\/gp\/product\/B00EYXP0IG\/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B00EYXP0IG&amp;linkCode=as2&amp;tag=teakdata-20&amp;linkId=VERX643AK4VGHZGF\"><img decoding=\"async\" border=\"0\" src=\"http:\/\/ws-na.amazon-adsystem.com\/widgets\/q?_encoding=UTF8&amp;ASIN=B00EYXP0IG&amp;Format=_SL110_&amp;ID=AsinImage&amp;MarketPlace=US&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=teakdata-20\" ><\/a><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/ir-na.amazon-adsystem.com\/e\/ir?t=teakdata-20&amp;l=as2&amp;o=1&amp;a=B00EYXP0IG\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" style=\"border:none !important; margin:0px !important;\" \/><\/td><td class=\"column-3\">Optional<\/td>\n<\/tr>\n<tr class=\"row-4\">\n\t<td class=\"column-1\">Hot Glue Gun<\/td><td class=\"column-2\"><a href=\"http:\/\/www.amazon.com\/gp\/product\/B003L264JA\/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B003L264JA&amp;linkCode=as2&amp;tag=teakdata-20&amp;linkId=MCB4JZM64GBV2DLJ\"><img decoding=\"async\" border=\"0\" src=\"http:\/\/ws-na.amazon-adsystem.com\/widgets\/q?_encoding=UTF8&amp;ASIN=B003L264JA&amp;Format=_SL110_&amp;ID=AsinImage&amp;MarketPlace=US&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=teakdata-20\" ><\/a><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/ir-na.amazon-adsystem.com\/e\/ir?t=teakdata-20&amp;l=as2&amp;o=1&amp;a=B003L264JA\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" style=\"border:none !important; margin:0px !important;\" \/><br \/>\n<\/td><td class=\"column-3\">Optional<\/td>\n<\/tr>\n<tr class=\"row-5\">\n\t<td class=\"column-1\">Glue Sticks<\/td><td class=\"column-2\"><a href=\"http:\/\/www.amazon.com\/gp\/product\/B0000BYD4Y\/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B0000BYD4Y&amp;linkCode=as2&amp;tag=teakdata-20&amp;linkId=2O2U5VWG77N3UKWL\"><img decoding=\"async\" border=\"0\" src=\"http:\/\/ws-na.amazon-adsystem.com\/widgets\/q?_encoding=UTF8&amp;ASIN=B0000BYD4Y&amp;Format=_SL110_&amp;ID=AsinImage&amp;MarketPlace=US&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=teakdata-20\" ><\/a><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/ir-na.amazon-adsystem.com\/e\/ir?t=teakdata-20&amp;l=as2&amp;o=1&amp;a=B0000BYD4Y\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" style=\"border:none !important; margin:0px !important;\" \/><br \/>\n<\/td><td class=\"column-3\">Optional<\/td>\n<\/tr>\n<tr class=\"row-6\">\n\t<td class=\"column-1\">Screwdriver<\/td><td class=\"column-2\"><a href=\"http:\/\/www.amazon.com\/gp\/product\/B00CDIY3HS\/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B00CDIY3HS&amp;linkCode=as2&amp;tag=teakdata-20&amp;linkId=OAAVW3KCYARRCBRT\"><img decoding=\"async\" border=\"0\" src=\"http:\/\/ws-na.amazon-adsystem.com\/widgets\/q?_encoding=UTF8&amp;ASIN=B00CDIY3HS&amp;Format=_SL110_&amp;ID=AsinImage&amp;MarketPlace=US&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=teakdata-20\" ><\/a><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/ir-na.amazon-adsystem.com\/e\/ir?t=teakdata-20&amp;l=as2&amp;o=1&amp;a=B00CDIY3HS\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" style=\"border:none !important; margin:0px !important;\" \/><br \/>\n<\/td><td class=\"column-3\">Optional<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<!-- #tablepress-3 from cache -->\n<p><a title=\"Next Page\" href=\"..\/3\">Next\u00a0Page: Home Security System &#8211; Hardware assembling<\/a><\/p>\n<p><!--nextpage--><\/p>\n<h2>DIY Home Security System &#8211; Hardware assembling<\/h2>\n<p>In this step we will prepare the hardware at the prototype level. A few wire cutting and soldering is required. \u00a0At the end when we have validated the working prototype we will assemble the final product.<\/p>\n<p>Prepare the wires, solder the resistor on one wire (be sure you add the shrink tube\u00a0before soldering. The long wire connected to the door should be measured to cover the distance from door to the device.<\/p>\n<p><a href=\"http:\/\/teakdata.com\/blog\/wp-content\/uploads\/2015\/04\/security-device-wires.gif\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-119 size-full\" src=\"http:\/\/teakdata.com\/blog\/wp-content\/uploads\/2015\/04\/security-device-wires.gif\" alt=\"Home Security Device - cut and strip the wires\" width=\"1200\" height=\"800\" \/><\/a><\/p>\n<p>Home Security Device &#8211; cut and strip the wires<\/p>\n<div id=\"attachment_120\" style=\"width: 1210px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/teakdata.com\/blog\/wp-content\/uploads\/2015\/04\/security-device-wires-soldered.gif\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-120\" class=\"wp-image-120 size-full\" src=\"http:\/\/teakdata.com\/blog\/wp-content\/uploads\/2015\/04\/security-device-wires-soldered.gif\" alt=\"Home Security Device - solder wires and resistor \" width=\"1200\" height=\"800\" \/><\/a><p id=\"caption-attachment-120\" class=\"wp-caption-text\">Home Security Device &#8211; solder wires and resistor<\/p><\/div>\n<div id=\"attachment_124\" style=\"width: 1210px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/teakdata.com\/blog\/wp-content\/uploads\/2015\/04\/security-device-wires_hshrink.gif\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-124\" class=\"wp-image-124 size-full\" src=\"http:\/\/teakdata.com\/blog\/wp-content\/uploads\/2015\/04\/security-device-wires_hshrink.gif\" alt=\"Home Security Device - heat the shrink pipe\" width=\"1200\" height=\"801\" \/><\/a><p id=\"caption-attachment-124\" class=\"wp-caption-text\">Home Security Device &#8211; heat the shrink pipe<\/p><\/div>\n<p>Connect the jumpers to pin 1 and 27. <a title=\"Raspberry PI GPIO documentation\" href=\"http:\/\/www.raspberrypi.org\/documentation\/usage\/gpio\" target=\"_blank\" rel=\"noopener noreferrer\">See\u00a0Raspberry PI GPIO documentation<\/a><\/p>\n<div id=\"attachment_122\" style=\"width: 1210px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/teakdata.com\/blog\/wp-content\/uploads\/2015\/04\/security-device-wires-connect-pi.gif\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-122\" class=\"wp-image-122 size-full\" src=\"http:\/\/teakdata.com\/blog\/wp-content\/uploads\/2015\/04\/security-device-wires-connect-pi.gif\" alt=\"Home Security Device - connect wire jumpers to GPIO raspberry pi pins\" width=\"1200\" height=\"800\" \/><\/a><p id=\"caption-attachment-122\" class=\"wp-caption-text\">Home Security Device &#8211; connect wire jumpers to GPIO raspberry pi pins<\/p><\/div>\n<p>Connect the end of long wire to the magnetic sensor using screws.<\/p>\n<div id=\"attachment_128\" style=\"width: 1210px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/teakdata.com\/blog\/wp-content\/uploads\/2015\/04\/security-device-connect_sensor.gif\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-128\" class=\"wp-image-128 size-full\" src=\"http:\/\/teakdata.com\/blog\/wp-content\/uploads\/2015\/04\/security-device-connect_sensor.gif\" alt=\"Home Security Device - connect magnetic sensor\" width=\"1200\" height=\"896\" \/><\/a><p id=\"caption-attachment-128\" class=\"wp-caption-text\">Home Security Device &#8211; connect magnetic sensor<\/p><\/div>\n<p>Connect the camera following <a title=\"Raspberry Pi Camera tutorial\" href=\"https:\/\/www.raspberrypi.org\/help\/camera-module-setup\" target=\"_blank\" rel=\"noopener noreferrer\">the Raspberry Pi Camera tutorial<\/a>.<\/p>\n<p>Plug also the WIFI dongle into one of the USB ports.<\/p>\n<div id=\"attachment_134\" style=\"width: 1210px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/teakdata.com\/blog\/wp-content\/uploads\/2015\/04\/security-device-all-connected.gif\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-134\" class=\"size-full wp-image-134\" src=\"http:\/\/teakdata.com\/blog\/wp-content\/uploads\/2015\/04\/security-device-all-connected.gif\" alt=\"Home Security System - assembled hardware prototype\" width=\"1200\" height=\"800\" \/><\/a><p id=\"caption-attachment-134\" class=\"wp-caption-text\">Home Security System &#8211; assembled hardware prototype<\/p><\/div>\n<p>&nbsp;<\/p>\n<p><a title=\"Home Security System - Software Configuration\" href=\"..\/4\">Next Page: Home Security System &#8211; Software Configuration<\/a><\/p>\n<p><!--nextpage--><\/p>\n<h2>DIY Home Security System &#8211; Software Configuration<\/h2>\n<p>In this step we will install the OS (Operating System) on the SD card.<\/p>\n<p>Download latest Raspbian OS from <a title=\"Raspberry Pi Download Page\" href=\"https:\/\/www.raspberrypi.org\/downloads\">Raspberry Pi Download Page<\/a><\/p>\n<p>Install Raspian OS on the SD card following the instruction at \u00a0<a title=\"Raspberry pi Installing Operating System \" href=\"https:\/\/www.raspberrypi.org\/documentation\/installation\/installing-images\/\">INSTALLING OPERATING SYSTEM IMAGES<\/a><\/p>\n<p>After installing the OS on the SD card, you are ready to start your Raspberry Pi.<\/p>\n<p><strong>Connect the Raspberry Pi to the network router using a network cable. <\/strong><\/p>\n<p>For the next step you have two options: 1. connect the raspberry pi to a monitor and keyboard or 2. connect to raspberry pi using ssh from another computer (in case 2 \u00a0you don&#8217;t need monitor and keyboard)<\/p>\n<h2>Scenario 1 &#8211; Connect Raspberry Pi using a TV\/Monitor and keyboard<\/h2>\n<p>Use a HDMI cable to connect the Raspberry Pi to a TV or to a monitor that supports HDMI. Connect the keyboard to one of the USB ports.<\/p>\n<p>Plug the power cable on the Raspberry Pi (the micro usb connector).<\/p>\n<p>Login with user pi, password raspberry<\/p>\n<p>Continue with &#8220;Install Wifi configuration tools&#8221;<\/p>\n<h2>Scenario 2 &#8211; Connect to Raspberry Pi using SSH from another computer<\/h2>\n<p>If you don&#8217;t have a TV or Monitor that supports HDMI, you can\u00a0connect directly from another computer using SSH.<\/p>\n<p>First step is to detect what IP was assigned to your Raspberry Pi.<\/p>\n<p>Using a browser connect to your Router [e.g. <a title=\"http:\/\/192.168.1.1\" href=\"http:\/\/192.168.1.1\" target=\"_blank\" rel=\"noopener noreferrer\">http:\/\/192.168.1.1<\/a>]. After you login with your router credentials, browse the list of connected devices (each router has a different page for this feature). Because your device is currently connected with a network cable, you should look at that section.<\/p>\n<p>You can also consult he detailed documentation <a title=\"how to detect your ip\" href=\"https:\/\/www.raspberrypi.org\/documentation\/troubleshooting\/hardware\/networking\/ip-address.md\" target=\"_blank\" rel=\"noopener noreferrer\">how to detect your Raspberry Pi IP<\/a><\/p>\n<p>After you have the Raspberry Pi computer IP, from your machine run ssh to connect remotely. [Note: if you are on a Mac or Linux, the ssh is already installed, on Windows you have to manually install ssh, see documentation <a title=\"how to install ssh on windows\" href=\"https:\/\/www.raspberrypi.org\/documentation\/remote-access\/ssh\/windows.md\" target=\"_blank\" rel=\"noopener noreferrer\">how to install ssh on windows<\/a>]<\/p>\n<p>Run the SSH tool [putty.exe for windows or ssh command in a terminal for Mac] and login with username pi, password raspberry.<\/p>\n<h2>Install Wifi configuration tools<\/h2>\n<p>run the update for the OS:<\/p>\n<pre><code>sudo apt-get update<\/code><\/pre>\n<p>install a command line tool to configure the WIFI:<\/p>\n<pre><code>sudo apt-get install wicd-curses<\/code><\/pre>\n<p>run the wifi tool<\/p>\n<pre><code>sudo wicd-curses<\/code><\/pre>\n<div id=\"attachment_163\" style=\"width: 1316px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/teakdata.com\/blog\/wp-content\/uploads\/2015\/04\/security-device-wifi-config.gif\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-163\" class=\"wp-image-163 size-full\" src=\"http:\/\/teakdata.com\/blog\/wp-content\/uploads\/2015\/04\/security-device-wifi-config.gif\" alt=\"Home Security Device - wifi config tool\" width=\"1306\" height=\"722\" border=\"1\" \/><\/a><p id=\"caption-attachment-163\" class=\"wp-caption-text\">Home Security Device &#8211; wifi config tool<\/p><\/div>\n<p>Using arrows keys, select your Wifi Network and press right arrow key to edit its properties. Type your wifi password in the Key section. Also check the &#8220;Automatically connect to this network&#8221; checkbox. Press F10 to save.<\/p>\n<div id=\"attachment_165\" style=\"width: 1316px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/teakdata.com\/blog\/wp-content\/uploads\/2015\/04\/security-device-wifi-config2.gif\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-165\" class=\"size-full wp-image-165\" src=\"http:\/\/teakdata.com\/blog\/wp-content\/uploads\/2015\/04\/security-device-wifi-config2.gif\" alt=\"Home Security Device - wifi config \" width=\"1306\" height=\"730\" \/><\/a><p id=\"caption-attachment-165\" class=\"wp-caption-text\">Home Security Device &#8211; wifi config<\/p><\/div>\n<p>In the first screen (the list of networks) if you connect to the wifi (capital C) then you will be disconnected from the wired connection and the current ssh session. What I suggest is to exit (capital Q) and reboot the Raspberry Pi: &#8220;sudo reboot&#8221; and disconnect the network cable.<\/p>\n<p>After 2-3 minutes, check again your router to find the new IP of you Raspberry Pi (now a wifi) and connect using SSH to the new ip.<\/p>\n<p><a title=\"DIY Home Security System - Install and configure the door sensors application\" href=\"..\/5\">Next Page: DIY Home Security System &#8211; Install and configure the door sensors application<\/a><\/p>\n<p><!--nextpage--><\/p>\n<h2>DIY Home Security System &#8211; Install and configure the door sensors application<\/h2>\n<p>In this step we look at the <a title=\"Door Sensor software\" href=\"https:\/\/github.com\/smarcu\/door-sensor\">door-sensor <\/a>software.<\/p>\n<p>All the commands on this page are executed on the raspberry pi box. See previous page for tips to connect remotely using ssh.<\/p>\n<p>In order to run java programs install the JDK<\/p>\n<p>First, check if you have java pre-installed<\/p>\n<pre class=\"p1\">java -version<\/pre>\n<p>my current output is<\/p>\n<pre class=\"p1\"><span class=\"s1\">java version \"1.8.0\"\r\nJava(TM) SE Runtime Environment (build 1.8.0-b132)\r\nJava HotSpot(TM) Client VM (build 25.0-b70, mixed mode)<\/span><\/pre>\n<p>If you get an error or you have an older version of java, install the java 8 JDK:<\/p>\n<pre class=\"p1\"><span class=\"s1\">sudo apt-get install oracle-java8-jdk<\/span><\/pre>\n<p>Re-run the java -version command to verify the installation.<\/p>\n<p>Download the doorsensors build<\/p>\n<pre class=\"p1\"><span class=\"s1\">cd ~\r\nwget http:\/\/teakdata.com\/doorsensor\/doorsensor-1.0.0-SNAPSHOT-bin.zip<\/span><\/pre>\n<p>Unzip the package<\/p>\n<pre class=\"p1\"><span class=\"s1\">unzip doorsensor-1.0.0-SNAPSHOT-bin.zip<\/span><\/pre>\n<p>At this point you should see the folder doorsensor-1.0.0-SNAPSHOT<\/p>\n<pre>ls doorsensor-1.0.0-SNAPSHOT<\/pre>\n<p>The above command should list all the files in the new folder:<\/p>\n<pre class=\"p1\"><em><span class=\"s1\">door.properties<span class=\"Apple-converted-space\">\u00a0 <\/span><\/span><span class=\"s2\"><b>door.sh<\/b><\/span><span class=\"s1\"><span class=\"Apple-converted-space\">\u00a0 <\/span><\/span><span class=\"s3\"><b>lib<\/b><\/span><\/em><\/pre>\n<p>Edit the configuration file door.properties, I am using the nano editor. After finished your changes, to save press CTRL-o and press enter to save to existing file. To exit press CTRL-x<\/p>\n<pre>cd ~\/doorsensor-1.0.0-SNAPSHOT\r\nnano door.properties<\/pre>\n<p>The main changes you should do in the door.properties file are related to your email configuration.<\/p>\n<p>IMPORTANT: it is a good idea to not use your main email, you can create a test gmail account to use it with the device. As &#8220;email.to&#8221; you can use your real email to receive notifications.<\/p>\n<p>The sample has preconfigured values for GMAIL accounts (smtp host, port).<\/p>\n<pre>#destination email to send the pictures\r\nemail.to=your_real_email@gmail.com\r\n#sender email\r\nemail.from=your_test_email@gmail.com\r\n#smtp server configuration\r\nemail.smtp.host=smtp.gmail.com\r\nemail.smtp.port=587\r\nemail.smtp.user=your_test_email\r\nemail.smtp.passwd=yourpassword<\/pre>\n<p>We are now ready to start the application.<\/p>\n<pre>cd ~\/doorsensor-1.0.0-SNAPSHOT\r\nsudo .\/door.sh<\/pre>\n<p>The application is running and the logs are now displayed on the console. To close the application use CTRL-C<\/p>\n<p>&nbsp;<\/p>\n<p><a title=\"DIY Home Security System - Final Assembly\" href=\"..\/6\">Next Page: DIY Home Security System &#8211; Final Assembly<\/a><br \/>\n<!--nextpage--><\/p>\n<h2>DIY Home Security System &#8211; Final Assembly<\/h2>\n<p>At this stage we have all the parts assembled and the software running.<\/p>\n<p>Now we need to wrap everything nicely and place the device in a spot where it can view the monitored entrance.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>DIY Home Security System using Raspberry Pi The Raspberry Pi computer is being used in many projects around the world. Inexpensive, small and powerful, this credit card size computer enables you to implement cool&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":95,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,12,10],"tags":[4,6,3,5],"class_list":["post-33","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-daniel-dad-laboratories","category-linux","category-raspberrypi","tag-daniel-dad-laboratories","tag-project","tag-raspberry-pi","tag-security"],"_links":{"self":[{"href":"https:\/\/teakdata.com\/blog\/wp-json\/wp\/v2\/posts\/33","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/teakdata.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/teakdata.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/teakdata.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/teakdata.com\/blog\/wp-json\/wp\/v2\/comments?post=33"}],"version-history":[{"count":90,"href":"https:\/\/teakdata.com\/blog\/wp-json\/wp\/v2\/posts\/33\/revisions"}],"predecessor-version":[{"id":302,"href":"https:\/\/teakdata.com\/blog\/wp-json\/wp\/v2\/posts\/33\/revisions\/302"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/teakdata.com\/blog\/wp-json\/wp\/v2\/media\/95"}],"wp:attachment":[{"href":"https:\/\/teakdata.com\/blog\/wp-json\/wp\/v2\/media?parent=33"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/teakdata.com\/blog\/wp-json\/wp\/v2\/categories?post=33"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/teakdata.com\/blog\/wp-json\/wp\/v2\/tags?post=33"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}