From bfb005fe8b9d59a6f8fd2950b615abee0eae41f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20GUILLY?= Date: Fri, 17 Jul 2015 14:48:20 +0200 Subject: [PATCH] first commit --- .babelrc | 1 + .editorconfig | 12 + .gitattributes | 1 + .gitignore | 3 + .jscsrc | 27 + .jshintrc | 11 + .travis.yml | 6 + LICENSE | 21 + README.md | 32 + example.js | 59 + gulpfile.js | 66 + lib/cam.js | 242 +++ lib/devicemgmt.wsdl | 3787 +++++++++++++++++++++++++++++++++++++++++++ lib/event.wsdl | 694 ++++++++ lib/media.wsdl | 3695 +++++++++++++++++++++++++++++++++++++++++ lib/onvif.js | 5 + lib/test.js | 40 + package.json | 39 + test/index.js | 9 + 19 files changed, 8750 insertions(+) create mode 100644 .babelrc create mode 100644 .editorconfig create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 .jscsrc create mode 100644 .jshintrc create mode 100644 .travis.yml create mode 100644 LICENSE create mode 100644 README.md create mode 100644 example.js create mode 100644 gulpfile.js create mode 100644 lib/cam.js create mode 100644 lib/devicemgmt.wsdl create mode 100644 lib/event.wsdl create mode 100644 lib/media.wsdl create mode 100644 lib/onvif.js create mode 100644 lib/test.js create mode 100644 package.json create mode 100644 test/index.js diff --git a/.babelrc b/.babelrc new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/.babelrc @@ -0,0 +1 @@ +{} diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..4a7ea30 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,12 @@ +root = true + +[*] +indent_style = space +indent_size = 2 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.md] +trim_trailing_whitespace = false diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..176a458 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +* text=auto diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7080506 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +/node_modules/ +/coverage/ +/.idea/ diff --git a/.jscsrc b/.jscsrc new file mode 100644 index 0000000..3370702 --- /dev/null +++ b/.jscsrc @@ -0,0 +1,27 @@ +{ + "requireCurlyBraces": ["else", "for", "while", "do", "try", "catch"], + "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch", "function"], + "requireSpacesInFunctionExpression": { + "beforeOpeningCurlyBrace": true + }, + "disallowMultipleVarDecl": true, + "disallowSpacesInsideArrayBrackets": true, + "disallowSpacesInsideParentheses": true, + "disallowSpaceAfterObjectKeys": true, + "disallowQuotedKeysInObjects": true, + "requireSpaceBeforeBinaryOperators": ["?", "+", "/", "*", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="], + "disallowSpaceAfterBinaryOperators": ["!"], + "requireSpaceAfterBinaryOperators": ["?", ",", "+", "/", "*", ":", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="], + "disallowSpaceBeforeBinaryOperators": [","], + "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"], + "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"], + "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], + "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], + "disallowImplicitTypeConversion": ["numeric", "binary", "string"], + "disallowKeywords": ["with", "eval"], + "disallowMultipleLineBreaks": true, + "disallowKeywordsOnNewLine": ["else"], + "requireLineFeedAtFileEnd": true, + "excludeFiles": ["node_modules/**"], + "validateIndentation": 2 +} diff --git a/.jshintrc b/.jshintrc new file mode 100644 index 0000000..c5d7201 --- /dev/null +++ b/.jshintrc @@ -0,0 +1,11 @@ +{ + "node": true, + "esnext": true, + "camelcase": true, + "immed": true, + "newcap": true, + "undef": true, + "unused": "vars", + "strict": true, + "mocha": true +} diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..b0c6a8d --- /dev/null +++ b/.travis.yml @@ -0,0 +1,6 @@ +sudo: false +language: node_js +node_js: + - '0.10' + - '0.12' + - 'iojs' diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..5dfce16 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Stéphane GUILLY + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..bd4f565 --- /dev/null +++ b/README.md @@ -0,0 +1,32 @@ +# onvif-soap [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][daviddm-image]][daviddm-url] [![Coverage percentage][coveralls-image]][coveralls-url] +> ONVIF CLIENT TO MANAGE CAMERA + + +## Install + +```sh +$ npm install --save onvif-soap +``` + + +## Usage + +```js +var onvifSoap = require('onvif-soap'); + +onvifSoap('Rainbow'); +``` + +## License + +MIT © [Stéphane GUILLY]() + + +[npm-image]: https://badge.fury.io/js/onvif-soap.svg +[npm-url]: https://npmjs.org/package/onvif-soap +[travis-image]: https://travis-ci.org/sguilly/onvif-soap.svg?branch=master +[travis-url]: https://travis-ci.org/sguilly/onvif-soap +[daviddm-image]: https://david-dm.org/sguilly/onvif-soap.svg?theme=shields.io +[daviddm-url]: https://david-dm.org/sguilly/onvif-soap +[coveralls-image]: https://coveralls.io/repos/sguilly/onvif-soap/badge.svg +[coveralls-url]: https://coveralls.io/r/sguilly/onvif-soap diff --git a/example.js b/example.js new file mode 100644 index 0000000..3be8e05 --- /dev/null +++ b/example.js @@ -0,0 +1,59 @@ +/** + * Created by sguilly on 16/07/2015. + */ +var Cam = require('./lib/onvif').Cam; + +Cam.LoadWsdl(function () { + var cam = new Cam({ + hostname: '192.168.0.31', + username: 'admin', + password: 'pbjsteam' + }); + + var cam1 = new Cam({ + hostname: '192.168.0.19', + username: 'admin', + password: 'pbjsteam' + }); + + var cam2 = new Cam({ + hostname: '192.168.0.33', + username: 'admin', + password: 'pbjsteam' + }); + + + + cam1.deviceCtrl('GetDeviceInformation').then(function (values) { + console.log(values); + }); +/* + cam1.deviceCtrl('GetServices').then(function (values) { + console.log(values); + }); + + cam1.mediaCtrl('GetSnapshotUri').then(function (values) { + console.log(values); + });*/ + + + + // cam1.deviceCtrl('GetDeviceInformation').then(function(values) { + // console.log(values); + // }); + // + //cam2.deviceCtrl('GetDeviceInformation').then(function(values) { + // console.log(values); + //}); + + + + + + + + + + +}); + diff --git a/gulpfile.js b/gulpfile.js new file mode 100644 index 0000000..baf7724 --- /dev/null +++ b/gulpfile.js @@ -0,0 +1,66 @@ +'use strict'; +var path = require('path'); +var gulp = require('gulp'); +var mocha = require('gulp-mocha'); +var jshint = require('gulp-jshint'); +var jscs = require('gulp-jscs'); +var istanbul = require('gulp-istanbul'); +var coveralls = require('gulp-coveralls'); +var babel = require('gulp-babel'); +var plumber = require('gulp-plumber'); + +var handleErr = function (err) { + console.log(err.message); + process.exit(1); +}; + +gulp.task('static', function () { + return gulp.src([ + '**/*.js', + '!node_modules/**' + ]) + .pipe(jshint('.jshintrc')) + .pipe(jshint.reporter('jshint-stylish')) + .pipe(jshint.reporter('fail')) + .pipe(jscs()) + .on('error', handleErr); +}); + +gulp.task('pre-test', function () { + return gulp.src('lib/**/*.js') + .pipe(babel()) + .pipe(istanbul({includeUntested: true})) + .pipe(istanbul.hookRequire()); +}); + +gulp.task('test', ['pre-test'], function (cb) { + var mochaErr; + + gulp.src('test/**/*.js') + .pipe(plumber()) + .pipe(mocha({reporter: 'spec', require: ['babel-core/register']})) + .on('error', function (err) { + mochaErr = err; + }) + .pipe(istanbul.writeReports()) + .on('end', function () { + cb(mochaErr); + }); +}); + +gulp.task('coveralls', ['test'], function () { + if (!process.env.CI) { + return; + } + + return gulp.src(path.join(__dirname, 'coverage/lcov.info')) + .pipe(coveralls()); +}); + +gulp.task('babel', function () { + return gulp.src('lib/**/*.js') + .pipe(babel()) + .pipe(gulp.dest('dist')); +}); + +gulp.task('default', ['static', 'test', 'coveralls']); diff --git a/lib/cam.js b/lib/cam.js new file mode 100644 index 0000000..4a576ac --- /dev/null +++ b/lib/cam.js @@ -0,0 +1,242 @@ +/** + * Created by sguilly on 16/07/2015. + */ +var locks = require('locks'); + +var uuid = require('node-uuid'); + +var Q = require('q'); +const soap = require('soap'); + +var device; +var mutexDevice = locks.createMutex(); +var mutexMedia = locks.createMutex(); +var event; +var media; + +var getDevice = function() +{ + + var deferred = Q.defer(); + if(device) + { + deferred.resolve(device); + } + else + { + soap.createClient('./lib/devicemgmt.wsdl', function(err, client) { + + if (err) { + console.log('ERR=', err); + deferred.reject(err); + } + else { + + + client.addSoapHeader("urn:uuid:"+uuid.v1()+"","","",""); + client.addSoapHeader("http://www.w3.org/2005/08/addressing/anonymous"); + + device = client; + console.log('Device Mgmt is ready !!!'); + + console.log('--- Available Functions ---'); + + for(var fu in device.DeviceService.DevicePort) + { + if(typeof device.DeviceService.DevicePort[fu] === "function") { + // its a function if you get here + console.log(fu); + } + } + + console.log('----------------------'); + + deferred.resolve(device); + } + }); + } + return deferred.promise; + +}; + +var getEvent = function() +{ + + var deferred = Q.defer(); + if(event) + { + deferred.resolve(event); + } + else + { + soap.createClient('./lib/event.wsdl', function(err, client) { + + if (err) { + console.log('ERR=', err); + deferred.reject(err); + } + else { + + + client.addSoapHeader("urn:uuid:"+uuid.v1()+"","","",""); + client.addSoapHeader("http://www.w3.org/2005/08/addressing/anonymous"); + + event = client; + console.log('Event is ready !!!'); + + console.log('--- Available Functions ---'); + + for(var fu in event.EventService.EventPort) + { + if(typeof event.EventService.EventPort[fu] === "function") { + // its a function if you get here + console.log(fu); + } + } + + console.log('----------------------'); + + deferred.resolve(device); + } + }); + } + return deferred.promise; + +}; + +var getMedia = function() +{ + + var deferred = Q.defer(); + if(media) + { + deferred.resolve(media); + } + else + { + soap.createClient('./lib/media.wsdl', function(err, client) { + + if (err) { + console.log('ERR=', err); + deferred.reject(err); + } + else { + + + client.addSoapHeader("urn:uuid:"+uuid.v1()+"","","",""); + client.addSoapHeader("http://www.w3.org/2005/08/addressing/anonymous"); + + media = client; + console.log('Media is ready !!!'); + + console.log('--- Available Functions ---'); + + for(var fu in media.MediaService.MediaPort) + { + if(typeof media.MediaService.MediaPort[fu] === "function") { + // its a function if you get here + console.log(fu); + } + } + + console.log('----------------------'); + + deferred.resolve(media); + } + }); + } + return deferred.promise; + +}; + + +var Cam = function(options) { + + this.hostname = options.hostname; + this.username = options.username; + this.password = options.password; + this.port = options.port ? options.port : 80; + +}; + +Cam.LoadWsdl = function(callback) { + getDevice().then(function(device) + { + getEvent().then(function(event) + { + getMedia().then(function(event) + { + callback.call(null); + }); + }); + + }); +}; + +Cam.prototype.deviceCtrl = function(name) { + + var deferred = Q.defer(); + + var that = this; + + mutexDevice.lock(function () { + //device.setSecurity(new soap.WSSecurity(that.username, that.password,'PasswordDigest')); + //device.setEndpoint('http://'+that.hostname+'/onvif/device_service'); + + if(device.DeviceService.DevicePort[name]) { + device.DeviceService.DevicePort[name](function(err,values) + { + if(err) + { + deferred.reject(err) + } + else{ + deferred.resolve(values); + } + }); + } + else{ + console.log(name+' -> la méthode n\'existe pas'); + deferred.reject(); + } + mutexDevice.unlock(); + }); + + return deferred.promise; +}; + +Cam.prototype.mediaCtrl = function(name) { + + var deferred = Q.defer(); + + var that = this; + + mutexMedia.lock(function () { + //media.setSecurity(new soap.WSSecurity(that.username, that.password,'PasswordDigest')); + //media.setEndpoint('http://'+that.hostname+'/onvif/media_service'); + + if(media.DeviceService.DevicePort[name]) { + media.DeviceService.DevicePort[name](function(err,values) + { + if(err) + { + deferred.reject(err) + } + else{ + deferred.resolve(values); + } + }); + } + else{ + console.log(name+' -> la méthode n\'existe pas'); + deferred.reject(); + } + mutexMedia.unlock(); + }); + + return deferred.promise; +}; + +module.exports = { + Cam: Cam +}; diff --git a/lib/devicemgmt.wsdl b/lib/devicemgmt.wsdl new file mode 100644 index 0000000..4561355 --- /dev/null +++ b/lib/devicemgmt.wsdl @@ -0,0 +1,3787 @@ + + + + + + + + + + + + + + Indicates if the service capabilities (untyped) should be included in the response. + + + + + + + + + + + Each Service element contains information about one service. + + + + + + + + + + + Namespace of the service being described. This parameter allows to match the service capabilities to the service. Note that only one set of capabilities is supported per namespace. + + + + + The transport addresses where the service can be reached. The scheme and IP part shall match the one used in the request (i.e. the GetServices request). + + + + + + + + The placeholder for the service capabilities. The service capability element shall be returned here. For example for the device service that would be the tds:DeviceServiceCapabilities element (not complextype). + + + + + + + + The version of the service (not the ONVIF core spec version). + + + + + + + + + + + + + + + + + + The capabilities for the device service is returned in the Capabilities element. + + + + + + + + + + + Network capabilities. + + + + + Security capabilities. + + + + + System capabilities. + + + + + Capabilities that do not fit in any of the other categories. + + + + + + + + + + Indicates support for IP filtering. + + + + + Indicates support for zeroconf. + + + + + Indicates support for IPv6. + + + + + Indicates support for dynamic DNS configuration. + + + + + Indicates support for IEEE 802.11 configuration. + + + + + Indicates the maximum number of Dot1X configurations supported by the device + + + + + Indicates support for retrieval of hostname from DHCP. + + + + + Maximum number of NTP servers supported by the devices SetNTP command. + + + + + Indicates support for Stateful IPv6 DHCP. + + + + + + + + + + + + Indicates support for TLS 1.0. + + + + + Indicates support for TLS 1.1. + + + + + Indicates support for TLS 1.2. + + + + + Indicates support for onboard key generation. + + + + + Indicates support for access policy configuration. + + + + + Indicates support for the ONVIF default access policy. + + + + + Indicates support for IEEE 802.1X configuration. + + + + + Indicates support for remote user configuration. Used when accessing another device. + + + + + Indicates support for WS-Security X.509 token. + + + + + Indicates support for WS-Security SAML token. + + + + + Indicates support for WS-Security Kerberos token. + + + + + Indicates support for WS-Security Username token. + + + + + Indicates support for WS over HTTP digest authenticated communication layer. + + + + + Indicates support for WS-Security REL token. + + + + + EAP Methods supported by the device. The int values refer to the IANA EAP Registry. + + + + + The maximum number of users that the device supports. + + + + + + + + + Indicates support for WS Discovery resolve requests. + + + + + Indicates support for WS-Discovery Bye. + + + + + Indicates support for remote discovery. + + + + + Indicates support for system backup through MTOM. + + + + + Indicates support for retrieval of system logging through MTOM. + + + + + Indicates support for firmware upgrade through MTOM. + + + + + Indicates support for system backup through MTOM. + + + + + Indicates support for system backup through HTTP. + + + + + Indicates support for retrieval of system logging through HTTP. + + + + + Indicates support for retrieving support information through HTTP. + + + + + + + + + Lists of commands supported by SendAuxiliaryCommand. + + + + + + + + + + + + + + + + The manufactor of the device. + + + + + The device model. + + + + + The firmware version in the device. + + + + + The serial number of the device. + + + + + The hardware ID of the device. + + + + + + + + + + + + Defines if the date and time is set via NTP or manually. + + + + + Automatically adjust Daylight savings if defined in TimeZone. + + + + + The time zone in POSIX 1003.1 format + + + + + Date and time in UTC. If time is obtained via NTP, UTCDateTime has no meaning + + + + + + + + + + + + + + + + + + + + + + + Contains information whether system date and time are set manually or by NTP, daylight savings is on or off, time zone in POSIX 1003.1 format and system date and time in UTC and also local system date and time. + + + + + + + + + + + + Specifies the factory default action type. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Contains the reboot message sent by the device. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Contains the arbitary device diagnostics information. + + + + + + + + + + + + Specifies the type of system log to get. + + + + + + + + + + + Contains the system log information. + + + + + + + + + + + + + + + + + + Contains a list of URI definining the device scopes. Scope parameters can be of two types: fixed and configurable. Fixed parameters can not be altered. + + + + + + + + + + + + Contains a list of scope parameters that will replace all existing configurable scope parameters. + + + + + + + + + + + + + + + + + + Contains a list of new configurable scope parameters that will be added to the existing configurable scope. + + + + + + + + + + + + + + + + + + Contains a list of URIs that should be removed from the device scope.
+ Note that the response message always will match the request or an error will be returned. The use of the response is for that reason deprecated. +
+
+
+
+
+
+ + + + + + Contains a list of URIs that has been removed from the device scope + + + + + + + + + + + + + + + + + + + Indicator of discovery mode: Discoverable, NonDiscoverable. + + + + + + + + + + + + + + Indicator of discovery mode: Discoverable, NonDiscoverable. + + + + + + + + + + + + + + + + + + + + + + + + + + Indicator of discovery mode: Discoverable, NonDiscoverable. + + + + + + + + + + + + + + Indicator of discovery mode: Discoverable, NonDiscoverable. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Contains a list of the onvif users and following information is included in each entry: username and user level. + + + + + + + + + + + + Creates new device users and corresponding credentials. Each user entry includes: username, password and user level. Either all users are created successfully or a fault message MUST be returned without creating any user. If trying to create several users with exactly the same username the request is rejected and no users are created. If password is missing, then fault message Too weak password is returned. + + + + + + + + + + + + + + + + + + Deletes users on an device and there may exist users that cannot be deleted to ensure access to the unit. Either all users are deleted successfully or a fault message MUST be returned and no users be deleted. If a username exists multiple times in the request, then a fault message is returned. + + + + + + + + + + + + + + + + + + Updates the credentials for one or several users on an device. Either all change requests are processed successfully or a fault message MUST be returned. If the request contains the same username multiple times, a fault message is returned. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + List of categories to retrieve capability information on. + + + + + + + + + + + + + Capability information. + + + + + + + + + + + + + + + + + + + Contains the hostname information. + + + + + + + + + + + + The hostname to set. + + + + + + + + + + + + + + + + + + True if the hostname shall be obtained via DHCP. + + + + + + + + + + + + Indicates whether or not a reboot is required after configuration updates. + + + + + + + + + + + + + + + + + + + + DNS information. + + + + + + + + + + + + + + Indicate if the DNS address is to be retrieved using DHCP. + + + + + + + DNS search domain. + + + + + + + DNS address(es) set manually. + + + + + + + + + + + + + + + + + + + + + + + + + + NTP information. + + + + + + + + + + + + + + Indicate if NTP address information is to be retrieved using DHCP. + + + + + + + Manual NTP settings. + + + + + + + + + + + + + + + + + + + + + + + + + + Dynamic DNS information. + + + + + + + + + + + + + + Dynamic DNS type. + + + + + + + DNS name. + + + + + + + DNS record time to live. + + + + + + + + + + + + + + + + + + + + + + + + + + List of network interfaces. + + + + + + + + + + + + + + Symbolic network interface name. + + + + + + + Network interface name. + + + + + + + + + + + + + Indicates whether or not a reboot is required after configuration updates. + If a device responds with RebootNeeded set to false, the device can be reached + via the new IP address without further action. A client should be aware that a device + may not be responsive for a short period of time until it signals availability at + the new address via the discovery Hello messages. + If a device responds with RebootNeeded set to true, it will be further available under + its previous IP address. The settings will only be activated when the device is + rebooted via the SystemReboot command. + + + + + + + + + + + + + + + + + + + Contains an array of defined protocols supported by the device. There are three protocols defined; HTTP, HTTPS and RTSP. The following parameters can be retrieved for each protocol: port and enable/disable. + + + + + + + + + + + + Configures one or more defined network protocols supported by the device. There are currently three protocols defined; HTTP, HTTPS and RTSP. The following parameters can be set for each protocol: port and enable/disable. + + + + + + + + + + + + + + + + + + + + + + + + Gets the default IPv4 and IPv6 gateway settings from the device. + + + + + + + + + + + + Sets IPv4 gateway address used as default setting. + + + + + Sets IPv6 gateway address used as default setting. + + + + + + + + + + + + + + + + + + + + + + + + Contains the zero-configuration. + + + + + + + + + + + + Unique identifier referencing the physical interface. + + + + + Specifies if the zero-configuration should be enabled or not. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Certificate id. + + + + + Identification of the entity associated with the public-key. + + + + + Certificate validity start date. + + + + + Certificate expiry start date. + + + + + + + + + + + + base64 encoded DER representation of certificate. + + + + + + + + + + + + + + + + + + + + Id and base64 encoded DER representation of all available certificates. + + + + + + + + + + + + + + + + + + + + Indicates if a certificate is used in an optional HTTPS configuration of the device. + + + + + + + + + + + + + + Indicates if a certificate is to be used in an optional HTTPS configuration of the device. + + + + + + + + + + + + + + + + + + + + List of ids of certificates to delete. + + + + + + + + + + + + + + + + + + + + List of ids of certificates to delete. + + + + + + + Relative Dinstinguished Name(RDN) CommonName(CN). + + + + + + + Optional base64 encoded DER attributes. + + + + + + + + + + + + + base64 encoded DER representation of certificate. + + + + + + + + + + + + + + Optional id and base64 encoded DER representation of certificate. + + + + + + + + + + + + + + + + + + + + + + + + + + Indicates whether or not client certificates are required by device. + + + + + + + + + + + + + + Indicates whether or not client certificates are required by device. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Returns information about services on the device. + + + + + Returns the capabilities of the device service. The result is returned in a typed answer. + + + + + This operation gets basic device information from the device. + + + + + This operation sets the device system date and time. The device shall support the + configuration of the daylight saving setting and of the manual system date and time (if + applicable) or indication of NTP time (if applicable) through the SetSystemDateAndTime + command.
+ If system time and date are set manually, the client shall include UTCDateTime in the request.
+ A TimeZone token which is not formed according to the rules of IEEE 1003.1 section 8.3 is considered as invalid timezone.
+ The DayLightSavings flag should be set to true to activate any DST settings of the TimeZone string. + Clear the DayLightSavings flag if the DST portion of the TimeZone settings should be ignored. +
+ + +
+ + This operation gets the device system date and time. The device shall support the return of + the daylight saving setting and of the manual system date and time (if applicable) or indication + of NTP time (if applicable) through the GetSystemDateAndTime command.
+ A device shall provide the UTCDateTime information.
+ + +
+ + This operation reloads the parameters on the device to their factory default values. + + + + + This operation upgrades a device firmware version. After a successful upgrade the response + message is sent before the device reboots. The device should support firmware upgrade + through the UpgradeSystemFirmware command. The exact format of the firmware data is + outside the scope of this standard. + + + + + This operation reboots the device. + + + + + This operation restores the system backup configuration files(s) previously retrieved from a + device. The device should support restore of backup configuration file(s) through the + RestoreSystem command. The exact format of the backup configuration file(s) is outside the + scope of this standard. If the command is supported, it shall accept backup files returned by + the GetSystemBackup command. + + + + + This operation is retrieves system backup configuration file(s) from a device. The device + should support return of back up configuration file(s) through the GetSystemBackup command. + The backup is returned with reference to a name and mime-type together with binary data. + The exact format of the backup configuration files is outside the scope of this standard. + + + + + This operation gets a system log from the device. The exact format of the system logs is outside the scope of this standard. + + + + + This operation gets arbitary device diagnostics information from the device. + + + + + This operation requests the scope parameters of a device. The scope parameters are used in + the device discovery to match a probe message, see Section 7. The Scope parameters are of + two different types:
    +
  • Fixed
  • +
  • Configurable
  • +
