Software Engineer

Setting up CCTV with MotionEyeOS

Recently, my paranoia of home invasion has reached a climax; So in addition to setting up a MotionEye cam pointed at my door, I’ve also decided I need a CCTV-like capability to monitor my door at all times while I’m at my desk.

Assuming you already have MotionEye set up on a pi (if you don’t you can look at my previous post here), you’ll only need to set up a Pi 3 with the latest rasbian image. I used a Pi 3 and the official 7-in screen.

Once you have a raspberry pi 3 running and on a network go ahead and update it with

~ sudo apt update -y && sudo apt upgrade -y

Then install unclutter with:

~ sudo apt install unclutter

This is to hide the mouse-cursor, recommended, but not required

Now onto the bread and butter. Make sure that you have the streaming functionality enabled, otherwise it won’t work. To display the MotionEyeOS stream, we’ll make chromium load on startup and open to the MotionEye’s streaming page. Write the following to /home/pi/.config/lxsession/LXDE-pi/autostart.

@xset s off
@xset -dpms
@xset s noblank
@chromium-browser --kiosk http://{MOTIONEYE'S IP}}:8081
@unclutter -idle 0

If you need to rotate the display write

lcd_display=2

into /boot/config.txt, 2 rotates it by 180 degrees.

And that’s it! Reboot to ensure everything is working.

MotionEye Config