Installation eines RaspberryPi als Netzkamera

//Installation eines RaspberryPi als Netzkamera
Installation eines RaspberryPi als Netzkamera 2018-05-01T15:16:32+00:00

Grundinstallation Raspberry Pi

Mit df -h Laufwerksname ermitteln (zB disk1)
Im Festplattendienstprogramm die Partitionen deaktivieren
Letzte
sudo dd bs=1m if=2014-09-09-wheezy-raspbian.zip of=/dev/disk1

Auf dem Raspi ausführen
sudo su
passwd root

apt-get update
apt-get upgrade
rpi-update
apt-get install mc apache2 php5

Zeitzone auswählen
dpkg-reconfigure tzdata
hostname #HOSTNAME#

WLAN konfigurieren

mcedit /etc/wpa_supplicant/wpa_supplicant.conf

am Ende hinzufügen:
network={
    ssid="SSID"
    psk="ganzgeheimespasswort"
}

ifup wlan0

Installation der Kamera

Kabel mit der Schriftseite in Richtung LAN-Port einstecken
raspi-config
Menüpunkt „enable Camera“ -> Enable -> Finish

Videotreibermodul laden:
echo 'bcm2835_v4l2' >> /etc/modules

Installation motioneye

#apt-get install python-tornado python-jinja2 python-imaging motion libavtools v4l-utils

wget https://github.com/ccrisan/motioneye/wiki/precompiled/ffmpeg_3.1.1-1_armhf.deb
dpkg -i ffmpeg_3.1.1-1_armhf.deb
apt-get install python-pip python-dev curl libssl-dev libcurl4-openssl-dev libjpeg-dev libx264-142 libavcodec56 libavformat56 libmysqlclient18 libswscale3 libpq5
pip install motioneye
mkdir -p /etc/motioneye
cp /usr/local/share/motioneye/extra/motioneye.conf.sample /etc/motioneye/motioneye.conf
mkdir -p /var/lib/motioneye
cp /usr/local/share/motioneye/extra/motioneye.systemd-unit-local /etc/systemd/system/motioneye.service
 systemctl daemon-reload
 systemctl enable motioneye
 systemctl start motioneye
pip install motioneye --upgrade
 systemctl restart motioneye

-> alt

cd /home/pi
Dateiname abholen bei ccrisan
wget https://bitbucket.org/ccrisan/motioneye/get/925e1b47f170.zip
unzip 925e1b47f170.zip
mv ccrisan-motioneye-xyz motioneye
cd motioneye
cp settings_default.py settings.py

Add the following line to /etc/rc.local (right before the exit 0):
sh -c '/home/pi/motioneye/motioneye.py > /home/pi/motioneye/run/motioneye.log 2>&1' &
reboot

Im Browser http://<IP>:8765 aufrufen, anmelden User: admin, ohne Passwort
Bildgröße und -rotation anpassen in /home/pi/motioneye/conf/thread-N.conf (wird allerdings überschrieben durch Einstellungsänderungen in motioneye Weboberfläche)