-
Notifications
You must be signed in to change notification settings - Fork 6
/
mios.html
120 lines (114 loc) · 4.24 KB
/
mios.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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
<script type="text/javascript">
RED.nodes.registerType('mios-server',{
category:'config',
icon: "white-globe.png",
defaults: {
name:{},
host:{required:true},
port:{value:3480, required:true},
},
label: function() {
return this.name||"mios-server";
}
});
</script>
<script type="text/x-red" data-template-name="mios-server">
<div class="form-row">
<label for="node-config-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-config-input-name" placeholder="Name">
</div>
<div class="form-row">
<label for="node-config-input-host"><i class="fa fa-globe"></i> Host</label>
<input type="text" id="node-config-input-host" placeholder="127.0.0.1">
</div>
<div class="form-row">
<label for="node-config-input-port"><i class="fa fa-tag"></i> Port</label>
<input type="text" id="node-config-input-port" placeholder="3480">
</div>
</script>
<script type="text/x-red" data-help-name="mios-server">
<p>The <b>MIOS-server</b> defines the connection properties.</p>
<p><b>Host</b> is the ip address to the unit.</p>
<p><b>Port</b> is the port the unit is listening on, normally 3480.</p>
</script>
<script type="text/x-red" data-template-name="mios-in">
<div class="form-row">
<label for="node-input-name"><i class="icon-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
<div class="form-row">
<label for="node-input-server"><i class="fa fa-globe"></i> Server</label>
<input type="text" id="node-input-server">
</div>
<div class="form-row">
<label for="node-input-item"><i class="icon-tag"></i> Item</label>
<input type="text" id="node-input-item">
</div>
<div class="form-row">
<label> </label>
<input type="checkbox" id="node-input-exact" placeholder="" style="display:inline-block; width: auto; vertical-align: top;">
<label for="node-input-exact">Exact match</label>
</div>
</script>
<script type="text/x-red" data-help-name="mios-in">
<p>The <b>mios-in</b> node gets the events from the unit.</p>
<p>Items are named in the form <b>Room:Unit:Variable</b>, ie <i>Bedroom:Bed Light:Status</i>.</p>
<p>The value in <b>Item</b> is a filter for the incoming events that filters from the left (unless you check <b>Exact match</b>) so if you put <i>Bedroom:</i> you will get all events from the Bedroom.</p>
<p>To see all events, leave the <b>Item</b> field blank. Units without a room defined in the Vera UI will get a room called <b>Unknown</b> here.</p>
</script>
<script type="text/javascript">
RED.nodes.registerType('mios-in',{
category:'input',
defaults: {
name: {value:""},
server: {type:'mios-server', required:true},
item: {},
exact: {value:false}
},
inputs:0,
outputs:1,
icon: "bridge.png",
color: "#A6BBCF",
label: function() {
return this.name||"mios-in";
}
});
</script>
<script type="text/x-red" data-template-name="mios-out">
<div class="form-row">
<label for="node-input-name"><i class="icon-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
<div class="form-row">
<label for="node-input-server"><i class="fa fa-globe"></i> Server</label>
<input type="text" id="node-input-server">
</div>
<div class="form-row">
<label for="node-input-item"><i class="icon-tag"></i> Item</label>
<input type="text" id="node-input-item">
</div>
</script>
<script type="text/x-red" data-help-name="mios-out">
<p>The <b>mios-out</b> node send commands to units from msg.payload.</p>
<p>Items are named in the form <b>Room:Unit:Variable</b>, ie <i>Bedroom:Bed Light:Status</i>.</p>
<p>To turn on a light, set msg.payload to 1, to turn it off set it to 0.</p>
<p>If the item is empty, item name must be defined in <b>msg.topic</b>.</p>
</script>
<script type="text/javascript">
RED.nodes.registerType('mios-out',{
category:'output',
defaults: {
name: {value:""},
server: {type:'mios-server', required:true},
item: {}
},
inputs:1,
outputs:0,
icon: "bridge.png",
align: "right",
color: "#A6BBCF",
label: function() {
return this.name||"mios-out";
}
});
</script>