+ Fixed scope parameters are permanent device characteristics and cannot be removed through the device management interface. + The scope type is indicated in the scope list returned in the get scope parameters response. A device shall support + retrieval of discovery scope parameters through the GetScopes command. As some scope parameters are mandatory, + the device shall return a non-empty scope list in the response.
+ + +
+ + This operation sets the scope parameters of a device. The scope parameters are used in the + device discovery to match a probe message. + This operation replaces all existing configurable scope parameters (not fixed parameters). If + this shall be avoided, one should use the scope add command instead. The device shall + support configuration of discovery scope parameters through the SetScopes command. + + + + + This operation adds new configurable scope parameters to a device. The scope parameters + are used in the device discovery to match a probe message. The device shall + support addition of discovery scope parameters through the AddScopes command. + + + + + This operation deletes scope-configurable scope parameters from a device. The scope + parameters are used in the device discovery to match a probe message, see Section 7. The + device shall support deletion of discovery scope parameters through the RemoveScopes + command. + Table + + + + + This operation gets the discovery mode of a device. See Section 7.2 for the definition of the + different device discovery modes. The device shall support retrieval of the discovery mode + setting through the GetDiscoveryMode command. + + + + + This operation sets the discovery mode operation of a device. See Section 7.2 for the + definition of the different device discovery modes. The device shall support configuration of + the discovery mode setting through the SetDiscoveryMode command. + + + + + This operation gets the remote discovery mode of a device. See Section 7.4 for the definition + of remote discovery extensions. A device that supports remote discovery shall support + retrieval of the remote discovery mode setting through the GetRemoteDiscoveryMode + command. + + + + + This operation sets the remote discovery mode of operation of a device. See Section 7.4 for + the definition of remote discovery remote extensions. A device that supports remote discovery + shall support configuration of the discovery mode setting through the + SetRemoteDiscoveryMode command. + + + + + This operation gets the remote DP address or addresses from a device. If the device supports + remote discovery, as specified in Section 7.4, the device shall support retrieval of the remote + DP address(es) through the GetDPAddresses command. + + + + + This operation sets the remote DP address or addresses on a device. If the device supports + remote discovery, as specified in Section 7.4, the device shall support configuration of the + remote DP address(es) through the SetDPAddresses command. + + + + + A client can ask for the device service endpoint reference address property that can be used + to derive the password equivalent for remote user operation. The device shall support the + GetEndpointReference command returning the address property of the device service + endpoint reference. + + + + + This operation returns the configured remote user (if any). A device supporting remote user + handling shall support this operation. The user is only valid for the WS-UserToken profile or + as a HTTP / RTSP user.
+ The algorithm to use for deriving the password is described in section 5.12.2.1 of the core specification.
+ + +
+ + This operation sets the remote user. A device supporting remote user handling shall support this + operation. The user is only valid for the WS-UserToken profile or as a HTTP / RTSP user.
+ The password that is set shall always be the original (not derived) password.
+ If UseDerivedPassword is set password derivation shall be done by the device when connecting to a + remote device.The algorithm to use for deriving the password is described in section 5.12.2.1 of the core specification.
+ To remove the remote user SetRemoteUser should be called without the RemoteUser parameter.
+ + +
+ + This operation lists the registered users and corresponding credentials on a device. The + device shall support retrieval of registered device users and their credentials for the user + token through the GetUsers command. + + + + + This operation creates new device users and corresponding credentials on a device for authentication purposes. + The device shall support creation of device users and their credentials through the CreateUsers + command. Either all users are created successfully or a fault message shall be returned + without creating any user.
+ ONVIF compliant devices are recommended to support password length of at least 28 bytes, + as clients may follow the password derivation mechanism which results in 'password + equivalent' of length 28 bytes, as described in section 3.1.2 of the ONVIF security white paper.
+ + +
+ + This operation deletes users on a device. The device shall support deletion of device users and their credentials + through the DeleteUsers command. A device may have one or more fixed users + that cannot be deleted to ensure access to the unit. Either all users are deleted successfully or a + fault message shall be returned and no users be deleted. + + + + + This operation updates the settings for one or several users on a device for authentication purposes. + The device shall support update of device users and their credentials through the SetUser command. + Either all change requests are processed successfully or a fault message shall be returned and no change requests be processed. + + + + + It is possible for an endpoint to request a URL that can be used to retrieve the complete + schema and WSDL definitions of a device. The command gives in return a URL entry point + where all the necessary product specific WSDL and schema definitions can be retrieved. The + device shall provide a URL for WSDL and schema download through the GetWsdlUrl command. + + + + + Any endpoint can ask for the capabilities of a device using the capability exchange request + response operation. The device shall indicate all its ONVIF compliant capabilities through the + GetCapabilities command. + The capability list includes references to the addresses (XAddr) of the service implementing + the interface operations in the category. Apart from the addresses, the + capabilities only reflect optional functions. + + + + + This operation is used by an endpoint to get the hostname from a device. The device shall + return its hostname configurations through the GetHostname command. + + + + + This operation sets the hostname on a device. It shall be possible to set the device hostname + configurations through the SetHostname command.
+ A device shall accept string formated according to RFC 1123 section 2.1 or alternatively to RFC 952, + other string shall be considered as invalid strings. +
+ + +
+ + This operation controls whether the hostname is set manually or retrieved via DHCP. + + + + + This operation gets the DNS settings from a device. The device shall return its DNS + configurations through the GetDNS command. + + + + + This operation sets the DNS settings on a device. It shall be possible to set the device DNS + configurations through the SetDNS command. + + + + + This operation gets the NTP settings from a device. If the device supports NTP, it shall be + possible to get the NTP server settings through the GetNTP command. + + + + + This operation sets the NTP settings on a device. If the device supports NTP, it shall be + possible to set the NTP server settings through the SetNTP command.
+ A device shall accept string formated according to RFC 1123 section 2.1 or alternatively to RFC 952, + other string shall be considered as invalid strings.
+ Changes to the NTP server list will not affect the clock mode DateTimeType. Use SetSystemDateAndTime to activate NTP operation. +
+ + +
+ + This operation gets the dynamic DNS settings from a device. If the device supports dynamic + DNS as specified in [RFC 2136] and [RFC 4702], it shall be possible to get the type, name + and TTL through the GetDynamicDNS command. + + + + + This operation sets the dynamic DNS settings on a device. If the device supports dynamic + DNS as specified in [RFC 2136] and [RFC 4702], it shall be possible to set the type, name + and TTL through the SetDynamicDNS command. + + + + + This operation gets the network interface configuration from a device. The device shall + support return of network interface configuration settings as defined by the NetworkInterface + type through the GetNetworkInterfaces command. + + + + + This operation sets the network interface configuration on a device. The device shall support + network configuration of supported network interfaces through the SetNetworkInterfaces + command.
+ For interoperability with a client unaware of the IEEE 802.11 extension a device shall retain + its IEEE 802.11 configuration if the IEEE 802.11 configuration element isn’t present in the + request.
+ + +
+ + This operation gets defined network protocols from a device. The device shall support the + GetNetworkProtocols command returning configured network protocols. + + + + + This operation configures defined network protocols on a device. The device shall support + configuration of defined network protocols through the SetNetworkProtocols command. + + + + + This operation gets the default gateway settings from a device. The device shall support the + GetNetworkDefaultGateway command returning configured default gateway address(es). + + + + + This operation sets the default gateway settings on a device. The device shall support + configuration of default gateway through the SetNetworkDefaultGateway command. + + + + + This operation gets the zero-configuration from a device. If the device supports dynamic IP + configuration according to [RFC3927], it shall support the return of IPv4 zero configuration + address and status through the GetZeroConfiguration command.
+ Devices supporting zero configuration on more than one interface shall use the extension to list the additional interface settings.
+ + +
+ + This operation sets the zero-configuration. Use GetCapalities to get if zero-zero-configuration is supported or not. + + + + + This operation gets the IP address filter settings from a device. If the device supports device + access control based on IP filtering rules (denied or accepted ranges of IP addresses), the + device shall support the GetIPAddressFilter command. + + + + + This operation sets the IP address filter settings on a device. If the device supports device + access control based on IP filtering rules (denied or accepted ranges of IP addresses), the + device shall support configuration of IP filtering rules through the SetIPAddressFilter + command. + + + + + This operation adds an IP filter address to a device. If the device supports device access + control based on IP filtering rules (denied or accepted ranges of IP addresses), the device + shall support adding of IP filtering addresses through the AddIPAddressFilter command. + + + + + This operation deletes an IP filter address from a device. If the device supports device access + control based on IP filtering rules (denied or accepted ranges of IP addresses), the device + shall support deletion of IP filtering addresses through the RemoveIPAddressFilter command. + + + + + Access to different services and sub-sets of services should be subject to access control. The + WS-Security framework gives the prerequisite for end-point authentication. Authorization + decisions can then be taken using an access security policy. This standard does not mandate + any particular policy description format or security policy but this is up to the device + manufacturer or system provider to choose policy and policy description format of choice. + However, an access policy (in arbitrary format) can be requested using this command. If the + device supports access policy settings based on WS-Security authentication, then the device + shall support this command. + + + + + This command sets the device access security policy (for more details on the access security + policy see the Get command). If the device supports access policy settings + based on WS-Security authentication, then the device shall support this command. + + + + + This operation generates a private/public key pair and also can create a self-signed device + certificate as a result of key pair generation. The certificate is created using a suitable + onboard key pair generation mechanism.
+ If a device supports onboard key pair generation, the device that supports TLS shall support + this certificate creation command. And also, if a device supports onboard key pair generation, + the device that support IEEE 802.1X shall support this command for the purpose of key pair + generation. Certificates and key pairs are identified using certificate IDs. These IDs are either + chosen by the certificate generation requester or by the device (in case that no ID value is + given).
+ + +
+ + This operation gets all device server certificates (including self-signed) for the purpose of TLS + authentication and all device client certificates for the purpose of IEEE 802.1X authentication. + This command lists only the TLS server certificates and IEEE 802.1X client certificates for the + device (neither trusted CA certificates nor trusted root certificates). The certificates are + returned as binary data. A device that supports TLS shall support this command and the + certificates shall be encoded using ASN.1 [X.681], [X.682], [X.683] DER [X.690] encoding + rules. + + + + + This operation is specific to TLS functionality. This operation gets the status + (enabled/disabled) of the device TLS server certificates. A device that supports TLS shall + support this command. + + + + + This operation is specific to TLS functionality. This operation sets the status (enable/disable) + of the device TLS server certificates. A device that supports TLS shall support this command. + Typically only one device server certificate is allowed to be enabled at a time. + + + + + This operation deletes a certificate or multiple certificates. The device MAY also delete a + private/public key pair which is coupled with the certificate to be deleted. The device that + support either TLS or IEEE 802.1X shall support the deletion of a certificate or multiple + certificates through this command. Either all certificates are deleted successfully or a fault + message shall be returned without deleting any certificate. + + + + + This operation requests a PKCS #10 certificate signature request from the device. The + returned information field shall be either formatted exactly as specified in [PKCS#10] or PEM + encoded [PKCS#10] format. In order for this command to work, the device must already have + a private/public key pair. This key pair should be referred by CertificateID as specified in the + input parameter description. This CertificateID refers to the key pair generated using + CreateCertificate command.
+ A device that support onboard key pair generation that supports either TLS or IEEE 802.1X + using client certificate shall support this command.
+ + +
+ + TLS server certificate(s) or IEEE 802.1X client certificate(s) created using the PKCS#10 + certificate request command can be loaded into the device using this command (see Section + 8.4.13). The certificate ID in the request shall be present. The device may sort the received + certificate(s) based on the public key and subject information in the certificate(s). + The certificate ID in the request will be the ID value the client wish to have. The device is + supposed to scan the generated key pairs present in the device to identify which is the + correspondent key pair with the loaded certificate and then make the link between the + certificate and the key pair.
+ A device that supports onboard key pair generation that support either TLS or IEEE 802.1X + shall support this command.
+ The certificates shall be encoded using ASN.1 [X.681], [X.682], [X.683] DER [X.690] encoding + rules.
+ This command is applicable to any device type, although the parameter name is called for + historical reasons NVTCertificate.
+ + +
+ + This operation is specific to TLS functionality. This operation gets the status + (enabled/disabled) of the device TLS client authentication. A device that supports TLS shall + support this command. + + + + + This operation is specific to TLS functionality. This operation sets the status + (enabled/disabled) of the device TLS client authentication. A device that supports TLS shall + support this command. + + + + + This operation gets a list of all available relay outputs and their settings.
+ This method has been depricated with version 2.0. Refer to the DeviceIO service.
+ + +
+ + This operation sets the settings of a relay output. +
This method has been depricated with version 2.0. Refer to the DeviceIO service.
+ + +
+ + This operation sets the state of a relay output. +
This method has been depricated with version 2.0. Refer to the DeviceIO service.
+ + +
+ + Manage auxiliary commands supported by a device, such as controlling an Infrared (IR) lamp, + a heater or a wiper or a thermometer that is connected to the device.
+ The supported commands can be retrieved via the AuxiliaryCommands capability.
+ Although the name of the auxiliary commands can be freely defined, commands starting with the prefix tt: are + reserved to define frequently used commands and these reserved commands shall all share the "tt:command|parameter" syntax. +
    +
  • tt:Wiper|On – Request to start the wiper.
  • +
  • tt:Wiper|Off – Request to stop the wiper.
  • +
  • tt:Washer|On – Request to start the washer.
  • +
  • tt:Washer|Off – Request to stop the washer.
  • +
  • tt:WashingProcedure|On – Request to start the washing procedure.
  • +
  • tt: WashingProcedure |Off – Request to stop the washing procedure.
  • +
  • tt:IRLamp|On – Request to turn ON an IR illuminator attached to the unit.
  • +
  • tt:IRLamp|Off – Request to turn OFF an IR illuminator attached to the unit.
  • +
  • tt:IRLamp|Auto – Request to configure an IR illuminator attached to the unit so that it automatically turns ON and OFF.
  • +
