Wednesday, April 6, 2016

IP Camera on Raspberry Pi 3 using motioneye [updated 9/3/2017]


Hardware: Raspberry Pi 3
Camera: VSTARCAM T6835WIP PnP IP Network Camera
OS: Linux raspberrypi 4.9.41-v7+ from NOOBS 2.4.3 [Raspian 9.1 stretch]

update

fresh os install on new sd card and ran into issues trying to load motioneye following the instructions on https://github.com/ccrisan/motioneye/wiki/Install-On-Raspbian

sudo apt-get install libssl-dev libcurl4-openssl-dev python-dev
sudo apt-get install motion ffmpeg v4l-utils # v4l the l is a lower case L



sudo pip install motioneye


sudo pip install --upgrade --force-reinstall pillow
sudo apt-get install libjpeg-dev


sudo mkdir -p /etc/motioneye
sudo mkdir -p /var/lib/motioneye
sudo cp /usr/local/share/motioneye/extra/motioneye.conf.sample /etc/motioneye/motioneye.conf
sudo cp /usr/local/share/motioneye/extra/motioneye.systemd-unit-local /etc/systemd/system/motioneye.service
 systemctl daemon-reload
 systemctl enable motioneye
 systemctl start motioneye




mkdir -p /var/lib/motioneye
cp /usr/local/share/motioneye/extra/motioneye.conf.sample /etc/motioneye/motioneye.conf

 cp /usr/local/share/motioneye/extra/motioneye.systemd-unit-local /etc/systemd/system/motioneye.service


did not run the following as sudo.  at the prompt, selected pi and entered the password

systemctl daemon-reload
 systemctl enable motioneye
 systemctl start motioneye



[old post]


set up raspberry pi with Raspian OS according to user guide


sudo apt-get update

sudo apt-get upgrade  'patience while it loads

[following is from https://github.com/ccrisan/motioneye/wiki/Install-On-Raspbian.  I have listed the commands I used.  the wiki has notes that may apply to your situation.  ]

'commands require root use sudo or become root using sudo -i

1. ffmpeg


wget https://github.com/ccrisan/motioneye/wiki/precompiled/ffmpeg_2.8.3.git325b593-1_armhf.deb

dpkg -i ffmpeg_2.8.3.git325b593-1_armhf.deb

2. install motion

apt-get install motion

3. Install the dependencies from the repositories:

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

4. Install motioneye


pip install motioneye

5. Prepare the configuration directory

mkdir -p /etc/motioneye

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

6. Prepare the media directory:


mkdir -p /var/lib/motioneye

7. 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

8. To upgrade to the newest version of motionEye :


pip install motioneye --upgrade

systemctl restart motioneye

9. open motioneye

from web browser enter "http://[your raspberry pi ip address]:8765"

10. add camera

[recommend you test out the connection to your IP camera [i used yawcam and iSpy64] from your laptop/desktop first so you know it is working.  i needed to enter my user name and password in the url only, not the user name and password blocks.  if i just entered in the user name and password blocks I got a "camera not supported error]

camera type = network camera

url = http://[ip camera address]:port/videostream.cgi?user=[username]&pwd=[password]"

'example http://192.168.0.199:81/videostream.cgi?user=USERNAME&pwd=PASSWORD"

user name = leave blank as included above

password = leave blank as included above



'enjoy