- Security camera 1080p
- Power Bank 10400mah
- 102/5000A camera module or usb camera
- A microsd card
- An HDMI cable
- Raspberry Pi and camera in (optional)
wget https://github.com/ccrisan/motioneye/wiki/precompiled/ffmpeg_3.1.1-1_armhf.debdpkg -i ffmpeg_3.1.1-1_armhf.deb
Get started with the Motion Eye
There are several different software that can be used to turn your Raspberry Pi into a monitoring system. In this guide we use Motion Eye OS, which you can download via this link. Motion Eye is quick to install and offers a smooth user interface directly in the browser.
Be sure to download the version that matches your Raspberry Pi model. After downloading the image file, insert it on your micro-sd card. If you use a Windows computer, i recommend that you do so with 7zip. If you sit on a Mac, I suggest Applepi-Baker.
When you start your Raspberry Pi, after a few minutes, you will see an ip address that dials into the url field of a web browser on a computer. The address takes you to the user interface of the Motion Eye. Note that if you do not have an extra monitor to connect your Raspberry Pi, you can log in to your router’s user interface and use the ip address of the Raspberry Pi instead.
Increase security and set up Wifi
As you probably notice as you scroll around, there are a lot of settings you can do in the Motion Eye to customize your system. The first thing you should do is set your username and password.
Click the person icon in the upper left corner. Enter admin as user name and leave the password field blank. Then click on the second icon to open the setup menu. Check Advanced Settings under General Settings and enter your own user name and password in the Admin username and Admin Password fields. When you’re done, click the Apply button that pops up at the top of the list.
Set the camera
Now is the time to look at some of the settings you can do with the camera itself. Our first tip is to change the name of the camera from generic “Camera1” to a more descriptive name, such as “Garage” and “Living room”.
Raspberry Pi surveillance camera
If you want to connect more cameras to your system, you can add them via the dropdown menu in the upper left corner. Just click the add camera… and add the cameras you connected to the Motioneye. It is possible to connect multiple cameras to one and the same Raspberry Pi, but we recommend that – if possible – use a Raspberry Pi for each camera you set up. Otherwise, it will have a major impact on performance and video quality.
Motion Eye is preset to start recording if the camera detects motion. However, it can be changed so that the camera records continuously. You do this under the Movies tab. There you can also regulate the length of the recordings. For example, if you want the camera to record clips for up to ten seconds, enter it. Finally, you can also specify how long you want the system to save the recorded video files.
Image quality settings can be found under the Video Device tab. Among other things, you can set the number of images per second and resolution. Try some different settings to find the balance that suits you best. I run at 30 frames per second and the resolution is 800×400. If you prioritize high image quality, you can specify that the system should capture still images under the Still images tab.
If you know that you will record a lot and at the same time want high image quality, we strongly recommend that you connect an external memory to your Raspberry Pi. Under the File Storage tab, you can specify the path to this memory. Here you can also choose whether to upload your media files to external services such as Google Drive, Dropbox or to an FTP server.
Connect to the Motion Eye outside your network
The default setting in the Motion Eye allows you to see only your camera broadcasts when connected to your home network. If you want access via the regular web, you need to do a “port forwarding” in your router settings. How you do it varies depending on the router you are using. Take a look at your manual or do a search on Google. Generally, it’s about defining a port you can use with the ip address in Raspberry Po. To access Motion Eye, enter your external ip address (you can find it easily through a quick Google search) followed by your defined port number in the url field. For example, if you are using port 80, write xx.xx.xx.x: 80.
Last but not least, it is of course nice to get a message when your camera system has recorded new material. You can choose to receive different types of notifications, both on e-mail and webhook notifications, under the Motion Notification tab.
Hopefully you have now started and got a good overview of your system. Good luck with the building!
INSTALL MOTION EYE
Install On Raspbian
- These instructions apply only to an up-to-date Raspbian Stretch.
- All commands require root; use
sudobefore each command or become root using
- If you want to use the CSI camera module for the Raspberry PI, make sure you have enabled it in
apt-get install ffmpeg libmariadb3 libpq5 libmicrohttpd12
wget https://github.com/Motion-Project/motion/releases/download/release-4.2.2/pi_buster_motion_4.2.2-1_armhf.deb dpkg -i pi_buster_motion_4.2.2-1_armhf.debnote: Raspbian Buster comes with
motionversion 4.1; it is however recommended that you install version 4.2, as indicated above
- Install the dependencies from the repositories:
apt-get install python-pip python-dev libssl-dev libcurl4-openssl-dev libjpeg-dev libz-dev
motioneye, which will automatically pull Python dependencies (
pip install motioneyenote: If
pillowinstallation fails, you can try installing it from official repos using
apt-get install python-pillow.
- Prepare the configuration directory:
mkdir -p /etc/motioneye cp /usr/local/share/motioneye/extra/motioneye.conf.sample /etc/motioneye/motioneye.conf
- Prepare the media directory:
mkdir -p /var/lib/motioneye
- Add an init script, configure it to run at startup and start the
cp /usr/local/share/motioneye/extra/motioneye.systemd-unit-local /etc/systemd/system/motioneye.service systemctl daemon-reload systemctl enable motioneye systemctl start motioneye
- To upgrade to the newest version of motionEye, just issue:
pip install motioneye --upgrade systemctl restart motioneye
Step 2: Installing Motion and prerequisites
We then need to install motion.
sudo apt-get install motion
As you probably know,
ffmpeg is missing from the official Debian repos. Moreover, the variant offered by deb-multimedia.org no longer works with Raspbian after recent updates. You can either compile it yourself (not recommended) or download this prebuilt package and install it:
dpkg -i ffmpeg_3.1.1-1_armhf.deb
We finally install all the prerequisites:
apt-get install python-pip python-dev curl libssl-dev libcurl4-openssl-dev libjpeg-dev libx264-142 libavcodec56 libavformat56 libmysqlclient18 libswscale3 libpq5
Step 3: Installing Motioneye
To install motioneye we can use pip.
pip install motioneye
- Prepare the configuration directory:
mkdir -p /etc/motioneye cp
2. Prepare the media directory:
mkdir -p /var/lib/motioneye
3. Add an init script, configure it to run at startup and start the
/etc/systemd/system/motioneye.service systemctl daemon-reload
systemctl enable motioneye systemctl start motioneye
Step 4: Running the application!
Once you have everything installed, visit your raspberry’s IP address with the port number 8765.