-
Notifications
You must be signed in to change notification settings - Fork 8
/
smartmeter.html
115 lines (112 loc) · 5.11 KB
/
smartmeter.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
<script type="text/x-red" data-help-name="smartmeter">
<p>Node to provide data from smartmeters</p>
<span style="font-weight:bold">Debugging:</span> use this option judiciously as it will generate a lot of data and could fill up your local storage.
</script>
<script type="text/x-red" data-template-name="smartmeter">
<div class="form-row">
<label for="node-input-datasource"><i class="fa fa-random"></i> <span data-i18n="smartmeter.label.datasource"></span></label>
<input type="text" id="node-input-datasource">
</div>
<div class="form-row">
<label for="node-input-protocol"><i class="fa fa-file-text-o"></i> <span data-i18n="smartmeter.label.protocol"></span></label>
<select id="node-input-protocol">
<option value="SmlProtocol" data-i18n="smartmeter.protocol.smlprotocol"></option>
<option value="D0Protocol" data-i18n="smartmeter.protocol.d0protocol"></option>
<option value="JsonEfrProtocol" data-i18n="smartmeter.protocol.jsonerfprotocol"></option>
</select>
</div>
<div class="form-row">
<label for="node-input-transport"><i class="fa fa-truck"></i> <span data-i18n="smartmeter.label.transport"></span></label>
<select id="node-input-transport">
<option value="SerialResponseTransport" data-i18n="smartmeter.transport.serialresponsetransport"></option>
<option value="SerialRequestResponseTransport" data-i18n="smartmeter.transport.serialrequesttransport"></option>
<option value="HttpRequestTransport" data-i18n="smartmeter.transport.httprequesttransport"></option>
<option value="LocalFileTransport" data-i18n="smartmeter.transport.localfiletransport"></option>
<option value="TCPTransport" data-i18n="smartmeter.transport.tcptransport"></option>
</select>
</div>
<div class="form-row">
<label for="node-input-requestInterval"><i class="fa fa-clock-o"></i> <span data-i18n="smartmeter.label.requestInterval"></span></label>
<input type="number" id="node-input-requestInterval" data-i18n="[placeholder]smartmeter.placeholder.requestInterval">
</div>
<div class="form-row">
<label for="node-input-d0WakeupCharacters"><i class="fa fa-bed"></i> <span data-i18n="smartmeter.label.d0WakeupCharacters"></span></label>
<input type="number" id="node-input-d0WakeupCharacters">
</div>
<div class="form-row">
<label for="node-input-d0SignOnMessage"><i class="fa fa-bell"></i> <span data-i18n="smartmeter.label.d0SignOnMessage"></span></label>
<input type="text" id="node-input-d0SignOnMessage">
</div>
<div class="form-row">
<label for="node-input-d0BaudrateChangeoverOverwrite"><i class="fa fa-tachometer"></i> <span data-i18n="smartmeter.label.d0BaudrateChangeoverOverwrite"></span></label>
<input type="number" id="node-input-d0BaudrateChangeoverOverwrite">
</div>
<div class="form-row">
<label for="node-input-protocolSmlIgnoreInvalidCRC"><i class="fa fa-times"></i> <span data-i18n="smartmeter.label.protocolSmlIgnoreInvalidCRC"></span></label>
<input type="checkbox" id="node-input-protocolSmlIgnoreInvalidCRC">
</div>
<div class="form-row">
<label for="node-input-debugging"><i class="fa fa-times"></i> <span data-i18n="smartmeter.label.debugging"></span></label>
<input type="checkbox" id="node-input-debugging">
</div>
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="node-red:common.label.name"></span></label>
<input type="text" id="node-input-name" data-i18n="[placeholder]node-red:common.label.name">
</div>
</script>
<script type="text/javascript">
RED.nodes.registerType("smartmeter", {
category: "input",
color: "#E9967A",
defaults: {
name: {
name: ""
},
datasource: {
type: "smartmeter-connection",
required: true
},
protocol: {
value: "SmlProtocol",
required: true
},
transport: {
value: "SerialResposeTransport",
required: true
},
requestInterval: {
value: 0,
required: true
},
d0WakeupCharacters: {
value: "",
required: false
},
d0SignOnMessage: {
value: "",
required: false
},
d0BaudrateChangeoverOverwrite: {
value: "",
required: false
},
protocolSmlIgnoreInvalidCRC: {
value: false,
required: false
},
debugging: {
value: false,
required: false
}
},
inputs: 1,
outputs: 1,
icon: "gauge.png",
label: function () {
return this.name || "smartmeter";
},
labelStyle: function () {
return this.name ? "node_label_italic" : "";
}
});
</script>