Sunday, June 07, 2020

Raspberry Pi Zero setup for Motion Eye



First off, I'd like to say thanks to  Calin Crisan for his work on Motion eye. He's posted a few how to's on his Github page. This page is a modified version of his page. I've found the following method to work a bit more smoothly for me. Your Millage May vary. Before you go further, this post assumes that you know about installing Raspbian on your SD card, and have access to your Pi Zero via SSH.

I'm installing Motion eye on a Raspberry Pi Zero W.

In this example Raspbian Buster Lite is already installed on it.  I used 2020-02-13-raspbian-buster-lite.zip for my install. It also needs to be setup headlessly to use SSH.  I wrote a little post about that here. 


 Before Proceeding

    Read Calin Crisan's general Installation page first.

These instructions are intended for an up-to-date Raspbian Buster install, but they should work for Raspbian Stretch as well.

    All commands require root; use sudo before each command or become root using sudo -i.
    If you want to use the CSI camera module for the Raspberry PI, make sure you have enabled it in raspi-config.  Also don't forget to run Apt Update and Apt Upgrade if doing this on a fresh install of buster.



Instructions

Install ffmpeg and other motion dependencies:

apt install ffmpeg libmariadb3 libpq5 libmicrohttpd12

I still needed to run apt update --fix-missing to get all the packages to install when I used this method. Lately, I have not had to. 

Install the dependencies from the repositories including "python-pil instead" of python-pillow, and selecting 'zlib1g-dev' instead of 'libz-dev'. 

apt install python-pip python-dev libssl-dev libcurl4-openssl-dev libjpeg-dev zlib1g-dev python-pil


Once all of the packages for ffmpeg and motion dependencies are install, proceed to install Motion.

 Install  motion:


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.deb
Install motioneye, which will automatically pull Python dependencies (tornado, jinja2, pillow and pycurl):
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.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



These instructions were modified from the original found here:

https://github.com/ccrisan/motioneye/wiki/Install-On-Raspbian

https://github.com/ccrisan/motioneye/wiki/Installation

Issues with Linux Mint (or Debian Linux) and Xsane

#notetoself So, today, I was playing around with a new PC setup. And of course there was an issue with the HP Scanner. - I generally use Xsa...