-
Notifications
You must be signed in to change notification settings - Fork 25
/
onvif_config.html
96 lines (93 loc) · 4.88 KB
/
onvif_config.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<!--
Copyright 2018, Bart Butenaers
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<script type="text/javascript">
RED.nodes.registerType('onvif-config',{
category: 'config',
color: '#ff758d',
defaults: {
xaddress: {value:"", required:true},
port: {value:80, required:true},
timeout: {value: 30, require:true}, // Default is otherwise 120 sec in agsh/onvif
checkConnectionInterval: {value: 5},
name: {value:""}
},
credentials: {
user: {type:"text"},
password: {type: "password"}
},
inputs:1,
outputs:1,
icon: "fluid.png",
label: function() {
// The (unique) name will also be displayed in the drop-down list, used by the related nodes
return this.name || this.xaddress || "OnVif device config";
},
oneditprepare: function() {
// Old nodes had no timeout property (which means the default timeout of 12 seconds from the agsh/onvif library was being used)
if (this.timeout == undefined) {
$('#node-config-input-timeout').val(3);
}
// Old nodes had no checkConnectionInterval property
if (this.checkConnectionInterval == undefined) {
$('#node-config-input-checkConnectionInterval').val(5);
}
}
});
</script>
<script type="text/x-red" data-template-name="onvif-config">
<div class="form-row">
<label for="node-config-input-xaddress"><i class="fa fa-globe"></i> IP address (or hostname)</label>
<input type="text" id="node-config-input-xaddress">
</div>
<div class="form-row">
<label for="node-config-input-port"><i class="fa fa-random"></i> Port</label>
<input type="text" id="node-config-input-port">
</div>
<div class="form-row">
<label for="node-config-input-user"><i class="fa fa-user"></i> User</label>
<input type="text" id="node-config-input-user">
</div>
<div class="form-row">
<label for="node-config-input-password"><i class="fa fa-lock"></i> Password</label>
<input type="password" id="node-config-input-password">
</div>
<div class="form-row">
<label for="node-config-input-timeout"><i class="icon-tag"></i> Timeout</label>
<input type="number" id="node-config-input-timeout">
</div>
<div class='form-row'>
<label for='node-config-input-refreshStatus'><i class='fa fa-refresh'></i> Refresh</label>
<span>Check connection status every</span>
<input type="number" id="node-config-input-checkConnectionInterval" style="width:45px; height:28px;" autocomplete="off" dir="">
<span>seconds</span>
</div>
</br>
<div class="form-row">
<label for="node-config-input-name"><i class="icon-tag"></i> Name</label>
<input type="text" id="node-config-input-name" placeholder="Name">
</div>
</script>
<script type="text/x-red" data-help-name="onvif-config">
<p><strong>IP address (or hostname):</strong><br/>
The IP address (or hostname) of the Onvif endpoint on the target IP device. When you don't know the IP address of your Onvif device, use the Onvif-Discovery: the <code>XAddrs</code> field contains a list of all the IP addresses.</p>
<p><strong>Port:</strong><br/>
The port number of the Onvif endpoint on the target IP device. Those port numbers can also be found via the Discovery node, in the same <code>XAddrs</code> field.</p>
<p><strong>User name:</strong><br/>
An optional user name for basic authentication on the target IP device.</p>
<p><strong>Password:</strong><br/>
An optional password for basic authentication on the target IP device.</p>
<p><strong>Timeout:</strong><br/>
Specify how many seconds needs to be waited for an answer, when connecting to an Onvif device. When no response has been received during the timeout interval, the device will be considered as 'disconnected'.</p>
<p><strong>Refresh:</strong><br/>
Specify at which interval (in seconds) the connection to the Onvif device should be checked, to make sure both the node status and the device data are up to date. Note that an interval of 0 seconds is used to disable automatic checking the device connection.</p>
</script>