-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathkonkeio.html
86 lines (84 loc) · 2.74 KB
/
konkeio.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
<script type="text/javascript">
RED.nodes.registerType('konkeio-discover', {
category: '控客',
color: '#45862b',
paletteLabel: '发现',
label() { return this.name || '发现' },
defaults: {
name: { value: '' },
timeout: { value: 1000 }
},
inputs: 1,
outputs: 1,
icon: 'white-globe.png'
})
RED.nodes.registerType('konkeio-action', {
category: '控客',
color: '#45862b',
paletteLabel: '操作',
label() { return this.name || '操作' },
defaults: {
name:{value:''},
ip: { value: '' },
sw: { value: 'auto' }
},
inputs: 1,
outputs: 1,
icon: 'white-globe.png',
align: 'right'
})
</script>
<script type="text/x-red" data-template-name="konkeio-discover">
<div class="form-row">
<label for="node-input-name"><i class="icon-tag"></i>名称</label>
<input type="text" id="node-input-name">
</div>
<div class="form-row">
<label for="node-input-timeout"><i></i>超时(毫秒)</label>
<input type="text" id="node-input-timeout" placeholder="1000">
</div>
</script>
<script type="text/x-red" data-help-name="konkeio-discover">
<p>发现局域网里的控客设备列表</p>
<h3>输出</h3>
<dl class="message-properties">
<dt>payload<span class="property-type">various</span></dt>
<dd>设备列表数组</dd>
<dt>list<span class="property-type">string</span></dt>
<dd>设备列表数组字符串</dd>
</dl>
</script>
<script type="text/x-red" data-template-name="konkeio-action">
<div class="form-row">
<label for="node-input-name"><i class="icon-tag"></i>名称</label>
<input type="text" id="node-input-name">
</div>
<div class="form-row">
<label for="node-input-ip"><i></i>设备IP</label>
<input type="text" id="node-input-ip" placeholder="192.168.1.1">
</div>
<div class="form-row">
<label for="node-input-sw"><i></i>状态</label>
<select id="node-input-sw">
<option value="auto">继承</option>
<option value="check">检查</option>
<option value="open">打开</option>
<option value="close">关闭</option>
</select>
</div>
</script>
<script type="text/x-red" data-help-name="konkeio-action">
<p>检查或者操作控客设备</p>
<h3>输入</h3>
<dl class="message-properties">
<dt>payload<span class="property-type">boolean</span></dt>
<dd>传递给设备节点开关状态,当节点的状态为继承时生效,true为开,false为关</dd>
</dl>
<h3>输出</h3>
<dl class="message-properties">
<dt>payload<span class="property-type">boolean</span></dt>
<dd>开关状态,true为开,false为关</dd>
<dt>status<span class="property-type">string</span></dt>
<dd>控客设备内部的值,取值可能为open,close,timeout等</dd>
</dl>
</script>