-
Notifications
You must be signed in to change notification settings - Fork 5
/
11-eibd.html
130 lines (118 loc) · 4.65 KB
/
11-eibd.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
121
122
123
124
125
126
127
128
129
130
<!--
KNX/eibd nodes for IBM's Node-Red
https://github.com/ekarak/node-red-contrib-eibd
(c) 2014, Elias Karakoulakis <elias.karakoulakis@gmail.com>
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/x-red" data-template-name="eibd-controller">
<div class="form-row">
<label for="node-config-input-host"><i class="icon-bookmark"></i> eibd Host</label>
<input type="text" id="node-config-input-host">
</div>
<div class="form-row">
<label for="node-config-input-port"><i class="icon-bookmark"></i> eibd Port</label>
<input type="text" id="node-config-input-port">
</div>
</script>
<script type="text/x-red" data-template-name="eibd-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-controller"><i class="icon-bookmark"></i> Controller</label>
<input type="text" id="node-input-controller">
</div>
</script>
<script type="text/x-red" data-template-name="eibd-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-controller"><i class="icon-bookmark"></i> Controller</label>
<input type="text" id="node-input-controller">
</div>
</script>
<script type="text/x-red" data-help-name="eibd-out">
<p>An output KNX node, as defined by a KNX group address and datatype.
Use this to <b>send</b> KNX telegrams.<br/>
<b>msg.topic</b> can be:
<li>'read': to send a read request to the bus</li>
<li>'respond': to send a response to another read request to the bus</li>
<li>'write': (<b>default</b>) to write a value to the bus. Can be omitted.</li>
<br/>
<b>msg.payload</b> must be a JavaScript object or a string in JSON format
(when doing 'write' requests): {"dstgad":"1/2/3", "value":"1", "dpt":"1"}
<li>dstgad: the destination <b>group</b> address (eg."1/2/3")</li>
<li>value: the actual value to send (eg."1")</li>
<li>dpt: the datapoint type (eg."1")</li>
</p>
</script>
<script type="text/x-red" data-help-name="eibd-in">
<p>An input KNX node, as defined by a KNX group address and datatype.
Use this to <b>inject</b> flows from KNX events<br/>
<b>msg.topic</b> will be:
<li>'read': when a read request arrives on the bus</li>
<li>'respond': when another KNX device responds to a read request on the bus</li>
<li>'write': when somebody writes a value to a KNX group address.</li>
<br/>
<b>msg.payload</b> will have the format: {width: X, value: Y}
<li>srcphy: source <b>physical</b> address (eg.'1.1.100')</li>
<li>dstgad: destination <b>group</b> address (eg.'1/2/3')</li>
<li>value: the actual value received</li>
<li>width: the width in <b>bits</b> of the payload</li>
</p>
</script>
<script type="text/javascript">
RED.nodes.registerType('eibd-controller', {
category: 'config',
defaults: {
host: {value:"localhost",required:true},
port: {value:6720, required:true, validate:RED.validators.number()}
},
label: function() {
return "eibd@"+this.host+":"+this.port;
}
});
</script>
<script type="text/javascript">
RED.nodes.registerType('eibd-out',{
category: 'home automation',
color: '#00cc00',
defaults: {
name: {value:""},
controller: {value:"", type:"eibd-controller"}
},
inputs: 1,
outputs: 0,
icon: "knx.png",
label: function() {
return(this.groupaddr||this.name||"eibd");
}
});
</script>
<script type="text/javascript">
RED.nodes.registerType('eibd-in',{
category: 'home automation',
color: '#00cc00',
defaults: {
name: {value:""},
controller: {value:"", type:"eibd-controller"}
},
inputs: 0,
outputs: 1,
icon: "knx.png",
label: function() {
return(this.groupaddr||this.name||"eibd");
}
});
</script>