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)
 
(5 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 +
{{Versioninfo}}
 
{| align="right"
 
{| align="right"
 
   | __TOC__
 
   | __TOC__
Line 10: Line 11:
 
There are three types of cameras you can use:
 
There are three types of cameras you can use:
  
* Cameras you connect directly to a PC (such as webcams), analog cameras connected to a video capture card, and USB cameras.
+
# Cameras you connect directly to a PC (such as webcams)
 
+
# Analog cameras connected to a video capture card
::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.
+
# USB cameras
::*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 Interface Device====
::*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.
+
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.
:::* For each camera you will need to specify a number in the parameter "Port/Channel Number".
+
* In '''[[LinuxMCE Admin Website]]-->Wizard-->Devices-->[[Interfaces]]'''
::::*  If you have only 1 camera, it's easy; put a 1.
+
** Add device "Motion Wrapper" from the category "Surveillance Video Interfaces"
::::*  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.
+
** Then click the "Pick device template" button.
::::*  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.
+
====Add Cameras====
 
+
=====Generic Analog Camera=====
* IP Based cameras which connect to the home network.
+
* 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.  
::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 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, 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.
+
** 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".
* Proprietary, stand alone camera systems which have their own master controller or interface to which the cameras are connected.
+
***  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.
::These also requires a custom LinuxMCE device.  In [[LinuxMCE Admin Website]]-->Wizard-->Devices--> Interfaces add the interface device, then add the cameras in Wizard-->Devices-->Surveillance cameras.
+
***  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]].'''
 
'''After you've made any changes to Motion Wrapper or Cameras, you'll have to [[quick reload router|Reload the Router]].'''
  
 
===Adding IP Cameras under Motion Wrapper===
 
===Adding IP Cameras under Motion Wrapper===
*From LinuxMCE Admin Website-->Advanced-->Configuration-->Devices, Open CORE and then Click on 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 )
+
* 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 IP Address with your IP Camera's IP
:*Fill in the MAC field with your IP Camera's mac
+
** 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"
+
** 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 Info" -> Select the "Room" where your IP Cam is located
::*"Device data" :
+
*** "Device data" :
:::*-> "Path" : set the path to your IP Camera current snapshot, it has to be a jpg or mjpg file
+
**** "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
+
**** "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
+
**** "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
+
**** "Username" : set the username required to access your IP Cam
:::*-> "Password" : set the password 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
+
**** "Noise" : noise level for motion detection, default to 32
  
 
*After you've done any changes to Motion Wrapper or Cameras, you'll have to [[quick reload router|Reload the Router]]
 
*After you've done any changes to Motion Wrapper or Cameras, you'll have to [[quick reload router|Reload the Router]]
  
 
===Adding the Security Device Mapping===
 
===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 Wizard, Security, Cell Phone Notifications.
+
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===
 
===Adding the Scenario===
You probably will want to add some buttons on the Orbiters to quickly view certain cameras.  In LinuxMCE Admin website 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'.
+
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==
 
==How to use it==
Line 57: Line 74:
  
 
==Programmer's guide==
 
==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 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.
+
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.