Advanced IP Camera

From LinuxMCE
Revision as of 13:52, 29 June 2012 by Sambuca (Talk | contribs) (Device data for the template)

Jump to: navigation, search

Introduction

The Advanced IP Camera is a generic device template which aims to utilize more features of modern IP cameras than GSD templates can.

This device template is current under development and what is described here may not be accurate!


Currently working:

  • Image retrieval
  • Motion detection events (for D-Link cameras - DCS-2121 used when developing)


This device template is not meant to be used directly, even though it can. The idea is that this template describes the available options that the Advanced_IP_Camera binary supports, and a device template for a specific make and model should specify the correct options for that device. See the D-Link DCS-2121 template as example (to be made).

Creating a device template based on Advanced IP Camera

Create a new device template, check "Implements DCE", enter "Advanced_IP_Camera" as Command Line. Add "Core" as controlled by category, and add a dependency on the "LinuxMCE Advanced IP Camera" software package.

This should make a template that uses the Advanced_IP_Camera binary, and is started automatically on the core.

You now need to enter the specific data for your device. I hope you have already set the manufacturer and model number when creating the template... A DHCP MAC range needs to be added if you want your device to be automatically detected.

Device data for the template

The device data describe options that might be special for your device. You need to add the device datas you need to customize for your device template. Look at the Advanced IP Camera template to see what data is available. Some data are required, like Path.

Other data are optional and depends on what features your camera has. Options:

  • File Name and Path/Event URL: an URL on the device that returns events
  • AuthUser: Username to authenticate to the camera
  • AuthPassword: Password to authenticate to the camera
  • Video support: Check if this camera supports video
  • Video Settings: URL where video can be retrieved from the camera
  • Control path: URL to control the camera
  • Configuration: specify what method to use to access the cameras events (motion detection, input changes etc.)

The available options are (this is an example)

eventMethod1=[url,httpserver,ftpserver,smtpserver]
eventURL1=[/cgi/web_event.cgi|localhost:25|localhost:8080]
controlURL1=[/dev/gpioCtrl.cgi]

If you have several different methods, use eventMethod2, eventURL2 etc...

Commands and events

You should select the commands and events that your device is capable of handling. They are not used in any way in the Advanced_IP_Camera binary at the moment, but that might change. Setting these are just the right thing to do.

Related device templates

This allows you to specify any children that should be created anutomatically, if any. For instance, if your camera supports motion detection, a motion detector device should be a children of your camera device. Sometimes cameras also have general input and outputs that can be read and controlled. This requires a generic input and output device to be added under your camera device.

Device data for children

Device data for children can be specified as a list of <PK_DeviceData>|<DataValue>|<PK_DeviceData>|<DataValue>|...etc

Motion detectors use the Capabilities data to describe how to look for events. The D-Link camera sends all events on a http connection that stays open, so we can look for a specific string that triggers the events.

Development notes

I'm looking for information about how other types of cameras implement events and camera controls. To be able to support as many types of camera manufacturers, we need to find out what support we need to implement. So if you want your particular camera supported, either send me a camera to test, or post the required data here.