With the rapid advancement of smart camera technologies, setting up your own surveillance system has become easier and more affordable. MotionEye OS is a powerful solution that transforms your Orange Pi Zero 2W into a full-fledged video surveillance system. In this article, we will guide you through the installation and configuration of MotionEye OS on Orange Pi Zero 2W running Debian Linux.
What is MotionEye OS?
MotionEye OS is a lightweight, open-source operating system designed for use with motion detection cameras.
It allows you to manage multiple camera feeds, record videos, capture images, and send notifications based on motion events. With its web interface, you can monitor your cameras remotely, making it an ideal solution for DIY security projects.
Requirements
Before you start, ensure you have the following:
- Orange Pi Zero 2W: This single-board computer With Dabian linux pre installed on the SD will serve as the host for MotionEye OS.
- Micro SD Card (Minimum 32GB): For installing the OS.
- Power Supply: Ensure it provides adequate power to the Orange Pi.
- Internet Connection: For network access and updates.
- USB Camera or Compatible IP Camera: To provide the video feed.
Instructions
- Update and Upgrade fresh install of Ubuntu 20.04 or newer.
sudo apt update && sudo apt upgrade -y
- Install
ssh
,curl
,motion
,ffmpeg
andv4l-utils
:apt-get install ssh curl motion ffmpeg v4l-utils -y reboot
- Install the python 2.7 and pip2: (enter as separate lines, do not copy/paste as a group)
apt-get install python2 -y curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py python2 get-pip.py There will be a warning that python 2.7 and pip2 are outdated and will not be updated This is normal and to be expected, as Python 2.7 is beyond EOL, as is pip2. When motionEye is updated to Python3, these messages will go away.
- Install all prerequisites: (enter as separate lines, do not copy/paste as a group)
apt-get install libffi-dev libzbar-dev libzbar0 -y apt-get install python2-dev libssl-dev libcurl4-openssl-dev libjpeg-dev -y
- Install
motioneye
, which will automatically pull Python dependencies (tornado
,jinja2
,pillow
andpycurl
):pip2 install motioneye
- 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
motionEye
server: - To upgrade to the newest version of motionEye, just issue:
pip2 install motioneye --upgrade systemctl restart motioneye