smart-nodes 0.1.0

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.
Files changed (62) hide show
  1. package/LICENSE +21 -0
  2. package/LICENSE.md +21 -0
  3. package/README.md +127 -0
  4. package/central/central.html +328 -0
  5. package/central/central.js +95 -0
  6. package/compare/compare.html +137 -0
  7. package/compare/compare.js +151 -0
  8. package/delay/delay.html +192 -0
  9. package/delay/delay.js +175 -0
  10. package/examples/central.json +804 -0
  11. package/examples/central.png +0 -0
  12. package/examples/compare.json +916 -0
  13. package/examples/compare.png +0 -0
  14. package/examples/delay.json +198 -0
  15. package/examples/delay.png +0 -0
  16. package/examples/forwarder.json +152 -0
  17. package/examples/forwarder.png +0 -0
  18. package/examples/hysteresis.json +358 -0
  19. package/examples/hysteresis.png +0 -0
  20. package/examples/light-control.json +499 -0
  21. package/examples/light-control.png +0 -0
  22. package/examples/logic.json +562 -0
  23. package/examples/logic.png +0 -0
  24. package/examples/long-press-control.json +113 -0
  25. package/examples/long-press-control.png +0 -0
  26. package/examples/multi-press-control.json +136 -0
  27. package/examples/multi-press-control.png +0 -0
  28. package/examples/scene-control.json +535 -0
  29. package/examples/scene-control.png +0 -0
  30. package/examples/scheduler.json +164 -0
  31. package/examples/scheduler.png +0 -0
  32. package/examples/shutter-complex-control.json +489 -0
  33. package/examples/shutter-complex-control.png +0 -0
  34. package/examples/shutter-control.json +457 -0
  35. package/examples/shutter-control.png +0 -0
  36. package/examples/statistic.json +1112 -0
  37. package/examples/statistic.png +0 -0
  38. package/forwarder/forwarder.html +100 -0
  39. package/forwarder/forwarder.js +95 -0
  40. package/hysteresis/hysteresis.html +152 -0
  41. package/hysteresis/hysteresis.js +146 -0
  42. package/light-control/light-control.html +358 -0
  43. package/light-control/light-control.js +231 -0
  44. package/logic/logic.html +168 -0
  45. package/logic/logic.js +171 -0
  46. package/long-press-control/long-press-control.html +74 -0
  47. package/long-press-control/long-press-control.js +75 -0
  48. package/multi-press-control/multi-press-control.html +135 -0
  49. package/multi-press-control/multi-press-control.js +68 -0
  50. package/package.json +59 -0
  51. package/persistence.js +74 -0
  52. package/scene-control/scene-control.html +575 -0
  53. package/scene-control/scene-control.js +265 -0
  54. package/scheduler/scheduler.html +338 -0
  55. package/scheduler/scheduler.js +209 -0
  56. package/shutter-complex-control/shutter-complex-control.html +330 -0
  57. package/shutter-complex-control/shutter-complex-control.js +399 -0
  58. package/shutter-control/shutter-control.html +283 -0
  59. package/shutter-control/shutter-control.js +208 -0
  60. package/smart_helper.js +156 -0
  61. package/statistic/statistic.html +107 -0
  62. package/statistic/statistic.js +196 -0
