node-red-contrib-boolean-logic-ultimate 1.2.3 → 1.2.5

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.
@@ -0,0 +1,96 @@
1
+ [
2
+ {
3
+ "id": "kal_tab_1",
4
+ "type": "tab",
5
+ "label": "KalmanFilterUltimate - smooth noisy values",
6
+ "disabled": false,
7
+ "info": "Esempio: genera un valore rumoroso e lo filtra con il Kalman filter."
8
+ },
9
+ {
10
+ "id": "kal_cmt_1",
11
+ "type": "comment",
12
+ "z": "kal_tab_1",
13
+ "name": "Clicca più volte \"Next sample\"",
14
+ "info": "Il Function genera una rampa con rumore. Confronta \"Raw\" e \"Filtered\".",
15
+ "x": 220,
16
+ "y": 60,
17
+ "wires": []
18
+ },
19
+ {
20
+ "id": "kal_inj_1",
21
+ "type": "inject",
22
+ "z": "kal_tab_1",
23
+ "name": "Next sample",
24
+ "props": [{ "p": "payload", "v": "", "vt": "date" }],
25
+ "repeat": "",
26
+ "crontab": "",
27
+ "once": false,
28
+ "onceDelay": 0.1,
29
+ "x": 140,
30
+ "y": 140,
31
+ "wires": [["kal_fn_1"]]
32
+ },
33
+ {
34
+ "id": "kal_fn_1",
35
+ "type": "function",
36
+ "z": "kal_tab_1",
37
+ "name": "Noisy generator",
38
+ "func": "let value = context.get('value') || 0;\nvalue += 1;\ncontext.set('value', value);\n\nconst noise = (Math.random() - 0.5) * 6; // +/- 3\nmsg.payload = value + noise;\nreturn msg;",
39
+ "outputs": 1,
40
+ "noerr": 0,
41
+ "initialize": "",
42
+ "finalize": "",
43
+ "libs": [],
44
+ "x": 340,
45
+ "y": 140,
46
+ "wires": [["kal_dbg_raw", "kal_node_1"]]
47
+ },
48
+ {
49
+ "id": "kal_node_1",
50
+ "type": "KalmanFilterUltimate",
51
+ "z": "kal_tab_1",
52
+ "name": "Kalman",
53
+ "payloadPropName": "payload",
54
+ "translatorConfig": "",
55
+ "measurementNoise": 0.01,
56
+ "processNoise": 3,
57
+ "x": 520,
58
+ "y": 200,
59
+ "wires": [["kal_dbg_filt"]]
60
+ },
61
+ {
62
+ "id": "kal_dbg_raw",
63
+ "type": "debug",
64
+ "z": "kal_tab_1",
65
+ "name": "Raw",
66
+ "active": true,
67
+ "tosidebar": true,
68
+ "console": false,
69
+ "tostatus": false,
70
+ "complete": "payload",
71
+ "targetType": "msg",
72
+ "statusVal": "",
73
+ "statusType": "auto",
74
+ "x": 520,
75
+ "y": 120,
76
+ "wires": []
77
+ },
78
+ {
79
+ "id": "kal_dbg_filt",
80
+ "type": "debug",
81
+ "z": "kal_tab_1",
82
+ "name": "Filtered",
83
+ "active": true,
84
+ "tosidebar": true,
85
+ "console": false,
86
+ "tostatus": false,
87
+ "complete": "payload",
88
+ "targetType": "msg",
89
+ "statusVal": "",
90
+ "statusType": "auto",
91
+ "x": 700,
92
+ "y": 200,
93
+ "wires": []
94
+ }
95
+ ]
96
+
@@ -0,0 +1,105 @@
1
+ [
2
+ {
3
+ "id": "ps_tab_1",
4
+ "type": "tab",
5
+ "label": "PresenceSimulatorUltimate - sequence playback",
6
+ "disabled": false,
7
+ "info": "Esempio: riproduce una sequenza programmata (un JSON per riga) per simulare presenza."
8
+ },
9
+ {
10
+ "id": "ps_cmt_1",
11
+ "type": "comment",
12
+ "z": "ps_tab_1",
13
+ "name": "Topic di controllo: presence",
14
+ "info": "Usa START/STOP/RESET. La sequenza è definita nel nodo (campo Sequence).",
15
+ "x": 220,
16
+ "y": 60,
17
+ "wires": []
18
+ },
19
+ {
20
+ "id": "ps_inj_start",
21
+ "type": "inject",
22
+ "z": "ps_tab_1",
23
+ "name": "START",
24
+ "props": [
25
+ { "p": "topic", "v": "presence", "vt": "str" },
26
+ { "p": "command", "v": "start", "vt": "str" }
27
+ ],
28
+ "repeat": "",
29
+ "crontab": "",
30
+ "once": false,
31
+ "onceDelay": 0.1,
32
+ "x": 120,
33
+ "y": 140,
34
+ "wires": [["ps_node_1"]]
35
+ },
36
+ {
37
+ "id": "ps_inj_stop",
38
+ "type": "inject",
39
+ "z": "ps_tab_1",
40
+ "name": "STOP",
41
+ "props": [
42
+ { "p": "topic", "v": "presence", "vt": "str" },
43
+ { "p": "command", "v": "stop", "vt": "str" }
44
+ ],
45
+ "repeat": "",
46
+ "crontab": "",
47
+ "once": false,
48
+ "onceDelay": 0.1,
49
+ "x": 120,
50
+ "y": 180,
51
+ "wires": [["ps_node_1"]]
52
+ },
53
+ {
54
+ "id": "ps_inj_reset",
55
+ "type": "inject",
56
+ "z": "ps_tab_1",
57
+ "name": "RESET",
58
+ "props": [
59
+ { "p": "topic", "v": "presence", "vt": "str" },
60
+ { "p": "reset", "v": "true", "vt": "bool" }
61
+ ],
62
+ "repeat": "",
63
+ "crontab": "",
64
+ "once": false,
65
+ "onceDelay": 0.1,
66
+ "x": 120,
67
+ "y": 220,
68
+ "wires": [["ps_node_1"]]
69
+ },
70
+ {
71
+ "id": "ps_node_1",
72
+ "type": "PresenceSimulatorUltimate",
73
+ "z": "ps_tab_1",
74
+ "name": "Presence",
75
+ "controlTopic": "presence",
76
+ "autoStart": false,
77
+ "autoLoop": true,
78
+ "randomize": false,
79
+ "jitter": 10,
80
+ "payloadPropName": "payload",
81
+ "translatorConfig": "",
82
+ "patterns": "{\"delay\":1000,\"payload\":true,\"topic\":\"light/living\"}\n{\"delay\":1500,\"payload\":false,\"topic\":\"light/living\"}\n{\"delay\":800,\"payload\":true,\"topic\":\"light/kitchen\"}\n{\"delay\":1200,\"payload\":false,\"topic\":\"light/kitchen\"}",
83
+ "x": 360,
84
+ "y": 180,
85
+ "wires": [["ps_dbg_1"]]
86
+ },
87
+ {
88
+ "id": "ps_dbg_1",
89
+ "type": "debug",
90
+ "z": "ps_tab_1",
91
+ "name": "Output events",
92
+ "active": true,
93
+ "tosidebar": true,
94
+ "console": false,
95
+ "tostatus": false,
96
+ "complete": "true",
97
+ "targetType": "full",
98
+ "statusVal": "",
99
+ "statusType": "auto",
100
+ "x": 570,
101
+ "y": 180,
102
+ "wires": []
103
+ }
104
+ ]
105
+
@@ -0,0 +1,186 @@
1
+ [
2
+ {
3
+ "id": "rws_tab_1",
4
+ "type": "tab",
5
+ "label": "RailwaySwitchUltimate - route by switcher",
6
+ "disabled": false,
7
+ "info": "Esempio: cambia l'uscita attiva inviando un messaggio sul topic di switch (switcher)."
8
+ },
9
+ {
10
+ "id": "rws_cmt_1",
11
+ "type": "comment",
12
+ "z": "rws_tab_1",
13
+ "name": "Switcher topic: switcher (payload 0..N-1)",
14
+ "info": "1) Imposta i pin di uscita nel nodo (Output pins).\n2) Invia switcher=0/1/2 per selezionare l'uscita.\n3) Invia DATA e osserva su quale debug arriva.",
15
+ "x": 280,
16
+ "y": 60,
17
+ "wires": []
18
+ },
19
+ {
20
+ "id": "rws_inj_sw0",
21
+ "type": "inject",
22
+ "z": "rws_tab_1",
23
+ "name": "switcher = 0",
24
+ "props": [
25
+ { "p": "payload", "v": "0", "vt": "num" },
26
+ { "p": "topic", "v": "switcher", "vt": "str" }
27
+ ],
28
+ "repeat": "",
29
+ "crontab": "",
30
+ "once": false,
31
+ "onceDelay": 0.1,
32
+ "x": 150,
33
+ "y": 140,
34
+ "wires": [["rws_node_1"]]
35
+ },
36
+ {
37
+ "id": "rws_inj_sw1",
38
+ "type": "inject",
39
+ "z": "rws_tab_1",
40
+ "name": "switcher = 1",
41
+ "props": [
42
+ { "p": "payload", "v": "1", "vt": "num" },
43
+ { "p": "topic", "v": "switcher", "vt": "str" }
44
+ ],
45
+ "repeat": "",
46
+ "crontab": "",
47
+ "once": false,
48
+ "onceDelay": 0.1,
49
+ "x": 150,
50
+ "y": 180,
51
+ "wires": [["rws_node_1"]]
52
+ },
53
+ {
54
+ "id": "rws_inj_sw2",
55
+ "type": "inject",
56
+ "z": "rws_tab_1",
57
+ "name": "switcher = 2",
58
+ "props": [
59
+ { "p": "payload", "v": "2", "vt": "num" },
60
+ { "p": "topic", "v": "switcher", "vt": "str" }
61
+ ],
62
+ "repeat": "",
63
+ "crontab": "",
64
+ "once": false,
65
+ "onceDelay": 0.1,
66
+ "x": 150,
67
+ "y": 220,
68
+ "wires": [["rws_node_1"]]
69
+ },
70
+ {
71
+ "id": "rws_inj_data",
72
+ "type": "inject",
73
+ "z": "rws_tab_1",
74
+ "name": "DATA",
75
+ "props": [
76
+ { "p": "payload", "v": "data", "vt": "str" },
77
+ { "p": "topic", "v": "data", "vt": "str" }
78
+ ],
79
+ "repeat": "",
80
+ "crontab": "",
81
+ "once": false,
82
+ "onceDelay": 0.1,
83
+ "x": 120,
84
+ "y": 300,
85
+ "wires": [["rws_node_1"]]
86
+ },
87
+ {
88
+ "id": "rws_node_1",
89
+ "type": "RailwaySwitchUltimate",
90
+ "z": "rws_tab_1",
91
+ "name": "Railway Switch",
92
+ "triggertopic": "switcher",
93
+ "outputs": 5,
94
+ "initializewith": "1",
95
+ "payloadPropName": "payload",
96
+ "translatorConfig": "",
97
+ "x": 370,
98
+ "y": 220,
99
+ "wires": [["rws_dbg_0"], ["rws_dbg_1"], ["rws_dbg_2"], ["rws_dbg_3"], ["rws_dbg_4"]]
100
+ },
101
+ {
102
+ "id": "rws_dbg_0",
103
+ "type": "debug",
104
+ "z": "rws_tab_1",
105
+ "name": "PIN 0",
106
+ "active": true,
107
+ "tosidebar": true,
108
+ "console": false,
109
+ "tostatus": false,
110
+ "complete": "true",
111
+ "targetType": "full",
112
+ "statusVal": "",
113
+ "statusType": "auto",
114
+ "x": 560,
115
+ "y": 140,
116
+ "wires": []
117
+ },
118
+ {
119
+ "id": "rws_dbg_1",
120
+ "type": "debug",
121
+ "z": "rws_tab_1",
122
+ "name": "PIN 1",
123
+ "active": true,
124
+ "tosidebar": true,
125
+ "console": false,
126
+ "tostatus": false,
127
+ "complete": "true",
128
+ "targetType": "full",
129
+ "statusVal": "",
130
+ "statusType": "auto",
131
+ "x": 560,
132
+ "y": 180,
133
+ "wires": []
134
+ },
135
+ {
136
+ "id": "rws_dbg_2",
137
+ "type": "debug",
138
+ "z": "rws_tab_1",
139
+ "name": "PIN 2",
140
+ "active": true,
141
+ "tosidebar": true,
142
+ "console": false,
143
+ "tostatus": false,
144
+ "complete": "true",
145
+ "targetType": "full",
146
+ "statusVal": "",
147
+ "statusType": "auto",
148
+ "x": 560,
149
+ "y": 220,
150
+ "wires": []
151
+ },
152
+ {
153
+ "id": "rws_dbg_3",
154
+ "type": "debug",
155
+ "z": "rws_tab_1",
156
+ "name": "PIN 3",
157
+ "active": true,
158
+ "tosidebar": true,
159
+ "console": false,
160
+ "tostatus": false,
161
+ "complete": "true",
162
+ "targetType": "full",
163
+ "statusVal": "",
164
+ "statusType": "auto",
165
+ "x": 560,
166
+ "y": 260,
167
+ "wires": []
168
+ },
169
+ {
170
+ "id": "rws_dbg_4",
171
+ "type": "debug",
172
+ "z": "rws_tab_1",
173
+ "name": "PIN 4",
174
+ "active": true,
175
+ "tosidebar": true,
176
+ "console": false,
177
+ "tostatus": false,
178
+ "complete": "true",
179
+ "targetType": "full",
180
+ "statusVal": "",
181
+ "statusType": "auto",
182
+ "x": 560,
183
+ "y": 300,
184
+ "wires": []
185
+ }
186
+ ]
@@ -0,0 +1,178 @@
1
+ [
2
+ {
3
+ "id": "rl_tab_1",
4
+ "type": "tab",
5
+ "label": "RateLimiterUltimate - debounce + control",
6
+ "disabled": false,
7
+ "info": "Esempio: genera un burst di messaggi e limita la frequenza con RateLimiter (debounce)."
8
+ },
9
+ {
10
+ "id": "rl_cmt_1",
11
+ "type": "comment",
12
+ "z": "rl_tab_1",
13
+ "name": "Burst → RateLimiter → Forward/Diagnostics",
14
+ "info": "Clicca BURST per generare messaggi ravvicinati. Output 1 = forward; Output 2 = diagnostica.\nUsa i pulsanti RESET/FLUSH e CHANGE MODE via topic \"rate\".",
15
+ "x": 290,
16
+ "y": 60,
17
+ "wires": []
18
+ },
19
+ {
20
+ "id": "rl_inj_burst",
21
+ "type": "inject",
22
+ "z": "rl_tab_1",
23
+ "name": "BURST (20 msgs)",
24
+ "props": [
25
+ { "p": "count", "v": "20", "vt": "num" },
26
+ { "p": "interval", "v": "50", "vt": "num" }
27
+ ],
28
+ "repeat": "",
29
+ "crontab": "",
30
+ "once": false,
31
+ "onceDelay": 0.1,
32
+ "x": 160,
33
+ "y": 140,
34
+ "wires": [["rl_fn_burst"]]
35
+ },
36
+ {
37
+ "id": "rl_fn_burst",
38
+ "type": "function",
39
+ "z": "rl_tab_1",
40
+ "name": "Burst generator",
41
+ "func": "const count = Number(msg.count || 20);\nconst interval = Number(msg.interval || 50);\nlet i = 0;\n\nconst sendOne = () => {\n node.send({ topic: 'data', payload: i, index: i, ts: Date.now() });\n i += 1;\n if (i < count) {\n setTimeout(sendOne, interval);\n }\n};\n\nsendOne();\nreturn null;",
42
+ "outputs": 1,
43
+ "noerr": 0,
44
+ "initialize": "",
45
+ "finalize": "",
46
+ "libs": [],
47
+ "x": 370,
48
+ "y": 140,
49
+ "wires": [["rl_node_1"]]
50
+ },
51
+ {
52
+ "id": "rl_inj_reset",
53
+ "type": "inject",
54
+ "z": "rl_tab_1",
55
+ "name": "RESET",
56
+ "props": [
57
+ { "p": "topic", "v": "rate", "vt": "str" },
58
+ { "p": "reset", "v": "true", "vt": "bool" }
59
+ ],
60
+ "repeat": "",
61
+ "crontab": "",
62
+ "once": false,
63
+ "onceDelay": 0.1,
64
+ "x": 130,
65
+ "y": 220,
66
+ "wires": [["rl_node_1"]]
67
+ },
68
+ {
69
+ "id": "rl_inj_flush",
70
+ "type": "inject",
71
+ "z": "rl_tab_1",
72
+ "name": "FLUSH",
73
+ "props": [
74
+ { "p": "topic", "v": "rate", "vt": "str" },
75
+ { "p": "flush", "v": "true", "vt": "bool" }
76
+ ],
77
+ "repeat": "",
78
+ "crontab": "",
79
+ "once": false,
80
+ "onceDelay": 0.1,
81
+ "x": 130,
82
+ "y": 260,
83
+ "wires": [["rl_node_1"]]
84
+ },
85
+ {
86
+ "id": "rl_inj_mode_throttle",
87
+ "type": "inject",
88
+ "z": "rl_tab_1",
89
+ "name": "MODE throttle (200ms)",
90
+ "props": [
91
+ { "p": "topic", "v": "rate", "vt": "str" },
92
+ { "p": "mode", "v": "throttle", "vt": "str" },
93
+ { "p": "interval", "v": "200", "vt": "num" }
94
+ ],
95
+ "repeat": "",
96
+ "crontab": "",
97
+ "once": false,
98
+ "onceDelay": 0.1,
99
+ "x": 170,
100
+ "y": 300,
101
+ "wires": [["rl_node_1"]]
102
+ },
103
+ {
104
+ "id": "rl_inj_mode_debounce",
105
+ "type": "inject",
106
+ "z": "rl_tab_1",
107
+ "name": "MODE debounce (500ms trailing)",
108
+ "props": [
109
+ { "p": "topic", "v": "rate", "vt": "str" },
110
+ { "p": "mode", "v": "debounce", "vt": "str" },
111
+ { "p": "wait", "v": "500", "vt": "num" },
112
+ { "p": "emitOn", "v": "trailing", "vt": "str" }
113
+ ],
114
+ "repeat": "",
115
+ "crontab": "",
116
+ "once": false,
117
+ "onceDelay": 0.1,
118
+ "x": 210,
119
+ "y": 340,
120
+ "wires": [["rl_node_1"]]
121
+ },
122
+ {
123
+ "id": "rl_node_1",
124
+ "type": "RateLimiterUltimate",
125
+ "z": "rl_tab_1",
126
+ "name": "RateLimiter",
127
+ "mode": "debounce",
128
+ "wait": 500,
129
+ "emitOn": "trailing",
130
+ "interval": 1000,
131
+ "trailing": false,
132
+ "windowSize": 1000,
133
+ "maxInWindow": 10,
134
+ "dropStrategy": "drop",
135
+ "payloadPropName": "payload",
136
+ "translatorConfig": "",
137
+ "controlTopic": "rate",
138
+ "statInterval": 2,
139
+ "x": 590,
140
+ "y": 220,
141
+ "wires": [["rl_dbg_fwd"], ["rl_dbg_diag"]]
142
+ },
143
+ {
144
+ "id": "rl_dbg_fwd",
145
+ "type": "debug",
146
+ "z": "rl_tab_1",
147
+ "name": "Forward",
148
+ "active": true,
149
+ "tosidebar": true,
150
+ "console": false,
151
+ "tostatus": false,
152
+ "complete": "true",
153
+ "targetType": "full",
154
+ "statusVal": "",
155
+ "statusType": "auto",
156
+ "x": 780,
157
+ "y": 200,
158
+ "wires": []
159
+ },
160
+ {
161
+ "id": "rl_dbg_diag",
162
+ "type": "debug",
163
+ "z": "rl_tab_1",
164
+ "name": "Diagnostics",
165
+ "active": true,
166
+ "tosidebar": true,
167
+ "console": false,
168
+ "tostatus": false,
169
+ "complete": "payload",
170
+ "targetType": "msg",
171
+ "statusVal": "",
172
+ "statusType": "auto",
173
+ "x": 790,
174
+ "y": 240,
175
+ "wires": []
176
+ }
177
+ ]
178
+
@@ -0,0 +1,80 @@
1
+ [
2
+ {
3
+ "id": "sou_tab_1",
4
+ "type": "tab",
5
+ "label": "SimpleOutputUltimate - true/false emit",
6
+ "disabled": false,
7
+ "info": "Esempio: ad ogni input il nodo emette TRUE su output 1 e FALSE su output 2 (indipendentemente dal payload in ingresso)."
8
+ },
9
+ {
10
+ "id": "sou_cmt_1",
11
+ "type": "comment",
12
+ "z": "sou_tab_1",
13
+ "name": "Qualsiasi messaggio in ingresso genera true/false",
14
+ "info": "Utile per generare rapidamente un TRUE/FALSE senza usare due inject separati.",
15
+ "x": 260,
16
+ "y": 60,
17
+ "wires": []
18
+ },
19
+ {
20
+ "id": "sou_inj_1",
21
+ "type": "inject",
22
+ "z": "sou_tab_1",
23
+ "name": "Trigger",
24
+ "props": [
25
+ { "p": "payload", "v": "anything", "vt": "str" },
26
+ { "p": "topic", "v": "trigger", "vt": "str" }
27
+ ],
28
+ "repeat": "",
29
+ "crontab": "",
30
+ "once": false,
31
+ "onceDelay": 0.1,
32
+ "x": 150,
33
+ "y": 160,
34
+ "wires": [["sou_node_1"]]
35
+ },
36
+ {
37
+ "id": "sou_node_1",
38
+ "type": "SimpleOutputUltimate",
39
+ "z": "sou_tab_1",
40
+ "name": "Output",
41
+ "x": 370,
42
+ "y": 160,
43
+ "wires": [["sou_dbg_true"], ["sou_dbg_false"]]
44
+ },
45
+ {
46
+ "id": "sou_dbg_true",
47
+ "type": "debug",
48
+ "z": "sou_tab_1",
49
+ "name": "True",
50
+ "active": true,
51
+ "tosidebar": true,
52
+ "console": false,
53
+ "tostatus": false,
54
+ "complete": "payload",
55
+ "targetType": "msg",
56
+ "statusVal": "",
57
+ "statusType": "auto",
58
+ "x": 540,
59
+ "y": 140,
60
+ "wires": []
61
+ },
62
+ {
63
+ "id": "sou_dbg_false",
64
+ "type": "debug",
65
+ "z": "sou_tab_1",
66
+ "name": "False",
67
+ "active": true,
68
+ "tosidebar": true,
69
+ "console": false,
70
+ "tostatus": false,
71
+ "complete": "payload",
72
+ "targetType": "msg",
73
+ "statusVal": "",
74
+ "statusType": "auto",
75
+ "x": 540,
76
+ "y": 180,
77
+ "wires": []
78
+ }
79
+ ]
80
+