Kamera Läuft Raumüberwachung
Total Page:16
File Type:pdf, Size:1020Kb
01/2014 IP-Kameras verwalten Titelthema Kamera läuft Raumüberwachung 36 Viele IP-Kameras lassen sich heute über intelligente Interfaces verwalten. Wenn diese fehlen oder im Gebäude mehrere Kameras filmen, kommen unter Linux kommerzielle und freie Anwendungen zum Zuge. Kristian Kißling www.linux-magazin.de Bewegungen (Motion Detection) oder Geräuschen (Sound Detection). In die- sem Fall schicken sie Bilder und Videos in wählbarer Auflösung an einen FTP-, SSH- oder Samba-Server, mitunter auch direkt in die Cloud. Einige IP-Kameras lassen sich zudem per Dyn-DNS ins In- ternet stellen – was nicht immer eine gute Idee ist (siehe Kasten „Security- Probleme“). Da die Konkurrenz nicht schläft, heben sich IP-Kameras zudem häufig durch ein bis zwei Alleinstellungsmerkmale ab: Sie lassen sich fernsteuern (auch als PTZ bezeichnet, was für „Pan, Tilt, Zoom“ steht), erfüllen den internationalen On- vif-Standard des Open Network Video © Dan Kuta, Photocase.com © Dan Kuta, Interface Forum [2], legen Daten auf Micro-SD-Karten ab oder schicken Bil- Systeme zur Kameraüberwachung über Käufer meist Indoor- und Outdoor-Über- der mit Hilfe von Apps direkt auf Smart- das Netzwerk existieren seit Mitte der wachungskameras zur Auswahl. Letz- phones oder Tablets. Einige Kameras 90er Jahre. Aktuelle Modelle, die auch tere müssen wesentlich robuster gegen tanken Energie über das Netzwerkkabel im Privatbereich erschwinglich sind, ver- schlechte Witterung geschützt sein und (Power over Ethernet, PoE) und brauchen einen dabei immer mehr Features aus kosten im Highend-Bereich schon mal ein keine Steckdose. dem Profibereich in sich, wozu etwa paar Tausend Euro pro Stück. Egal welche Art Kamera der Anwender Nachtsicht per Infrarot oder Schwenk-, Doch auch an den preiswerteren Indoor- einsetzt, er sollte auch die gesetzlichen Neige- und Zoomfähigkeiten gehören. Kameras ist der technische Fortschritt Regelungen kennen. Eine umfangreiche Eigentümer überwachen mit ihnen die nicht spurlos vorübergegangen. Sie kos- Liste mit Links und Texten zur Video- Urlaubshäuser, Firmeninhaber behalten ten eine zwei- oder dreistellige Summe, die Geschäftsräume und Katzenbesitzer integrieren sich meist drahtlos oder Security-Probleme ihre im Urlaub zurückgelassenen Lieb- per Ethernet ins lokale Netzwerk und Zwar lassen sich die meisten Webinterfaces linge im Blick. bringen zum Verwalten und Bedienen durch Passwörter schützen, viele Benutzer Meist richtet sich das Objektiv einer oder eine eigene Weboberfläche mit (Abbil- machen sich aber nicht die Mühe, das Stan- mehrerer Kameras tagein, tagaus auf ei- dung 1), die allerhand Nützliches kann. dardpasswort zu ändern. Ist die Oberfläche nen leeren Gang, eine Bürotür oder einen Die mitgelieferten Installations-CDs dür- übers Internet erreichbar, stehen die Auf- Parkplatz. Der Artikel beleuchtet, wie fen Linux-Anwender getrost in der Box nahmen ungeschützt im Netz. Hinzu kom- Linux und freie Software den Umgang lassen, denn offizieller Linux-Support ist men Sicherheitslücken: Trendnet-Kameras mit dem Kamerapark erleichtern. selten. Tools wie »fping« verraten den- erregten 2012 Aufsehen, weil Interessierte noch, welche IP-Adresse der Router einer die Streams unter Umgehung des Passwort- Technik, die begeistert Webcam zuweist. schutzes über eine spezielle URL erreichen Dank Infrarot erkennen viele aktuelle konnten [1]. Doch zunächst zur Technik. Neben den Kameras Objekte auch im Dunklen und Empfohlen wird also, die Kameras nur im lo- meist sehr schlichten Webcams und den leuchten den Raum teilweise bis zu 15 kalen Netzwerk zu betreiben und die Daten am besten SSL-verschlüsselt zu verschicken. winzigen Spionagekameras stehen dem Meter weit aus. Alarm schlagen sie bei 01/2014 Titelthema überwachung bietet das Unabhängige »thread.conf«-Dateien im Verzeichnis fällt und wie viele Tage das Archiv vor- Landeszentrum für Datenschutz Schles- »/etc/motion/« lassen sich jeweils Pfade halten soll, um den Bedarf an Festplatten- wig-Holstein [3]. zu weiteren Kamerastreams definieren kapazität richtig einzuschätzen. Zudem und Orte für Aufnahmen festlegen. muss das Netzwerk den permanenten Powered by Motion Da sich Motion selbst nicht um den wei- Datenstrom verkraften. teren Verbleib des Materials kümmert, Ein Cron-getriebenes Skript in Kom- Raumüberwachung Wer nur sein Büro oder ein einziges Ob- muss der Nutzer tätig werden und die bination mit Tools wie Duplicity oder jekt überwachen möchte, dem genügt Ergebnisdateien per Cronjob und über Rsync könnte auf dem NAS automatisch 37 meist eine günstige Webcam ohne Web- Bash- oder Perl-Skripte abgreifen und ältere Aufnahmen aus dem Datenwust interface: Linux kann sie mit Hilfe von zum Beispiel auf einen entfernten Server filtern und löschen. Beim permanenten Motion in eine Überwachungskamera verschieben. Oder Motion packt sie in ein Aufzeichnen ist zudem ein intelligentes verwandeln. Das Kommandozeilentool Dropbox- oder Ubuntu-One-Verzeichnis, Einordnen der Videos auf Datums- und www.linux-magazin.de gehört zu den Veteranen im Motion-De- um sie so auf andere Geräte zu übertra- Uhrzeitbasis unverzichtbar, um unter tection-Bereich und erkennt Bewegungen gen, etwa auf Smartphones. Tausenden Aufnahmen schnell die wichti- im Sichtfeld (Abbildung 2) oder in des- Auch in Sachen Home-Automation sind gen Sekunden ausfindig zu machen. Wer sen Bereichen. mit Motion interessante Einsätze vorstell- die Aufnahmen nicht vor Ort speichern Eine Einschränkung der Software besteht bar: So kann ein Skript die Textausgaben möchte, kann einen gut angebundenen darin, dass die Bildquelle im Jpeg- oder von Motion auswerten oder die Speicher- Rootserver mieten und das Material per Motion-Jpeg-Format (Mjpeg) vorliegen orte überwachen und Ereignisse starten, SFTP dorthin hochladen. muss – neumodischen Kram wie Mpeg sobald Motion Bewegung entdeckt. In Manche Unternehmen müssen die erstell- 4 oder Divx mag Motion nicht. Zum Verbindung mit Fhem [4], einem Server ten Videodateien mitunter lange aufbe- Glück bringen viele aktuelle IP-Kameras für die Home-Automation, der eine ganze wahren und dürfen sie nicht verlieren. Sie Mjpeg-Support mit. Schön an Motion ist Reihe von Heim-Automatisierungsproto- können die Aufnahmen gut auf eigenen die ausführliche Dokumentation, die es kollen kennt (etwa KNX, Home Easy, Servern mit Raid 10 lagern. Nutzen die recht schnell erlaubt, die Funktion der X 10), lassen sich Motion-Events an Haus- Firmen fremde Rechenzentren, sollten sie verschiedenen auskommentierten Opti- haltsgeräte koppeln: Betritt der Bewohner eine Verschlüsselung in Betracht ziehen. onen in »/etc/motion/motion.conf« zu ein Zimmer, geht das Licht an oder Ähn- Einige Profisysteme entschlüsseln Daten verstehen, um die Software über die zen- liches. Ein Bastelfreund [5] lässt sich nur, wenn zwei Personen zugleich ihre trale Konfigurationsdatei an die eigenen zum Beispiel Menschen, die an seiner Passwörter angeben, um den Missbrauch Bedürfnisse anzupassen. Haustür klingeln, zehn Sekunden lang in zu erschweren. Der Parameter »target_dir« legt ein lo- einem Fenster seiner XBMC-Installation Wer für die Langzeitlagerung von Video- kales Zielverzeichnis für die entstande- auf seinem Flatscreen anzeigen. material eine freie Archivierungslösung nen Bilder und Filme fest. Für die erste sucht, kann zudem einen Blick auf Open IP-Kamera muss in der Datei »motion. All my Circuits Archive [6] oder das Avalon Media Sys- conf« eine Adresse neben »netcam_url« tem [7] werfen, die unter der AGPLv3 eingetragen sein, andernfalls will Motion Komplexer wird es, wenn die Zahl der respektive Apache-Lizenz stehen. standardmäßig auf »/dev/video0« zugrei- Kameras steigt und zugleich dauerhaft fen. Die Software kommt allerdings auch gefilmt wird, was auch als CCTV (Closed Additionsspiele mit mehreren Kameras zurecht: In den Circuit Television) firmiert. Der Admin muss abschätzen, Wie erwähnt addieren sich beim Ein- welche Menge an satz mehrerer Kameras die Bandbreiten Daten pro Tag an- ebenso wie der nötige Speicherplatz. Abbildung 1: IP-Kameras wie die von D-Link bringen häufig eigene Weboberflä- Abbildung 2: Bewegung (hier mit einem Filter hervorgehoben) lässt sich unter chen mit und können bei Bewegungen oder Geräuschen Aktionen starten. Linux mit Motion erkennen, dafür ist keine spezielle Kamera nötig. 01/2014 Titelthema Raumüberwachung 38 www.linux-magazin.de Abbildung 4: Im Eventlog hebt Zoneminder die vom Bewegungsmelder aufge- zeichneten Bewegungen farbig hervor. nitoring mehrerer und Videos per E-Mail oder – über ein E- Kameras eignet es Mail-Gateway – per SMS verschickt. Der sich daher nur be- Filter »PureWhenFull« löscht alte Aufnah- Quelle: http://www.lavrsen.dk/foswiki dingt. Hier springt men, damit die Festplatte nicht vollläuft, Abbildung 3: Die Weboberfläche von Motion kann noch etwas Politur gebrauchen. Zoneminder in die ist jedoch standardmäßig deaktiviert. Für Bresche, ein Open- den Umgang mit Zoneminder lassen sich NAS-Anbieter wie Qnap und Synology Source-Programm unter der GPL. Es ver- mehrere Benutzer anlegen, die Kameras bieten hierfür Network Video Recorder waltet mehrere Kameras, darunter jene, auch über PTZ fernsteuern. (NVR, [8]) oder Surveillance Stations die Video-4-Linux unterstützt, lässt sich Die Home-Automatisierung unterstützt [9] an. Synology stellt zudem einen über eine Web oberfläche bedienen und Zoneminder mit dem X-10-Protokoll. Das Ressourcenrechner [10] bereit, um den bindet Web- und IP-Kameras über HTTP- Tool Zmxap [11] verbindet Zoneminder Bandbreiten- und Speicherbedarf zu be- sowie RTSP-Streams ein. außerdem über das