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

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,222 @@
1
+ [
2
+ {
3
+ "id": "sum_tab_1",
4
+ "type": "tab",
5
+ "label": "SumUltimate - sum + subtract",
6
+ "disabled": false,
7
+ "info": "Esempi: somma con topic diversi e sottrazione con \"Subtract from\"."
8
+ },
9
+ {
10
+ "id": "sum_cmt_1",
11
+ "type": "comment",
12
+ "z": "sum_tab_1",
13
+ "name": "SUM: ogni msg.topic rappresenta una variabile",
14
+ "info": "Il nodo memorizza l'ultimo valore per ciascun topic e ricalcola ad ogni arrivo.",
15
+ "x": 240,
16
+ "y": 60,
17
+ "wires": []
18
+ },
19
+ {
20
+ "id": "sum_inj_a",
21
+ "type": "inject",
22
+ "z": "sum_tab_1",
23
+ "name": "a = 10",
24
+ "props": [
25
+ { "p": "payload" },
26
+ { "p": "topic", "vt": "str" }
27
+ ],
28
+ "repeat": "",
29
+ "crontab": "",
30
+ "once": false,
31
+ "onceDelay": 0.1,
32
+ "topic": "a",
33
+ "payload": "10",
34
+ "payloadType": "num",
35
+ "x": 120,
36
+ "y": 120,
37
+ "wires": [["sum_node_sum"]]
38
+ },
39
+ {
40
+ "id": "sum_inj_b",
41
+ "type": "inject",
42
+ "z": "sum_tab_1",
43
+ "name": "b = 5",
44
+ "props": [
45
+ { "p": "payload" },
46
+ { "p": "topic", "vt": "str" }
47
+ ],
48
+ "repeat": "",
49
+ "crontab": "",
50
+ "once": false,
51
+ "onceDelay": 0.1,
52
+ "topic": "b",
53
+ "payload": "5",
54
+ "payloadType": "num",
55
+ "x": 110,
56
+ "y": 160,
57
+ "wires": [["sum_node_sum"]]
58
+ },
59
+ {
60
+ "id": "sum_inj_c",
61
+ "type": "inject",
62
+ "z": "sum_tab_1",
63
+ "name": "c = 2",
64
+ "props": [
65
+ { "p": "payload" },
66
+ { "p": "topic", "vt": "str" }
67
+ ],
68
+ "repeat": "",
69
+ "crontab": "",
70
+ "once": false,
71
+ "onceDelay": 0.1,
72
+ "topic": "c",
73
+ "payload": "2",
74
+ "payloadType": "num",
75
+ "x": 110,
76
+ "y": 200,
77
+ "wires": [["sum_node_sum"]]
78
+ },
79
+ {
80
+ "id": "sum_inj_reset_1",
81
+ "type": "inject",
82
+ "z": "sum_tab_1",
83
+ "name": "reset",
84
+ "props": [{ "p": "reset", "v": "true", "vt": "bool" }],
85
+ "repeat": "",
86
+ "crontab": "",
87
+ "once": false,
88
+ "onceDelay": 0.1,
89
+ "x": 110,
90
+ "y": 240,
91
+ "wires": [["sum_node_sum", "sum_node_sub"]]
92
+ },
93
+ {
94
+ "id": "sum_node_sum",
95
+ "type": "SumUltimate",
96
+ "z": "sum_tab_1",
97
+ "name": "Sum",
98
+ "property": "payload",
99
+ "math": "sum",
100
+ "subtractstartfrom": "",
101
+ "x": 320,
102
+ "y": 160,
103
+ "wires": [["sum_dbg_sum"]]
104
+ },
105
+ {
106
+ "id": "sum_dbg_sum",
107
+ "type": "debug",
108
+ "z": "sum_tab_1",
109
+ "name": "SUM result",
110
+ "active": true,
111
+ "tosidebar": true,
112
+ "console": false,
113
+ "tostatus": false,
114
+ "complete": "payload",
115
+ "targetType": "msg",
116
+ "statusVal": "",
117
+ "statusType": "auto",
118
+ "x": 540,
119
+ "y": 160,
120
+ "wires": []
121
+ },
122
+ {
123
+ "id": "sum_cmt_2",
124
+ "type": "comment",
125
+ "z": "sum_tab_1",
126
+ "name": "SUBTRACT: scegli il topic iniziale (Subtract from)",
127
+ "info": "Qui la sottrazione parte dal topic \"startNumber\" e sottrae a/b.",
128
+ "x": 270,
129
+ "y": 300,
130
+ "wires": []
131
+ },
132
+ {
133
+ "id": "sum_inj_start",
134
+ "type": "inject",
135
+ "z": "sum_tab_1",
136
+ "name": "startNumber = 100",
137
+ "props": [
138
+ { "p": "payload" },
139
+ { "p": "topic", "vt": "str" }
140
+ ],
141
+ "repeat": "",
142
+ "crontab": "",
143
+ "once": false,
144
+ "onceDelay": 0.1,
145
+ "topic": "startNumber",
146
+ "payload": "100",
147
+ "payloadType": "num",
148
+ "x": 150,
149
+ "y": 360,
150
+ "wires": [["sum_node_sub"]]
151
+ },
152
+ {
153
+ "id": "sum_inj_sa",
154
+ "type": "inject",
155
+ "z": "sum_tab_1",
156
+ "name": "a = 20",
157
+ "props": [
158
+ { "p": "payload" },
159
+ { "p": "topic", "vt": "str" }
160
+ ],
161
+ "repeat": "",
162
+ "crontab": "",
163
+ "once": false,
164
+ "onceDelay": 0.1,
165
+ "topic": "a",
166
+ "payload": "20",
167
+ "payloadType": "num",
168
+ "x": 120,
169
+ "y": 400,
170
+ "wires": [["sum_node_sub"]]
171
+ },
172
+ {
173
+ "id": "sum_inj_sb",
174
+ "type": "inject",
175
+ "z": "sum_tab_1",
176
+ "name": "b = 10",
177
+ "props": [
178
+ { "p": "payload" },
179
+ { "p": "topic", "vt": "str" }
180
+ ],
181
+ "repeat": "",
182
+ "crontab": "",
183
+ "once": false,
184
+ "onceDelay": 0.1,
185
+ "topic": "b",
186
+ "payload": "10",
187
+ "payloadType": "num",
188
+ "x": 120,
189
+ "y": 440,
190
+ "wires": [["sum_node_sub"]]
191
+ },
192
+ {
193
+ "id": "sum_node_sub",
194
+ "type": "SumUltimate",
195
+ "z": "sum_tab_1",
196
+ "name": "Subtract",
197
+ "property": "payload",
198
+ "math": "subtract",
199
+ "subtractstartfrom": "startNumber",
200
+ "x": 330,
201
+ "y": 420,
202
+ "wires": [["sum_dbg_sub"]]
203
+ },
204
+ {
205
+ "id": "sum_dbg_sub",
206
+ "type": "debug",
207
+ "z": "sum_tab_1",
208
+ "name": "SUBTRACT result",
209
+ "active": true,
210
+ "tosidebar": true,
211
+ "console": false,
212
+ "tostatus": false,
213
+ "complete": "payload",
214
+ "targetType": "msg",
215
+ "statusVal": "",
216
+ "statusType": "auto",
217
+ "x": 560,
218
+ "y": 420,
219
+ "wires": []
220
+ }
221
+ ]
222
+
@@ -0,0 +1,63 @@
1
+ [
2
+ {
3
+ "id": "tog_tab_1",
4
+ "type": "tab",
5
+ "label": "toggleUltimate - toggle true/false",
6
+ "disabled": false,
7
+ "info": "Esempio: ad ogni msg in ingresso, il nodo alterna il payload tra true e false."
8
+ },
9
+ {
10
+ "id": "tog_cmt_1",
11
+ "type": "comment",
12
+ "z": "tog_tab_1",
13
+ "name": "Ogni click alterna true/false",
14
+ "info": "Serve solo che esista msg.payload (il valore non viene usato, ma deve essere presente).",
15
+ "x": 220,
16
+ "y": 60,
17
+ "wires": []
18
+ },
19
+ {
20
+ "id": "tog_inj_1",
21
+ "type": "inject",
22
+ "z": "tog_tab_1",
23
+ "name": "Toggle",
24
+ "props": [{ "p": "payload", "v": "1", "vt": "num" }],
25
+ "repeat": "",
26
+ "crontab": "",
27
+ "once": false,
28
+ "onceDelay": 0.1,
29
+ "x": 140,
30
+ "y": 140,
31
+ "wires": [["tog_node_1"]]
32
+ },
33
+ {
34
+ "id": "tog_node_1",
35
+ "type": "toggleUltimate",
36
+ "z": "tog_tab_1",
37
+ "name": "Toggle",
38
+ "valueToToggle": "true",
39
+ "payloadPropName": "payload",
40
+ "translatorConfig": "",
41
+ "x": 330,
42
+ "y": 140,
43
+ "wires": [["tog_dbg_1"]]
44
+ },
45
+ {
46
+ "id": "tog_dbg_1",
47
+ "type": "debug",
48
+ "z": "tog_tab_1",
49
+ "name": "Output",
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": 520,
59
+ "y": 140,
60
+ "wires": []
61
+ }
62
+ ]
63
+
@@ -0,0 +1,99 @@
1
+ [
2
+ {
3
+ "id": "tr_tab_1",
4
+ "type": "tab",
5
+ "label": "translator-config - example usage",
6
+ "disabled": false,
7
+ "info": "Esempio: usa translator-config per convertire stringhe (on/off, open/closed, ecc.) in booleani."
8
+ },
9
+ {
10
+ "id": "tr_cmt_1",
11
+ "type": "comment",
12
+ "z": "tr_tab_1",
13
+ "name": "Il FilterUltimate usa translator-config",
14
+ "info": "Invia payload \"open\"/\"closed\" e osserva su quale uscita viene instradato.",
15
+ "x": 240,
16
+ "y": 60,
17
+ "wires": []
18
+ },
19
+ {
20
+ "id": "tr_inj_open",
21
+ "type": "inject",
22
+ "z": "tr_tab_1",
23
+ "name": "payload = \"open\"",
24
+ "props": [{ "p": "payload", "v": "open", "vt": "str" }],
25
+ "repeat": "",
26
+ "crontab": "",
27
+ "once": false,
28
+ "onceDelay": 0.1,
29
+ "x": 150,
30
+ "y": 140,
31
+ "wires": [["tr_filter_1"]]
32
+ },
33
+ {
34
+ "id": "tr_inj_closed",
35
+ "type": "inject",
36
+ "z": "tr_tab_1",
37
+ "name": "payload = \"closed\"",
38
+ "props": [{ "p": "payload", "v": "closed", "vt": "str" }],
39
+ "repeat": "",
40
+ "crontab": "",
41
+ "once": false,
42
+ "onceDelay": 0.1,
43
+ "x": 160,
44
+ "y": 180,
45
+ "wires": [["tr_filter_1"]]
46
+ },
47
+ {
48
+ "id": "tr_filter_1",
49
+ "type": "FilterUltimate",
50
+ "z": "tr_tab_1",
51
+ "name": "Filter + Translator",
52
+ "payloadPropName": "payload",
53
+ "translatorConfig": "tr_cfg_1",
54
+ "x": 380,
55
+ "y": 160,
56
+ "wires": [["tr_dbg_true"], ["tr_dbg_false"]]
57
+ },
58
+ {
59
+ "id": "tr_dbg_true",
60
+ "type": "debug",
61
+ "z": "tr_tab_1",
62
+ "name": "True (translated)",
63
+ "active": true,
64
+ "tosidebar": true,
65
+ "console": false,
66
+ "tostatus": false,
67
+ "complete": "payload",
68
+ "targetType": "msg",
69
+ "statusVal": "",
70
+ "statusType": "auto",
71
+ "x": 600,
72
+ "y": 140,
73
+ "wires": []
74
+ },
75
+ {
76
+ "id": "tr_dbg_false",
77
+ "type": "debug",
78
+ "z": "tr_tab_1",
79
+ "name": "False (translated)",
80
+ "active": true,
81
+ "tosidebar": true,
82
+ "console": false,
83
+ "tostatus": false,
84
+ "complete": "payload",
85
+ "targetType": "msg",
86
+ "statusVal": "",
87
+ "statusType": "auto",
88
+ "x": 610,
89
+ "y": 180,
90
+ "wires": []
91
+ },
92
+ {
93
+ "id": "tr_cfg_1",
94
+ "type": "translator-config",
95
+ "name": "Default translations",
96
+ "commandText": "on:true\noff:false\nactive:true\ninactive:false\nopen:true\nclosed:false\nclose:false\n1:true\n0:false\ntrue:true\nfalse:false\nhome:true\nnot_home:false"
97
+ }
98
+ ]
99
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-red-contrib-boolean-logic-ultimate",
3
- "version": "1.2.3",
3
+ "version": "1.2.4",
4
4
  "description": "A set of Node-RED enhanced boolean logic and utility nodes, flow interruption, blinker, invert, filter, toggle etc.., with persistent values after reboot. Compatible also with Homeassistant values.",
5
5
  "author": "Supergiovane (https://github.com/Supergiovane)",
6
6
  "dependencies": {