+ A device that indicates auxiliary service capability shall support this command.
+ + +
+ + CA certificates will be loaded into a device and be used for the sake of following two cases. + The one is for the purpose of TLS client authentication in TLS server function. The other one + is for the purpose of Authentication Server authentication in IEEE 802.1X function. This + operation gets all CA certificates loaded into a device. A device that supports either TLS client + authentication or IEEE 802.1X shall support this command and the returned certificates shall + be encoded using ASN.1 [X.681], [X.682], [X.683] DER [X.690] encoding rules. + + + + + There might be some cases that a Certificate Authority or some other equivalent creates a + certificate without having PKCS#10 certificate signing request. In such cases, the certificate + will be bundled in conjunction with its private key. This command will be used for such use + case scenarios. The certificate ID in the request is optionally set to the ID value the client + wish to have. If the certificate ID is not specified in the request, device can choose the ID + accordingly.
+ This operation imports a private/public key pair into the device. + The certificates shall be encoded using ASN.1 [X.681], [X.682], [X.683] DER [X.690] encoding + rules.
+ A device that does not support onboard key pair generation and support either TLS or IEEE + 802.1X using client certificate shall support this command. A device that support onboard key + pair generation MAY support this command. The security policy of a device that supports this + operation should make sure that the private key is sufficiently protected.
+ + +
+ + This operation requests the information of a certificate specified by certificate ID. The device + should respond with its “Issuer DN”, “Subject DN”, “Key usage”, "Extended key usage”, “Key + Length”, “Version”, “Serial Number”, “Signature Algorithm” and “Validity” data as the + information of the certificate, as long as the device can retrieve such information from the + specified certificate.
+ A device that supports either TLS or IEEE 802.1X should support this command.
+ + +
+ + This command is used when it is necessary to load trusted CA certificates or trusted root + certificates for the purpose of verification for its counterpart i.e. client certificate verification in + TLS function or server certificate verification in IEEE 802.1X function.
+ A device that support either TLS or IEEE 802.1X shall support this command. As for the + supported certificate format, either DER format or PEM format is possible to be used. But a + device that support this command shall support at least DER format as supported format type. + The device may sort the received certificate(s) based on the public key and subject + information in the certificate(s). Either all CA certificates are loaded successfully or a fault + message shall be returned without loading any CA certificate.
+ + +
+ + This operation newly creates IEEE 802.1X configuration parameter set of the device. The + device shall support this command if it supports IEEE 802.1X. If the device receives this + request with already existing configuration token (Dot1XConfigurationToken) specification, the + device should respond with 'ter:ReferenceToken ' error to indicate there is some configuration + conflict. + + + + + While the CreateDot1XConfiguration command is trying to create a new configuration + parameter set, this operation modifies existing IEEE 802.1X configuration parameter set of + the device. A device that support IEEE 802.1X shall support this command. + + + + + This operation gets one IEEE 802.1X configuration parameter set from the device by + specifying the configuration token (Dot1XConfigurationToken).
+ A device that supports IEEE 802.1X shall support this command. + Regardless of whether the 802.1X method in the retrieved configuration has a password or + not, the device shall not include the Password element in the response.
+ + +
+ + This operation gets all the existing IEEE 802.1X configuration parameter sets from the device. + The device shall respond with all the IEEE 802.1X configurations so that the client can get to + know how many IEEE 802.1X configurations are existing and how they are configured.
+ A device that support IEEE 802.1X shall support this command.
+ Regardless of whether the 802.1X method in the retrieved configuration has a password or + not, the device shall not include the Password element in the response.
+ + +
+ + This operation deletes an IEEE 802.1X configuration parameter set from the device. Which + configuration should be deleted is specified by the 'Dot1XConfigurationToken' in the request. + A device that support IEEE 802.1X shall support this command. + + + + + This operation returns the IEEE802.11 capabilities. The device shall support + this operation. + + + + + This operation returns the status of a wireless network interface. The device shall support this + command. + + + + + This operation returns a lists of the wireless networks in range of the device. A device should + support this operation. + + + + + This operation is used to retrieve URIs from which system information may be downloaded + using HTTP. URIs may be returned for the following system information:
+ System Logs. Multiple system logs may be returned, of different types. The exact format of + the system logs is outside the scope of this specification.
+ Support Information. This consists of arbitrary device diagnostics information from a device. + The exact format of the diagnostic information is outside the scope of this specification.
+ System Backup. The received file is a backup file that can be used to restore the current + device configuration at a later date. The exact format of the backup configuration file is + outside the scope of this specification.
+ If the device allows retrieval of system logs, support information or system backup data, it + should make them available via HTTP GET. If it does, it shall support the GetSystemUris + command.
+ + +
+ + This operation initiates a firmware upgrade using the HTTP POST mechanism. The response + to the command includes an HTTP URL to which the upgrade file may be uploaded. The + actual upgrade takes place as soon as the HTTP POST operation has completed. The device + should support firmware upgrade through the StartFirmwareUpgrade command. The exact + format of the firmware data is outside the scope of this specification. + Firmware upgrade over HTTP may be achieved using the following steps:
    +
  1. Client calls StartFirmwareUpgrade.
  2. +
  3. Server responds with upload URI and optional delay value.
  4. +
  5. Client waits for delay duration if specified by server.
  6. +
  7. Client transmits the firmware image to the upload URI using HTTP POST.
  8. +
  9. Server reprograms itself using the uploaded image, then reboots.
  10. +
