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,164 @@
1
+ [
2
+ {
3
+ "id": "4defb79b62dcbe60",
4
+ "type": "tab",
5
+ "label": "Scheduler",
6
+ "disabled": false,
7
+ "info": "",
8
+ "env": []
9
+ },
10
+ {
11
+ "id": "92c644cc421bc9a0",
12
+ "type": "smart_scheduler",
13
+ "z": "4defb79b62dcbe60",
14
+ "name": "",
15
+ "schedules": [
16
+ {
17
+ "days": "3,4",
18
+ "hour": "21",
19
+ "minute": "56",
20
+ "second": "00",
21
+ "message": "{\"a\":\"1\"}",
22
+ "valid": true
23
+ },
24
+ {
25
+ "days": "3,4",
26
+ "hour": "21",
27
+ "minute": "57",
28
+ "second": "00",
29
+ "message": "{\"a\":2}",
30
+ "valid": true
31
+ }
32
+ ],
33
+ "x": 320,
34
+ "y": 120,
35
+ "wires": [
36
+ [
37
+ "3b25cd8b578b618a"
38
+ ]
39
+ ]
40
+ },
41
+ {
42
+ "id": "69835ce52d9ef4fd",
43
+ "type": "inject",
44
+ "z": "4defb79b62dcbe60",
45
+ "name": "",
46
+ "props": [
47
+ {
48
+ "p": "topic",
49
+ "vt": "str"
50
+ }
51
+ ],
52
+ "repeat": "",
53
+ "crontab": "",
54
+ "once": false,
55
+ "onceDelay": 0.1,
56
+ "topic": "enable",
57
+ "x": 90,
58
+ "y": 60,
59
+ "wires": [
60
+ [
61
+ "92c644cc421bc9a0"
62
+ ]
63
+ ]
64
+ },
65
+ {
66
+ "id": "1225974eadeb0a8c",
67
+ "type": "inject",
68
+ "z": "4defb79b62dcbe60",
69
+ "name": "",
70
+ "props": [
71
+ {
72
+ "p": "topic",
73
+ "vt": "str"
74
+ }
75
+ ],
76
+ "repeat": "",
77
+ "crontab": "",
78
+ "once": false,
79
+ "onceDelay": 0.1,
80
+ "topic": "disable",
81
+ "x": 90,
82
+ "y": 100,
83
+ "wires": [
84
+ [
85
+ "92c644cc421bc9a0"
86
+ ]
87
+ ]
88
+ },
89
+ {
90
+ "id": "9fb7fd3f4ece27af",
91
+ "type": "inject",
92
+ "z": "4defb79b62dcbe60",
93
+ "name": "",
94
+ "props": [
95
+ {
96
+ "p": "topic",
97
+ "vt": "str"
98
+ },
99
+ {
100
+ "p": "payload"
101
+ }
102
+ ],
103
+ "repeat": "",
104
+ "crontab": "",
105
+ "once": false,
106
+ "onceDelay": 0.1,
107
+ "topic": "set_state",
108
+ "payload": "true",
109
+ "payloadType": "bool",
110
+ "x": 110,
111
+ "y": 160,
112
+ "wires": [
113
+ [
114
+ "92c644cc421bc9a0"
115
+ ]
116
+ ]
117
+ },
118
+ {
119
+ "id": "3cbc006c45a9af1b",
120
+ "type": "inject",
121
+ "z": "4defb79b62dcbe60",
122
+ "name": "",
123
+ "props": [
124
+ {
125
+ "p": "topic",
126
+ "vt": "str"
127
+ },
128
+ {
129
+ "p": "payload"
130
+ }
131
+ ],
132
+ "repeat": "",
133
+ "crontab": "",
134
+ "once": false,
135
+ "onceDelay": 0.1,
136
+ "topic": "set_state",
137
+ "payload": "false",
138
+ "payloadType": "bool",
139
+ "x": 110,
140
+ "y": 200,
141
+ "wires": [
142
+ [
143
+ "92c644cc421bc9a0"
144
+ ]
145
+ ]
146
+ },
147
+ {
148
+ "id": "3b25cd8b578b618a",
149
+ "type": "debug",
150
+ "z": "4defb79b62dcbe60",
151
+ "name": "debug 2",
152
+ "active": true,
153
+ "tosidebar": true,
154
+ "console": false,
155
+ "tostatus": false,
156
+ "complete": "true",
157
+ "targetType": "full",
158
+ "statusVal": "",
159
+ "statusType": "auto",
160
+ "x": 500,
161
+ "y": 120,
162
+ "wires": []
163
+ }
164
+ ]
Binary file
@@ -0,0 +1,489 @@
1
+ [
2
+ {
3
+ "id": "da16cc6450e29747",
4
+ "type": "tab",
5
+ "label": "Schutter Complex",
6
+ "disabled": false,
7
+ "info": "",
8
+ "env": []
9
+ },
10
+ {
11
+ "id": "d91ba9a2c56bd3f1",
12
+ "type": "inject",
13
+ "z": "da16cc6450e29747",
14
+ "name": "",
15
+ "props": [
16
+ {
17
+ "p": "topic",
18
+ "vt": "str"
19
+ },
20
+ {
21
+ "p": "payload"
22
+ }
23
+ ],
24
+ "repeat": "",
25
+ "crontab": "",
26
+ "once": false,
27
+ "onceDelay": 0.1,
28
+ "topic": "alarm",
29
+ "payload": "true",
30
+ "payloadType": "bool",
31
+ "x": 120,
32
+ "y": 620,
33
+ "wires": [
34
+ [
35
+ "00717aa338a65385"
36
+ ]
37
+ ]
38
+ },
39
+ {
40
+ "id": "07350312641cf7ee",
41
+ "type": "inject",
42
+ "z": "da16cc6450e29747",
43
+ "name": "",
44
+ "props": [
45
+ {
46
+ "p": "topic",
47
+ "vt": "str"
48
+ },
49
+ {
50
+ "p": "payload"
51
+ }
52
+ ],
53
+ "repeat": "",
54
+ "crontab": "",
55
+ "once": false,
56
+ "onceDelay": 0.1,
57
+ "topic": "up_down",
58
+ "payload": "false",
59
+ "payloadType": "bool",
60
+ "x": 110,
61
+ "y": 100,
62
+ "wires": [
63
+ [
64
+ "00717aa338a65385"
65
+ ]
66
+ ]
67
+ },
68
+ {
69
+ "id": "c8ec230ed399baf0",
70
+ "type": "inject",
71
+ "z": "da16cc6450e29747",
72
+ "name": "",
73
+ "props": [
74
+ {
75
+ "p": "topic",
76
+ "vt": "str"
77
+ },
78
+ {
79
+ "p": "payload"
80
+ }
81
+ ],
82
+ "repeat": "",
83
+ "crontab": "",
84
+ "once": false,
85
+ "onceDelay": 0.1,
86
+ "topic": "up_down",
87
+ "payload": "true",
88
+ "payloadType": "bool",
89
+ "x": 110,
90
+ "y": 140,
91
+ "wires": [
92
+ [
93
+ "00717aa338a65385"
94
+ ]
95
+ ]
96
+ },
97
+ {
98
+ "id": "75fa521d71ed4ac7",
99
+ "type": "inject",
100
+ "z": "da16cc6450e29747",
101
+ "name": "",
102
+ "props": [
103
+ {
104
+ "p": "topic",
105
+ "vt": "str"
106
+ }
107
+ ],
108
+ "repeat": "",
109
+ "crontab": "",
110
+ "once": false,
111
+ "onceDelay": 0.1,
112
+ "topic": "up",
113
+ "x": 130,
114
+ "y": 180,
115
+ "wires": [
116
+ [
117
+ "00717aa338a65385"
118
+ ]
119
+ ]
120
+ },
121
+ {
122
+ "id": "6f023c7e4e9869d8",
123
+ "type": "inject",
124
+ "z": "da16cc6450e29747",
125
+ "name": "up: 2s",
126
+ "props": [
127
+ {
128
+ "p": "topic",
129
+ "vt": "str"
130
+ },
131
+ {
132
+ "p": "time_on",
133
+ "v": "2s",
134
+ "vt": "str"
135
+ }
136
+ ],
137
+ "repeat": "",
138
+ "crontab": "",
139
+ "once": false,
140
+ "onceDelay": 0.1,
141
+ "topic": "up",
142
+ "x": 130,
143
+ "y": 220,
144
+ "wires": [
145
+ [
146
+ "00717aa338a65385"
147
+ ]
148
+ ]
149
+ },
150
+ {
151
+ "id": "3758cb1b699842a7",
152
+ "type": "inject",
153
+ "z": "da16cc6450e29747",
154
+ "name": "",
155
+ "props": [
156
+ {
157
+ "p": "topic",
158
+ "vt": "str"
159
+ }
160
+ ],
161
+ "repeat": "",
162
+ "crontab": "",
163
+ "once": false,
164
+ "onceDelay": 0.1,
165
+ "topic": "up_stop",
166
+ "x": 120,
167
+ "y": 260,
168
+ "wires": [
169
+ [
170
+ "00717aa338a65385"
171
+ ]
172
+ ]
173
+ },
174
+ {
175
+ "id": "cbd3c8245baaec18",
176
+ "type": "inject",
177
+ "z": "da16cc6450e29747",
178
+ "name": "",
179
+ "props": [
180
+ {
181
+ "p": "topic",
182
+ "vt": "str"
183
+ }
184
+ ],
185
+ "repeat": "",
186
+ "crontab": "",
187
+ "once": false,
188
+ "onceDelay": 0.1,
189
+ "topic": "stop",
190
+ "x": 130,
191
+ "y": 300,
192
+ "wires": [
193
+ [
194
+ "00717aa338a65385"
195
+ ]
196
+ ]
197
+ },
198
+ {
199
+ "id": "debf6778bdadee9e",
200
+ "type": "inject",
201
+ "z": "da16cc6450e29747",
202
+ "name": "",
203
+ "props": [
204
+ {
205
+ "p": "topic",
206
+ "vt": "str"
207
+ }
208
+ ],
209
+ "repeat": "",
210
+ "crontab": "",
211
+ "once": false,
212
+ "onceDelay": 0.1,
213
+ "topic": "down_stop",
214
+ "x": 110,
215
+ "y": 340,
216
+ "wires": [
217
+ [
218
+ "00717aa338a65385"
219
+ ]
220
+ ]
221
+ },
222
+ {
223
+ "id": "4336f8214603756b",
224
+ "type": "inject",
225
+ "z": "da16cc6450e29747",
226
+ "name": "",
227
+ "props": [
228
+ {
229
+ "p": "topic",
230
+ "vt": "str"
231
+ }
232
+ ],
233
+ "repeat": "",
234
+ "crontab": "",
235
+ "once": false,
236
+ "onceDelay": 0.1,
237
+ "topic": "down",
238
+ "x": 130,
239
+ "y": 380,
240
+ "wires": [
241
+ [
242
+ "00717aa338a65385"
243
+ ]
244
+ ]
245
+ },
246
+ {
247
+ "id": "8653fca2b4d3f014",
248
+ "type": "inject",
249
+ "z": "da16cc6450e29747",
250
+ "name": "down: 2000",
251
+ "props": [
252
+ {
253
+ "p": "topic",
254
+ "vt": "str"
255
+ },
256
+ {
257
+ "p": "time_on",
258
+ "v": "2000",
259
+ "vt": "num"
260
+ }
261
+ ],
262
+ "repeat": "",
263
+ "crontab": "",
264
+ "once": false,
265
+ "onceDelay": 0.1,
266
+ "topic": "down",
267
+ "x": 110,
268
+ "y": 420,
269
+ "wires": [
270
+ [
271
+ "00717aa338a65385"
272
+ ]
273
+ ]
274
+ },
275
+ {
276
+ "id": "9088c5880eb3def8",
277
+ "type": "inject",
278
+ "z": "da16cc6450e29747",
279
+ "name": "",
280
+ "props": [
281
+ {
282
+ "p": "topic",
283
+ "vt": "str"
284
+ },
285
+ {
286
+ "p": "payload"
287
+ }
288
+ ],
289
+ "repeat": "",
290
+ "crontab": "",
291
+ "once": false,
292
+ "onceDelay": 0.1,
293
+ "topic": "position",
294
+ "payload": "0",
295
+ "payloadType": "str",
296
+ "x": 120,
297
+ "y": 460,
298
+ "wires": [
299
+ [
300
+ "00717aa338a65385"
301
+ ]
302
+ ]
303
+ },
304
+ {
305
+ "id": "72e70db9d51f0e9b",
306
+ "type": "inject",
307
+ "z": "da16cc6450e29747",
308
+ "name": "",
309
+ "props": [
310
+ {
311
+ "p": "topic",
312
+ "vt": "str"
313
+ },
314
+ {
315
+ "p": "payload"
316
+ }
317
+ ],
318
+ "repeat": "",
319
+ "crontab": "",
320
+ "once": false,
321
+ "onceDelay": 0.1,
322
+ "topic": "position",
323
+ "payload": "50",
324
+ "payloadType": "str",
325
+ "x": 120,
326
+ "y": 500,
327
+ "wires": [
328
+ [
329
+ "00717aa338a65385"
330
+ ]
331
+ ]
332
+ },
333
+ {
334
+ "id": "9b7d3cdf0568b03a",
335
+ "type": "inject",
336
+ "z": "da16cc6450e29747",
337
+ "name": "",
338
+ "props": [
339
+ {
340
+ "p": "topic",
341
+ "vt": "str"
342
+ },
343
+ {
344
+ "p": "payload"
345
+ }
346
+ ],
347
+ "repeat": "",
348
+ "crontab": "",
349
+ "once": false,
350
+ "onceDelay": 0.1,
351
+ "topic": "position",
352
+ "payload": "100",
353
+ "payloadType": "str",
354
+ "x": 110,
355
+ "y": 540,
356
+ "wires": [
357
+ [
358
+ "00717aa338a65385"
359
+ ]
360
+ ]
361
+ },
362
+ {
363
+ "id": "45a7cbd3c1b3a3db",
364
+ "type": "inject",
365
+ "z": "da16cc6450e29747",
366
+ "name": "",
367
+ "props": [
368
+ {
369
+ "p": "topic",
370
+ "vt": "str"
371
+ }
372
+ ],
373
+ "repeat": "",
374
+ "crontab": "",
375
+ "once": false,
376
+ "onceDelay": 0.1,
377
+ "topic": "toggle",
378
+ "x": 130,
379
+ "y": 580,
380
+ "wires": [
381
+ [
382
+ "00717aa338a65385"
383
+ ]
384
+ ]
385
+ },
386
+ {
387
+ "id": "65d7944109b9e124",
388
+ "type": "debug",
389
+ "z": "da16cc6450e29747",
390
+ "name": "debug 16",
391
+ "active": true,
392
+ "tosidebar": true,
393
+ "console": false,
394
+ "tostatus": false,
395
+ "complete": "true",
396
+ "targetType": "full",
397
+ "statusVal": "",
398
+ "statusType": "auto",
399
+ "x": 820,
400
+ "y": 280,
401
+ "wires": []
402
+ },
403
+ {
404
+ "id": "d5be3d341b487da4",
405
+ "type": "debug",
406
+ "z": "da16cc6450e29747",
407
+ "name": "debug 17",
408
+ "active": true,
409
+ "tosidebar": true,
410
+ "console": false,
411
+ "tostatus": false,
412
+ "complete": "true",
413
+ "targetType": "full",
414
+ "statusVal": "",
415
+ "statusType": "auto",
416
+ "x": 820,
417
+ "y": 320,
418
+ "wires": []
419
+ },
420
+ {
421
+ "id": "ea62c7061fb1f017",
422
+ "type": "debug",
423
+ "z": "da16cc6450e29747",
424
+ "name": "debug 18",
425
+ "active": true,
426
+ "tosidebar": true,
427
+ "console": false,
428
+ "tostatus": false,
429
+ "complete": "true",
430
+ "targetType": "full",
431
+ "statusVal": "",
432
+ "statusType": "auto",
433
+ "x": 820,
434
+ "y": 360,
435
+ "wires": []
436
+ },
437
+ {
438
+ "id": "00717aa338a65385",
439
+ "type": "smart_shutter-complex-control",
440
+ "z": "da16cc6450e29747",
441
+ "name": "",
442
+ "max_time": 60,
443
+ "revert_time_ms": "5000",
444
+ "alarm_action": "UP",
445
+ "links": [],
446
+ "x": 530,
447
+ "y": 320,
448
+ "wires": [
449
+ [
450
+ "65d7944109b9e124"
451
+ ],
452
+ [
453
+ "d5be3d341b487da4"
454
+ ],
455
+ [
456
+ "ea62c7061fb1f017"
457
+ ]
458
+ ]
459
+ },
460
+ {
461
+ "id": "c5a176f4b389064e",
462
+ "type": "inject",
463
+ "z": "da16cc6450e29747",
464
+ "name": "",
465
+ "props": [
466
+ {
467
+ "p": "topic",
468
+ "vt": "str"
469
+ },
470
+ {
471
+ "p": "payload"
472
+ }
473
+ ],
474
+ "repeat": "",
475
+ "crontab": "",
476
+ "once": false,
477
+ "onceDelay": 0.1,
478
+ "topic": "alarm",
479
+ "payload": "false",
480
+ "payloadType": "bool",
481
+ "x": 120,
482
+ "y": 660,
483
+ "wires": [
484
+ [
485
+ "00717aa338a65385"
486
+ ]
487
+ ]
488
+ }
489
+ ]