Installing MotionEye on a Linksys WRT3200ACM With OpenWrt


Introduction: Installing MotionEye on a Linksys WRT3200ACM With OpenWrt

Needing a security camera system for my house I visited the inter-webs for an open source option. This led me to the Motioneye's web frontend to the Motion daemon for linux. This project by Calin Crisan (MotionEye) is just what the doctored ordered. It has advanced feature and is easy to setup and use.

Next setting out to find a suitable platform to run MotionEye's on it's wiki states you can run it on a plethora of Linux OS's so I initially thought, great, I'll use my PI. At the same time I just bought a Linksys WRT3200ACM router for which I installed OpenWrt on it. So while setting up OpenWrt and installing packages, I remembered that there were instructions on the MotionEye's wiki to "Install On Other Distributions". Following the wiki's instructions and with a few modifications, voilà, I had Motioneye working right on my Linksys WRT3200ACM router, cool!

This guide will show the steps to install Motioneye's on a Linksys WRT3200ACM router which could possibly work for other routers too.

Step 1: Getting Started:

I installed everything through command line, you can also use Luci to install packages but will have ssh into the router to finish this guide.

SSH into your router, from a fresh install of OpenWrt it's

Copy and paste these commnds below:

ssh root@

Step 2: Use Opkg to Install Needed Packages:

These are the minimum number of packages requied to run MotionEye.

Copy and paste these commnds below:

opkg update

opkg install python

opkg install curl

opkg install motion

opkg install ffmpeg

opkg install v4l-utils

opkg install python-pip

opkg install python-dev

opkg install python-curl

opkg install pillow

# optional for this tutorial

opkg install nano

Step 3: Upgrade 'setuptools' and Install Motioneye:

MotionEye's is written in python, use PIP to download and install it.

Copy and paste these commnds below:

pip install --upgrade setuptools

pip install motioneye

Step 4: Create the Configuration Directory and Copy the Sample Configuration to It:

Here we have to create a directory to store a copy of the sample configuration file.

Copy and paste these commnds below:

mkdir -p /etc/motioneye

cp /usr/share/motioneye/extra/motioneye.conf.sample /etc/motioneye/motioneye.conf

Step 5: Create the Media Directory:

To store any meaniful amount of media files you will have to connect to the router some type storage. The default directory MotionEye uses is provided below but remember this router has limited amount of space.

The command below will be fine for just to see if it is working but change it to an external storage directory if you plan to save any media files. MotionEye's media directory can be changed in the web interface after testing.

Copy and paste these commnds below:

mkdir -p /var/lib/motioneye

# If this default media directory is not going to be used the change must be updated in /etc/motioneye/motioneye.conf.

# Using nano, open /etc/motioneye/motioneye.conf

# Find 'media_path' entry and change the path to your external storage. This is shown in the picture above.

Step 6: Start the MotionEye Server:

Here is the start up command for MotionEye. The -b parameter makes MotionEye run in the background and what will be needed to have it start up at boot. If you want to debug, remove the -b parameter and use -d.

Copy and paste these commnds below:

meyectl startserver -c /etc/motioneye/motioneye.conf -b

You can add this command to the startup items in Luci to start at boot.

Step 7: Open MotionEye Website:

Now that MotionEye is installed and running in your browser goto address:

Thats it!!!

Now use the MotionEye tutorial to configure it!



    • Make it Move Contest

      Make it Move Contest
    • Woodworking Contest

      Woodworking Contest
    • Microcontroller Contest

      Microcontroller Contest

    We have a be nice policy.
    Please be positive and constructive.