Difference between revisions of "Monitor surveillance cameras"

From LinuxMCE
Jump to: navigation, search
m (Adding IP Cameras under Motion Wrapper: fixed LinuxMCE Admin Website link)
 
(49 intermediate revisions by 8 users not shown)
Line 1: Line 1:
<table width="100%"> <tr><td bgcolor="#FFCFCF">This page was written by Pluto and imported with their permission when LinuxMCE branched off in February, 2007.  In general any information should apply to LinuxMCE.  However, this page should be edited to reflect changes to LinuxMCE and remove old references to Pluto.</td></tr> </table>[[Monitor surveillance cameras]]<br>
+
{{Versioninfo}}
 +
{| align="right"
 +
  | __TOC__
 +
  |}
 +
[[Category: Cameras]]
 +
[[Category: Security]]
 +
[[Category: Tutorials]]
 +
[[Image:Webcam1.jpg|thumb|Snapshot from a surveillance CAM]]
 +
==How to set it up==
 +
===Adding the Device - Motion Wrapper===
 +
There are three types of cameras you can use:
  
<p><h1>How to set it up--part 1, adding the device</h1></p>
+
# Cameras you connect directly to a PC (such as webcams)
<p>There are three types of cameras you can use:</p>
+
# Analog cameras connected to a video capture card
<p>1. Cameras you connect directly to a PC, such as webcam's, analog cameras connected to a video capture card, and USB cameras<br>
+
# USB cameras
2. IP Based cameras you connect to the home network<br>
+
====Add Interface Device====
3. Proprietary, stand alone camera systems which have their own master controller or interface which the cameras are connected to.</p>
+
This requires an interface device.  LinuxMCE includes the device [[motion|Motion Wrapper]], which is a wrapper for the open source project [http://www.lavrsen.dk/twiki/bin/view/Motion/WebHome Motion], and will be the interface device.
<p>#3 requires a custom LinuxMCE device.  In LinuxMCEAdmin choose Wizard, Devices, Interfaces and add the interface device, then add the cameras in Wizard, Devices, Surveillance cameras.</p>
+
* In '''[[LinuxMCE Admin Website]]-->Wizard-->Devices-->[[Interfaces]]'''
<p>#1 also requires an interface device.  LinuxMCE includes the device "Motion Wrapper", which is a wrapper for the open source project 'motion', and will be the interface device. In LinuxMCEAdmin choose Wizard, Devices, Interfaces and add the device "Motion Wrapper" which is in the category "Surveillance Video Interfaces". Then in LinuxMCE Admin go to Wizard, Devices, Surveillance Cameras and for each camera, both analog cameras you connect to a capture board, as well as USB cams and web cams, add a device "Generic Camera" which you will find in the category "Peripherals", "Surveillance Cameras", and choose the motion wrapper as the "Controlled Via" device. For each camera you will need to specify a number in the parameter "Port/Channel Number".  If you have only 1 camera, it's easy; put a 1.  If you have several cameras connected to a single multi-port capture card, the number for each camera should correspond to the port number on the card.  However, if you have a mixture it may require some experimenting to see which camera gets mapped to which port.  For example, if you have two 4-port capture cards, and you call the 8 cameras "Cams 1-8", and 1 USB camera, which you call "Living Room cam" cam, there will be a total of 9 cameras.  The order is determined by the drivers.  Normally USB cameras come first.  So try giving the USB camera "Living Room cam" a port 1, and then the 4 cameras on the first capture card port #2-5, and the 4 cameras on the second capture card #6-9.  Later when you are viewing the cameras if you find the port numbers are incorrect you may need to re-arrange them.  If, for example, you go to view the camera you called "Living Room Cam" and see that it is really showing you another camera, go back and change the port parameter until each camera is correct.</p>
+
** Add device "Motion Wrapper" from the category "Surveillance Video Interfaces"
<p>#2, IP cameras, are the best.  They are the simplest and often have the most features, such as pan, tilt and zoom.  They do not require an interface device.  Most are also plug and play.  Try just plugging the camera.  If you see a message on all the Orbiters that your camera was detected, that's all there was to it.  If not, then in LinuxMCE Admin go to "Wizard", "Devices", "Surveillance Cameras" and add the camera from the category "Peripherals", "Surveillance Cameras" and make the Controlled Via device be the Core.  If your model is not shown, you will have 2 choices.  One is to create a GSD device for it.  This will give you full control over all the cameras features, but requires some technical skills.  The second possibility is to add the "Motion Wrapper" interface, and add the camera as a "Generic Camera" as described in the prior paragraph.  The only difference is that you will put the IP address of the camera in the IP box.  Then the Motion Wrapper knows it's an IP camera.  Note that even if your model is specifically listed and you don't use the Generic Camera device, you can still choose Motion Wrapper as the "Controlled Via" if you want Motion Wrapper to monitor the camera.</p>
+
** Then click the "Pick device template" button.
<p><h1>How to set it up--part 2, adding the security device mapping</h1></p>
+
====Add Cameras====
<p>In LinuxMCE Admin choose Wizard, Security, Security-Video Links.  Here is a matrix of all your security sensors and intercoms on the left, and all the cameras across the top.  Check the boxes to indicate which cameras can view which security devices.  If, for example, someone rings the "Front Door intercom", or the "Kitchen smoke detector" is triggered, then when LinuxMCE tries to contact you it will automatically send you video from all the cameras you checked off as corresponding to that sensor.  The rules for who to notify are specified in Wizard, Security, Cell Phone Notifications.</p>
+
=====Generic Analog Camera=====
<p><h1>How to set it up--part 3, adding the scenario</h1></p>
+
* In '''[[LinuxMCE Admin Website]]-->Wizard-->Devices-->[[Surveillance Cameras]]'''
<p>You probably will want to add some buttons on the Orbiters to quickly view certain cameras.  In LinuxMCE Admin choose Wizard, Security, Scenarios. For each room you can add a shortcut to view a particular camera by checking the camera, or a shortcut to view 4 cameras at once by click 'Add new quad view scenario'.</p>
+
** Add device  "Generic Analog Camera"  from the category "Peripherals"-->"Surveillance Cameras" for each camera. This includes analog cameras you have connected to a video capture board, USB cams, and web cams.
 +
** Then click the "Pick device template" button. Choose the the "Controlled Via" device to be the motion wrapper.
 +
*** For each camera you will need to specify a number in the parameter "Port/Channel Number".
 +
*** If you have only 1 camera, it's easy; put a 1.
 +
*** If you have several cameras connected to a single multi-port capture card, the number for each camera should correspond to the port number on the card.
 +
*** If you have a mixture it may require some experimenting to see which camera gets mapped to which port.  For example, if you have two 4-port capture cards, and you call the 8 cameras "Cams 1-8", and 1 USB camera, which you call "Living Room cam" cam, there will be a total of 9 cameras.  The order is determined by the drivers.  Normally USB cameras come first.  So try giving the USB camera "Living Room cam" a port 1, and then the 4 cameras on the first capture card port #2-5, and the 4 cameras on the second capture card #6-9.  Later when you are viewing the cameras if you find the port numbers are incorrect you may need to re-arrange them.  If, for example, you go to view the camera you called "Living Room Cam" and see that it is really showing you another camera, go back and change the port parameter until each camera is correct.
 +
=====IP Based Cameras=====
 +
IP Based cameras which connect to the home network are the best.  They are the simplest and often have the most features, such as pan, tilt and zoom.  They do not require an interface device.  Most are also plug and play.   
 +
======Plug and Play======
 +
Try just plugging the camera.  If you see a message on all the Orbiters that your camera was detected, that's all there was to it.   
 +
======Manually Add Camera======
 +
* Open '''[[LinuxMCE Admin Website]]-->Wizard-->Devices-->[[Surveillance Cameras]]'''
 +
** Add the camera from the category "Peripherals-->Surveillance Cameras" and make the "Controlled Via" device be the Core.   
 +
** If your model is not shown, you will have 2 choices.   
 +
*** One is to create a [[GSD]] device for it.  This will give you full control over all the cameras features, but requires some technical skills.   
 +
*** The second possibility is to add the "[[motion|Motion Wrapper]]" interface, **** Add the camera as a "Generic Camera" as described in the prior paragraph.  The only difference is that you will put the IP address of the camera in the IP box.   
 +
**** Then the Motion Wrapper knows it's an IP camera.   
 +
Note that even if your model is specifically listed and you don't use the Generic Camera device, you can still choose Motion Wrapper as the "Controlled Via" if you want Motion Wrapper to monitor the camera.
 +
=====Proprietary Camera Systems=====
 +
Proprietary, stand alone camera systems which have their own master controller or interface to which the cameras are connected.
 +
* These also requires a custom LinuxMCE device.  In '''[[LinuxMCE Admin Website]]-->Wizard-->Devices-->[[Interfaces]]'''
 +
** Add the interface device
 +
** Then add the cameras in '''[[LinuxMCE Admin Website]]-->Wizard-->Devices-->[[Surveillance Cameras]]'''.
 +
'''After you've made any changes to Motion Wrapper or Cameras, you'll have to [[quick reload router|Reload the Router]].'''
  
<p><h1>How to use it</h1></p>
+
===Adding IP Cameras under Motion Wrapper===
<p>From any Orbiter touch the button for the scenario you created.  Notifications of alerts is automatic.</p>
+
* From '''[[LinuxMCE Admin Website]]-->Advanced-->Configuration-->[[Devices]]''' Open CORE and then Click on Motion_Wrapper
 +
* From the top right frame press "Create Child Device" -> enter a description ( or leave blank for default one )
 +
** Fill in the IP Address with your IP Camera's IP
 +
** Fill in the MAC field with your IP Camera's mac
 +
** Press "Pick Device Template" --> "Device Template --> Motion Generic Ip Camera" --> press "Pick Device Template"
 +
*** "Device Info" -> Select the "Room" where your IP Cam is located
 +
*** "Device data" :
 +
**** "Path" : set the path to your IP Camera current snapshot, it has to be a jpg or mjpg file
 +
**** "Protocol" : set the protocol to http or ftp, default is http
 +
**** "TCP Port" : set the port on which your IP CAM it's feeding the images
 +
**** "Username" : set the username required to access your IP Cam
 +
**** "Password" : set the password required to access your IP Cam
 +
**** "Noise" : noise level for motion detection, default to 32
  
<p><h1>Programmer's guide</h1></p>
+
*After you've done any changes to Motion Wrapper or Cameras, you'll have to [[quick reload router|Reload the Router]]
<p>The Motion Wrapper device is very simple.  It simply scans all the child devices, which are assumed to be cameras, and puts them all in the motion config.  If the camera has an ip address, it's assumed to be an IP camera.  If not, then it is /dev/video[port] where port is the parameter specified for the camera.  The Orbiters and the Security Plugin send a "Get Video Frame" command when they need to view the camera.  If the camera uses the device template "Generic Camera", then when an Orbiter or the Security Plugin sends the command it will go to Motion Wrapper, since Generic Camera does not implement DCE.  Motion Wrapper just sends a signal to motion and returns the frame.  If the camera does not use the template Generic Camera, but rather uses a device template that does Implement DCE, such as "Panasonic IP Camera", then this means a separate device will be spawned for this camera, and that device will handle the "Get Video Frame" itself since it implements DCE.  It won't use motion.  If the "Controlled Via" is the Motion Wrapper then motion will still monitor it, since when motion starts it writes all child devices into motion's configuration file.</p>
+
 
 +
===Adding the Security Device Mapping===
 +
Go to '''[[LinuxMCE Admin Website]]-->Wizard-->Security-->[[Security-Video Links]]'''.  Here is a matrix of all your security sensors and intercoms on the left, and all the cameras across the top.  Check the boxes to indicate which cameras can view which security devices.  If, for example, someone rings the "Front Door intercom", or the "Kitchen smoke detector" is triggered, then when LinuxMCE tries to contact you it will automatically send you video from all the cameras you checked off as corresponding to that sensor.  The rules for who to notify are specified in '''[[LinuxMCE Admin Website]]-->Wizard-->Security-->[[Notifications|Cell Phone Notifications]]'''.
 +
 
 +
===Adding the Scenario===
 +
You probably will want to add some buttons on the Orbiters to quickly view certain cameras.  Go to '''[[LinuxMCE Admin Website]]-->Wizard-->[[Scenarios]]-->Security Scenarios'''.  For each room you can add a shortcut to view a particular camera by checking the camera, or a shortcut to view 4 cameras at once by click 'Add new quad view scenario'.
 +
 
 +
==How to use it==
 +
From any Orbiter touch the button for the scenario you created.  Notifications of alerts is automatic.
 +
 
 +
==Programmer's guide==
 +
The Motion Wrapper device is very simple.  It simply scans all the child devices, which are assumed to be cameras, and puts them all in the motion config.  If the camera has an ip address, it's assumed to be an IP camera.  If not, then it is /dev/video[port] where port is the parameter specified for the camera.  The Orbiters and the Security Plugin send a "Get Video Frame" command when they need to view the camera.  If the camera uses the device template "Generic Camera", then when an Orbiter or the Security Plugin sends the command it will go to Motion Wrapper, since Generic Camera does not implement [[DCE]].  Motion Wrapper just sends a signal to motion and returns the frame.  If the camera does not use the template Generic Camera, but rather uses a device template that does Implement [[DCE]], such as "[[Panasonic BL-C10]]", then this means a separate device will be spawned for this camera, and that device will handle the "Get Video Frame" itself since it implements [[DCE]].  It won't use motion.  If the "Controlled Via" is the Motion Wrapper then motion will still monitor it, since when motion starts it writes all child devices into motion's configuration file.

Latest revision as of 07:33, 28 May 2012

Version Status Date Updated Updated By
710 Unknown N/A N/A
810 Unknown N/A N/A
1004 Unknown N/A N/A
1204 Unknown N/A N/A
1404 Unknown N/A N/A
Usage Information
Snapshot from a surveillance CAM

How to set it up

Adding the Device - Motion Wrapper

There are three types of cameras you can use:

  1. Cameras you connect directly to a PC (such as webcams)
  2. Analog cameras connected to a video capture card
  3. USB cameras

Add Interface Device

This requires an interface device. LinuxMCE includes the device Motion Wrapper, which is a wrapper for the open source project Motion, and will be the interface device.

  • In LinuxMCE Admin Website-->Wizard-->Devices-->Interfaces
    • Add device "Motion Wrapper" from the category "Surveillance Video Interfaces"
    • Then click the "Pick device template" button.

Add Cameras

Generic Analog Camera
  • In LinuxMCE Admin Website-->Wizard-->Devices-->Surveillance Cameras
    • Add device "Generic Analog Camera" from the category "Peripherals"-->"Surveillance Cameras" for each camera. This includes analog cameras you have connected to a video capture board, USB cams, and web cams.
    • Then click the "Pick device template" button. Choose the the "Controlled Via" device to be the motion wrapper.
      • For each camera you will need to specify a number in the parameter "Port/Channel Number".
      • If you have only 1 camera, it's easy; put a 1.
      • If you have several cameras connected to a single multi-port capture card, the number for each camera should correspond to the port number on the card.
      • If you have a mixture it may require some experimenting to see which camera gets mapped to which port. For example, if you have two 4-port capture cards, and you call the 8 cameras "Cams 1-8", and 1 USB camera, which you call "Living Room cam" cam, there will be a total of 9 cameras. The order is determined by the drivers. Normally USB cameras come first. So try giving the USB camera "Living Room cam" a port 1, and then the 4 cameras on the first capture card port #2-5, and the 4 cameras on the second capture card #6-9. Later when you are viewing the cameras if you find the port numbers are incorrect you may need to re-arrange them. If, for example, you go to view the camera you called "Living Room Cam" and see that it is really showing you another camera, go back and change the port parameter until each camera is correct.
IP Based Cameras

IP Based cameras which connect to the home network are the best. They are the simplest and often have the most features, such as pan, tilt and zoom. They do not require an interface device. Most are also plug and play.

Plug and Play

Try just plugging the camera. If you see a message on all the Orbiters that your camera was detected, that's all there was to it.

Manually Add Camera
  • Open LinuxMCE Admin Website-->Wizard-->Devices-->Surveillance Cameras
    • Add the camera from the category "Peripherals-->Surveillance Cameras" and make the "Controlled Via" device be the Core.
    • If your model is not shown, you will have 2 choices.
      • One is to create a GSD device for it. This will give you full control over all the cameras features, but requires some technical skills.
      • The second possibility is to add the "Motion Wrapper" interface, **** Add the camera as a "Generic Camera" as described in the prior paragraph. The only difference is that you will put the IP address of the camera in the IP box.
        • Then the Motion Wrapper knows it's an IP camera.

Note that even if your model is specifically listed and you don't use the Generic Camera device, you can still choose Motion Wrapper as the "Controlled Via" if you want Motion Wrapper to monitor the camera.

Proprietary Camera Systems

Proprietary, stand alone camera systems which have their own master controller or interface to which the cameras are connected.

After you've made any changes to Motion Wrapper or Cameras, you'll have to Reload the Router.

Adding IP Cameras under Motion Wrapper

  • From LinuxMCE Admin Website-->Advanced-->Configuration-->Devices Open CORE and then Click on Motion_Wrapper
  • From the top right frame press "Create Child Device" -> enter a description ( or leave blank for default one )
    • Fill in the IP Address with your IP Camera's IP
    • Fill in the MAC field with your IP Camera's mac
    • Press "Pick Device Template" --> "Device Template --> Motion Generic Ip Camera" --> press "Pick Device Template"
      • "Device Info" -> Select the "Room" where your IP Cam is located
      • "Device data" :
        • "Path" : set the path to your IP Camera current snapshot, it has to be a jpg or mjpg file
        • "Protocol" : set the protocol to http or ftp, default is http
        • "TCP Port" : set the port on which your IP CAM it's feeding the images
        • "Username" : set the username required to access your IP Cam
        • "Password" : set the password required to access your IP Cam
        • "Noise" : noise level for motion detection, default to 32
  • After you've done any changes to Motion Wrapper or Cameras, you'll have to Reload the Router

Adding the Security Device Mapping

Go to LinuxMCE Admin Website-->Wizard-->Security-->Security-Video Links. Here is a matrix of all your security sensors and intercoms on the left, and all the cameras across the top. Check the boxes to indicate which cameras can view which security devices. If, for example, someone rings the "Front Door intercom", or the "Kitchen smoke detector" is triggered, then when LinuxMCE tries to contact you it will automatically send you video from all the cameras you checked off as corresponding to that sensor. The rules for who to notify are specified in LinuxMCE Admin Website-->Wizard-->Security-->Cell Phone Notifications.

Adding the Scenario

You probably will want to add some buttons on the Orbiters to quickly view certain cameras. Go to LinuxMCE Admin Website-->Wizard-->Scenarios-->Security Scenarios. For each room you can add a shortcut to view a particular camera by checking the camera, or a shortcut to view 4 cameras at once by click 'Add new quad view scenario'.

How to use it

From any Orbiter touch the button for the scenario you created. Notifications of alerts is automatic.

Programmer's guide

The Motion Wrapper device is very simple. It simply scans all the child devices, which are assumed to be cameras, and puts them all in the motion config. If the camera has an ip address, it's assumed to be an IP camera. If not, then it is /dev/video[port] where port is the parameter specified for the camera. The Orbiters and the Security Plugin send a "Get Video Frame" command when they need to view the camera. If the camera uses the device template "Generic Camera", then when an Orbiter or the Security Plugin sends the command it will go to Motion Wrapper, since Generic Camera does not implement DCE. Motion Wrapper just sends a signal to motion and returns the frame. If the camera does not use the template Generic Camera, but rather uses a device template that does Implement DCE, such as "Panasonic BL-C10", then this means a separate device will be spawned for this camera, and that device will handle the "Get Video Frame" itself since it implements DCE. It won't use motion. If the "Controlled Via" is the Motion Wrapper then motion will still monitor it, since when motion starts it writes all child devices into motion's configuration file.