Binary file
@@ -0,0 +1,198 @@
1
+ [
2
+ {
3
+ "id": "f783ba5236bdf735",
4
+ "type": "tab",
5
+ "label": "Delay",
6
+ "disabled": false,
7
+ "info": "",
8
+ "env": []
9
+ },
10
+ {
11
+ "id": "2539955c6e0d017a",
12
+ "type": "inject",
13
+ "z": "f783ba5236bdf735",
14
+ "name": "",
15
+ "props": [
16
+ {
17
+ "p": "payload"
18
+ },
19
+ {
20
+ "p": "topic",
21
+ "vt": "str"
22
+ }
23
+ ],
24
+ "repeat": "",
25
+ "crontab": "",
26
+ "once": false,
27
+ "onceDelay": 0.1,
28
+ "topic": "test",
29
+ "payload": "true",
30
+ "payloadType": "bool",
31
+ "x": 120,
32
+ "y": 60,
33
+ "wires": [
34
+ [
35
+ "3ae49f8104517376"
36
+ ]
37
+ ]
38
+ },
39
+ {
40
+ "id": "edb62121e6b8aa7c",
41
+ "type": "debug",
42
+ "z": "f783ba5236bdf735",
43
+ "name": "debug 37",
44
+ "active": true,
45
+ "tosidebar": true,
46
+ "console": false,
47
+ "tostatus": false,
48
+ "complete": "true",
49
+ "targetType": "full",
50
+ "statusVal": "",
51
+ "statusType": "auto",
52
+ "x": 620,
53
+ "y": 80,
54
+ "wires": []
55
+ },
56
+ {
57
+ "id": "388d626bad558933",
58
+ "type": "inject",
59
+ "z": "f783ba5236bdf735",
60
+ "name": "",
61
+ "props": [
62
+ {
63
+ "p": "payload"
64
+ },
65
+ {
66
+ "p": "topic",
67
+ "vt": "str"
68
+ }
69
+ ],
70
+ "repeat": "",
71
+ "crontab": "",
72
+ "once": false,
73
+ "onceDelay": 0.1,
74
+ "topic": "blub",
75
+ "payload": "false",
76
+ "payloadType": "bool",
77
+ "x": 120,
78
+ "y": 100,
79
+ "wires": [
80
+ [
81
+ "3ae49f8104517376"
82
+ ]
83
+ ]
84
+ },
85
+ {
86
+ "id": "3ae49f8104517376",
87
+ "type": "smart_delay",
88
+ "z": "f783ba5236bdf735",
89
+ "name": "Delay: bei Änderung",
90
+ "on_delay": 10,
91
+ "on_delay_unit": "s",
92
+ "off_delay": "5",
93
+ "off_delay_unit": "s",
94
+ "delay_only_on_change": true,
95
+ "save_state": true,
96
+ "resend_on_start": true,
97
+ "x": 380,
98
+ "y": 80,
99
+ "wires": [
100
+ [
101
+ "edb62121e6b8aa7c"
102
+ ]
103
+ ]
104
+ },
105
+ {
106
+ "id": "669c1dc389051186",
107
+ "type": "smart_delay",
108
+ "z": "f783ba5236bdf735",
109
+ "name": "Delay: immer",
110
+ "on_delay": 10,
111
+ "on_delay_unit": "s",
112
+ "off_delay": "5",
113
+ "off_delay_unit": "s",
114
+ "delay_only_on_change": false,
115
+ "x": 350,
116
+ "y": 220,
117
+ "wires": [
118
+ [
119
+ "5f8b38cf1abba57f"
120
+ ]
121
+ ]
122
+ },
123
+ {
124
+ "id": "d5f9e9cadc731ca7",
125
+ "type": "inject",
126
+ "z": "f783ba5236bdf735",
127
+ "name": "",
128
+ "props": [
129
+ {
130
+ "p": "payload"
131
+ },
132
+ {
133
+ "p": "topic",
134
+ "vt": "str"
135
+ }
136
+ ],
137
+ "repeat": "",
138
+ "crontab": "",
139
+ "once": false,
140
+ "onceDelay": 0.1,
141
+ "topic": "test",
142
+ "payload": "true",
143
+ "payloadType": "bool",
144
+ "x": 120,
145
+ "y": 200,
146
+ "wires": [
147
+ [
148
+ "669c1dc389051186"
149
+ ]
150
+ ]
151
+ },
152
+ {
153
+ "id": "dfcdd034ec4184c8",
154
+ "type": "inject",
155
+ "z": "f783ba5236bdf735",
156
+ "name": "",
157
+ "props": [
158
+ {
159
+ "p": "payload"
160
+ },
161
+ {
162
+ "p": "topic",
163
+ "vt": "str"
164
+ }
165
+ ],
166
+ "repeat": "",
167
+ "crontab": "",
168
+ "once": false,
169
+ "onceDelay": 0.1,
170
+ "topic": "blub",
171
+ "payload": "false",
172
+ "payloadType": "bool",
173
+ "x": 120,
174
+ "y": 240,
175
+ "wires": [
176
+ [
177
+ "669c1dc389051186"
178
+ ]
179
+ ]
180
+ },
181
+ {
182
+ "id": "5f8b38cf1abba57f",
183
+ "type": "debug",
184
+ "z": "f783ba5236bdf735",
185
+ "name": "debug 38",
186
+ "active": true,
187
+ "tosidebar": true,
188
+ "console": false,
189
+ "tostatus": false,
190
+ "complete": "true",
191
+ "targetType": "full",
192
+ "statusVal": "",
193
+ "statusType": "auto",
194
+ "x": 620,
195
+ "y": 220,
196
+ "wires": []
197
+ }
198
+ ]
Binary file
@@ -0,0 +1,152 @@
1
+ [
2
+ {
3
+ "id": "3f7674b42690cbf6",
4
+ "type": "tab",
5
+ "label": "Forwarder",
6
+ "disabled": false,
7
+ "info": "",
8
+ "env": []
9
+ },
10
+ {
11
+ "id": "b66a09e81ad59e7f",
12
+ "type": "inject",
13
+ "z": "3f7674b42690cbf6",
14
+ "name": "",
15
+ "props": [
16
+ {
17
+ "p": "topic",
18
+ "vt": "str"
19
+ }
20
+ ],
21
+ "repeat": "",
22
+ "crontab": "",
23
+ "once": false,
24
+ "onceDelay": 0.1,
25
+ "topic": "enable",
26
+ "x": 130,
27
+ "y": 60,
28
+ "wires": [
29
+ [
30
+ "96f4341ffed2d829"
31
+ ]
32
+ ]
33
+ },
34
+ {
35
+ "id": "7626979605acc1fd",
36
+ "type": "debug",
37
+ "z": "3f7674b42690cbf6",
38
+ "name": "debug 28",
39
+ "active": true,
40
+ "tosidebar": true,
41
+ "console": false,
42
+ "tostatus": false,
43
+ "complete": "true",
44
+ "targetType": "full",
45
+ "statusVal": "",
46
+ "statusType": "auto",
47
+ "x": 540,
48
+ "y": 180,
49
+ "wires": []
50
+ },
51
+ {
52
+ "id": "96f4341ffed2d829",
53
+ "type": "smart_forwarder",
54
+ "z": "3f7674b42690cbf6",
55
+ "name": "",
56
+ "enabled": true,
57
+ "always_forward_true": false,
58
+ "always_forward_false": false,
59
+ "forward_last_on_enable": true,
60
+ "save_state": true,
61
+ "resend_on_start": true,
62
+ "x": 330,
63
+ "y": 180,
64
+ "wires": [
65
+ [
66
+ "7626979605acc1fd"
67
+ ]
68
+ ]
69
+ },
70
+ {
71
+ "id": "77cb71c53af51072",
72
+ "type": "inject",
73
+ "z": "3f7674b42690cbf6",
74
+ "name": "",
75
+ "props": [
76
+ {
77
+ "p": "topic",
78
+ "vt": "str"
79
+ }
80
+ ],
81
+ "repeat": "",
82
+ "crontab": "",
83
+ "once": false,
84
+ "onceDelay": 0.1,
85
+ "topic": "disable",
86
+ "x": 130,
87
+ "y": 100,
88
+ "wires": [
89
+ [
90
+ "96f4341ffed2d829"
91
+ ]
92
+ ]
93
+ },
94
+ {
95
+ "id": "ede57c90bfaaa971",
96
+ "type": "inject",
97
+ "z": "3f7674b42690cbf6",
98
+ "name": "",
99
+ "props": [
100
+ {
101
+ "p": "topic",
102
+ "vt": "str"
103
+ },
104
+ {
105
+ "p": "payload"
106
+ }
107
+ ],
108
+ "repeat": "",
109
+ "crontab": "",
110
+ "once": false,
111
+ "onceDelay": 0.1,
112
+ "topic": "example",
113
+ "payload": "42",
114
+ "payloadType": "num",
115
+ "x": 110,
116
+ "y": 160,
117
+ "wires": [
118
+ [
119
+ "96f4341ffed2d829"
120
+ ]
121
+ ]
122
+ },
123
+ {
124
+ "id": "be2437f2d4445321",
125
+ "type": "inject",
126
+ "z": "3f7674b42690cbf6",
127
+ "name": "",
128
+ "props": [
129
+ {
130
+ "p": "topic",
131
+ "vt": "str"
132
+ },
133
+ {
134
+ "p": "payload"
135
+ }
136
+ ],
137
+ "repeat": "",
138
+ "crontab": "",
139
+ "once": false,
140
+ "onceDelay": 0.1,
141
+ "topic": "example",
142
+ "payload": "777",
143
+ "payloadType": "num",
144
+ "x": 110,
145
+ "y": 200,
146
+ "wires": [
147
+ [
148
+ "96f4341ffed2d829"
149
+ ]
150
+ ]
151
+ }
152
+ ]
Binary file
@@ -0,0 +1,358 @@
1
+ [
2
+ {
3
+ "id": "c51a4aa01bcf08f4",
4
+ "type": "tab",
5
+ "label": "Hysteresis",
6
+ "disabled": false,
7
+ "info": "",
8
+ "env": []
9
+ },
10
+ {
11
+ "id": "f2004bf115b58fd3",
12
+ "type": "inject",
13
+ "z": "c51a4aa01bcf08f4",
14
+ "name": "",
15
+ "props": [
16
+ {
17
+ "p": "payload"
18
+ }
19
+ ],
20
+ "repeat": "",
21
+ "crontab": "",
22
+ "once": false,
23
+ "onceDelay": 0.1,
24
+ "topic": "",
25
+ "payload": "26",
26
+ "payloadType": "num",
27
+ "x": 150,
28
+ "y": 460,
29
+ "wires": [
30
+ [
31
+ "592bd85753e315c1"
32
+ ]
33
+ ]
34
+ },
35
+ {
36
+ "id": "13a9ae291863de5d",
37
+ "type": "inject",
38
+ "z": "c51a4aa01bcf08f4",
39
+ "name": "",
40
+ "props": [
41
+ {
42
+ "p": "payload"
43
+ }
44
+ ],
45
+ "repeat": "",
46
+ "crontab": "",
47
+ "once": false,
48
+ "onceDelay": 0.1,
49
+ "topic": "",
50
+ "payload": "25",
51
+ "payloadType": "num",
52
+ "x": 150,
53
+ "y": 420,
54
+ "wires": [
55
+ [
56
+ "592bd85753e315c1"
57
+ ]
58
+ ]
59
+ },
60
+ {
61
+ "id": "ab4e87fa22585fd8",
62
+ "type": "debug",
63
+ "z": "c51a4aa01bcf08f4",
64
+ "name": "debug 35",
65
+ "active": true,
66
+ "tosidebar": true,
67
+ "console": false,
68
+ "tostatus": false,
69
+ "complete": "true",
70
+ "targetType": "full",
71
+ "statusVal": "",
72
+ "statusType": "auto",
73
+ "x": 640,
74
+ "y": 260,
75
+ "wires": []
76
+ },
77
+ {
78
+ "id": "592bd85753e315c1",
79
+ "type": "smart_hysteresis",
80
+ "z": "c51a4aa01bcf08f4",
81
+ "name": "",
82
+ "setpoint": 20,
83
+ "hysteresis": 5,
84
+ "out_higher": "",
85
+ "out_higher_type": "null",
86
+ "out_lower": "{\"topic\": \"lower\"}",
87
+ "out_lower_type": "json",
88
+ "save_state": false,
89
+ "resend_on_start": true,
90
+ "x": 430,
91
+ "y": 280,
92
+ "wires": [
93
+ [
94
+ "ab4e87fa22585fd8"
95
+ ],
96
+ [
97
+ "265a590877075c4d"
98
+ ]
99
+ ]
100
+ },
101
+ {
102
+ "id": "be58e48c9ec36b4c",
103
+ "type": "inject",
104
+ "z": "c51a4aa01bcf08f4",
105
+ "name": "",
106
+ "props": [
107
+ {
108
+ "p": "payload"
109
+ },
110
+ {
111
+ "p": "topic",
112
+ "vt": "str"
113
+ }
114
+ ],
115
+ "repeat": "",
116
+ "crontab": "",
117
+ "once": false,
118
+ "onceDelay": 0.1,
119
+ "topic": "setpoint",
120
+ "payload": "20",
121
+ "payloadType": "num",
122
+ "x": 140,
123
+ "y": 100,
124
+ "wires": [
125
+ [
126
+ "592bd85753e315c1"
127
+ ]
128
+ ]
129
+ },
130
+ {
131
+ "id": "471e16a89781bada",
132
+ "type": "inject",
133
+ "z": "c51a4aa01bcf08f4",
134
+ "name": "",
135
+ "props": [
136
+ {
137
+ "p": "payload"
138
+ },
139
+ {
140
+ "p": "topic",
141
+ "vt": "str"
142
+ }
143
+ ],
144
+ "repeat": "",
145
+ "crontab": "",
146
+ "once": false,
147
+ "onceDelay": 0.1,
148
+ "topic": "hysteresis",
149
+ "payload": "5",
150
+ "payloadType": "num",
151
+ "x": 130,
152
+ "y": 180,
153
+ "wires": [
154
+ [
155
+ "592bd85753e315c1"
156
+ ]
157
+ ]
158
+ },
159
+ {
160
+ "id": "c802f945cadf444c",
161
+ "type": "inject",
162
+ "z": "c51a4aa01bcf08f4",
163
+ "name": "",
164
+ "props": [
165
+ {
166
+ "p": "payload"
167
+ },
168
+ {
169
+ "p": "topic",
170
+ "vt": "str"
171
+ }
172
+ ],
173
+ "repeat": "",
174
+ "crontab": "",
175
+ "once": false,
176
+ "onceDelay": 0.1,
177
+ "topic": "setpoint",
178
+ "payload": "30",
179
+ "payloadType": "num",
180
+ "x": 140,
181
+ "y": 140,
182
+ "wires": [
183
+ [
184
+ "592bd85753e315c1"
185
+ ]
186
+ ]
187
+ },
188
+ {
189
+ "id": "3c9f425d1cfd3119",
190
+ "type": "inject",
191
+ "z": "c51a4aa01bcf08f4",
192
+ "name": "",
193
+ "props": [
194
+ {
195
+ "p": "payload"
196
+ },
197
+ {
198
+ "p": "topic",
199
+ "vt": "str"
200
+ }
201
+ ],
202
+ "repeat": "",
203
+ "crontab": "",
204
+ "once": false,
205
+ "onceDelay": 0.1,
206
+ "topic": "hysteresis",
207
+ "payload": "10",
208
+ "payloadType": "num",
209
+ "x": 130,
210
+ "y": 220,
211
+ "wires": [
212
+ [
213
+ "592bd85753e315c1"
214
+ ]
215
+ ]
216
+ },
217
+ {
218
+ "id": "0460eed27090315a",
219
+ "type": "inject",
220
+ "z": "c51a4aa01bcf08f4",
221
+ "name": "",
222
+ "props": [
223
+ {
224
+ "p": "payload"
225
+ }
226
+ ],
227
+ "repeat": "",
228
+ "crontab": "",
229
+ "once": false,
230
+ "onceDelay": 0.1,
231
+ "topic": "",
232
+ "payload": "14",
233
+ "payloadType": "num",
234
+ "x": 150,
235
+ "y": 340,
236
+ "wires": [
237
+ [
238
+ "592bd85753e315c1"
239
+ ]
240
+ ]
241
+ },
242
+ {
243
+ "id": "d2f60fee0d2aa6ca",
244
+ "type": "inject",
245
+ "z": "c51a4aa01bcf08f4",
246
+ "name": "",
247
+ "props": [
248
+ {
249
+ "p": "payload"
250
+ }
251
+ ],
252
+ "repeat": "",
253
+ "crontab": "",
254
+ "once": false,
255
+ "onceDelay": 0.1,
256
+ "topic": "",
257
+ "payload": "15",
258
+ "payloadType": "num",
259
+ "x": 150,
260
+ "y": 380,
261
+ "wires": [
262
+ [
263
+ "592bd85753e315c1"
264
+ ]
265
+ ]
266
+ },
267
+ {
268
+ "id": "e8fbc9799f52928b",
269
+ "type": "inject",
270
+ "z": "c51a4aa01bcf08f4",
271
+ "name": "",
272
+ "props": [
273
+ {
274
+ "p": "payload"
275
+ }
276
+ ],
277
+ "repeat": "",
278
+ "crontab": "",
279
+ "once": false,
280
+ "onceDelay": 0.1,
281
+ "topic": "",
282
+ "payload": "1",
283
+ "payloadType": "num",
284
+ "x": 150,
285
+ "y": 300,
286
+ "wires": [
287
+ [
288
+ "592bd85753e315c1"
289
+ ]
290
+ ]
291
+ },
292
+ {
293
+ "id": "56d627323026926e",
294
+ "type": "inject",
295
+ "z": "c51a4aa01bcf08f4",
296
+ "name": "",
297
+ "props": [
298
+ {
299
+ "p": "payload"
300
+ }
301
+ ],
302
+ "repeat": "",
303
+ "crontab": "",
304
+ "once": false,
305
+ "onceDelay": 0.1,
306
+ "topic": "",
307
+ "payload": "100",
308
+ "payloadType": "num",
309
+ "x": 150,
310
+ "y": 500,
311
+ "wires": [
312
+ [
313
+ "592bd85753e315c1"
314
+ ]
315
+ ]
316
+ },
317
+ {
318
+ "id": "265a590877075c4d",
319
+ "type": "debug",
320
+ "z": "c51a4aa01bcf08f4",
321
+ "name": "debug 36",
322
+ "active": true,
323
+ "tosidebar": true,
324
+ "console": false,
325
+ "tostatus": false,
326
+ "complete": "true",
327
+ "targetType": "full",
328
+ "statusVal": "",
329
+ "statusType": "auto",
330
+ "x": 640,
331
+ "y": 300,
332
+ "wires": []
333
+ },
334
+ {
335
+ "id": "d27ad526b17c5f01",
336
+ "type": "inject",
337
+ "z": "c51a4aa01bcf08f4",
338
+ "name": "",
339
+ "props": [
340
+ {
341
+ "p": "topic",
342
+ "vt": "str"
343
+ }
344
+ ],
345
+ "repeat": "",
346
+ "crontab": "",
347
+ "once": false,
348
+ "onceDelay": 0.1,
349
+ "topic": "resend",
350
+ "x": 150,
351
+ "y": 60,
352
+ "wires": [
353
+ [
354
+ "592bd85753e315c1"
355
+ ]
356
+ ]
357
+ }
358
+ ]
Binary file