{"id":79369,"date":"2019-01-03T13:14:08","date_gmt":"2019-01-03T13:14:08","guid":{"rendered":"https:\/\/randomnerdtutorials.com\/?p=79369"},"modified":"2019-04-02T10:23:16","modified_gmt":"2019-04-02T10:23:16","slug":"raspberry-pi-motion-detector-photo-capture","status":"publish","type":"post","link":"https:\/\/randomnerdtutorials.com\/raspberry-pi-motion-detector-photo-capture\/","title":{"rendered":"Raspberry Pi Motion Detector with Photo Capture"},"content":{"rendered":"<p>This project shows how to take photos with a Raspberry Pi when motion is detected. It can be used as a burglar detector, to take wildlife photos or in other applications. We&#8217;ll be using a Raspberry Pi V2 camera and the code will be written in Python programming language.<!--more--><\/p>\n<p><img data-recalc-dims=\"1\" fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter size-full wp-image-79437\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/01\/burglar_detector_thumbnail.jpg?resize=1200%2C675&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"\" width=\"1200\" height=\"675\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/01\/burglar_detector_thumbnail.jpg?w=1280&amp;quality=100&amp;strip=all&amp;ssl=1 1280w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/01\/burglar_detector_thumbnail.jpg?resize=300%2C169&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/01\/burglar_detector_thumbnail.jpg?resize=768%2C432&amp;quality=100&amp;strip=all&amp;ssl=1 768w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/01\/burglar_detector_thumbnail.jpg?resize=1024%2C576&amp;quality=100&amp;strip=all&amp;ssl=1 1024w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/><\/p>\n<p><strong>Note:<\/strong> <em>this project is an excerpt from our &#8220;<a href=\"https:\/\/randomnerdtutorials.com\/20-easy-raspberry-pi-projects-book\/\" target=\"_blank\" rel=\"noopener noreferrer\">20 Easy Raspberry Pi Projects<\/a>&#8221; book. If you want to build electronics projects with the Raspberry\u00a0Pi using Python, we recommend reading\u00a0<a href=\"https:\/\/randomnerdtutorials.com\/20-easy-raspberry-pi-projects-book\/\">our Raspberry Pi Projects book<\/a>. It&#8217;s available in digital and paperback version.\u00a0<\/em><\/p>\n<h2>Prerequisites<\/h2>\n<ul>\n<li>You should be familiar with the\u00a0<a href=\"https:\/\/makeradvisor.com\/raspberry-pi-board\/\" target=\"_blank\" rel=\"noopener noreferrer\">Raspberry Pi<\/a>\u00a0board \u2013\u00a0<a href=\"https:\/\/randomnerdtutorials.com\/getting-started-with-raspberry-pi\/\" target=\"_blank\" rel=\"noopener noreferrer\">read Getting Started with Raspberry Pi<\/a><\/li>\n<li>Install the <a href=\"https:\/\/www.raspberrypi.org\/downloads\/\">Raspbian or NOOBS operating system<\/a> on your Raspberry Pi<\/li>\n<li>For an introduction to the Raspberry Pi Camera V2 module read:\u00a0<a href=\"https:\/\/randomnerdtutorials.com\/guide-to-raspberry-pi-camera-v2-module\/\">Guide to Raspberry Pi Camera V2 Module<\/a><\/li>\n<\/ul>\n<p>You might also like:\u00a0<a href=\"https:\/\/randomnerdtutorials.com\/best-raspberry-pi-camera-for-your-project\/\">What\u2019s the Best Raspberry Pi Camera For Your Project?<\/a><\/p>\n<h2>Parts Required<\/h2>\n<ul>\n<li><a href=\"https:\/\/makeradvisor.com\/tools\/raspberry-pi-board\/\">Raspberry Pi<\/a> &#8211; read <a href=\"https:\/\/makeradvisor.com\/best-raspberry-pi-3-starter-kits\/\">Best Raspberry Pi Starter Kits<\/a><\/li>\n<li><a href=\"https:\/\/makeradvisor.com\/tools\/mb-102-solderless-breadboard-830-points\/\">Breadboard<\/a><\/li>\n<li><a href=\"https:\/\/makeradvisor.com\/tools\/raspberry-pi-camera-v2-module\/\">Raspberry Pi Camera Module v2<\/a><\/li>\n<li><a href=\"https:\/\/makeradvisor.com\/tools\/pir-motion-sensor-hc-sr501\/\">HC-SR501 PIR motion sensor<\/a><\/li>\n<li><a href=\"https:\/\/makeradvisor.com\/tools\/pushbuttons-kit\/\">Pushbutton<\/a><\/li>\n<li><a href=\"https:\/\/makeradvisor.com\/tools\/jumper-wires-kit-120-pieces\/\">Jumper wires<\/a><\/li>\n<\/ul>\n<h2>Project Overview<\/h2>\n<p>The circuit for this project consists of a PIR motion sensor, a pushbutton, and a camera module you\u2019ll connect to your Pi. The pushbutton is an extra component that allows you to stop the Python script.<\/p>\n<p><img data-recalc-dims=\"1\" decoding=\"async\" class=\"aligncenter size-full wp-image-79434\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/01\/motion-detector-with-photo-capture-750.jpg?resize=750%2C499&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"\" width=\"750\" height=\"499\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/01\/motion-detector-with-photo-capture-750.jpg?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/01\/motion-detector-with-photo-capture-750.jpg?resize=300%2C200&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/p>\n<p>To program the Raspberry Pi we&#8217;ll be using a Python script and the built-in <em>picamera<\/em> library, which makes it very simple to control the camera. To control the GPIOs we&#8217;ll be using the <em>gpiozero<\/em> library that contains classes for most popular components like pushbuttons, LEDs, motion sensor, etc.<\/p>\n<h2>Enable the Camera<\/h2>\n<p>You need to enable your Raspberry Pi\u2019s camera software before you can use the camera module. In the desktop environment, go to the main menu and select <strong>Preferences\u00a0<\/strong>&gt;\u00a0<strong>Raspberry<\/strong> <strong>Pi Configuration<\/strong>. Select the <b>Interfaces\u00a0<\/b>tab and a window as shown below should open.<\/p>\n<p><img data-recalc-dims=\"1\" decoding=\"async\" class=\"aligncenter size-full wp-image-41866\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/08\/Figure-13-3.png?resize=508%2C429&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"\" width=\"508\" height=\"429\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/08\/Figure-13-3.png?w=508&amp;quality=100&amp;strip=all&amp;ssl=1 508w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/08\/Figure-13-3.png?resize=300%2C253&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 508px) 100vw, 508px\" \/><\/p>\n<p>Alternatively, in the Terminal window, type the following command:<\/p>\n<pre>pi@raspberry:~ $ <strong>sudo raspi-config<\/strong><\/pre>\n<p>You should see the Raspberry Pi software configuration tool. Select the <strong>Interfacing Options<\/strong>:<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-41873\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/08\/Interfacing-options.png?resize=959%2C270&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"\" width=\"959\" height=\"270\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/08\/Interfacing-options.png?w=959&amp;quality=100&amp;strip=all&amp;ssl=1 959w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/08\/Interfacing-options.png?resize=300%2C84&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/08\/Interfacing-options.png?resize=768%2C216&amp;quality=100&amp;strip=all&amp;ssl=1 768w\" sizes=\"(max-width: 959px) 100vw, 959px\" \/><\/p>\n<p>Enable the camera and reboot your Pi:<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-41874\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/08\/enable-camera-raspi-config.png?resize=960%2C270&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"\" width=\"960\" height=\"270\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/08\/enable-camera-raspi-config.png?w=960&amp;quality=100&amp;strip=all&amp;ssl=1 960w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/08\/enable-camera-raspi-config.png?resize=300%2C84&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/08\/enable-camera-raspi-config.png?resize=768%2C216&amp;quality=100&amp;strip=all&amp;ssl=1 768w\" sizes=\"(max-width: 960px) 100vw, 960px\" \/><\/p>\n<h2>Connect the Camera<\/h2>\n<p>With the camera software enabled, shut down your Pi and then connect the camera to the CSI port. Make sure the camera is connected with the blue letters facing up and oriented as shown in the following figure. Then start up your Pi again.<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-41868\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/08\/connectcamera-1.jpg?resize=516%2C406&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"\" width=\"516\" height=\"406\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/08\/connectcamera-1.jpg?w=516&amp;quality=100&amp;strip=all&amp;ssl=1 516w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/08\/connectcamera-1.jpg?resize=300%2C236&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 516px) 100vw, 516px\" \/><\/p>\n<h2>Build the Circuit<\/h2>\n<p>With the camera connected, follow the next\u00a0 schematic diagram to wire the rest of the circuit.<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-79415\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/01\/pir-motion-sensor-with-raspberry-pi.jpg?resize=750%2C628&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"\" width=\"750\" height=\"628\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/01\/pir-motion-sensor-with-raspberry-pi.jpg?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/01\/pir-motion-sensor-with-raspberry-pi.jpg?resize=300%2C251&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/p>\n<ul>\n<li><strong>Pushbutton<\/strong>: GPIO 2<\/li>\n<li><strong>PIR motion sensor<\/strong>: GPIO 4<\/li>\n<\/ul>\n<p><strong>Note:<\/strong> the PIR motion sensor we&#8217;re using in this project should be powered using the 5V pin. Other sensors required 3.3V to operate. Read your sensor&#8217;s specifications before wiring the circuit.<\/p>\n<h2>Writing the Script<\/h2>\n<p>To control the camera, you\u2019ll use the built-in <em>picamera<\/em> library. Here\u2019s an overview of what the code should do:<\/p>\n<ol>\n<li>Initialize the camera.<\/li>\n<li>Take a photo when the PIR motion sensor detects movement.<\/li>\n<li>Save the photos in your Desktop folder.<\/li>\n<li>Name the photos incrementally so you know what order they were taken in\u2014for example, <em>image_1.jpg<\/em>, <em>image_2.jpg<\/em>, and so on.<\/li>\n<li>Stop the camera when the pushbutton is pressed. If you don\u2019t include this feature, you won\u2019t be able to exit the camera preview that pops up on your screen.<\/li>\n<\/ol>\n<h3>Entering the script<\/h3>\n<p>Create a new file using Python 3 (IDLE) and copy the following code. Then, save the code in the Desktop folder with the following name: <em>burglar_detector.py<\/em>.<\/p>\n<pre style=\"max-height: 40em; margin-bottom: 20px;\"><code class=\"language-c\">#Project 13 - Burglar Detector With Photo Capture\n#latest code updates available at: https:\/\/github.com\/RuiSantosdotme\/RaspberryPiProject\n#project updates at: https:\/\/nostarch.com\/RaspberryPiProject\n\n#import the necessary packages\nfrom gpiozero import Button, MotionSensor\nfrom picamera import PiCamera\nfrom time import sleep\nfrom signal import pause\n\n#create objects that refer to a button,\n#a motion sensor and the PiCamera\nbutton = Button(2)\npir = MotionSensor(4)\ncamera = PiCamera()\n\n#start the camera\ncamera.rotation = 180\ncamera.start_preview()\n\n#image image names\ni = 0\n\n#stop the camera when the pushbutton is pressed\ndef stop_camera():\n    camera.stop_preview()\n    #exit the program\n    exit()\n\n#take photo when motion is detected\ndef take_photo():\n    global i\n    i = i + 1\n    camera.capture('\/home\/pi\/Desktop\/image_%s.jpg' % i)\n    print('A photo has been taken')\n    sleep(10)\n\n#assign a function that runs when the button is pressed\nbutton.when_pressed = stop_camera\n#assign a function that runs when motion is detected\npir.when_motion = take_photo\n\npause()\n<\/code><\/pre>\n\t<p style=\"text-align:center\"><a class=\"rntwhite\" href=\"https:\/\/github.com\/RuiSantosdotme\/RaspberryPiProject\/raw\/master\/Code\/Project_13\/burglar_detector.py\" target=\"_blank\">View raw code<\/a><\/p>\n<h3>How the code works<\/h3>\n<p>First you import the necessary libraries; as we\u2019ve said, the program uses the <em>picamera<\/em> library to control the camera. The <em>gpiozero<\/em> library contains classes to control the pushbutton and the motion sensor: <em>Button<\/em> and <em>MotionSensor<\/em>. The <em>sleep<\/em> method allows us to deal with delays, and the <em>pause<\/em>\u00a0method is used to handle interrupts.<\/p>\n<pre>from gpiozero import Button, MotionSensor\r\nfrom picamera import PiCamera\r\nfrom time import sleep\r\nfrom signal import pause<\/pre>\n<p>Then, you create objects to refer to the pushbutton, the PIR motion sensor, and the camera. The pushbutton is on GPIO 2 and the motion sensor on GPIO 4.<\/p>\n<pre>button = Button(2)\r\npir = MotionSensor(4)\r\ncamera = PiCamera()<\/pre>\n<p>Then, initialize the camera with <em>camera.start_preview()<\/em>.<\/p>\n<pre>camera.start_preview()<\/pre>\n<p>Depending on how your camera is oriented, you might also need to rotate it 180 degrees so that it doesn\u2019t take the photos upside down.<\/p>\n<pre>camera.rotation = 180<\/pre>\n<p>Next, you initialize an <em>i<\/em> variable that starts at 0.<\/p>\n<pre>i = 0<\/pre>\n<p>Then, we create the <em>stop_camera()<\/em> and the <em>take_photo()<\/em> functions that will be called later in the code.<\/p>\n<p>The <em>take_photo()<\/em> function, will use the <em>i<\/em> variable to count and number the images, incrementing the number in the filename by one with each picture taken.<\/p>\n<pre>def take_photo():\r\n  global i\r\n  i = i + 1\r\n  camera.capture('\/home\/pi\/Desktop\/image_%s.jpg' % i)\r\n  print('A photo has been taken')\r\n  sleep(10)<\/pre>\n<p>To take and save a photo you use the <em>camera.capture()<\/em> method, specifying the directory you want to save the image to inside the parentheses. In this case, we\u2019re saving the images in the Desktop folder and naming the images <em>image_%s.jpg<\/em>, where <em>%s<\/em> is replaced with the number we incremented earlier in <em>i<\/em>.<\/p>\n<p>If you want to save your files to a different folder, replace this directory with the path to your chosen folder. You then impose a 10-second delay, meaning the camera takes photos at 10-second intervals for as long as the PIR sensor detects movement. Feel free to increase or decrease the delay time, but be careful to not overload the Pi with tons of images by making the delay time too small.<\/p>\n<p>The <em>stop_camera()<\/em> function stops the camera with the <em>camera.stop_preview()<\/em> method.<\/p>\n<pre>def stop_camera():\r\n  camera.stop_preview()\r\n  #exit the program\r\n  exit()<\/pre>\n<p>This function stops the camera preview and exits the program. The <em>exit()<\/em> function pops up a window asking if you want to close the program; to close it, just click OK.<\/p>\n<p>Finally, you define that when the pushbutton is pressed, the cameras stops.<\/p>\n<pre>button.when_pressed = stop_camera<\/pre>\n<p>Finally, you tell the camera to take a photo by triggering the <em>take_photo()<\/em> function when motion is detected.<\/p>\n<pre>pir.when_motion = take_photo<\/pre>\n<p>The <em>pause()<\/em> at the end of the code keeps your program running so that interrupts can be detected.<\/p>\n<h2>Demonstration<\/h2>\n<p>If your&#8217;re using Python IDLE to write your code, press <strong>F5<\/strong> or go to <strong>Run<\/strong> &gt; <strong>Run Module<\/strong> to run the script. While the script is running, you should see a preview of what the camera sees on your screen. To shut down the camera preview, press the pushbutton and click <strong>OK<\/strong> in the window that pops up.<\/p>\n<p>Alternatively, in the Terminal window you can type:<\/p>\n<pre>pi@raspberrypi:~ $ <strong>python3 burglar_detector.py<\/strong><\/pre>\n<p>Congratulations, you project is ready to detect motion and take some photos. You can place this project in a strategic place and come back later to check any saved photos. The following figure shows a photo taken by this project.<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-79431\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/01\/motion-detector-with-photo-burglar.jpg?resize=750%2C600&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"\" width=\"750\" height=\"600\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/01\/motion-detector-with-photo-burglar.jpg?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/01\/motion-detector-with-photo-burglar.jpg?resize=300%2C240&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/p>\n<h2>Wrapping Up<\/h2>\n<p>Using cameras with the Raspberry Pi is an easy task and can be applied to a wide variety of projects. The <em>picamera<\/em> and <em>gpiozero<\/em> libraries give you an easy way to control the camera and GPIOs with the Raspberry Pi.<\/p>\n<p>We have other projects with cameras and Raspberry Pi that you may like:<\/p>\n<ul>\n<li><a href=\"https:\/\/randomnerdtutorials.com\/video-streaming-with-raspberry-pi-camera\/\">Video Streaming with Raspberry Pi Camera<\/a><\/li>\n<li><a href=\"https:\/\/randomnerdtutorials.com\/car-plate-recognition-system-with-raspberry-pi-and-node-red\/\" target=\"_blank\" rel=\"noopener noreferrer\">Car Plate Recognition System with Raspberry Pi and Node-RED<\/a><\/li>\n<li><a href=\"https:\/\/randomnerdtutorials.com\/cctv-raspberry-pi-based-system-storage-motioneyeos\/\" target=\"_blank\" rel=\"noopener noreferrer\">CCTV Raspberry Pi Based System with Storage using MotionEyeOS<\/a><\/li>\n<li><a href=\"https:\/\/randomnerdtutorials.com\/projects-raspberry-pi\/\">More projects with RPi&#8230;<\/a><\/li>\n<\/ul>\n<p>This is an excerpt from our book &#8220;<a href=\"https:\/\/randomnerdtutorials.com\/20-easy-raspberry-pi-projects-book\/\" target=\"_blank\" rel=\"noopener noreferrer\">20 Easy Raspberry Pi Projects<\/a>&#8220;. For an overview of our book, you can watch the video below.<\/p>\n<p style=\"text-align:center\"><iframe width=\"720\" height=\"405\" src=\"https:\/\/www.youtube.com\/embed\/6FyOsMHQDqg?rel=0\" frameborder=\"0\" allowfullscreen><\/iframe><\/p>\n<p><strong><a href=\"https:\/\/randomnerdtutorials.com\/20-easy-raspberry-pi-projects-book\/\" target=\"_blank\" rel=\"noopener noreferrer\">\u00bb Get a copy (paperback version) of our Raspberry Pi book \u00bb<\/a><\/strong><\/p>\n<p>We hope you&#8217;ve found this project useful.<\/p>\n<p>Thank you for reading!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This project shows how to take photos with a Raspberry Pi when motion is detected. It can be used as a burglar detector, to take wildlife photos or in other &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"Raspberry Pi Motion Detector with Photo Capture\" class=\"read-more button\" href=\"https:\/\/randomnerdtutorials.com\/raspberry-pi-motion-detector-photo-capture\/#more-79369\" aria-label=\"Read more about Raspberry Pi Motion Detector with Photo Capture\">CONTINUE READING \u00bb<\/a><\/p>\n","protected":false},"author":5,"featured_media":79437,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[301,225,264,268,190,192],"tags":[],"class_list":["post-79369","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-0-raspberrypi","category-home-automation","category-project","category-raspberry-pi-project","category-raspberry-pi","category-r-tutorials"],"aioseo_notices":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/01\/burglar_detector_thumbnail.jpg?fit=1280%2C720&quality=100&strip=all&ssl=1","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/posts\/79369","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/comments?post=79369"}],"version-history":[{"count":0,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/posts\/79369\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/media\/79437"}],"wp:attachment":[{"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/media?parent=79369"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/categories?post=79369"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/tags?post=79369"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}