+ If the firmware upgrade fails because the upgrade file was invalid, the HTTP POST response + shall be “415 Unsupported Media Type”. If the firmware upgrade fails due to an error at the + device, the HTTP POST response shall be “500 Internal Server Error”.
+ The value of the Content-Type header in the HTTP POST request shall be “application/octetstream”.
+ + +
+ + This operation initiates a system restore from backed up configuration data using the HTTP + POST mechanism. The response to the command includes an HTTP URL to which the backup + file may be uploaded. The actual restore takes place as soon as the HTTP POST operation + has completed. Devices should support system restore through the StartSystemRestore + command. The exact format of the backup configuration data is outside the scope of this + specification.
+ System restore over HTTP may be achieved using the following steps:
    +
  1. Client calls StartSystemRestore.
  2. +
  3. Server responds with upload URI.
  4. +
  5. Client transmits the configuration data to the upload URI using HTTP POST.
  6. +
  7. Server applies the uploaded configuration, then reboots if necessary.
  8. +
+ If the system restore fails because the uploaded file was invalid, the HTTP POST response + shall be “415 Unsupported Media Type”. If the system restore fails due to an error at the + device, the HTTP POST response shall be “500 Internal Server Error”.
+ The value of the Content-Type header in the HTTP POST request shall be “application/octetstream”.
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/lib/event.wsdl b/lib/event.wsdl new file mode 100644 index 0000000..744b163 --- /dev/null +++ b/lib/event.wsdl @@ -0,0 +1,694 @@ + + + + + + + + + + + + + + + + + + + + + + + + The capabilities for the event service is returned in the Capabilities element. + + + + + + + + + + + + + Indicates that the WS Subscription policy is supported. + + + + + Indicates that the WS Pull Point is supported. + + + + + Indicates that the WS Pausable Subscription Manager Interface is supported. + + + + + Indication if the device supports the rate limitation policy. + + + + + Maximum number of supported notification producers as defined by WS-BaseNotification. + + + + + Maximum supported number of notification pull points. + + + + + + + + + + + + Optional XPATH expression to select specific topics. + + + + + Initial termination time. + + + + + Refer to Web Services Base Notification 1.3 (WS-BaseNotification). + + + + + + + + + + + + + + + + + Endpoint reference of the subscription to be used for pulling the messages. + + + + + Current time of the server for synchronization purposes. + + + + + Date time when the PullPoint will be shut down without further pull requests. + + + + + + + + + + + + + Maximum time to block until this method returns. + + + + + Upper limit for the number of messages to return at once. A server implementation may decide to return less messages. + + + + + + + + + + + + The date and time when the messages have been delivered by the web server to the client. + + + + + Date time when the PullPoint will be shut down without further pull requests. + + + + + List of messages. This list shall be empty in case of a timeout. + + + + + + + + + + + Maximum timeout supported by the device. + + + + + Maximum message limit supported by the device. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + List of topic namespaces supported. + + + + + True when topicset is fixed for all times. + + + + + Set of topics supported. + + + + + + Defines the XPath expression syntax supported for matching topic expressions.
+ The following TopicExpressionDialects are mandatory for an ONVIF compliant device (see Section 15.7.3): +
    +
  • http://docs.oasis-open.org/wsn/t-1/TopicExpression/Concrete
  • +
  • http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet.
  • +
