zoneminder
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen der Seite angezeigt.
| Beide Seiten, vorherige ÜberarbeitungVorherige ÜberarbeitungNächste Überarbeitung | Vorherige Überarbeitung | ||
| zoneminder [2015/08/20 22:33] – noone | zoneminder [2017/10/16 23:43] (aktuell) – Externe Bearbeitung 127.0.0.1 | ||
|---|---|---|---|
| Zeile 1: | Zeile 1: | ||
| + | Raspberry Pi + Webcam + Zoneminder | ||
| + | Submitted by bshea on Wed, 02/11/2015 - 12:07 | ||
| + | |||
| + | ===0. Parts & Software=== | ||
| + | |||
| + | * 1 - Raspberry Pi (RPi) with 512 MB + 32GB SD card. (Model = 0x0e / 2B) (SSH console only.) | ||
| + | * 1 - Microsoft LifeCam HD-3000 | ||
| + | * Raspbian Linux (free) | ||
| + | * Zoneminder Security Camera Software (free) | ||
| + | |||
| + | Approximate Total Price: ~$50 | ||
| + | |||
| + | Notes and Quirks with webcams: | ||
| + | |||
| + | This webcam does not need a self-powered USB hub. Some models do. | ||
| + | This model is not found using "zmu -d /dev/video0 -vqV2" (etc) - it does not enumerate. I used v2l utils to identify capabilities. | ||
| + | You may want to consider running Zoneminder on a desktop/ | ||
| + | |||
| + | ===1. Install=== | ||
| + | |||
| + | Installing Zoneminder should also install (among others) php/ | ||
| + | sudo apt-get update && sudo apt-get upgrade | ||
| + | sudo apt-get install apache2 | ||
| + | sudo apt-get install zoneminder | ||
| + | sudo apt-get install v4l-utils | ||
| + | |||
| + | Unfortunately the package for Zoneminder needs some work. Please follow this carefully! | ||
| + | |||
| + | ===2. Configure Apache/Web and Permissions=== | ||
| + | |||
| + | # Allow www-data to access webcam: | ||
| + | sudo usermod -aG video www-data | ||
| + | |||
| + | # Add CGI ScriptAlias if not present after installing: | ||
| + | sudo nano / | ||
| + | |||
| + | Alias /zm / | ||
| + | | ||
| + | < | ||
| + | php_flag register_globals off | ||
| + | Options Indexes FollowSymLinks | ||
| + | < | ||
| + | DirectoryIndex index.php | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | # Correct ownership/ | ||
| + | sudo chown -R root: | ||
| + | sudo find / | ||
| + | |||
| + | # Correct Perl memory bug in zoneminder code if present: | ||
| + | # REF : http:// | ||
| + | sudo nano / | ||
| + | |||
| + | # line 130 - Change from: | ||
| + | ' | ||
| + | # To: | ||
| + | ' | ||
| + | |||
| + | # SymLink Apache file to conf.d: | ||
| + | sudo ln -s / | ||
| + | |||
| + | # Install Cambozola Java Plugin | ||
| + | mkdir ~/tmp && cd ~/tmp | ||
| + | wget http:// | ||
| + | tar xvf cambozola-latest.tar.gz | ||
| + | sudo cp ./ | ||
| + | cd ~ && rm -rf ~/ | ||
| + | |||
| + | |||
| + | ===3. Find your webcam formats for zoneminder=== | ||
| + | |||
| + | # Find formats of webcam for zoneminder config: | ||
| + | zmu -d /dev/video0 -vqV2 | ||
| + | # If that does not work or fails to enumerate, try: | ||
| + | | ||
| + | |||
| + | ===4. Kernel shared memory settings: | ||
| + | |||
| + | # Set shared memory for 512MB RPi board: | ||
| + | # 128MB shhmax shared: | ||
| + | sudo su - | ||
| + | echo " | ||
| + | exit | ||
| + | # 2MB shmall pages: | ||
| + | sudo su - | ||
| + | echo " | ||
| + | exit | ||
| + | |||
| + | ===5. ZM Setup and Testing=== | ||
| + | |||
| + | REBOOT RPi & open a web browser pointing to local RPi IP | ||
| + | |||
| + | From Pi desktop: | ||
| + | | ||
| + | or | ||
| + | | ||
| + | if on separate pc on local network (Recommended) | ||
| + | |||
| + | Note: Remeber that running a desktop manager under the RPi will use more memory and resources - not advised. | ||
| + | |||
| + | Setup a bandwidth profile: | ||
| + | |||
| + | Click Options on far right. Click "High B/W". | ||
| + | Change " | ||
| + | Make sure " | ||
| + | SAVE. | ||
| + | On main console page pick " | ||
| + | |||
| + | Misc Options to check or set (Optional) | ||
| + | Click Options on far Right and Pick " | ||
| + | Look for OPT_CAMBOZOLA and check it. | ||
| + | Look for PATH_CAMBOZOLA and you should see or set to: " | ||
| + | Look for PATH_FFMPEG and set to: "/ | ||
| + | Note: For Cambozola to work, you may need to set an exception on it's Java jar. (Self-Signed as of this writing) | ||
| + | SAVE. | ||
| + | |||
| + | Video | ||
| + | -> Select "/ | ||
| + | GENERAL TAB: | ||
| + | |||
| + | Source: Local | ||
| + | Function: Monitor (later you can change this if everything works to MoDetect) | ||
| + | Set frame rate at 5. Set 10 as max. | ||
| + | |||
| + | SOURCE TAB: | ||
| + | (Setup web/ | ||
| + | (Many cheaper webcams use NTSC or PAL + YUYV or MPEG1 compression) | ||
| + | Channel = 0 | ||
| + | 320x240 -> (Set capture width @ 320 or less. Set capture height @ 240 or less.) | ||
| + | SAVE. | ||
| + | |||
| + | Test the Web Streaming | ||
| + | Click ' | ||
| + | You should see: a stream if using Cambozola, or a new JPG every 5 secs if not using it. | ||
| + | Note on Cambozola: You may need to edit security for your Java client and add an exception for your IP address/ | ||
| + | |||
| + | You should now have a basic working Zoneminder install on your Pi! | ||
