smart-nodes 0.4.16-beta → 0.4.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +146 -153
- package/LICENSE.md +20 -20
- package/light/light.html +0 -18
- package/light/light.js +4 -66
- package/light/locales/de-DE/light.json +24 -29
- package/light/locales/en-US/light.json +24 -29
- package/package.json +1 -1
- package/scene/locales/de-DE/scene.json +21 -26
- package/scene/locales/en-US/scene.json +20 -25
- package/scene/scene.html +2 -20
- package/scene/scene.js +2 -29
- package/shutter/locales/de-DE/shutter.json +11 -16
- package/shutter/locales/en-US/shutter.json +11 -16
- package/shutter/shutter.html +1 -29
- package/shutter/shutter.js +5 -117
- package/shutter-complex/locales/de-DE/shutter-complex.json +20 -25
- package/shutter-complex/locales/en-US/shutter-complex.json +20 -25
- package/shutter-complex/shutter-complex.html +1 -29
- package/shutter-complex/shutter-complex.js +1 -116
package/CHANGELOG.md
CHANGED
|
@@ -1,153 +1,146 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
## Version 0.3.28:
|
|
4
|
-
|
|
5
|
-
- Added this changlog file.
|
|
6
|
-
- Separate values for shutter_complex node for up and down times.
|
|
7
|
-
(Open each node and save it, to use the new times. This should be done before the version 0.4.0 is released.)
|
|
8
|
-
- For the following nodes you can choose to have one or two outputs (Could be a **breaking change**, please check your nodes).
|
|
9
|
-
|
|
10
|
-
- Logic
|
|
11
|
-
- Compare
|
|
12
|
-
- Hysteresis
|
|
13
|
-
|
|
14
|
-
- You can now separately declare the messages that should be sent by the following nodes (Could be a **breaking change**, please check your nodes).
|
|
15
|
-
|
|
16
|
-
- Logic
|
|
17
|
-
- Compare
|
|
18
|
-
- Hysteresis
|
|
19
|
-
|
|
20
|
-
- You can choose for the following nodes if they should send the result all the time or only if the result changed.
|
|
21
|
-
- Logic
|
|
22
|
-
- Compare
|
|
23
|
-
- Hysteresis
|
|
24
|
-
|
|
25
|
-
## Version 0.3.29:
|
|
26
|
-
|
|
27
|
-
- Fixed that hysteresis sends only on change, when separate outputs are enabled.
|
|
28
|
-
- Added a definable short up/down time for the shutter control.
|
|
29
|
-
- Fixed calculation of the time from string.
|
|
30
|
-
|
|
31
|
-
## Version 0.3.30:
|
|
32
|
-
|
|
33
|
-
- Added counter example.
|
|
34
|
-
|
|
35
|
-
## Version 0.3.31:
|
|
36
|
-
|
|
37
|
-
- Fixed logic node - invert output option.
|
|
38
|
-
|
|
39
|
-
## Version 0.3.32:
|
|
40
|
-
|
|
41
|
-
- Fixed hysteresis node - always change result.
|
|
42
|
-
|
|
43
|
-
## Version 0.3.33:
|
|
44
|
-
|
|
45
|
-
- Fixed hysteresis node - init send.
|
|
46
|
-
|
|
47
|
-
## Version 0.3.34:
|
|
48
|
-
|
|
49
|
-
- Fixed hysteresis node - init send.
|
|
50
|
-
- Fixed light node - status.
|
|
51
|
-
|
|
52
|
-
## Version 0.3.35:
|
|
53
|
-
|
|
54
|
-
- Fixed saving last message object as a clone of the original message, because it could be changed later.
|
|
55
|
-
|
|
56
|
-
## Version 0.3.36:
|
|
57
|
-
|
|
58
|
-
- Fixed mixing-valve - call of toFixed function.
|
|
59
|
-
|
|
60
|
-
## Version 0.3.37:
|
|
61
|
-
|
|
62
|
-
- Fixed using typedInput with node-red v4.
|
|
63
|
-
- Started to add English translations.
|
|
64
|
-
|
|
65
|
-
## Version 0.4.0:
|
|
66
|
-
|
|
67
|
-
- Fully added English and German translations.
|
|
68
|
-
- Light control: Added Alarm off action
|
|
69
|
-
- Shutter complex control: Added Alarm off action
|
|
70
|
-
- Restructured the complete code
|
|
71
|
-
- Improved status texts
|
|
72
|
-
- **breaking change** (soon): Changed some node internal values. Please open and save the following node types:
|
|
73
|
-
|
|
74
|
-
- Central node
|
|
75
|
-
- Compare node
|
|
76
|
-
- Counter node
|
|
77
|
-
- Hysteresis node
|
|
78
|
-
- Shutter complex node
|
|
79
|
-
- Statistic node
|
|
80
|
-
|
|
81
|
-
After saving the nodes, the values are automatically converted to the new one.
|
|
82
|
-
This conversion will be removed in version 0.5.0.
|
|
83
|
-
|
|
84
|
-
## Version 0.4.1:
|
|
85
|
-
|
|
86
|
-
- Show only up to 2 decimal places in node status text.
|
|
87
|
-
- Improved warn messages shown in console.
|
|
88
|
-
|
|
89
|
-
## Version 0.4.2:
|
|
90
|
-
|
|
91
|
-
- Fixed design of property page of forwarder node.
|
|
92
|
-
- Corrected hysteresis to send original message.
|
|
93
|
-
|
|
94
|
-
## Version 0.4.3:
|
|
95
|
-
|
|
96
|
-
- Corrected hysteresis (again) to send original message.
|
|
97
|
-
|
|
98
|
-
## Version 0.4.4:
|
|
99
|
-
|
|
100
|
-
- Fixed the delay node to not restart the time if "only on change" option is enabled.
|
|
101
|
-
|
|
102
|
-
## Version 0.4.5:
|
|
103
|
-
|
|
104
|
-
- Fixed the status of hysteresis node.
|
|
105
|
-
|
|
106
|
-
## Version 0.4.6:
|
|
107
|
-
|
|
108
|
-
- Fixed the status of hysteresis node.
|
|
109
|
-
|
|
110
|
-
## Version 0.4.7:
|
|
111
|
-
|
|
112
|
-
- Added blink topic to light node.
|
|
113
|
-
|
|
114
|
-
## Version 0.4.8:
|
|
115
|
-
|
|
116
|
-
- Fixed reading values in heating-curve node.
|
|
117
|
-
|
|
118
|
-
## Version 0.4.9:
|
|
119
|
-
|
|
120
|
-
- Fixed reading config values for offset and slope in heating-curve node.
|
|
121
|
-
|
|
122
|
-
## Version 0.4.10:
|
|
123
|
-
|
|
124
|
-
- **breaking change** (soon): Added common and separate outputs to multi press node.
|
|
125
|
-
Please open node config and save it to make sure it will work in later versions.
|
|
126
|
-
- Added common and separate outputs to long press node.
|
|
127
|
-
|
|
128
|
-
## Version 0.4.11:
|
|
129
|
-
|
|
130
|
-
- Fixed long press default outputs.
|
|
131
|
-
|
|
132
|
-
## Version 0.4.12:
|
|
133
|
-
|
|
134
|
-
- Fixed text exec node.
|
|
135
|
-
|
|
136
|
-
## Version 0.4.13:
|
|
137
|
-
|
|
138
|
-
- Fixed text exec node again.
|
|
139
|
-
|
|
140
|
-
## Version 0.4.14:
|
|
141
|
-
|
|
142
|
-
- Removed log outputs.
|
|
143
|
-
|
|
144
|
-
## Version 0.
|
|
145
|
-
|
|
146
|
-
-
|
|
147
|
-
|
|
148
|
-
- Simple: Compatible with knx_ultimate nodes.
|
|
149
|
-
- HomeAssistant: Outputs messages that can directly be sent to home assistant entities via action nodes.
|
|
150
|
-
|
|
151
|
-
**Important Action node settings:**
|
|
152
|
-
|
|
153
|
-
- Disable option `Block input overrides`, so the smart nodes can control the actions and the sended data.
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## Version 0.3.28:
|
|
4
|
+
|
|
5
|
+
- Added this changlog file.
|
|
6
|
+
- Separate values for shutter_complex node for up and down times.
|
|
7
|
+
(Open each node and save it, to use the new times. This should be done before the version 0.4.0 is released.)
|
|
8
|
+
- For the following nodes you can choose to have one or two outputs (Could be a **breaking change**, please check your nodes).
|
|
9
|
+
|
|
10
|
+
- Logic
|
|
11
|
+
- Compare
|
|
12
|
+
- Hysteresis
|
|
13
|
+
|
|
14
|
+
- You can now separately declare the messages that should be sent by the following nodes (Could be a **breaking change**, please check your nodes).
|
|
15
|
+
|
|
16
|
+
- Logic
|
|
17
|
+
- Compare
|
|
18
|
+
- Hysteresis
|
|
19
|
+
|
|
20
|
+
- You can choose for the following nodes if they should send the result all the time or only if the result changed.
|
|
21
|
+
- Logic
|
|
22
|
+
- Compare
|
|
23
|
+
- Hysteresis
|
|
24
|
+
|
|
25
|
+
## Version 0.3.29:
|
|
26
|
+
|
|
27
|
+
- Fixed that hysteresis sends only on change, when separate outputs are enabled.
|
|
28
|
+
- Added a definable short up/down time for the shutter control.
|
|
29
|
+
- Fixed calculation of the time from string.
|
|
30
|
+
|
|
31
|
+
## Version 0.3.30:
|
|
32
|
+
|
|
33
|
+
- Added counter example.
|
|
34
|
+
|
|
35
|
+
## Version 0.3.31:
|
|
36
|
+
|
|
37
|
+
- Fixed logic node - invert output option.
|
|
38
|
+
|
|
39
|
+
## Version 0.3.32:
|
|
40
|
+
|
|
41
|
+
- Fixed hysteresis node - always change result.
|
|
42
|
+
|
|
43
|
+
## Version 0.3.33:
|
|
44
|
+
|
|
45
|
+
- Fixed hysteresis node - init send.
|
|
46
|
+
|
|
47
|
+
## Version 0.3.34:
|
|
48
|
+
|
|
49
|
+
- Fixed hysteresis node - init send.
|
|
50
|
+
- Fixed light node - status.
|
|
51
|
+
|
|
52
|
+
## Version 0.3.35:
|
|
53
|
+
|
|
54
|
+
- Fixed saving last message object as a clone of the original message, because it could be changed later.
|
|
55
|
+
|
|
56
|
+
## Version 0.3.36:
|
|
57
|
+
|
|
58
|
+
- Fixed mixing-valve - call of toFixed function.
|
|
59
|
+
|
|
60
|
+
## Version 0.3.37:
|
|
61
|
+
|
|
62
|
+
- Fixed using typedInput with node-red v4.
|
|
63
|
+
- Started to add English translations.
|
|
64
|
+
|
|
65
|
+
## Version 0.4.0:
|
|
66
|
+
|
|
67
|
+
- Fully added English and German translations.
|
|
68
|
+
- Light control: Added Alarm off action
|
|
69
|
+
- Shutter complex control: Added Alarm off action
|
|
70
|
+
- Restructured the complete code
|
|
71
|
+
- Improved status texts
|
|
72
|
+
- **breaking change** (soon): Changed some node internal values. Please open and save the following node types:
|
|
73
|
+
|
|
74
|
+
- Central node
|
|
75
|
+
- Compare node
|
|
76
|
+
- Counter node
|
|
77
|
+
- Hysteresis node
|
|
78
|
+
- Shutter complex node
|
|
79
|
+
- Statistic node
|
|
80
|
+
|
|
81
|
+
After saving the nodes, the values are automatically converted to the new one.
|
|
82
|
+
This conversion will be removed in version 0.5.0.
|
|
83
|
+
|
|
84
|
+
## Version 0.4.1:
|
|
85
|
+
|
|
86
|
+
- Show only up to 2 decimal places in node status text.
|
|
87
|
+
- Improved warn messages shown in console.
|
|
88
|
+
|
|
89
|
+
## Version 0.4.2:
|
|
90
|
+
|
|
91
|
+
- Fixed design of property page of forwarder node.
|
|
92
|
+
- Corrected hysteresis to send original message.
|
|
93
|
+
|
|
94
|
+
## Version 0.4.3:
|
|
95
|
+
|
|
96
|
+
- Corrected hysteresis (again) to send original message.
|
|
97
|
+
|
|
98
|
+
## Version 0.4.4:
|
|
99
|
+
|
|
100
|
+
- Fixed the delay node to not restart the time if "only on change" option is enabled.
|
|
101
|
+
|
|
102
|
+
## Version 0.4.5:
|
|
103
|
+
|
|
104
|
+
- Fixed the status of hysteresis node.
|
|
105
|
+
|
|
106
|
+
## Version 0.4.6:
|
|
107
|
+
|
|
108
|
+
- Fixed the status of hysteresis node.
|
|
109
|
+
|
|
110
|
+
## Version 0.4.7:
|
|
111
|
+
|
|
112
|
+
- Added blink topic to light node.
|
|
113
|
+
|
|
114
|
+
## Version 0.4.8:
|
|
115
|
+
|
|
116
|
+
- Fixed reading values in heating-curve node.
|
|
117
|
+
|
|
118
|
+
## Version 0.4.9:
|
|
119
|
+
|
|
120
|
+
- Fixed reading config values for offset and slope in heating-curve node.
|
|
121
|
+
|
|
122
|
+
## Version 0.4.10:
|
|
123
|
+
|
|
124
|
+
- **breaking change** (soon): Added common and separate outputs to multi press node.
|
|
125
|
+
Please open node config and save it to make sure it will work in later versions.
|
|
126
|
+
- Added common and separate outputs to long press node.
|
|
127
|
+
|
|
128
|
+
## Version 0.4.11:
|
|
129
|
+
|
|
130
|
+
- Fixed long press default outputs.
|
|
131
|
+
|
|
132
|
+
## Version 0.4.12:
|
|
133
|
+
|
|
134
|
+
- Fixed text exec node.
|
|
135
|
+
|
|
136
|
+
## Version 0.4.13:
|
|
137
|
+
|
|
138
|
+
- Fixed text exec node again.
|
|
139
|
+
|
|
140
|
+
## Version 0.4.14:
|
|
141
|
+
|
|
142
|
+
- Removed log outputs.
|
|
143
|
+
|
|
144
|
+
## Version 0.4.15:
|
|
145
|
+
|
|
146
|
+
- Reverted some tests.
|
package/LICENSE.md
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
# The MIT License (MIT)
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2024 BergenSoft
|
|
4
|
-
|
|
5
|
-
> Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
> of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
> in the Software without restriction, including without limitation the rights
|
|
8
|
-
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
> copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
> furnished to do so, subject to the following conditions:
|
|
11
|
-
>
|
|
12
|
-
> The above copyright notice and this permission notice shall be included in
|
|
13
|
-
> all copies or substantial portions of the Software.
|
|
14
|
-
>
|
|
15
|
-
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
1
|
+
# The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 BergenSoft
|
|
4
|
+
|
|
5
|
+
> Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
> of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
> in the Software without restriction, including without limitation the rights
|
|
8
|
+
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
> copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
> furnished to do so, subject to the following conditions:
|
|
11
|
+
>
|
|
12
|
+
> The above copyright notice and this permission notice shall be included in
|
|
13
|
+
> all copies or substantial portions of the Software.
|
|
14
|
+
>
|
|
15
|
+
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
21
|
> THE SOFTWARE.
|
package/light/light.html
CHANGED
|
@@ -139,7 +139,6 @@
|
|
|
139
139
|
defaults: {
|
|
140
140
|
name: { value: "" },
|
|
141
141
|
exec_text_names: { value: "" },
|
|
142
|
-
data_type: { value: "SIMPLE" }, // SIMPLE || HOMEASSISTANT
|
|
143
142
|
max_time_on: { value: "0" },
|
|
144
143
|
max_time_on_unit: { value: "s" },
|
|
145
144
|
alarm_action: { value: 'NOTHING' }, // NOTHING | ON | OFF
|
|
@@ -160,19 +159,6 @@
|
|
|
160
159
|
onEditPrepare(this, ["smart_central-control"]);
|
|
161
160
|
initTreeList(node, ["smart_central-control"]);
|
|
162
161
|
|
|
163
|
-
$("#node-input-data_type")
|
|
164
|
-
.css("max-width", "70%")
|
|
165
|
-
.typedInput({
|
|
166
|
-
types: [{
|
|
167
|
-
value: "data_type",
|
|
168
|
-
default: "SIMPLE",
|
|
169
|
-
options: [
|
|
170
|
-
{ value: "SIMPLE", label: node._("light.ui.simple") },
|
|
171
|
-
{ value: "HOMEASSISTANT", label: node._("light.ui.home_assistant") }
|
|
172
|
-
],
|
|
173
|
-
}],
|
|
174
|
-
});
|
|
175
|
-
|
|
176
162
|
$("#node-input-max_time_on")
|
|
177
163
|
.css("max-width", "4rem")
|
|
178
164
|
.spinner({
|
|
@@ -251,10 +237,6 @@
|
|
|
251
237
|
<input id="node-input-exec_text_names" type="text" />
|
|
252
238
|
<div style="max-width: 450px;" data-i18n="light.ui.controlled_by_words"></div>
|
|
253
239
|
</div>
|
|
254
|
-
<div class="form-row">
|
|
255
|
-
<label for="node-input-data_type"><i class="fa fa-file-code-o"></i> <span data-i18n="light.ui.data_type"></span></label>
|
|
256
|
-
<input id="node-input-data_type"/>
|
|
257
|
-
</div>
|
|
258
240
|
<div class="form-row">
|
|
259
241
|
<label for="node-input-max_time_on"><i class="fa fa-clock-o"></i> <span data-i18n="light.ui.max_time_on"></span></label>
|
|
260
242
|
<input id="node-input-max_time_on" value="0" />
|
package/light/light.js
CHANGED
|
@@ -45,7 +45,6 @@ module.exports = function (RED)
|
|
|
45
45
|
let max_time_on = helper.getTimeInMs(config.max_time_on, config.max_time_on_unit);
|
|
46
46
|
let alarm_action = config.alarm_action || "NOTHING";
|
|
47
47
|
let alarm_off_action = config.alarm_off_action || "NOTHING";
|
|
48
|
-
let data_type = config.data_type || "SIMPLE";
|
|
49
48
|
|
|
50
49
|
// ##################
|
|
51
50
|
// # Runtime values #
|
|
@@ -231,7 +230,7 @@ module.exports = function (RED)
|
|
|
231
230
|
if (!node_settings.alarm_active)
|
|
232
231
|
{
|
|
233
232
|
isBlinking = true;
|
|
234
|
-
|
|
233
|
+
node.send({ payload: !node_settings.last_value });
|
|
235
234
|
setStatus();
|
|
236
235
|
setTimeout(
|
|
237
236
|
() =>
|
|
@@ -239,7 +238,7 @@ module.exports = function (RED)
|
|
|
239
238
|
isBlinking = false;
|
|
240
239
|
if (!node_settings.alarm_active)
|
|
241
240
|
{
|
|
242
|
-
|
|
241
|
+
node.send({ payload: node_settings.last_value });
|
|
243
242
|
setStatus();
|
|
244
243
|
}
|
|
245
244
|
},
|
|
@@ -284,7 +283,7 @@ module.exports = function (RED)
|
|
|
284
283
|
}
|
|
285
284
|
|
|
286
285
|
if (node_settings.alarm_active || helper.getTopicName(msg.topic) != "status")
|
|
287
|
-
|
|
286
|
+
node.send({ payload: node_settings.last_value });
|
|
288
287
|
|
|
289
288
|
// Output is on, now
|
|
290
289
|
if (node_settings.last_value && doRestartTimer)
|
|
@@ -327,7 +326,7 @@ module.exports = function (RED)
|
|
|
327
326
|
{
|
|
328
327
|
timeout = null;
|
|
329
328
|
node_settings.last_value = false;
|
|
330
|
-
|
|
329
|
+
node.send({ payload: false });
|
|
331
330
|
notifyCentral(false);
|
|
332
331
|
|
|
333
332
|
setStatus();
|
|
@@ -373,67 +372,6 @@ module.exports = function (RED)
|
|
|
373
372
|
}
|
|
374
373
|
}
|
|
375
374
|
|
|
376
|
-
/**
|
|
377
|
-
* Turns the output to the given state and returns the sent message
|
|
378
|
-
* @param {bool} state The new state of the output
|
|
379
|
-
* @returns The sent message
|
|
380
|
-
*/
|
|
381
|
-
let sendState = state =>
|
|
382
|
-
{
|
|
383
|
-
if (state)
|
|
384
|
-
return sendTurnOn();
|
|
385
|
-
|
|
386
|
-
return sendTurnOff();
|
|
387
|
-
}
|
|
388
|
-
|
|
389
|
-
/**
|
|
390
|
-
* Turns the output on and returns the sent message
|
|
391
|
-
* @returns The sent message
|
|
392
|
-
*/
|
|
393
|
-
let sendTurnOn = () =>
|
|
394
|
-
{
|
|
395
|
-
let data = null;
|
|
396
|
-
switch (data_type)
|
|
397
|
-
{
|
|
398
|
-
case "SIMPLE":
|
|
399
|
-
data = { payload: true };
|
|
400
|
-
break;
|
|
401
|
-
|
|
402
|
-
case "HOMEASSISTANT":
|
|
403
|
-
data = { payload: { action: "homeassistant.turn_on" } };
|
|
404
|
-
break;
|
|
405
|
-
|
|
406
|
-
default:
|
|
407
|
-
return null;
|
|
408
|
-
}
|
|
409
|
-
node.send(data);
|
|
410
|
-
return data;
|
|
411
|
-
}
|
|
412
|
-
|
|
413
|
-
/**
|
|
414
|
-
* Turns the output off and returns the sent message
|
|
415
|
-
* @returns The sent message
|
|
416
|
-
*/
|
|
417
|
-
let sendTurnOff = () =>
|
|
418
|
-
{
|
|
419
|
-
let data = null;
|
|
420
|
-
switch (data_type)
|
|
421
|
-
{
|
|
422
|
-
case "SIMPLE":
|
|
423
|
-
data = { payload: false };
|
|
424
|
-
break;
|
|
425
|
-
|
|
426
|
-
case "HOMEASSISTANT":
|
|
427
|
-
data = { payload: { action: "homeassistant.turn_off" } };
|
|
428
|
-
break;
|
|
429
|
-
|
|
430
|
-
default:
|
|
431
|
-
return null;
|
|
432
|
-
}
|
|
433
|
-
node.send(data);
|
|
434
|
-
return data;
|
|
435
|
-
}
|
|
436
|
-
|
|
437
375
|
/**
|
|
438
376
|
* Notify all connected central nodes
|
|
439
377
|
* @param {boolean} state The state if the light is on
|
|
@@ -1,29 +1,24 @@
|
|
|
1
|
-
{
|
|
2
|
-
"light": {
|
|
3
|
-
"ui": {
|
|
4
|
-
"name": "Name",
|
|
5
|
-
"text": "Text",
|
|
6
|
-
"controlled_by_words": "Diese Node kann über die eingegebenen Wörter gesteuert werden. Mehrere Wörter werden durch ein Komma getrennt.",
|
|
7
|
-
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
"last_state": "Letzen Zustand",
|
|
26
|
-
"last_sended_state": "Zuletzt gesendeten Zustand"
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"light": {
|
|
3
|
+
"ui": {
|
|
4
|
+
"name": "Name",
|
|
5
|
+
"text": "Text",
|
|
6
|
+
"controlled_by_words": "Diese Node kann über die eingegebenen Wörter gesteuert werden. Mehrere Wörter werden durch ein Komma getrennt.",
|
|
7
|
+
"max_time_on": "Max Zeit Ein",
|
|
8
|
+
"alarm_on": "Alarm Ein",
|
|
9
|
+
"alarm_off": "Alarm Aus",
|
|
10
|
+
"controlled_by_central": "Dieser Baustein wird von folgenden Zentralbausteinen gesteuert:",
|
|
11
|
+
|
|
12
|
+
"milliseconds": "Millisekunden",
|
|
13
|
+
"seconds": "Sekunden",
|
|
14
|
+
"minutes": "Minuten",
|
|
15
|
+
"hours": "Stunden",
|
|
16
|
+
|
|
17
|
+
"no_action": "Keine Aktion",
|
|
18
|
+
"turn_on": "Einschalten",
|
|
19
|
+
"turn_off": "Ausschalten",
|
|
20
|
+
"last_state": "Letzen Zustand",
|
|
21
|
+
"last_sended_state": "Zuletzt gesendeten Zustand"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -1,29 +1,24 @@
|
|
|
1
|
-
{
|
|
2
|
-
"light": {
|
|
3
|
-
"ui": {
|
|
4
|
-
"name": "Name",
|
|
5
|
-
"text": "Text",
|
|
6
|
-
"controlled_by_words": "This node can be controlled using the words entered. Multiple words are separated by a comma.",
|
|
7
|
-
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
"last_state": "Last state",
|
|
26
|
-
"last_sended_state": "Last sent state"
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"light": {
|
|
3
|
+
"ui": {
|
|
4
|
+
"name": "Name",
|
|
5
|
+
"text": "Text",
|
|
6
|
+
"controlled_by_words": "This node can be controlled using the words entered. Multiple words are separated by a comma.",
|
|
7
|
+
"max_time_on": "Max time on",
|
|
8
|
+
"alarm_on": "Alarm on",
|
|
9
|
+
"alarm_off": "Alarm off",
|
|
10
|
+
"controlled_by_central": "This block is controlled by the following central blocks:",
|
|
11
|
+
|
|
12
|
+
"milliseconds": "Milliseconds",
|
|
13
|
+
"seconds": "Seconds",
|
|
14
|
+
"minutes": "Minutes",
|
|
15
|
+
"hours": "Hours",
|
|
16
|
+
|
|
17
|
+
"no_action": "No action",
|
|
18
|
+
"turn_on": "Turn on",
|
|
19
|
+
"turn_off": "Turn off",
|
|
20
|
+
"last_state": "Last state",
|
|
21
|
+
"last_sended_state": "Last sent state"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
package/package.json
CHANGED
|
@@ -1,26 +1,21 @@
|
|
|
1
|
-
{
|
|
2
|
-
"scene": {
|
|
3
|
-
"ui": {
|
|
4
|
-
"name": "Name",
|
|
5
|
-
"text": "Text",
|
|
6
|
-
"controlled_by_words": "Diese Node kann über die eingegebenen Wörter gesteuert werden. Mehrere Wörter werden durch ein Komma getrennt.",
|
|
7
|
-
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
"
|
|
11
|
-
|
|
12
|
-
"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
"hours": "Stunden"
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"scene": {
|
|
3
|
+
"ui": {
|
|
4
|
+
"name": "Name",
|
|
5
|
+
"text": "Text",
|
|
6
|
+
"controlled_by_words": "Diese Node kann über die eingegebenen Wörter gesteuert werden. Mehrere Wörter werden durch ein Komma getrennt.",
|
|
7
|
+
"time_on": "Zeit Ein",
|
|
8
|
+
"controlled_by_central": "Dieser Baustein wird von folgenden Zentralbausteinen gesteuert:",
|
|
9
|
+
|
|
10
|
+
"outputs": "Ausgänge",
|
|
11
|
+
"scenes": "Szenen",
|
|
12
|
+
"links": "Links",
|
|
13
|
+
|
|
14
|
+
"milliseconds": "Millisekunden",
|
|
15
|
+
"seconds": "Sekunden",
|
|
16
|
+
"minutes": "Minuten",
|
|
17
|
+
"hours": "Stunden"
|
|
18
|
+
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|