forked from Supergiovane/node-red-contrib-knx-ultimate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
knxUltimate-config.html
179 lines (166 loc) · 9.83 KB
/
knxUltimate-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
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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
<script type="text/javascript">
RED.nodes.registerType('knxUltimate-config',{
category: 'config',
defaults: {
host: {value:"224.0.23.12",required:true},
port: {value:3671,required:true,validate:RED.validators.number()},
// the KNX physical address we'd like to use
physAddr: {value:"15.15.22",required:true},
// enable this option to suppress the acknowledge flag with outgoing L_Data.req requests. LoxOne needs this
suppressACKRequest: {value: false},
csv: {value:"",required:false},
KNXEthInterface:{value:"Auto"},
KNXEthInterfaceManuallyInput:{value:""},
statusDisplayLastUpdate:{value:true},
statusDisplayDeviceNameWhenALL:{value:true},
statusDisplayDataPoint:{value:false}
},
oneditprepare: function () {
$("#node-config-input-KNXEthInterface").append($("<option></option>")
.attr("value", "Auto")
.text("Auto")
)
$("#node-config-input-KNXEthInterface").append($("<option></option>")
.attr("value", "Manual")
.text("Manually enter interface's name")
)
$.getJSON('knxUltimateETHInterfaces', (data) => {
data.sort().forEach(iFace => {
$("#node-config-input-KNXEthInterface").append($("<option></option>")
.attr("value", iFace.name)
.text(iFace.name + " (" + iFace.address+")")
)
});
$("#node-config-input-KNXEthInterface").val(typeof this.KNXEthInterface ==="undefined" ? "Auto":this.KNXEthInterface)
if (this.KNXEthInterface==="Manual")
{
// Show input
$("#divKNXEthInterfaceManuallyInput").show();
}else{
$("#divKNXEthInterfaceManuallyInput").hide()
}
$("#node-config-input-KNXEthInterface").on('change',function() {
if ($("#node-config-input-KNXEthInterface").val()==="Manual")
{
// Show input
$("#divKNXEthInterfaceManuallyInput").show();
}else{
// Hide input
$("#divKNXEthInterfaceManuallyInput").hide()
}
})
})
},
oneditsave: function() {
// Check if the csv file contains errors
if($("#node-config-input-csv").val() != 'undefined' && $("#node-config-input-csv").val()!=""){
var checkResult="Upon deploy, i'll parse the CSV. Please see the debug TAB or node-red's log for errors/warnings. If no warnings, then the csv is OK. Otherwise you should correct the issues and again export from ETS and paste here."
var myNotification= RED.notify(checkResult,
{
modal: true,
fixed: true,
type: 'info',
buttons: [
{
text: "OK",
click: function(e) {
myNotification.close();
}
}]
})
}
},
label: function() {
return this.host+":"+this.port;
}
});
</script>
<script type="text/x-red" data-template-name="knxUltimate-config">
<div class="form-row">
<label for="node-config-input-host"><i class="icon-bookmark"></i> 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> Port</label>
<input type="text" id="node-config-input-port">
</div>
<div class="form-row">
<label for="node-config-input-KNXEthInterface"><i class="fa fa-wifi"></i> Bind to local interface </label>
<select id="node-config-input-KNXEthInterface"></select>
</div>
<div class="form-row" id="divKNXEthInterfaceManuallyInput" style="display: none;">
<label for="node-config-input-KNXEthInterfaceManuallyInput"></label>
<input type="text" id="node-config-input-KNXEthInterfaceManuallyInput" placeholder="Interface name, ex: eth0 or ens1 or Ethernet 1 and so on..."></input>
</div>
<div class="form-row">
<label for="node-config-input-physAddr"><i class="fa fa-microchip"></i> KNX Physical Address</label>
<input type="text" id="node-config-input-physAddr">
</div>
<div class="form-row">
<input type="checkbox" id="node-config-input-statusDisplayLastUpdate" style="display:inline-block; width:auto; vertical-align:top;">
<label style="width:auto" for="node-config-input-statusDisplayLastUpdate"> <i class="fa fa-comment-o"></i> Display last update day and time in node status</label>
</div>
<div class="form-row">
<input type="checkbox" id="node-config-input-statusDisplayDeviceNameWhenALL" style="display:inline-block; width:auto; vertical-align:top;">
<label style="width:auto" for="node-config-input-statusDisplayDeviceNameWhenALL"> <i class="fa fa-comment-o"></i> Display device name in node status (only avaiable if "Listen all Group Address" is checked)</label>
</div>
<div class="form-row">
<input type="checkbox" id="node-config-input-statusDisplayDataPoint" style="display:inline-block; width:auto; vertical-align:top;">
<label style="width:auto" for="node-config-input-statusDisplayDataPoint"> <i class="fa fa-comment-o"></i> Display datapoint in node status</label>
</div>
<div class="form-row">
<input type="checkbox" id="node-config-input-suppressACKRequest" style="display:inline-block; width:auto; vertical-align:top;">
<label style="width:auto" for="node-config-input-suppressACKRequest"> <i class="fa fa-ban"></i> Suppress ACK request</label>
<div id="helpallga"> This option help compatibility with old Siemens SWG1 148-1AB22 IP Interface firmware</div>
</div>
<div class="form-row">
<label for="node-config-input-csv"><i class="fa fa-th-list"></i> ETS Group Addresses list</label>
<br /><i>On ETS, click the group addresses list, then right click, then select 'export group addresses'. On the export window, select these options -> Output Format: CSV, CSV Format: 1/1 Name/Address, Export with header line: checked, CSV Separator: Tabulator. </i><br />
<a href="https://youtu.be/I32_qG7yhFc" target="_blank">See how to export the CSV on Youtube</a>
<textarea rows=20 id="node-config-input-csv" style="width:100%" placeholder="Paste here your CSV exported file from ETS">
</div>
</script>
<script type="text/x-red" data-help-name="knxUltimate-config">
To be able to interact with the KNX bus, you need to configure the Node's gateway. It stores the default ETH/KNX Router's multicast address as well as the default port. It should work with the default values.
<a href="https://www.paypal.me/techtoday" target="_blank"><img src='https://img.shields.io/badge/Donate-PayPal-blue.svg?style=flat-square' width='30%'></a>
<br/>
<p>
<b>Host</b><br/>
ETH/KNX Router's multicast address.
</p>
<p>
<b>Port</b><br/>
ETH/KNX Router's multicast port.
</p>
<b>Bind to local interface</b><br/>
The Node will use this local interface for communications. Leave "Auto" for automatic selection. If you have more than one lan connection, for example Ethernet and Wifi, it's strongly recommended to manually select the interface, otherwise not all UDP telegram will reach your computer, thus the Node may not work as expected.
</p>
<p>
<b>KNX Physical Address</b><br/>
Local KNX physical addres, identifying the KNX device. Default "15.15.22". This is not a group address, this represents the unique address of a konnex device in a konnex installation.
</p>
<p>
<b>Display last update day and time in node status</b><br/>
Display last update day and time, in the format (day, hh:mm:ss);
</p>
<p>
<b>Display device name in node status (only avaiable if "Listen all Group Address" is checked)</b><br/>
Display device name in node status. This option is only taken in consideration if "Listen all Group Address" is checked. Displays the KNX device name.
</p>
<p>
<b>Display device name in node status (only avaiable if "Listen all Group Address" is checked)</b><br/>
Display device name in node status. This option is only taken in consideration if "Listen all Group Address" is checked. Displays the KNX device name.
</p>
<p>
<b>Display datapoint in node status</b><br/>
Display the node's KNX Datapoint.
</p>
<p>
<b>Suppress ACK request</b><br/>
This option help compatibility with old Siemens SWG1 148-1AB22 IP Interface firmware and other EHT/KNX interfaces that does'nt like the ACK. Default "unchecked". Check it to help compatibility
</p>
<p><b>ETS Group Addresses list</b><br/>
Optionally, you can paste here the CSV file from ETS. This CSV will then be used by the knxUltimate node (if you select "Universal mode (listen to all Group Addresses)" on the knxUltimate node) to automatically decode all the raw values received from the KNX bus. These values will then be outputted by the msg.payload<br/>
Starting from Version 1.1.11, you can use <b>Universal mode (listen to all Group Addresses)</b> option without the need of an imported ETS CSV File. You need to pass a message to the node, containing datapoint type and a value. As soon as the node receives a telegram from KNX Bus, it will output a RAW value and beside that, it will try to decode the value without knowing the datapoint type.</p>
<p>For other options, please <a href="https://github.com/Supergiovane/node-red-contrib-knx-ultimate/wiki">see the wiki here.</a></p>
</script>