+
+
+
+ + + + Defines the XPath function set supported for message content filtering.
+ The following MessageContentFilterDialects are mandatory for an ONVIF compliant device(see Section 15.5.5): +
    +
  • http://www.onvif.org/ver10/tev/messageContentFilter/ItemFilter.
  • +
+
+
+
+ + + + Optional ProducerPropertiesDialects. Refer to Web Services Base Notification 1.3 (WS-BaseNotification) for advanced filtering. + + + + + + The Message Content Description Language, introduced in Section 15.5.4, allows referencing + of vendor-specific types. In order to ease the integration of such types into a client application, + the GetEventPropertiesResponse shall list all URI locations to schema files whose types are + used in the description of notifications, with MessageContentSchemaLocation elements.
+ This list shall at least contain the URI of the ONVIF schema file.
+
+
+ + + + + +
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Returns the capabilities of the event service. The result is returned in a typed answer. + + + + + This method returns a PullPointSubscription that can be polled using PullMessages. + This message contains the same elements as the SubscriptionRequest of the WS-BaseNotification without the ConsumerReference.
+ If no Filter is specified the pullpoint notifies all occurring events to the client.
+ This method is mandatory.
+ + + + + + + + + + + + + + +
+ + The WS-BaseNotification specification defines a set of OPTIONAL WS-ResouceProperties. + This specification does not require the implementation of the WS-ResourceProperty interface. + Instead, the subsequent direct interface shall be implemented by an ONVIF compliant device + in order to provide information about the FilterDialects, Schema files and topics supported by + the device. + + + +
+ + + + This method pulls one or more messages from a PullPoint. + The device shall provide the following PullMessages command for all SubscriptionManager + endpoints returned by the CreatePullPointSubscription command. This method shall not wait until + the requested number of messages is available but return as soon as at least one message is available.
+ The command shall at least support a Timeout of one minute. In case a device supports retrieval of less messages + than requested it shall return these without generating a fault.
+ + + +
+ + Properties inform a client about property creation, changes and + deletion in a uniform way. When a client wants to synchronize its properties with the + properties of the device, it can request a synchronization point which repeats the current + status of all properties to which a client has subscribed. The PropertyOperation of all + produced notifications is set to “Initialized” (see Section 15.5). The Synchronization Point is + requested directly from the SubscriptionManager which was returned in either the + SubscriptionResponse or in the CreatePullPointSubscriptionResponse. The property update is + transmitted via the notification transportation of the notification interface. This method is mandatory. + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/lib/media.wsdl b/lib/media.wsdl new file mode 100644 index 0000000..f4d397c --- /dev/null +++ b/lib/media.wsdl @@ -0,0 +1,3695 @@ + + + + + + + + + + + + + + + + + + + + The capabilities for the media service is returned in the Capabilities element. + + + + + + + + + + + Media profile capabilities. + + + + + Streaming capabilities. + + + + + + + Indicates if GetSnapshotUri is supported. + + + + + Indicates whether or not Rotation feature is supported. + + + + + Indicates the support for changing video source mode. + + + + + Indicates if OSD is supported. + + + + + Indicates the support for the Efficient XML Interchange (EXI) binary XML format. + + + + + + + + + + + + + Maximum number of profiles supported. + + + + + + + + + + + + Indicates support for RTP multicast. + + + + + Indicates support for RTP over TCP. + + + + + Indicates support for RTP/RTSP/TCP. + + + + + Indicates support for non aggregate RTSP control. + + + + + Indicates the device does not support live media streaming via RTSP. + + + + + + + + + + + + + + + + + List of existing Video Sources + + + + + + + + + + + + + + + + + + List of existing Audio Sources + + + + + + + + + + + + + + + + + + List of existing Audio Outputs + + + + + + + + + + + + friendly name of the profile to be created + + + + + Optional token, specifying the unique identifier of the new profile.
A device supports at least a token length of 12 characters and characters "A-Z" | "a-z" | "0-9" | "-.".
+
+
+
+
+
+ + + + + + returns the new created profile + + + + + + + + + + + + this command requests a specific profile + + + + + + + + + + + returns the requested media profile + + + + + + + + + + + + + + + + + + + lists all profiles that exist in the media service + + + + + + + + + + + + Reference to the profile where the configuration should be added + + + + + Contains a reference to the VideoEncoderConfiguration to add + + + + + + + + + + + + + + + + + + Contains a reference to the media profile from which the + VideoEncoderConfiguration shall be removed. + + + + + + + + + + + + + + + + + + Reference to the profile where the configuration should be added + + + + + Contains a reference to the VideoSourceConfiguration to add + + + + + + + + + + + + + + + + + + Contains a reference to the media profile from which the + VideoSourceConfiguration shall be removed. + + + + + + + + + + + + + + + + + + Reference to the profile where the configuration should be added + + + + + Contains a reference to the AudioEncoderConfiguration to add + + + + + + + + + + + + + + + + + + Contains a reference to the media profile from which the + AudioEncoderConfiguration shall be removed. + + + + + + + + + + + + + + + + + + Reference to the profile where the configuration should be added + + + + + Contains a reference to the AudioSourceConfiguration to add + + + + + + + + + + + + + + + + + + Contains a reference to the media profile from which the + AudioSourceConfiguration shall be removed. + + + + + + + + + + + + + + + + + + Reference to the profile where the configuration should be added + + + + + Contains a reference to the PTZConfiguration to add + + + + + + + + + + + + + + + + + + Contains a reference to the media profile from which the + PTZConfiguration shall be removed. + + + + + + + + + + + + + + + + + + Reference to the profile where the configuration should be added + + + + + Contains a reference to the VideoAnalyticsConfiguration to add + + + + + + + + + + + + + + + + + + Contains a reference to the media profile from which the + VideoAnalyticsConfiguration shall be removed. + + + + + + + + + + + + + + + + + + Reference to the profile where the configuration should be added + + + + + Contains a reference to the MetadataConfiguration to add + + + + + + + + + + + + + + + + + + Contains a reference to the media profile from which the + MetadataConfiguration shall be removed. + + + + + + + + + + + + + + + + + + Reference to the profile where the configuration should be added + + + + + Contains a reference to the AudioOutputConfiguration to add + + + + + + + + + + + + + + + + + + Contains a reference to the media profile from which the + AudioOutputConfiguration shall be removed. + + + + + + + + + + + + + + + + + + This element contains a reference to the profile where the configuration should be added. + + + + + This element contains a reference to the AudioDecoderConfiguration to add. + + + + + + + + + + + + + + + + + + This element contains a reference to the media profile from which the AudioDecoderConfiguration shall be removed. + + + + + + + + + + + + + + + + + + This element contains a reference to the profile that should be deleted. + + + + + + + + + + + + + + + + + + + + + + + + + + This element contains a list of video encoder configurations. + + + + + + + + + + + + + + + + + + This element contains a list of video source configurations. + + + + + + + + + + + + + + + + + + This element contains a list of audio encoder configurations. + + + + + + + + + + + + + + + + + + This element contains a list of audio source configurations. + + + + + + + + + + + + + + + + + + This element contains a list of VideoAnalytics configurations. + + + + + + + + + + + + + + + + + + This element contains a list of metadata configurations + + + + + + + + + + + + + + + + + + + This element contains a list of audio output configurations + + + + + + + + + + + + + + + + + + This element contains a list of audio decoder configurations + + + + + + + + + + + + Token of the requested video source configuration. + + + + + + + + + + + + The requested video source configuration. + + + + + + + + + + + + Token of the requested video encoder configuration. + + + + + + + + + + + The requested video encoder configuration. + + + + + + + + + + + + Token of the requested audio source configuration. + + + + + + + + + + + The requested audio source configuration. + + + + + + + + + + + + Token of the requested audio encoder configuration. + + + + + + + + + + + The requested audio encoder configuration + + + + + + + + + + + + Token of the requested video analytics configuration. + + + + + + + + + + + The requested video analytics configuration. + + + + + + + + + + + + Token of the requested metadata configuration. + + + + + + + + + + + The requested metadata configuration. + + + + + + + + + + + + + Token of the requested audio output configuration. + + + + + + + + + + + + The requested audio output configuration. + + + + + + + + + + + + Token of the requested audio decoder configuration. + + + + + + + + + + + + The requested audio decoder configuration + + + + + + + + + + + + Contains the token of an existing media profile the configurations shall be compatible with. + + + + + + + + + + + Contains a list of video encoder configurations that are compatible with the specified media profile. + + + + + + + + + + + + Contains the token of an existing media profile the configurations shall be compatible with. + + + + + + + + + + + Contains a list of video source configurations that are compatible with the specified media profile. + + + + + + + + + + + + Contains the token of an existing media profile the configurations shall be compatible with. + + + + + + + + + + + Contains a list of audio encoder configurations that are compatible with the specified media profile. + + + + + + + + + + + + Contains the token of an existing media profile the configurations shall be compatible with. + + + + + + + + + + + Contains a list of audio source configurations that are compatible with the specified media profile. + + + + + + + + + + + + Contains the token of an existing media profile the configurations shall be compatible with. + + + + + + + + + + + Contains a list of video analytics configurations that are compatible with the specified media profile. + + + + + + + + + + + + Contains the token of an existing media profile the configurations shall be compatible with. + + + + + + + + + + + Contains a list of metadata configurations that are compatible with the specified media profile. + + + + + + + + + + + + + Contains the token of an existing media profile the configurations shall be compatible with. + + + + + + + + + + + Contains a list of audio output configurations that are compatible with the specified media profile. + + + + + + + + + + + + Contains the token of an existing media profile the configurations shall be compatible with. + + + + + + + + + + + Contains a list of audio decoder configurations that are compatible with the specified media profile. + + + + + + + + + + + + + + + + + Contains the modified video encoder configuration. The configuration shall exist in the device. + + + + + The ForcePersistence element is obsolete and should always be assumed to be true. + + + + + + + + + + + + + + + + + + Contains the modified video source configuration. The configuration shall exist in the device. + + + + + The ForcePersistence element is obsolete and should always be assumed to be true. + + + + + + + + + + + + + + + + + + Contains the modified audio encoder configuration. The configuration shall exist in the device. + + + + + The ForcePersistence element is obsolete and should always be assumed to be true. + + + + + + + + + + + + + + + + + + Contains the modified audio source configuration. The configuration shall exist in the device. + + + + + The ForcePersistence element is obsolete and should always be assumed to be true. + + + + + + + + + + + + + + + + + + Contains the modified video analytics configuration. The configuration shall exist in the device. + + + + + The ForcePersistence element is obsolete and should always be assumed to be true. + + + + + + + + + + + + + + + + + + Contains the modified metadata configuration. The configuration shall exist in the device. + + + + + The ForcePersistence element is obsolete and should always be assumed to be true. + + + + + + + + + + + + + + + + + + + Contains the modified audio output configuration. The configuration shall exist in the device. + + + + + The ForcePersistence element is obsolete and should always be assumed to be true. + + + + + + + + + + + + + + + + + + Contains the modified audio decoder configuration. The configuration shall exist in the device. + + + + + The ForcePersistence element is obsolete and should always be assumed to be true. + + + + + + + + + + + + + + + + + + Optional video source configurationToken that specifies an existing configuration that the options are intended for. + + + + + Optional ProfileToken that specifies an existing media profile that the options shall be compatible with. + + + + + + + + + + + This message contains the video source configuration options. If a video source configuration is specified, the options shall concern that particular configuration. If a media profile is specified, the options shall be compatible with that media profile. If no tokens are specified, the options shall be considered generic for the device. + + + + + + + + + + + + Optional video encoder configuration token that specifies an existing configuration that the options are intended for. + + + + + Optional ProfileToken that specifies an existing media profile that the options shall be compatible with. + + + + + + + + + + + + + + + + + + + Optional audio source configuration token that specifies an existing configuration that the options are intended for. + + + + + Optional ProfileToken that specifies an existing media profile that the options shall be compatible with. + + + + + + + + + + + This message contains the audio source configuration options. If a audio source configuration is specified, the options shall concern that particular configuration. If a media profile is specified, the options shall be compatible with that media profile. If no tokens are specified, the options shall be considered generic for the device. + + + + + + + + + + + + Optional audio encoder configuration token that specifies an existing configuration that the options are intended for. + + + + + Optional ProfileToken that specifies an existing media profile that the options shall be compatible with. + + + + + + + + + + + This message contains the audio encoder configuration options. If a audio encoder configuration is specified, the options shall concern that particular configuration. If a media profile is specified, the options shall be compatible with that media profile. If no tokens are specified, the options shall be considered generic for the device. + + + + + + + + + + + + Optional metadata configuration token that specifies an existing configuration that the options are intended for. + + + + + Optional ProfileToken that specifies an existing media profile that the options shall be compatible with. + + + + + + + + + + + This message contains the metadata configuration options. If a metadata configuration is specified, the options shall concern that particular configuration. If a media profile is specified, the options shall be compatible with that media profile. If no tokens are specified, the options shall be considered generic for the device. + + + + + + + + + + + + Optional audio output configuration token that specifies an existing configuration that the options are intended for. + + + + + Optional ProfileToken that specifies an existing media profile that the options shall be compatible with. + + + + + + + + + + + This message contains the audio output configuration options. If a audio output configuration is specified, the options shall concern that particular configuration. If a media profile is specified, the options shall be compatible with that media profile. If no tokens are specified, the options shall be considered generic for the device. + + + + + + + + + + + + Optional audio decoder configuration token that specifies an existing configuration that the options are intended for. + + + + + Optional ProfileToken that specifies an existing media profile that the options shall be compatible with. + + + + + + + + + + + This message contains the audio decoder configuration options. If a audio decoder configuration is specified, the options shall concern that particular configuration. If a media profile is specified, the options shall be compatible with that media profile. If no tokens are specified, the options shall be considered generic for the device. + + + + + + + + + + + + Token of the video source configuration + + + + + + + + + + + The minimum guaranteed total number of encoder instances (applications) per VideoSourceConfiguration. The device is able to deliver the TotalNumber of streams + + + + + If a device limits the number of instances for respective Video Codecs the response contains the information how many Jpeg streams can be set up at the same time per VideoSource. + + + + + If a device limits the number of instances for respective Video Codecs the response contains the information how many H264 streams can be set up at the same time per VideoSource. + + + + + If a device limits the number of instances for respective Video Codecs the response contains the information how many Mpeg4 streams can be set up at the same time per VideoSource. + + + + + + + + + + + + Stream Setup that should be used with the uri + + + + + The ProfileToken element indicates the media profile to use and will define the configuration of the content of the stream. + + + + + + + + + + + + + + + + + + + + + + + Contains the token of the Profile that is used to define the multicast stream. + + + + + + + + + + + + + + + + + + Contains the token of the Profile that is used to define the multicast stream. + + + + + + + + + + + + + + + + + + Contains a Profile reference for which a Synchronization Point is requested. + + + + + + + + + + + + + + + + + + The ProfileToken element indicates the media profile to use and will define the source and dimensions of the snapshot. + + + + + + + + + + + + + + + + + + + + + + + Contains a video source reference for which a video source mode is requested. + + + + + + + + + + + Return the information for specified video source mode. + + + + + + + + + + + + Contains a video source reference for which a video source mode is requested. + + + + + Indicate video source mode. + + + + + + + + + + + The response contains information about rebooting after returning response. When Reboot is set true, a device will reboot automatically after setting mode. + + + + + + + + + Indication which encodings are supported for this video source. The list may contain one or more enumeration values of tt:VideoEncoding. + + + + + + + + + Max frame rate in frames per second for this video source mode. + + + + + Max horizontal and vertical resolution for this video source mode. + + + + + Indication which encodings are supported for this video source. The list may contain one or more enumeration values of tt:VideoEncoding. + + + + + After setting the mode if a device starts to reboot this value is true. If a device change the mode without rebooting this value is false. If true, configured parameters may not be guaranteed by the device after rebooting. + + + + + Informative description of this video source mode. This field should be described in English. + + + + + + + Indicate token for video source mode. + + + + + Indication of whether this mode is active. If active this value is true. In case of non-indication, it means as false. The value of true shall be had by only one video source mode. + + + + + + + + + + + + + + + + + + + Token of the Video Source Configuration, which has OSDs associated with are requested. If token not exist, request all available OSDs. + + + + + + + + + + + This element contains a list of requested OSDs. + + + + + + + + + + + + The GetOSD command fetches the OSD configuration if the OSD token is known. + + + + + + + + + + + + The requested OSD configuration. + + + + + + + + + + + + + Contains the modified OSD configuration. + + + + + + + + + + + + + + + + + + + + Video Source Configuration Token that specifies an existing video source configuration that the options shall be compatible with. + + + + + + + + + + + + + + + + + + + + + + + + + Contain the initial OSD configuration for create. + + + + + + + + + + + + Returns Token of the newly created OSD + + + + + + + + + + + + + This element contains a reference to the OSD configuration that should be deleted. + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Returns the capabilities of the media service. The result is returned in a typed answer. + + + + + + This command lists all available physical video inputs of the device. + + + + + This command lists all available physical audio inputs of the device. + + + + + This command lists all available physical audio outputs of the device. + + + + + + This operation creates a new empty media profile. The media profile shall be created in the + device and shall be persistent (remain after reboot). A created profile shall be deletable and a device shall set the “fixed” attribute to false in the + returned Profile. + + + + + If the profile token is already known, a profile can be fetched through the GetProfile command. + + + + + Any endpoint can ask for the existing media profiles of a device using the GetProfiles + command. Pre-configured or dynamically configured profiles can be retrieved using this + command. This command lists all configured profiles in a device. The client does not need to + know the media profile in order to use the command. + + + + + This operation adds a VideoEncoderConfiguration to an existing media profile. If a + configuration exists in the media profile, it will be replaced. The change shall be persistent. A device shall + support adding a compatible VideoEncoderConfiguration to a Profile containing a VideoSourceConfiguration and shall + support streaming video data of such a profile. + + + + + + This operation removes a VideoEncoderConfiguration from an existing media profile. If the + media profile does not contain a VideoEncoderConfiguration, the operation has no effect. The removal shall be persistent. + + + + + This operation adds a VideoSourceConfiguration to an existing media profile. If such a + configuration exists in the media profile, it will be replaced. The change shall be persistent. + + + + + This operation removes a VideoSourceConfiguration from an existing media profile. If the + media profile does not contain a VideoSourceConfiguration, the operation has no effect. The removal shall be persistent. Video source configurations should only be removed after removing a + VideoEncoderConfiguration from the media profile. + + + + + This operation adds an AudioEncoderConfiguration to an existing media profile. If a + configuration exists in the media profile, it will be replaced. The change shall be persistent. A device shall + support adding a compatible AudioEncoderConfiguration to a profile containing an AudioSourceConfiguration and shall + support streaming audio data of such a profile. + + + + + + This operation removes an AudioEncoderConfiguration from an existing media profile. If the + media profile does not contain an AudioEncoderConfiguration, the operation has no effect. + The removal shall be persistent. + + + + + This operation adds an AudioSourceConfiguration to an existing media profile. If a + configuration exists in the media profile, it will be replaced. The change shall be persistent. + + + + + This operation removes an AudioSourceConfiguration from an existing media profile. If the + media profile does not contain an AudioSourceConfiguration, the operation has no effect. The + removal shall be persistent. Audio source configurations should only be removed after removing an + AudioEncoderConfiguration from the media profile. + + + + + This operation adds a PTZConfiguration to an existing media profile. If a configuration exists + in the media profile, it will be replaced. The change shall be persistent. Adding a PTZConfiguration to a media profile means that streams using that media profile can + contain PTZ status (in the metadata), and that the media profile can be used for controlling + PTZ movement. + + + + + This operation removes a PTZConfiguration from an existing media profile. If the media profile + does not contain a PTZConfiguration, the operation has no effect. The removal shall be persistent. + + + + + This operation adds a VideoAnalytics configuration to an existing media profile. If a + configuration exists in the media profile, it will be replaced. The change shall be persistent. Adding a VideoAnalyticsConfiguration to a media profile means that streams using that media + profile can contain video analytics data (in the metadata) as defined by the submitted configuration reference. A profile containing only a video analytics configuration but no video source configuration is incomplete. Therefore, a client should first add a video source configuration to a profile before adding a video analytics configuration. The device can deny adding of a video analytics + configuration before a video source configuration. + + + + + This operation removes a VideoAnalyticsConfiguration from an existing media profile. If the media profile does not contain a VideoAnalyticsConfiguration, the operation has no effect. + The removal shall be persistent. + + + + + This operation adds a Metadata configuration to an existing media profile. If a configuration exists in the media profile, it will be replaced. The change shall be persistent. Adding a MetadataConfiguration to a Profile means that streams using that profile contain metadata. Metadata can consist of events, PTZ status, and/or video analytics data. + + + + + This operation removes a MetadataConfiguration from an existing media profile. If the media profile does not contain a MetadataConfiguration, the operation has no effect. The removal shall be persistent. + + + + + This operation adds an AudioOutputConfiguration to an existing media profile. If a configuration exists in the media profile, it will be replaced. The change shall be persistent. + + + + + This operation removes an AudioOutputConfiguration from an existing media profile. If the media profile does not contain an AudioOutputConfiguration, the operation has no effect. The removal shall be persistent. + + + + + This operation adds an AudioDecoderConfiguration to an existing media profile. If a configuration exists in the media profile, it shall be replaced. The change shall be persistent. + + + + + This operation removes an AudioDecoderConfiguration from an existing media profile. If the media profile does not contain an AudioDecoderConfiguration, the operation has no effect. The removal shall be persistent. + + + + + This operation deletes a profile. This change shall always be persistent. Deletion of a profile is only possible for non-fixed profiles + + + + + + This operation lists all existing video source configurations for a device. The client need not know anything about the video source configurations in order to use the command. + + + + + This operation lists all existing video encoder configurations of a device. This command lists all configured video encoder configurations in a device. The client need not know anything apriori about the video encoder configurations in order to use the command. + + + + + This operation lists all existing audio source configurations of a device. This command lists all audio source configurations in a device. The client need not know anything apriori about the audio source configurations in order to use the command. + + + + + This operation lists all existing device audio encoder configurations. The client need not know anything apriori about the audio encoder configurations in order to use the command. + + + + + This operation lists all video analytics configurations of a device. This command lists all configured video analytics in a device. The client need not know anything apriori about the video analytics in order to use the command. + + + + + This operation lists all existing metadata configurations. The client need not know anything apriori about the metadata in order to use the command. + + + + + This command lists all existing AudioOutputConfigurations of a device. The NVC need not know anything apriori about the audio configurations to use this command. + + + + + This command lists all existing AudioDecoderConfigurations of a device. The NVC need not know anything apriori about the audio decoder configurations in order to + use this command. + + + + + If the video source configuration token is already known, the video source configuration can be fetched through the GetVideoSourceConfiguration command. + + + + + If the video encoder configuration token is already known, the encoder configuration can be fetched through the GetVideoEncoderConfiguration command. + + + + + The GetAudioSourceConfiguration command fetches the audio source configurations if the audio source configuration token is already known. An + + + + + The GetAudioEncoderConfiguration command fetches the encoder configuration if the audio encoder configuration token is known. + + + + + The GetVideoAnalyticsConfiguration command fetches the video analytics configuration if the video analytics token is known. + + + + + The GetMetadataConfiguration command fetches the metadata configuration if the metadata token is known. + + + + + If the audio output configuration token is already known, the output configuration can be fetched through the GetAudioOutputConfiguration command. + + + + + If the audio decoder configuration token is already known, the decoder configuration can be fetched through the GetAudioDecoderConfiguration command. + + + + + + This operation lists all the video encoder configurations of the device that are compatible with a certain media profile. Each of the returned configurations shall be a valid input parameter for the AddVideoEncoderConfiguration command on the media profile. The result will vary depending on the capabilities, configurations and settings in the device. + + + + + This operation requests all the video source configurations of the device that are compatible + with a certain media profile. Each of the returned configurations shall be a valid input + parameter for the AddVideoSourceConfiguration command on the media profile. The result + will vary depending on the capabilities, configurations and settings in the device. + + + + + This operation requests all audio encoder configurations of a device that are compatible with a certain media profile. Each of the returned configurations shall be a valid input parameter for the AddAudioSourceConfiguration command on the media profile. The result varies depending on the capabilities, configurations and settings in the device. + + + + + This operation requests all audio source configurations of the device that are compatible with a certain media profile. Each of the returned configurations shall be a valid input parameter for the AddAudioEncoderConfiguration command on the media profile. The result varies depending on the capabilities, configurations and settings in the device. + + + + + This operation requests all video analytic configurations of the device that are compatible with a certain media profile. Each of the returned configurations shall be a valid input parameter for the AddVideoAnalyticsConfiguration command on the media profile. The result varies depending on the capabilities, configurations and settings in the device. + + + + + This operation requests all the metadata configurations of the device that are compatible with a certain media profile. Each of the returned configurations shall be a valid input parameter for the AddMetadataConfiguration command on the media profile. The result varies depending on the capabilities, configurations and settings in the device. + + + + + This command lists all audio output configurations of a device that are compatible with a certain media profile. Each returned configuration shall be a valid input for the + AddAudioOutputConfiguration command. + + + + + This operation lists all the audio decoder configurations of the device that are compatible with a certain media profile. Each of the returned configurations shall be a valid input parameter for the AddAudioDecoderConfiguration command on the media profile. + + + + + + This operation modifies a video source configuration. The ForcePersistence flag indicates if the changes shall remain after reboot of the device. Running streams using this configuration may be immediately updated according to the new settings. The changes are not guaranteed to take effect unless the client requests a new stream URI and restarts any affected stream. NVC methods for changing a running stream are out of scope for this specification. + + + + + This operation modifies a video encoder configuration. The ForcePersistence flag indicates if the changes shall remain after reboot of the device. Changes in the Multicast settings shall always be persistent. Running streams using this configuration may be immediately updated according to the new settings. The changes are not guaranteed to take effect unless the client requests a new stream URI and restarts any affected stream. NVC methods for changing a running stream are out of scope for this specification.
SessionTimeout is provided as a hint for keeping rtsp session by a device. If necessary the device may adapt parameter values for SessionTimeout elements without returning an error. For the time between keep alive calls the client shall adhere to the timeout value signaled via RTSP.
+ + +
+ + This operation modifies an audio source configuration. The ForcePersistence flag indicates if + the changes shall remain after reboot of the device. Running streams using this configuration + may be immediately updated according to the new settings. The changes are not guaranteed + to take effect unless the client requests a new stream URI and restarts any affected stream + NVC methods for changing a running stream are out of scope for this specification. + + + + + This operation modifies an audio encoder configuration. The ForcePersistence flag indicates if + the changes shall remain after reboot of the device. Running streams using this configuration may be immediately updated + according to the new settings. The changes are not guaranteed to take effect unless the client + requests a new stream URI and restarts any affected streams. NVC methods for changing a + running stream are out of scope for this specification. + + + + + A video analytics configuration is modified using this command. The ForcePersistence flag + indicates if the changes shall remain after reboot of the device or not. Running streams using + this configuration shall be immediately updated according to the new settings. Otherwise + inconsistencies can occur between the scene description processed by the rule engine and + the notifications produced by analytics engine and rule engine which reference the very same + video analytics configuration token. + + + + + This operation modifies a metadata configuration. The ForcePersistence flag indicates if the + changes shall remain after reboot of the device. Changes in the Multicast settings shall + always be persistent. Running streams using this configuration may be updated immediately + according to the new settings. The changes are not guaranteed to take effect unless the client + requests a new stream URI and restarts any affected streams. NVC methods for changing a + running stream are out of scope for this specification. + + + + + This operation modifies an audio output configuration. The ForcePersistence flag indicates if + the changes shall remain after reboot of the device. + + + + + This operation modifies an audio decoder configuration. The ForcePersistence flag indicates if + the changes shall remain after reboot of the device. + + + + + + This operation returns the available options (supported values and ranges for video source configuration parameters) when the video source parameters are + reconfigured If a video source configuration is specified, the options shall concern that + particular configuration. If a media profile is specified, the options shall be compatible with + that media profile. + + + + + This operation returns the available options (supported values and ranges for video encoder + configuration parameters) when the video encoder parameters are reconfigured.
+ For JPEG, MPEG4 and H264 extension elements have been defined that provide additional information. A device must provide the + XxxOption information for all encodings supported and should additionally provide the corresponding XxxOption2 information.
+ This response contains the available video encoder configuration options. If a video encoder configuration is specified, + the options shall concern that particular configuration. If a media profile is specified, the options shall be + compatible with that media profile. If no tokens are specified, the options shall be considered generic for the device. +
+ + +
+ + This operation returns the available options (supported values and ranges for audio source configuration parameters) when the audio source parameters are + reconfigured. If an audio source configuration is specified, the options shall concern that + particular configuration. If a media profile is specified, the options shall be compatible with + that media profile. + + + + + This operation returns the available options (supported values and ranges for audio encoder configuration parameters) when the audio encoder parameters are + reconfigured. + + + + + This operation returns the available options (supported values and ranges for metadata configuration parameters) for changing the metadata configuration. + + + + + This operation returns the available options (supported values and ranges for audio output configuration parameters) for configuring an audio output. + + + + + This command list the audio decoding capabilities for a given profile and configuration of a + device. + + + + + + The GetGuaranteedNumberOfVideoEncoderInstances command can be used to request the + minimum number of guaranteed video encoder instances (applications) per Video Source + Configuration. + + + + + + This operation requests a URI that can be used to initiate a live media stream using RTSP as + the control protocol. The returned URI shall remain valid indefinitely even if the profile is + changed. The ValidUntilConnect, ValidUntilReboot and Timeout Parameter shall be set + accordingly (ValidUntilConnect=false, ValidUntilReboot=false, timeout=PT0S).
+ The correct syntax for the StreamSetup element for these media stream setups defined in 5.1.1 of the streaming specification are as follows: +
    +
  1. RTP unicast over UDP: StreamType = "RTP_unicast", TransportProtocol = "UDP"
  2. +
  3. RTP over RTSP over HTTP over TCP: StreamType = "RTP_unicast", TransportProtocol = "HTTP"
  4. +
  5. RTP over RTSP over TCP: StreamType = "RTP_unicast", TransportProtocol = "RTSP"
  6. +
