-
Notifications
You must be signed in to change notification settings - Fork 0
/
netgear.html
92 lines (79 loc) · 2.71 KB
/
netgear.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
<script type="text/javascript">
RED.nodes.registerType('netgear-all-devices',{
category: 'Netgear',
color: '#3f7bb1',
defaults: {
creds: {value: '',type: 'netgear-config-node'}
},
inputs:1,
outputs:1,
icon: "arrow-in.svg",
label: function() {
return this.name || 'get all Devices';
}
});
</script>
<script type="text/html" data-help-name="netgear-all-devices">
<p>Node fetch an array of device objects from Netgear router.</p>
<p>Please note that this can take up to 10 seconds, which is related to the SOAP Interface of the router.</p>
<h3>Outputs</h3>
<dl class="message-properties">
<dt>payload
<span class="property-type">Object</span>
</dt>
<dd>
<p>
[
{
"IP":"192.168.XX.XX",
"Name":"XXX",
"MAC":"B8:09:8A:XX:XX:XX",
"ConnectionType":"5G",
"Linkspeed":null,
"SignalStrength":100,
"AllowOrBlock":"Allow"
},
{
"IP":"192.168.XX.XX",
"Name":"XXX",
"MAC":"B8:09:8A:XX:XX:XX",
"ConnectionType":"5G",
"Linkspeed":null,
"SignalStrength":100,
"AllowOrBlock":"Allow"
}
]
</p>
</dd>
</dl>
<h3>Details</h3>
<p>This node simply wraps the functions of the exellent library for node.js from grruijter: https://github.com/gruijter/netgear.js/</p>
</script>
<script type="text/html" data-template-name="netgear-all-devices">
<div class="form-row">
<label for="node-input-creds"><i class="icon-tag"></i> Credentials</label>
<input type="text" id="node-input-creds" placeholder="Add Netgear credentials">
</div>
</script>
<script type="text/javascript">
RED.nodes.registerType('netgear-config-node',{
category: 'config',
defaults: {
password: {value:"",required:true},
host: {value:"",required:true}
},
label: function() {
return 'netgear router: ' + this.host;
}
});
</script>
<script type="text/html" data-template-name="netgear-config-node">
<div class="form-row">
<label for="node-config-input-password"><i class="icon-tag"></i> Password</label>
<input type="text" id="node-config-input-password" placeholder="yourPassword">
</div>
<div class="form-row">
<label for="node-config-input-host"><i class="icon-tag"></i> Host</label>
<input type="text" id="node-config-input-host" placeholder="192.168.1.1">
</div>
</script>