{"id":1979,"date":"2020-02-24T19:12:03","date_gmt":"2020-02-24T11:12:03","guid":{"rendered":"https:\/\/www.techcoil.com\/blog\/?p=1979"},"modified":"2020-12-12T22:48:44","modified_gmt":"2020-12-12T14:48:44","slug":"how-to-setup-a-raspberry-pi-security-camera-with-motioneyeos","status":"publish","type":"post","link":"https:\/\/www.techcoil.com\/blog\/how-to-setup-a-raspberry-pi-security-camera-with-motioneyeos\/","title":{"rendered":"How to setup a Raspberry Pi security camera with motionEyeOS"},"content":{"rendered":"<p>When you want to turn your unused Raspberry Pi into a security camera, you can take a look at <a href=\"https:\/\/github.com\/ccrisan\/motioneyeos\" rel=\"noopener\" target=\"_blank\">motionEyeOS<\/a>.<\/p>\n<p>So what is motionEyeOS? In short, motionEyeOS is a Linux distribution that turns your single board computer into a video surveillance system. Therefore, it is convenient to setup a Raspberry Pi security camera with motionEyeOS.<\/p>\n<p>Given these points, let us look at how we can setup a Raspberry Pi security camera with motionEyeOS.<\/p>\n<h2>Steps to setup a Raspberry Pi security camera with motionEyeOS<\/h2>\n<p>Typically, setting up a Raspberry Pi security camera with motionEyeOS involves the following steps:<\/p>\n<ol>\n<li>Gather the hardware parts for your Raspberry Pi security camera.<\/li>\n<li>Download the motionEyeOS image for the Raspberry Pi board version that you are using for the security camera.<\/li>\n<li>Install motionEyeOS on your microSD card.<\/li>\n<li>Assemble the hardware parts for your Raspberry Pi security camera.<\/li>\n<li>Get the IP address of your Raspberry Pi security camera.<\/li>\n<li>Configure motionEye settings for your Raspberry Pi security camera.<\/li>\n<\/ol>\n<h2>1. Gathering the hardware parts for your Raspberry Pi security camera<\/h2>\n<p>If you are an ardent fan of Raspberry Pi, then you may find it easy to gather the hardware parts. However, if you are unable to do so, here are hardware combinations that you can procure for your Raspberry Pi security camera:<\/p>\n<h3>Parts to build a Raspberry Pi Zero W security camera<\/h3>\n<ul>\n<li><a href=\"https:\/\/www.amazon.com\/CanaKit-Raspberry-Wireless-Official-Supply\/dp\/B071L2ZQZX\/ref=as_li_ss_tl?ie=UTF8&linkCode=ll1&tag=clivsperswebs-20&linkId=04fed713c9c8ed1b66a339bee783c1fe&language=en_US\" rel=\"noopener\" target=\"_blank\">CanaKit Raspberry Pi Zero W (Wireless) with Official Case and Power Supply<\/a><\/li>\n<li><a href=\"https:\/\/www.amazon.com\/SanDisk-128GB-microSDXC-Memory-Adapter\/dp\/B073JYC4XM\/ref=as_li_ss_tl?ie=UTF8&linkCode=ll1&tag=clivsperswebs-20&linkId=72cc34d8317cf3d0778892e69ca0b9b5&language=en_US\" rel=\"noopener\" target=\"_blank\">SanDisk Ultra 128GB microSDXC UHS-I card with Adapter<\/a><\/li>\n<li><a href=\"https:\/\/www.amazon.com\/seeed-studio-Raspberry-Megapixel-Compatible\/dp\/B07Z76QHBY\/ref=as_li_ss_tl?ie=UTF8&linkCode=ll1&tag=clivsperswebs-20&linkId=31ded8aa6e169cc6f4f7d17d247b4732&language=en_US\" rel=\"noopener\" target=\"_blank\">Raspberry Pi Camera Module V2 8 Megapixel 1080P<\/a><\/li>\n<\/ul>\n<h3>Parts to build a Raspberry Pi 3B+ security camera<\/h3>\n<ul>\n<li><a href=\"https:\/\/www.amazon.com\/CanaKit-Raspberry-Power-Supply-Listed\/dp\/B07BC6WH7V\/ref=as_li_ss_tl?ie=UTF8&linkCode=ll1&tag=clivsperswebs-20&linkId=4b6e978369572dfb85548021d87109f0&language=en_US\" rel=\"noopener\" target=\"_blank\">CanaKit Raspberry Pi 3 B+ (B Plus) with 2.5A Power Supply (UL Listed)<\/a><\/li>\n<li><a href=\"https:\/\/www.amazon.com\/Raspberry-Model-Case-Enclosure-Clear\/dp\/B00LV9ALGW\/ref=as_li_ss_tl?ie=UTF8&linkCode=ll1&tag=clivsperswebs-20&linkId=a711721f194aea59ce88d8c78ca8f07f&language=en_US\" rel=\"noopener\" target=\"_blank\">Raspberry Pi Model B+ Case Enclosure<\/a><\/li>\n<li><a href=\"https:\/\/www.amazon.com\/SanDisk-128GB-microSDXC-Memory-Adapter\/dp\/B073JYC4XM\/ref=as_li_ss_tl?ie=UTF8&linkCode=ll1&tag=clivsperswebs-20&linkId=72cc34d8317cf3d0778892e69ca0b9b5&language=en_US\" rel=\"noopener\" target=\"_blank\">SanDisk Ultra 128GB microSDXC UHS-I card with Adapter<\/a><\/li>\n<li><a href=\"https:\/\/www.amazon.com\/seeed-studio-Raspberry-Megapixel-Compatible\/dp\/B07Z76QHBY\/ref=as_li_ss_tl?ie=UTF8&linkCode=ll1&tag=clivsperswebs-20&linkId=31ded8aa6e169cc6f4f7d17d247b4732&language=en_US\" rel=\"noopener\" target=\"_blank\">Raspberry Pi Camera Module V2 8 Megapixel 1080P<\/a><\/li>\n<li><a href=\"https:\/\/www.amazon.com\/Rankie-Snagless-Ethernet-5-Pack-5-Color\/dp\/B01J8K0XK4\/ref=as_li_ss_tl?ie=UTF8&linkCode=ll1&tag=clivsperswebs-20&linkId=f28b551f34c34084334f8d629eb7c552&language=en_US\" rel=\"noopener\" target=\"_blank\">RJ45 cable<\/a> (if you wish to connect your Raspberry Pi to the switch port of your router)<\/li>\n<\/ul>\n<h3>Parts to install motionEyeOS onto the microSD card<\/h3>\n<ul>\n<li>If your computer does not have a microSD card drive, then you will need to get a <a href=\"https:\/\/www.amazon.com\/Vanja-Reader-Adapter-RS-MMC-Windows\/dp\/B07MBD66GZ\/ref=as_li_ss_tl?ie=UTF8&linkCode=ll1&tag=clivsperswebs-20&linkId=a3291143633330d538d750afcd5ea822&language=en_US\" rel=\"noopener\" target=\"_blank\">microSD card adapter<\/a>.<\/li>\n<li>In order for Raspberry Pi Zero W to communicate with your computer, you need to have a <a href=\"https:\/\/www.amazon.com\/s\/ref=as_li_ss_tl?k=2.4GHz+wifi+router&ref=nb_sb_noss_2&linkCode=ll2&tag=clivsperswebs-20&linkId=bb5b7076e836e6c8079c1268fbcd9ece&language=en_US\" rel=\"noopener\" target=\"_blank\">router that supports 2.4GHz WiFi network<\/a>.<\/li>\n<\/ul>\n<h2>2. Downloading the latest motionEyeOS image for the Raspberry Pi board version that you are using for the security camera<\/h2>\n<p>Once you have gotten the hardware parts to build your security camera, proceed to download a copy of motionEyeOS image. Given that, go to <a href=\"https:\/\/github.com\/ccrisan\/motioneyeos\/releases\/latest\" rel=\"noopener\" target=\"_blank\">motionEyeOS latest release page<\/a> with your web browser to find the image for your security camera. <\/p>\n<p>When you do so, you should find a list of motionEyeOS images to download. For example, I got the following list at this point of writing:<br \/>\n<img decoding=\"async\" width=\"880\" height=\"626\" src=\"https:\/\/www.techcoil.com\/blog\/wp-content\/uploads\/motionEyeOS-20190911-release-page-on-Github.gif\" alt=\"motionEyeOS 20190911 release page on Github\" class=\"aligncenter size-full wp-image-1985\" \/><\/p>\n<p>So which motionEyeOS should you download? As shown above, you should look for an image with <strong>raspberrypi<\/strong> as part of the file name. In addition to that, you should download the one with the same version number as the Raspberry Pi board that you choose. When you have a Raspberry Pi Zero W, you will download the image for Raspberry Pi version 1. <\/p>\n<p>If you are using a <strong>Raspberry Pi Zero W<\/strong>, then you will download <strong>motioneyeos-raspberrypi-20190911.img.xz<\/strong>.<\/p>\n<p>However, if you are using a <strong>Raspberry Pi 3B+<\/strong>, then you will download <strong>motioneyeos-raspberrypi3-20190911.img.xz<\/strong>.<\/p>\n<h2>3. Installing motionEyeOS on your microSD card<\/h2>\n<p>Once you have downloaded a copy of motionEyeOS for your Raspberry Pi security camera, install it onto your microSD card.<\/p>\n<p>In order to do so, you will need a tool like <a href=\"https:\/\/www.balena.io\/etcher\" rel=\"noopener\" target=\"_blank\">balenaEtcher<\/a>. Given that, insert your microSD card into the microSD card drive\/adapter of your computer and flash the image onto your microSD card:<br \/>\n<img decoding=\"async\" width=\"800\" height=\"480\" src=\"https:\/\/www.techcoil.com\/blog\/wp-content\/uploads\/writing-motioneyeos-raspberrypi-20190911.img-onto-microSD-card-with-balenaEtcher-on-macOS.gif\" alt=\"writing motioneyeos-raspberrypi-20190911.img onto microSD card with balenaEtcher on macOS\"  class=\"aligncenter size-full wp-image-1986\" \/><\/p>\n<h3>Making your Raspberry Pi security camera connect to WiFi on first boot<\/h3>\n<p>If you are connecting your Raspberry Pi security camera through your WiFi network, then you may want to make it do so on first boot. <\/p>\n<p>In order to do so, prepare a <code>wpa_supplicant.conf<\/code> file with the following contents:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nupdate_config=1\r\nctrl_interface=\/var\/run\/wpa_supplicant\r\n \r\nnetwork={\r\n        scan_ssid=1\r\n        ssid=&quot;wifiSsid&quot;\r\n        psk=&quot;wifiPassword&quot; \r\n}\r\n<\/pre>\n<p>Once you have done so, reinsert your microSD card into the drive\/adapter. When your computer detects your microSD card again, copy the file into the root directory of your microSD card:<br \/>\n<img decoding=\"async\" width=\"878\" height=\"653\" src=\"https:\/\/www.techcoil.com\/blog\/wp-content\/uploads\/root-directory-of-motioneyeos-raspberrypi-20190911.img-after-pasting-wpa_supplicant.gif\" alt=\"root directory of motioneyeos-raspberrypi-20190911.img after pasting wpa_supplicant\" class=\"aligncenter size-full wp-image-1987\" \/><\/p>\n<h2>4. Assembling the hardware parts for your Raspberry Pi security camera<\/h2>\n<p>At this point in time, you are ready to assemble the hardware parts for your Raspberry Pi security camera.<\/p>\n<h3>For Raspberry Pi Zero W security camera<\/h3>\n<p><a href=\"https:\/\/www.techcoil.com\/blog\/connect-raspberry-pi-camera-module-raspberry-pi-zero-w-official-case\/\" rel=\"noopener\" target=\"_blank\">Connect Raspberry Pi camera module to Raspberry Pi Zero W and the official case<\/a>.<\/p>\n<h3>For Raspberry Pi 3B+ security camera<\/h3>\n<p><a href=\"https:\/\/www.techcoil.com\/blog\/connect-raspberry-pi-camera-module-raspberry-pi-2-raspberry-pi-3\/\" rel=\"noopener\" target=\"_blank\">Connect the Raspberry Pi Camera Module to Raspberry Pi 3B+<\/a> and put it into the case.<br \/>\nWhen you have done so, your Raspberry Pi security camera should look like the following:<br \/>\n<img decoding=\"async\" width=\"800\" height=\"600\" src=\"https:\/\/www.techcoil.com\/blog\/wp-content\/uploads\/raspberry-pi-zero-w-and-raspberry-pi-2-3-camera-with-mobile-phone-clips.jpg\" alt=\"Raspberry Pi Zero W and Raspberry Pi 2 3 camera with mobile phone clips\" class=\"aligncenter size-full wp-image-1082\" \/><\/p>\n<h2>5. Getting the IP address of your Raspberry Pi security camera<\/h2>\n<p>After you had assembled your Raspberry Pi security camera, supply power to it. If you are using an RJ45 cable, then connect the cable with your Raspberry Pi and switch port of your router.<\/p>\n<p>When motionEyeOS loads, it will get an IP address from your router. Therefore, you can either get the IP address from your router portal or an IP scanning tool.<\/p>\n<p>For example, if you are using a <a href=\"https:\/\/www.amazon.com\/Linksys-Dual-Band-Max-Stream-MU-Mimo-Wireless\/dp\/B019WAQMVY\/ref=as_li_ss_tl?ie=UTF8&linkCode=ll1&tag=clivsperswebs-20&linkId=1b6be69114ed5fe4bda1f96e7f8de077&language=en_US\" rel=\"noopener\" target=\"_blank\">Linksys router<\/a>, you can get the IP address of your Raspberry Pi security camera from Network map.<br \/>\n<img decoding=\"async\" width=\"515\" height=\"433\" src=\"https:\/\/www.techcoil.com\/blog\/wp-content\/uploads\/Linksys-network-map-entry-for-MEYE-56F13C6F.gif\" alt=\"Linksys network map entry for MEYE-56F13C6F\" class=\"aligncenter size-full wp-image-1989\" \/><\/p>\n<p>As shown above, motionEyeOS will take a hostname in the form <strong>MEYE-XXXXXXXX<\/strong>. In this case, the motionEyeOS had gotten <strong>192.168.1.136<\/strong> as the IP address.<\/p>\n<h2>6. Configuring motionEye settings for your Raspberry Pi security camera<\/h2>\n<p>Given the IP address that you had gotten, access it with a browser from a computer in the same network. When you do so, you will find a video stream from your Raspberry Pi security camera.<br \/>\n<img decoding=\"async\" width=\"959\" height=\"759\" src=\"https:\/\/www.techcoil.com\/blog\/wp-content\/uploads\/First-browser-screenshot-for-motioneyeos-raspberrypi-20190911.jpg\" alt=\"First browser screenshot for motioneyeos-raspberrypi-20190911\" class=\"aligncenter size-full wp-image-1990\" \/><\/p>\n<p>At this point in time, you will be able to configure motionEye settings for your Raspberry Pi security camera.<\/p>\n<h3>Changing the login credentials for the admin user and surveillance user<\/h3>\n<p>When you click on the second button at the top left corner, you will be presented with the login screen. In order to change the login credentials, you need to login as the admin user. Therefore, enter <strong>admin<\/strong> in the Username field, leave the Password field empty and click <strong>Login<\/strong>:<br \/>\n<img decoding=\"async\" width=\"959\" height=\"759\" src=\"https:\/\/www.techcoil.com\/blog\/wp-content\/uploads\/Login-screen-for-motioneyeos-raspberrypi-20190911-with-admin-in-the-Username-field.gif\" alt=\"Login screen for motioneyeos-raspberrypi-20190911 with admin in the Username field\" class=\"aligncenter size-full wp-image-1991\" \/><\/p>\n<p>After you had logged in, you will be presented with the video stream of your camera again. Next, click on the first button at the top left corner to access the settings drawer:<br \/>\n<img decoding=\"async\" width=\"959\" height=\"759\" src=\"https:\/\/www.techcoil.com\/blog\/wp-content\/uploads\/raspberrypi-20190911-with-settings-drawer-collapsed.gif\" alt=\"raspberrypi-20190911 with settings drawer collapsed\" class=\"aligncenter size-full wp-image-1992\" \/> <\/p>\n<p>In addition to the admin user, there is a surveillance user as well. While the admin user can configure every setting on your security camera, the surveillance user can only view the video feed.<\/p>\n<p>Another point to note is that we can create a custom username for the surveillance user but we cannot change the username for admin.<\/p>\n<p>Given these points, provide a value for <strong>Admin Password<\/strong>, <strong>Surveillance Username<\/strong> and <strong>Surveillance Password<\/strong>. Once you have done so, click <strong>Apply<\/strong> to save the changes.<br \/>\n<img decoding=\"async\" width=\"959\" height=\"759\" src=\"https:\/\/www.techcoil.com\/blog\/wp-content\/uploads\/raspberrypi-20190911-dashboard-with-Admin-Password-Surveillance-Username-and-Surveillance-Password-filled-up.jpg\" alt=\"raspberrypi-20190911 dashboard with Admin Password Surveillance Username and Surveillance Password filled up\" class=\"aligncenter size-full wp-image-1993\" \/><\/p>\n<h3>Changing video resolution of video feed<\/h3>\n<p>If you wish to increase the video resolution of your video feed, then you can do so via the <strong>Video Device<\/strong> section:<br \/>\n<img decoding=\"async\" src=\"https:\/\/www.techcoil.com\/blog\/wp-content\/uploads\/raspberrypi-20190911-dashboard-showing-video-resolution-settings.jpg\" alt=\"raspberrypi-20190911 dashboard showing video resolution settings\" class=\"aligncenter size-full wp-image-1994\" \/><\/p>\n<p>After you select your ideal video resolution, click on <strong>Apply<\/strong> to apply the changes. When you do so, you should see the video feed in the new resolution.<\/p>\n<h3>Enabling recording of still images and movies<\/h3>\n<p>If you wish to record your video feed, then you will want to enable recording of still images and movies:<br \/>\n<img decoding=\"async\" width=\"1064\" height=\"856\" src=\"https:\/\/www.techcoil.com\/blog\/wp-content\/uploads\/raspberrypi-20190911-dashboard-showing-Still-Images-and-Movies-settings.jpg\" alt=\"raspberrypi-20190911 dashboard showing Still Images and Movies settings\" class=\"aligncenter size-full wp-image-1996\" \/><\/p>\n<p>As shown above, you can also decide the mode of capture, preservation periods and other relevant configurations.<\/p>\n<h3>Configuring motionEye to only capture video if there are movements in particular sections of the surveillance area<\/h3>\n<p>When you only want motion detection to trigger if parts of the video feed changes, you can check out the <strong>Motion Detection<\/strong> section. Given that, this is <a href=\"https:\/\/www.techcoil.com\/blog\/how-to-configure-motioneye-to-only-capture-video-if-there-are-movements-in-particular-sections-of-the-surveillance-area\/\" rel=\"noopener\" target=\"_blank\">how to configure motionEye to only capture video if there are movements in particular sections of the surveillance area<\/a>.<\/p>\n<p><img decoding=\"async\" width=\"600\" height=\"900\" src=\"https:\/\/www.techcoil.com\/blog\/wp-content\/uploads\/How-to-setup-a-Raspberry-Pi-security-camera-with-motionEyeOS.jpg\" alt=\"How to setup a Raspberry Pi security camera with motionEyeOS\" class=\"aligncenter size-full wp-image-2020\" \/><\/p>\n\n      <ul id=\"social-sharing-buttons-list\">\n        <li class=\"facebook\">\n          <a href=\"https:\/\/www.facebook.com\/sharer\/sharer.php?u=https%3A%2F%2Fwp.me%2Fp245TQ-vV\" target=\"_blank\" role=\"button\" rel=\"nofollow\">\n            <img decoding=\"async\" src=\"\/ph\/img\/3rd-party\/social-icons\/Facebook.png\" alt=\"Facebook icon\"> Share\n          <\/a>\n        <\/li>\n        <li class=\"twitter\">\n          <a href=\"https:\/\/twitter.com\/intent\/tweet?text=&url=https%3A%2F%2Fwp.me%2Fp245TQ-vV&via=Techcoil_com\" target=\"_blank\" role=\"button\" rel=\"nofollow\">\n          <img decoding=\"async\" src=\"\/ph\/img\/3rd-party\/social-icons\/Twitter.png\" alt=\"Twitter icon\"> Tweet\n          <\/a>\n        <\/li>\n        <li class=\"linkedin\">\n          <a href=\"https:\/\/www.linkedin.com\/shareArticle?mini=1&title=&url=https%3A%2F%2Fwp.me%2Fp245TQ-vV&source=https:\/\/www.techcoil.com\" target=\"_blank\" role=\"button\" rel=\"nofollow\">\n          <img decoding=\"async\" src=\"\/ph\/img\/3rd-party\/social-icons\/linkedin.png\" alt=\"Linkedin icon\"> Share\n          <\/a>\n        <\/li>\n        <li class=\"pinterest\">\n          <a href=\"https:\/\/pinterest.com\/pin\/create\/button\/?url=https%3A%2F%2Fwww.techcoil.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F1979&description=\" class=\"pin-it-button\" target=\"_blank\" role=\"button\" rel=\"nofollow\" count-layout=\"horizontal\">\n          <img decoding=\"async\" src=\"\/ph\/img\/3rd-party\/social-icons\/Pinterest.png\" alt=\"Pinterest icon\"> Save\n          <\/a>\n        <\/li>\n      <\/ul>\n    ","protected":false},"excerpt":{"rendered":"<p>When you want to turn your unused Raspberry Pi into a security camera, you can take a look at <a href=\"https:\/\/github.com\/ccrisan\/motioneyeos\" rel=\"noopener\" target=\"_blank\">motionEyeOS<\/a>.<\/p>\n<p>So what is motionEyeOS? In short, motionEyeOS is a Linux distribution that turns your single board computer into a video surveillance system. Therefore, it is convenient to setup a Raspberry Pi security camera with motionEyeOS.<\/p>\n<p>Given these points, let us look at how we can setup a Raspberry Pi security camera with motionEyeOS.<\/p>\n","protected":false},"author":1,"featured_media":1992,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"footnotes":""},"categories":[4],"tags":[275,277,484,411,240,410,163],"jetpack_featured_media_url":"https:\/\/www.techcoil.com\/blog\/wp-content\/uploads\/raspberrypi-20190911-with-settings-drawer-collapsed.gif","jetpack_shortlink":"https:\/\/wp.me\/p245TQ-vV","jetpack-related-posts":[],"jetpack_likes_enabled":true,"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.techcoil.com\/blog\/wp-json\/wp\/v2\/posts\/1979"}],"collection":[{"href":"https:\/\/www.techcoil.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.techcoil.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.techcoil.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.techcoil.com\/blog\/wp-json\/wp\/v2\/comments?post=1979"}],"version-history":[{"count":0,"href":"https:\/\/www.techcoil.com\/blog\/wp-json\/wp\/v2\/posts\/1979\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.techcoil.com\/blog\/wp-json\/wp\/v2\/media\/1992"}],"wp:attachment":[{"href":"https:\/\/www.techcoil.com\/blog\/wp-json\/wp\/v2\/media?parent=1979"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.techcoil.com\/blog\/wp-json\/wp\/v2\/categories?post=1979"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.techcoil.com\/blog\/wp-json\/wp\/v2\/tags?post=1979"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}