+
+ If a multicast stream is requested the VideoEncoderConfiguration, AudioEncoderConfiguration and MetadataConfiguration element inside the corresponding + media profile must be configured with valid multicast settings.
+ For full compatibility with other ONVIF services a device should not generate Uris longer than + 128 octets.
+ + +
+ + This command starts multicast streaming using a specified media profile of a device. + Streaming continues until StopMulticastStreaming is called for the same Profile. The + streaming shall continue after a reboot of the device until a StopMulticastStreaming request is + received. The multicast address, port and TTL are configured in the + VideoEncoderConfiguration, AudioEncoderConfiguration and MetadataConfiguration + respectively. + + + + + This command stop multicast streaming using a specified media profile of a device + + + + + Synchronization points allow clients to decode and correctly use all data after the + synchronization point. + For example, if a video stream is configured with a large I-frame distance and a client loses a + single packet, the client does not display video until the next I-frame is transmitted. In such + cases, the client can request a Synchronization Point which enforces the device to add an I-Frame as soon as possible. Clients can request Synchronization Points for profiles. The device + shall add synchronization points for all streams associated with this profile. + Similarly, a synchronization point is used to get an update on full PTZ or event status through + the metadata stream. + If a video stream is associated with the profile, an I-frame shall be added to this video stream. + If a PTZ metadata stream is associated to the profile, + the PTZ position shall be repeated within the metadata stream. + + + + + A client uses the GetSnapshotUri command to obtain a JPEG snapshot from the + device. The returned URI shall remain valid indefinitely even if the profile is changed. The + ValidUntilConnect, ValidUntilReboot and Timeout Parameter shall be set accordingly + (ValidUntilConnect=false, ValidUntilReboot=false, timeout=PT0S). The URI can be used for + acquiring a JPEG image through a HTTP GET operation. The image encoding will always be + JPEG regardless of the encoding setting in the media profile. The Jpeg settings + (like resolution or quality) may be taken from the profile if suitable. The provided + image will be updated automatically and independent from calls to GetSnapshotUri. + + + + + A device returns the information for current video source mode and settable video source modes of specified video source. A device that indicates a capability of VideoSourceModes shall support this command. + + + + + SetVideoSourceMode changes the media profile structure relating to video source for the specified video source mode. A device that indicates a capability of VideoSourceModes shall support this command. The behavior after changing the mode is not defined in this specification. + + + + + + Get the OSDs. + + + + + Get the OSD. + + + + + Get the OSD Options. + + + + + Set the OSD + + + + + Create the OSD. + + + + + Delete the OSD. + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/lib/onvif.js b/lib/onvif.js new file mode 100644 index 0000000..072485e --- /dev/null +++ b/lib/onvif.js @@ -0,0 +1,5 @@ +'use strict'; + +module.exports = { + Cam: require('./cam').Cam +}; diff --git a/lib/test.js b/lib/test.js new file mode 100644 index 0000000..8ac9224 --- /dev/null +++ b/lib/test.js @@ -0,0 +1,40 @@ +/** + * Created by sguilly on 16/07/2015. + */ +var soap = require('soap'); + +var device; + +soap.createClient('devicemgmt.wsdl', function(err, client) { + + + if(err) + { + console.log('ERR=',err); + } + else + { + client.setSecurity(new soap.WSSecurity('admin', 'pbjsteam','PasswordDigest')); + client.setEndpoint('http://192.168.0.19/onvif/device_service'); + + device = client; + + device.DeviceService.DevicePort.GetDeviceInformation(function(err,value) + { + + if(err) + { + console.log(err); + } + else + { + console.log('value'); + console.log(value); + + + } + + }); + + } +}); diff --git a/package.json b/package.json new file mode 100644 index 0000000..2ebfdcc --- /dev/null +++ b/package.json @@ -0,0 +1,39 @@ +{ + "name": "onvif-soap", + "version": "0.0.0", + "description": "ONVIF CLIENT TO MANAGE CAMERA", + "homepage": "", + "repository": "sguilly/onvif-soap", + "author": { + "name": "Stéphane GUILLY", + "email": "stephane.guilly@gmail.com", + "url": "" + }, + "files": [ + "lib" + ], + "main": "/lib/onvif-soap.js", + "keywords": [], + "devDependencies": { + "gulp": "^3.6.0", + "gulp-istanbul": "^0.8.1", + "gulp-jscs": "^1.1.0", + "gulp-jshint": "^1.5.3", + "gulp-mocha": "^2.0.0", + "gulp-plumber": "^1.0.0", + "jshint-stylish": "^1.0.0", + "gulp-coveralls": "^0.1.0", + "gulp-babel": "^5.1.0", + "babel-core": "^5.5.0" + }, + "scripts": { + "test": "gulp" + }, + "license": "MIT", + "dependencies": { + "locks": "^0.1.0", + "node-uuid": "^1.4.3", + "q": "^1.4.1", + "soap": "git+https://github.com/sguilly/node-soap.git" + } +} diff --git a/test/index.js b/test/index.js new file mode 100644 index 0000000..0179dd8 --- /dev/null +++ b/test/index.js @@ -0,0 +1,9 @@ +'use strict'; +import assert from 'assert'; +import from '../lib'; + +describe('', function () { + it('should have unit test!', function () { + assert(false, 'we expected this package author to add actual unit tests.'); + }); +});