Doorcam using a cheap webcam, Raspberry PI and motioneye with Openhab integration

Motioneye is a web-based frontend software for the Motion software. Found here:https://github.com/ccrisan/motioneye

I used a cheap USB webcam that I attached above the door to work as a Doorcam. Please excuse the sloppy wiring, these are installation photos so I have cleaned them up later.

This was attached to a Raspberry PI using an extension USB cable. Left one is running Motioneye and right one Openhab.

Motion is quite resource intensive for Raspberry Pi 1 but it runs ok with around 10-30% CPU utilization when capturing 640X400 resolution. It cannot run Motioneye and Openhab on the same box, but Raspberry PI 2 probably could.

Installing MotionEye is relatively easy. instructions are found here: https://github.com/ccrisan/motioneye/wiki/Install-On-Raspbian

Note that the instruction mention adding repositories, but they are actually not needed for the current versio nof raspbian.

In short the installation was done with these commands:

apt-get install motion ffmpeg

apt-get install python-pip python-dev libssl-dev libcurl4-openssl-dev libjpeg-dev

pip 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:

cp /usr/local/share/motioneye/extra/motioneye.init-debian /etc/init.d/motioneye

chmod +x /etc/init.d/motioneye

update-rc.d -f motioneye defaults

/etc/init.d/motioneye start

The go ahead and test on the Motioneye web site: http://yourraspberryIP:8765/

Default username is admin

Openhab integration is done simply By adding the Motion streaming website as a video to the sitemap

Frame label="Camera" {

Frame {

Video icon="video" url="http://motioneeyeIP:8081" encoding="mjpeg"

}

Motioneye has amazing features and all respect to the coder. Motioneye stores images and videos and you can watch them directly from the web GUI. Works fine with mobile (at least Android) too the videos can be watches with Kodi app.

It also has builtin features to upload to Dropbox and trigger actions when motion is detected.