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
@@ -0,0 +1,136 @@
1
+ [
2
+ {
3
+ "id": "167b9ec950099246",
4
+ "type": "tab",
5
+ "label": "Multi press",
6
+ "disabled": false,
7
+ "info": "",
8
+ "env": []
9
+ },
10
+ {
11
+ "id": "e13d1ee0aa3d7dc9",
12
+ "type": "smart_multi-press-control",
13
+ "z": "167b9ec950099246",
14
+ "name": "",
15
+ "press_delay_ms": "2000",
16
+ "outputs": 3,
17
+ "out1": "{\"topic\": \"\"}",
18
+ "out2": "{\"topic\": \"\"}",
19
+ "out3": "{\"topic\": \"\"}",
20
+ "out4": "{\"topic\": \"\"}",
21
+ "x": 450,
22
+ "y": 160,
23
+ "wires": [
24
+ [
25
+ "5140ca1187aa92ac"
26
+ ],
27
+ [
28
+ "2beaab848c6d54a5"
29
+ ],
30
+ [
31
+ "b91558b809587cf8"
32
+ ]
33
+ ]
34
+ },
35
+ {
36
+ "id": "d4cd4c571dde6b27",
37
+ "type": "inject",
38
+ "z": "167b9ec950099246",
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": "true",
51
+ "payloadType": "bool",
52
+ "x": 210,
53
+ "y": 140,
54
+ "wires": [
55
+ [
56
+ "e13d1ee0aa3d7dc9"
57
+ ]
58
+ ]
59
+ },
60
+ {
61
+ "id": "cabe6d711e5551f6",
62
+ "type": "inject",
63
+ "z": "167b9ec950099246",
64
+ "name": "",
65
+ "props": [
66
+ {
67
+ "p": "payload"
68
+ }
69
+ ],
70
+ "repeat": "",
71
+ "crontab": "",
72
+ "once": false,
73
+ "onceDelay": 0.1,
74
+ "topic": "",
75
+ "payload": "false",
76
+ "payloadType": "bool",
77
+ "x": 210,
78
+ "y": 180,
79
+ "wires": [
80
+ [
81
+ "e13d1ee0aa3d7dc9"
82
+ ]
83
+ ]
84
+ },
85
+ {
86
+ "id": "5140ca1187aa92ac",
87
+ "type": "debug",
88
+ "z": "167b9ec950099246",
89
+ "name": "debug 51",
90
+ "active": true,
91
+ "tosidebar": true,
92
+ "console": false,
93
+ "tostatus": false,
94
+ "complete": "true",
95
+ "targetType": "full",
96
+ "statusVal": "",
97
+ "statusType": "auto",
98
+ "x": 680,
99
+ "y": 120,
100
+ "wires": []
101
+ },
102
+ {
103
+ "id": "2beaab848c6d54a5",
104
+ "type": "debug",
105
+ "z": "167b9ec950099246",
106
+ "name": "debug 52",
107
+ "active": true,
108
+ "tosidebar": true,
109
+ "console": false,
110
+ "tostatus": false,
111
+ "complete": "true",
112
+ "targetType": "full",
113
+ "statusVal": "",
114
+ "statusType": "auto",
115
+ "x": 680,
116
+ "y": 160,
117
+ "wires": []
118
+ },
119
+ {
120
+ "id": "b91558b809587cf8",
121
+ "type": "debug",
122
+ "z": "167b9ec950099246",
123
+ "name": "debug 53",
124
+ "active": true,
125
+ "tosidebar": true,
126
+ "console": false,
127
+ "tostatus": false,
128
+ "complete": "true",
129
+ "targetType": "full",
130
+ "statusVal": "",
131
+ "statusType": "auto",
132
+ "x": 678.0994262695312,
133
+ "y": 206.09091186523438,
134
+ "wires": []
135
+ }
136
+ ]
Binary file
@@ -0,0 +1,535 @@
1
+ [
2
+ {
3
+ "id": "ac13e4c2ef52ddcd",
4
+ "type": "tab",
5
+ "label": "Scene",
6
+ "disabled": false,
7
+ "info": "",
8
+ "env": []
9
+ },
10
+ {
11
+ "id": "e6ec350469c36167",
12
+ "type": "debug",
13
+ "z": "ac13e4c2ef52ddcd",
14
+ "name": "debug 11",
15
+ "active": true,
16
+ "tosidebar": true,
17
+ "console": false,
18
+ "tostatus": false,
19
+ "complete": "true",
20
+ "targetType": "full",
21
+ "statusVal": "",
22
+ "statusType": "auto",
23
+ "x": 820,
24
+ "y": 280,
25
+ "wires": []
26
+ },
27
+ {
28
+ "id": "1fa7e2a1adc7844b",
29
+ "type": "smart_scene-control",
30
+ "z": "ac13e4c2ef52ddcd",
31
+ "name": "",
32
+ "max_time_on": "10",
33
+ "max_time_on_unit": "s",
34
+ "outputs": 2,
35
+ "output_items": [
36
+ {
37
+ "name": "A"
38
+ },
39
+ {
40
+ "name": "B"
41
+ }
42
+ ],
43
+ "scenes": [
44
+ {
45
+ "name": "Alles",
46
+ "outputs": "1,2"
47
+ },
48
+ {
49
+ "name": "A",
50
+ "outputs": "1"
51
+ },
52
+ {
53
+ "name": "B",
54
+ "outputs": "2"
55
+ }
56
+ ],
57
+ "links": [],
58
+ "x": 480,
59
+ "y": 300,
60
+ "wires": [
61
+ [
62
+ "e6ec350469c36167"
63
+ ],
64
+ [
65
+ "b0db99523955e348"
66
+ ]
67
+ ]
68
+ },
69
+ {
70
+ "id": "b0db99523955e348",
71
+ "type": "debug",
72
+ "z": "ac13e4c2ef52ddcd",
73
+ "name": "debug 12",
74
+ "active": true,
75
+ "tosidebar": true,
76
+ "console": false,
77
+ "tostatus": false,
78
+ "complete": "true",
79
+ "targetType": "full",
80
+ "statusVal": "",
81
+ "statusType": "auto",
82
+ "x": 820,
83
+ "y": 320,
84
+ "wires": []
85
+ },
86
+ {
87
+ "id": "4b70235bbbb5474d",
88
+ "type": "inject",
89
+ "z": "ac13e4c2ef52ddcd",
90
+ "name": "",
91
+ "props": [
92
+ {
93
+ "p": "topic",
94
+ "vt": "str"
95
+ },
96
+ {
97
+ "p": "payload"
98
+ }
99
+ ],
100
+ "repeat": "",
101
+ "crontab": "",
102
+ "once": false,
103
+ "onceDelay": 0.1,
104
+ "topic": "status#1",
105
+ "payload": "true",
106
+ "payloadType": "bool",
107
+ "x": 150,
108
+ "y": 40,
109
+ "wires": [
110
+ [
111
+ "1fa7e2a1adc7844b"
112
+ ]
113
+ ]
114
+ },
115
+ {
116
+ "id": "6c6ac3529cebb8ab",
117
+ "type": "inject",
118
+ "z": "ac13e4c2ef52ddcd",
119
+ "name": "",
120
+ "props": [
121
+ {
122
+ "p": "topic",
123
+ "vt": "str"
124
+ },
125
+ {
126
+ "p": "payload"
127
+ }
128
+ ],
129
+ "repeat": "",
130
+ "crontab": "",
131
+ "once": false,
132
+ "onceDelay": 0.1,
133
+ "topic": "status#1",
134
+ "payload": "false",
135
+ "payloadType": "bool",
136
+ "x": 150,
137
+ "y": 80,
138
+ "wires": [
139
+ [
140
+ "1fa7e2a1adc7844b"
141
+ ]
142
+ ]
143
+ },
144
+ {
145
+ "id": "f047f190e0022e4e",
146
+ "type": "inject",
147
+ "z": "ac13e4c2ef52ddcd",
148
+ "name": "",
149
+ "props": [
150
+ {
151
+ "p": "topic",
152
+ "vt": "str"
153
+ }
154
+ ],
155
+ "repeat": "",
156
+ "crontab": "",
157
+ "once": false,
158
+ "onceDelay": 0.1,
159
+ "topic": "on",
160
+ "x": 170,
161
+ "y": 200,
162
+ "wires": [
163
+ [
164
+ "1fa7e2a1adc7844b"
165
+ ]
166
+ ]
167
+ },
168
+ {
169
+ "id": "d698392bde3583a1",
170
+ "type": "inject",
171
+ "z": "ac13e4c2ef52ddcd",
172
+ "name": "",
173
+ "props": [
174
+ {
175
+ "p": "topic",
176
+ "vt": "str"
177
+ }
178
+ ],
179
+ "repeat": "",
180
+ "crontab": "",
181
+ "once": false,
182
+ "onceDelay": 0.1,
183
+ "topic": "off",
184
+ "x": 170,
185
+ "y": 280,
186
+ "wires": [
187
+ [
188
+ "1fa7e2a1adc7844b"
189
+ ]
190
+ ]
191
+ },
192
+ {
193
+ "id": "393c26ee9cdeca17",
194
+ "type": "inject",
195
+ "z": "ac13e4c2ef52ddcd",
196
+ "name": "",
197
+ "props": [
198
+ {
199
+ "p": "topic",
200
+ "vt": "str"
201
+ },
202
+ {
203
+ "p": "payload"
204
+ }
205
+ ],
206
+ "repeat": "",
207
+ "crontab": "",
208
+ "once": false,
209
+ "onceDelay": 0.1,
210
+ "topic": "set",
211
+ "payload": "true",
212
+ "payloadType": "bool",
213
+ "x": 170,
214
+ "y": 320,
215
+ "wires": [
216
+ [
217
+ "1fa7e2a1adc7844b"
218
+ ]
219
+ ]
220
+ },
221
+ {
222
+ "id": "0984bfc3ae488598",
223
+ "type": "inject",
224
+ "z": "ac13e4c2ef52ddcd",
225
+ "name": "",
226
+ "props": [
227
+ {
228
+ "p": "topic",
229
+ "vt": "str"
230
+ },
231
+ {
232
+ "p": "payload"
233
+ }
234
+ ],
235
+ "repeat": "",
236
+ "crontab": "",
237
+ "once": false,
238
+ "onceDelay": 0.1,
239
+ "topic": "set",
240
+ "payload": "false",
241
+ "payloadType": "bool",
242
+ "x": 160,
243
+ "y": 400,
244
+ "wires": [
245
+ [
246
+ "1fa7e2a1adc7844b"
247
+ ]
248
+ ]
249
+ },
250
+ {
251
+ "id": "2550e3c0f5a835be",
252
+ "type": "inject",
253
+ "z": "ac13e4c2ef52ddcd",
254
+ "name": "",
255
+ "props": [
256
+ {
257
+ "p": "topic",
258
+ "vt": "str"
259
+ },
260
+ {
261
+ "p": "payload"
262
+ }
263
+ ],
264
+ "repeat": "",
265
+ "crontab": "",
266
+ "once": false,
267
+ "onceDelay": 0.1,
268
+ "topic": "set_permanent",
269
+ "payload": "true",
270
+ "payloadType": "bool",
271
+ "x": 130,
272
+ "y": 440,
273
+ "wires": [
274
+ [
275
+ "1fa7e2a1adc7844b"
276
+ ]
277
+ ]
278
+ },
279
+ {
280
+ "id": "990bbe925eddd5ea",
281
+ "type": "inject",
282
+ "z": "ac13e4c2ef52ddcd",
283
+ "name": "",
284
+ "props": [
285
+ {
286
+ "p": "topic",
287
+ "vt": "str"
288
+ },
289
+ {
290
+ "p": "payload"
291
+ }
292
+ ],
293
+ "repeat": "",
294
+ "crontab": "",
295
+ "once": false,
296
+ "onceDelay": 0.1,
297
+ "topic": "set_permanent",
298
+ "payload": "false",
299
+ "payloadType": "bool",
300
+ "x": 130,
301
+ "y": 480,
302
+ "wires": [
303
+ [
304
+ "1fa7e2a1adc7844b"
305
+ ]
306
+ ]
307
+ },
308
+ {
309
+ "id": "f5a5073e7b770b68",
310
+ "type": "inject",
311
+ "z": "ac13e4c2ef52ddcd",
312
+ "name": "",
313
+ "props": [
314
+ {
315
+ "p": "topic",
316
+ "vt": "str"
317
+ }
318
+ ],
319
+ "repeat": "",
320
+ "crontab": "",
321
+ "once": false,
322
+ "onceDelay": 0.1,
323
+ "topic": "toggle",
324
+ "x": 170,
325
+ "y": 520,
326
+ "wires": [
327
+ [
328
+ "1fa7e2a1adc7844b"
329
+ ]
330
+ ]
331
+ },
332
+ {
333
+ "id": "6771d87c8a476451",
334
+ "type": "inject",
335
+ "z": "ac13e4c2ef52ddcd",
336
+ "name": "on: 1s",
337
+ "props": [
338
+ {
339
+ "p": "topic",
340
+ "vt": "str"
341
+ },
342
+ {
343
+ "p": "time_on",
344
+ "v": "1s",
345
+ "vt": "str"
346
+ }
347
+ ],
348
+ "repeat": "",
349
+ "crontab": "",
350
+ "once": false,
351
+ "onceDelay": 0.1,
352
+ "topic": "on",
353
+ "x": 170,
354
+ "y": 240,
355
+ "wires": [
356
+ [
357
+ "1fa7e2a1adc7844b"
358
+ ]
359
+ ]
360
+ },
361
+ {
362
+ "id": "2807b5192316e754",
363
+ "type": "inject",
364
+ "z": "ac13e4c2ef52ddcd",
365
+ "name": "set:true 1s",
366
+ "props": [
367
+ {
368
+ "p": "topic",
369
+ "vt": "str"
370
+ },
371
+ {
372
+ "p": "payload"
373
+ },
374
+ {
375
+ "p": "time_on",
376
+ "v": "1s",
377
+ "vt": "str"
378
+ }
379
+ ],
380
+ "repeat": "",
381
+ "crontab": "",
382
+ "once": false,
383
+ "onceDelay": 0.1,
384
+ "topic": "set",
385
+ "payload": "true",
386
+ "payloadType": "bool",
387
+ "x": 160,
388
+ "y": 360,
389
+ "wires": [
390
+ [
391
+ "1fa7e2a1adc7844b"
392
+ ]
393
+ ]
394
+ },
395
+ {
396
+ "id": "8a990211ae628f4a",
397
+ "type": "inject",
398
+ "z": "ac13e4c2ef52ddcd",
399
+ "name": "toggle: 1000",
400
+ "props": [
401
+ {
402
+ "p": "topic",
403
+ "vt": "str"
404
+ },
405
+ {
406
+ "p": "time_on",
407
+ "v": "1000",
408
+ "vt": "num"
409
+ }
410
+ ],
411
+ "repeat": "",
412
+ "crontab": "",
413
+ "once": false,
414
+ "onceDelay": 0.1,
415
+ "topic": "toggle",
416
+ "x": 150,
417
+ "y": 560,
418
+ "wires": [
419
+ [
420
+ "1fa7e2a1adc7844b"
421
+ ]
422
+ ]
423
+ },
424
+ {
425
+ "id": "d46afdc8d78abfe8",
426
+ "type": "inject",
427
+ "z": "ac13e4c2ef52ddcd",
428
+ "name": "",
429
+ "props": [
430
+ {
431
+ "p": "topic",
432
+ "vt": "str"
433
+ },
434
+ {
435
+ "p": "payload"
436
+ }
437
+ ],
438
+ "repeat": "",
439
+ "crontab": "",
440
+ "once": false,
441
+ "onceDelay": 0.1,
442
+ "topic": "status#2",
443
+ "payload": "true",
444
+ "payloadType": "bool",
445
+ "x": 150,
446
+ "y": 120,
447
+ "wires": [
448
+ [
449
+ "1fa7e2a1adc7844b"
450
+ ]
451
+ ]
452
+ },
453
+ {
454
+ "id": "549daf2a12e512aa",
455
+ "type": "inject",
456
+ "z": "ac13e4c2ef52ddcd",
457
+ "name": "",
458
+ "props": [
459
+ {
460
+ "p": "topic",
461
+ "vt": "str"
462
+ },
463
+ {
464
+ "p": "payload"
465
+ }
466
+ ],
467
+ "repeat": "",
468
+ "crontab": "",
469
+ "once": false,
470
+ "onceDelay": 0.1,
471
+ "topic": "status#2",
472
+ "payload": "false",
473
+ "payloadType": "bool",
474
+ "x": 150,
475
+ "y": 160,
476
+ "wires": [
477
+ [
478
+ "1fa7e2a1adc7844b"
479
+ ]
480
+ ]
481
+ },
482
+ {
483
+ "id": "5491a0adbb1bed17",
484
+ "type": "inject",
485
+ "z": "ac13e4c2ef52ddcd",
486
+ "name": "",
487
+ "props": [
488
+ {
489
+ "p": "topic",
490
+ "vt": "str"
491
+ }
492
+ ],
493
+ "repeat": "",
494
+ "crontab": "",
495
+ "once": false,
496
+ "onceDelay": 0.1,
497
+ "topic": "scene_0,1,2",
498
+ "x": 150,
499
+ "y": 600,
500
+ "wires": [
501
+ [
502
+ "1fa7e2a1adc7844b"
503
+ ]
504
+ ]
505
+ },
506
+ {
507
+ "id": "6476f72371969610",
508
+ "type": "inject",
509
+ "z": "ac13e4c2ef52ddcd",
510
+ "name": "scene_0,1,2: 2s",
511
+ "props": [
512
+ {
513
+ "p": "topic",
514
+ "vt": "str"
515
+ },
516
+ {
517
+ "p": "time_on",
518
+ "v": "2s",
519
+ "vt": "str"
520
+ }
521
+ ],
522
+ "repeat": "",
523
+ "crontab": "",
524
+ "once": false,
525
+ "onceDelay": 0.1,
526
+ "topic": "scene_0,1,2",
527
+ "x": 140,
528
+ "y": 640,
529
+ "wires": [
530
+ [
531
+ "1fa7e2a1adc7844b"
532
+ ]
533
+ ]
534
+ }
535
+ ]
Binary file