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,104 @@
1
+ [
2
+ {
3
+ "id": "cmp_tab_1",
4
+ "type": "tab",
5
+ "label": "Comparator - compare two topics",
6
+ "disabled": false,
7
+ "info": "Esempio: confronta due valori numerici identificati da msg.topic e produce true/false."
8
+ },
9
+ {
10
+ "id": "cmp_cmt_1",
11
+ "type": "comment",
12
+ "z": "cmp_tab_1",
13
+ "name": "Confronto: t1 > t2",
14
+ "info": "Invia valori su topic t1 e t2. Il Comparator emette true/false quando ha entrambi i valori.",
15
+ "x": 210,
16
+ "y": 60,
17
+ "wires": []
18
+ },
19
+ {
20
+ "id": "cmp_inj_t1",
21
+ "type": "inject",
22
+ "z": "cmp_tab_1",
23
+ "name": "t1 = 25",
24
+ "props": [
25
+ { "p": "payload" },
26
+ { "p": "topic", "vt": "str" }
27
+ ],
28
+ "repeat": "",
29
+ "crontab": "",
30
+ "once": false,
31
+ "onceDelay": 0.1,
32
+ "topic": "t1",
33
+ "payload": "25",
34
+ "payloadType": "num",
35
+ "x": 120,
36
+ "y": 140,
37
+ "wires": [["cmp_node_1"]]
38
+ },
39
+ {
40
+ "id": "cmp_inj_t2",
41
+ "type": "inject",
42
+ "z": "cmp_tab_1",
43
+ "name": "t2 = 20",
44
+ "props": [
45
+ { "p": "payload" },
46
+ { "p": "topic", "vt": "str" }
47
+ ],
48
+ "repeat": "",
49
+ "crontab": "",
50
+ "once": false,
51
+ "onceDelay": 0.1,
52
+ "topic": "t2",
53
+ "payload": "20",
54
+ "payloadType": "num",
55
+ "x": 120,
56
+ "y": 180,
57
+ "wires": [["cmp_node_1"]]
58
+ },
59
+ {
60
+ "id": "cmp_inj_reset",
61
+ "type": "inject",
62
+ "z": "cmp_tab_1",
63
+ "name": "reset",
64
+ "props": [{ "p": "reset", "v": "true", "vt": "bool" }],
65
+ "repeat": "",
66
+ "crontab": "",
67
+ "once": false,
68
+ "onceDelay": 0.1,
69
+ "x": 120,
70
+ "y": 220,
71
+ "wires": [["cmp_node_1"]]
72
+ },
73
+ {
74
+ "id": "cmp_node_1",
75
+ "type": "Comparator",
76
+ "z": "cmp_tab_1",
77
+ "name": "t1 > t2",
78
+ "property": "payload",
79
+ "math": ">",
80
+ "topic1": "t1",
81
+ "topic2": "t2",
82
+ "x": 330,
83
+ "y": 180,
84
+ "wires": [["cmp_dbg_1"]]
85
+ },
86
+ {
87
+ "id": "cmp_dbg_1",
88
+ "type": "debug",
89
+ "z": "cmp_tab_1",
90
+ "name": "Result (boolean)",
91
+ "active": true,
92
+ "tosidebar": true,
93
+ "console": false,
94
+ "tostatus": false,
95
+ "complete": "payload",
96
+ "targetType": "msg",
97
+ "statusVal": "",
98
+ "statusType": "auto",
99
+ "x": 550,
100
+ "y": 180,
101
+ "wires": []
102
+ }
103
+ ]
104
+
@@ -0,0 +1,105 @@
1
+ [
2
+ {
3
+ "id": "fil_tab_1",
4
+ "type": "tab",
5
+ "label": "FilterUltimate - true/false routing",
6
+ "disabled": false,
7
+ "info": "Esempio: instradamento su 2 uscite in base al valore booleano (con supporto translator-config)."
8
+ },
9
+ {
10
+ "id": "fil_cmt_1",
11
+ "type": "comment",
12
+ "z": "fil_tab_1",
13
+ "name": "Output 1 = True, Output 2 = False",
14
+ "info": "Invia \"on\"/\"off\": il translator-config converte a booleano prima del filtro.",
15
+ "x": 230,
16
+ "y": 60,
17
+ "wires": []
18
+ },
19
+ {
20
+ "id": "fil_inj_on",
21
+ "type": "inject",
22
+ "z": "fil_tab_1",
23
+ "name": "payload = \"on\"",
24
+ "props": [
25
+ { "p": "payload", "v": "on", "vt": "str" },
26
+ { "p": "topic", "v": "state", "vt": "str" }
27
+ ],
28
+ "repeat": "",
29
+ "crontab": "",
30
+ "once": false,
31
+ "onceDelay": 0.1,
32
+ "x": 140,
33
+ "y": 140,
34
+ "wires": [["fil_node_1"]]
35
+ },
36
+ {
37
+ "id": "fil_inj_off",
38
+ "type": "inject",
39
+ "z": "fil_tab_1",
40
+ "name": "payload = \"off\"",
41
+ "props": [
42
+ { "p": "payload", "v": "off", "vt": "str" },
43
+ { "p": "topic", "v": "state", "vt": "str" }
44
+ ],
45
+ "repeat": "",
46
+ "crontab": "",
47
+ "once": false,
48
+ "onceDelay": 0.1,
49
+ "x": 140,
50
+ "y": 180,
51
+ "wires": [["fil_node_1"]]
52
+ },
53
+ {
54
+ "id": "fil_node_1",
55
+ "type": "FilterUltimate",
56
+ "z": "fil_tab_1",
57
+ "name": "Filter (HA)",
58
+ "payloadPropName": "payload",
59
+ "translatorConfig": "fil_trans_1",
60
+ "x": 350,
61
+ "y": 160,
62
+ "wires": [["fil_dbg_true"], ["fil_dbg_false"]]
63
+ },
64
+ {
65
+ "id": "fil_dbg_true",
66
+ "type": "debug",
67
+ "z": "fil_tab_1",
68
+ "name": "Output True",
69
+ "active": true,
70
+ "tosidebar": true,
71
+ "console": false,
72
+ "tostatus": false,
73
+ "complete": "payload",
74
+ "targetType": "msg",
75
+ "statusVal": "",
76
+ "statusType": "auto",
77
+ "x": 580,
78
+ "y": 140,
79
+ "wires": []
80
+ },
81
+ {
82
+ "id": "fil_dbg_false",
83
+ "type": "debug",
84
+ "z": "fil_tab_1",
85
+ "name": "Output False",
86
+ "active": true,
87
+ "tosidebar": true,
88
+ "console": false,
89
+ "tostatus": false,
90
+ "complete": "payload",
91
+ "targetType": "msg",
92
+ "statusVal": "",
93
+ "statusType": "auto",
94
+ "x": 580,
95
+ "y": 180,
96
+ "wires": []
97
+ },
98
+ {
99
+ "id": "fil_trans_1",
100
+ "type": "translator-config",
101
+ "name": "Home Assistant",
102
+ "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"
103
+ }
104
+ ]
105
+
@@ -0,0 +1,82 @@
1
+ [
2
+ {
3
+ "id": "imp_tab_1",
4
+ "type": "tab",
5
+ "label": "ImpulseUltimate - timed sequence",
6
+ "disabled": false,
7
+ "info": "Esempio: avvia una sequenza di comandi (send/wait/send) quando riceve payload=true."
8
+ },
9
+ {
10
+ "id": "imp_cmt_1",
11
+ "type": "comment",
12
+ "z": "imp_tab_1",
13
+ "name": "Start/Stop sequenza",
14
+ "info": "payload=true avvia la sequenza; payload=false ferma la sequenza in corso.",
15
+ "x": 210,
16
+ "y": 60,
17
+ "wires": []
18
+ },
19
+ {
20
+ "id": "imp_inj_start",
21
+ "type": "inject",
22
+ "z": "imp_tab_1",
23
+ "name": "Start",
24
+ "props": [{ "p": "payload" }],
25
+ "repeat": "",
26
+ "crontab": "",
27
+ "once": false,
28
+ "onceDelay": 0.1,
29
+ "topic": "",
30
+ "payload": "true",
31
+ "payloadType": "bool",
32
+ "x": 140,
33
+ "y": 140,
34
+ "wires": [["imp_node_1"]]
35
+ },
36
+ {
37
+ "id": "imp_inj_stop",
38
+ "type": "inject",
39
+ "z": "imp_tab_1",
40
+ "name": "Stop",
41
+ "props": [{ "p": "payload" }],
42
+ "repeat": "",
43
+ "crontab": "",
44
+ "once": false,
45
+ "onceDelay": 0.1,
46
+ "topic": "",
47
+ "payload": "false",
48
+ "payloadType": "bool",
49
+ "x": 140,
50
+ "y": 180,
51
+ "wires": [["imp_node_1"]]
52
+ },
53
+ {
54
+ "id": "imp_node_1",
55
+ "type": "ImpulseUltimate",
56
+ "z": "imp_tab_1",
57
+ "name": "Impulse demo",
58
+ "commandText": "// Demo\\nsend:true\\nwait:500\\nsend:false",
59
+ "payloadPropName": "payload",
60
+ "x": 350,
61
+ "y": 160,
62
+ "wires": [["imp_dbg_1"]]
63
+ },
64
+ {
65
+ "id": "imp_dbg_1",
66
+ "type": "debug",
67
+ "z": "imp_tab_1",
68
+ "name": "Output",
69
+ "active": true,
70
+ "tosidebar": true,
71
+ "console": false,
72
+ "tostatus": false,
73
+ "complete": "true",
74
+ "targetType": "full",
75
+ "statusVal": "",
76
+ "statusType": "auto",
77
+ "x": 540,
78
+ "y": 160,
79
+ "wires": []
80
+ }
81
+ ]
82
+
@@ -0,0 +1,100 @@
1
+ [
2
+ {
3
+ "id": "iju_tab_1",
4
+ "type": "tab",
5
+ "label": "InjectUltimate - 4 outputs",
6
+ "disabled": false,
7
+ "info": "Esempio: clicca il pulsante del nodo InjectUltimate per inviare messaggi su 4 uscite (true/false/toggle/JSON)."
8
+ },
9
+ {
10
+ "id": "iju_cmt_1",
11
+ "type": "comment",
12
+ "z": "iju_tab_1",
13
+ "name": "Clicca il pulsante a sinistra del nodo",
14
+ "info": "Output 1: true\nOutput 2: false\nOutput 3: toggle\nOutput 4: JSON definito nel nodo",
15
+ "x": 240,
16
+ "y": 60,
17
+ "wires": []
18
+ },
19
+ {
20
+ "id": "iju_node_1",
21
+ "type": "InjectUltimate",
22
+ "z": "iju_tab_1",
23
+ "name": "Inject",
24
+ "topic": "1",
25
+ "curVal": true,
26
+ "outputJSON": "{\\n\\t\"payload\":\"hello\",\\n\\t\"topic\":\"1\"\\n}",
27
+ "x": 170,
28
+ "y": 160,
29
+ "wires": [["iju_dbg_true"], ["iju_dbg_false"], ["iju_dbg_toggle"], ["iju_dbg_json"]]
30
+ },
31
+ {
32
+ "id": "iju_dbg_true",
33
+ "type": "debug",
34
+ "z": "iju_tab_1",
35
+ "name": "Pin1 (true)",
36
+ "active": true,
37
+ "tosidebar": true,
38
+ "console": false,
39
+ "tostatus": false,
40
+ "complete": "payload",
41
+ "targetType": "msg",
42
+ "statusVal": "",
43
+ "statusType": "auto",
44
+ "x": 420,
45
+ "y": 120,
46
+ "wires": []
47
+ },
48
+ {
49
+ "id": "iju_dbg_false",
50
+ "type": "debug",
51
+ "z": "iju_tab_1",
52
+ "name": "Pin2 (false)",
53
+ "active": true,
54
+ "tosidebar": true,
55
+ "console": false,
56
+ "tostatus": false,
57
+ "complete": "payload",
58
+ "targetType": "msg",
59
+ "statusVal": "",
60
+ "statusType": "auto",
61
+ "x": 430,
62
+ "y": 160,
63
+ "wires": []
64
+ },
65
+ {
66
+ "id": "iju_dbg_toggle",
67
+ "type": "debug",
68
+ "z": "iju_tab_1",
69
+ "name": "Pin3 (toggle)",
70
+ "active": true,
71
+ "tosidebar": true,
72
+ "console": false,
73
+ "tostatus": false,
74
+ "complete": "payload",
75
+ "targetType": "msg",
76
+ "statusVal": "",
77
+ "statusType": "auto",
78
+ "x": 430,
79
+ "y": 200,
80
+ "wires": []
81
+ },
82
+ {
83
+ "id": "iju_dbg_json",
84
+ "type": "debug",
85
+ "z": "iju_tab_1",
86
+ "name": "Pin4 (JSON)",
87
+ "active": true,
88
+ "tosidebar": true,
89
+ "console": false,
90
+ "tostatus": false,
91
+ "complete": "true",
92
+ "targetType": "full",
93
+ "statusVal": "",
94
+ "statusType": "auto",
95
+ "x": 430,
96
+ "y": 240,
97
+ "wires": []
98
+ }
99
+ ]
100
+
@@ -0,0 +1,153 @@
1
+ [
2
+ {
3
+ "id": "int_tab_1",
4
+ "type": "tab",
5
+ "label": "InterruptFlowUltimate - block/pass/replay",
6
+ "disabled": false,
7
+ "info": "Esempio: blocca il flusso quando riceve payload=false dal topic di trigger; riprende con payload=true; replay e reset tramite msg.play / msg.reset."
8
+ },
9
+ {
10
+ "id": "int_cmt_1",
11
+ "type": "comment",
12
+ "z": "int_tab_1",
13
+ "name": "Topic di controllo: trigger",
14
+ "info": "1) Invia un messaggio 'DATA' (sarà memorizzato).\n2) Invia 'BLOCK' (topic=trigger, payload=false) per bloccare.\n3) Invia altri DATA: non passeranno ma verranno memorizzati.\n4) Invia 'PLAY' (topic=trigger, msg.play=true) per riprodurre l'ultimo memorizzato (con isReplay=true).\n5) Invia 'PASS' (topic=trigger, payload=true) per riprendere il flusso.\n6) Invia 'RESET' (topic=trigger, msg.reset=true) per cancellare il messaggio memorizzato.",
15
+ "x": 300,
16
+ "y": 60,
17
+ "wires": []
18
+ },
19
+ {
20
+ "id": "int_inj_data_1",
21
+ "type": "inject",
22
+ "z": "int_tab_1",
23
+ "name": "DATA #1",
24
+ "props": [
25
+ { "p": "payload", "v": "hello", "vt": "str" },
26
+ { "p": "topic", "v": "data", "vt": "str" }
27
+ ],
28
+ "repeat": "",
29
+ "crontab": "",
30
+ "once": false,
31
+ "onceDelay": 0.1,
32
+ "x": 140,
33
+ "y": 160,
34
+ "wires": [["int_node_1"]]
35
+ },
36
+ {
37
+ "id": "int_inj_data_2",
38
+ "type": "inject",
39
+ "z": "int_tab_1",
40
+ "name": "DATA #2",
41
+ "props": [
42
+ { "p": "payload", "v": "world", "vt": "str" },
43
+ { "p": "topic", "v": "data", "vt": "str" }
44
+ ],
45
+ "repeat": "",
46
+ "crontab": "",
47
+ "once": false,
48
+ "onceDelay": 0.1,
49
+ "x": 140,
50
+ "y": 200,
51
+ "wires": [["int_node_1"]]
52
+ },
53
+ {
54
+ "id": "int_inj_block",
55
+ "type": "inject",
56
+ "z": "int_tab_1",
57
+ "name": "BLOCK (trigger=false)",
58
+ "props": [
59
+ { "p": "payload", "v": "false", "vt": "bool" },
60
+ { "p": "topic", "v": "trigger", "vt": "str" }
61
+ ],
62
+ "repeat": "",
63
+ "crontab": "",
64
+ "once": false,
65
+ "onceDelay": 0.1,
66
+ "x": 170,
67
+ "y": 280,
68
+ "wires": [["int_node_1"]]
69
+ },
70
+ {
71
+ "id": "int_inj_pass",
72
+ "type": "inject",
73
+ "z": "int_tab_1",
74
+ "name": "PASS (trigger=true)",
75
+ "props": [
76
+ { "p": "payload", "v": "true", "vt": "bool" },
77
+ { "p": "topic", "v": "trigger", "vt": "str" }
78
+ ],
79
+ "repeat": "",
80
+ "crontab": "",
81
+ "once": false,
82
+ "onceDelay": 0.1,
83
+ "x": 170,
84
+ "y": 320,
85
+ "wires": [["int_node_1"]]
86
+ },
87
+ {
88
+ "id": "int_inj_play",
89
+ "type": "inject",
90
+ "z": "int_tab_1",
91
+ "name": "PLAY (msg.play=true)",
92
+ "props": [
93
+ { "p": "play", "v": "true", "vt": "bool" },
94
+ { "p": "topic", "v": "trigger", "vt": "str" }
95
+ ],
96
+ "repeat": "",
97
+ "crontab": "",
98
+ "once": false,
99
+ "onceDelay": 0.1,
100
+ "x": 170,
101
+ "y": 360,
102
+ "wires": [["int_node_1"]]
103
+ },
104
+ {
105
+ "id": "int_inj_reset",
106
+ "type": "inject",
107
+ "z": "int_tab_1",
108
+ "name": "RESET (msg.reset=true)",
109
+ "props": [
110
+ { "p": "reset", "v": "true", "vt": "bool" },
111
+ { "p": "topic", "v": "trigger", "vt": "str" }
112
+ ],
113
+ "repeat": "",
114
+ "crontab": "",
115
+ "once": false,
116
+ "onceDelay": 0.1,
117
+ "x": 180,
118
+ "y": 400,
119
+ "wires": [["int_node_1"]]
120
+ },
121
+ {
122
+ "id": "int_node_1",
123
+ "type": "InterruptFlowUltimate",
124
+ "z": "int_tab_1",
125
+ "name": "Interrupt",
126
+ "triggertopic": "trigger",
127
+ "initializewith": "1",
128
+ "autoToggle": "0",
129
+ "payloadPropName": "payload",
130
+ "translatorConfig": "",
131
+ "x": 420,
132
+ "y": 260,
133
+ "wires": [["int_dbg_1"]]
134
+ },
135
+ {
136
+ "id": "int_dbg_1",
137
+ "type": "debug",
138
+ "z": "int_tab_1",
139
+ "name": "Flow output",
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": 620,
149
+ "y": 260,
150
+ "wires": []
151
+ }
152
+ ]
153
+
@@ -0,0 +1,88 @@
1
+ [
2
+ {
3
+ "id": "inv_tab_1",
4
+ "type": "tab",
5
+ "label": "InvertUltimate - base + translator",
6
+ "disabled": false,
7
+ "info": "Esempio: inversione booleana con translator-config (utile con payload Home Assistant on/off)."
8
+ },
9
+ {
10
+ "id": "inv_cmt_1",
11
+ "type": "comment",
12
+ "z": "inv_tab_1",
13
+ "name": "Usa on/off (string) grazie al translator-config",
14
+ "info": "Il nodo converte il valore in booleano (con translator-config) e poi lo inverte.",
15
+ "x": 260,
16
+ "y": 60,
17
+ "wires": []
18
+ },
19
+ {
20
+ "id": "inv_inj_on",
21
+ "type": "inject",
22
+ "z": "inv_tab_1",
23
+ "name": "payload = \"on\"",
24
+ "props": [
25
+ { "p": "payload", "v": "on", "vt": "str" },
26
+ { "p": "topic", "v": "ha", "vt": "str" }
27
+ ],
28
+ "repeat": "",
29
+ "crontab": "",
30
+ "once": false,
31
+ "onceDelay": 0.1,
32
+ "x": 140,
33
+ "y": 140,
34
+ "wires": [["inv_node_1"]]
35
+ },
36
+ {
37
+ "id": "inv_inj_off",
38
+ "type": "inject",
39
+ "z": "inv_tab_1",
40
+ "name": "payload = \"off\"",
41
+ "props": [
42
+ { "p": "payload", "v": "off", "vt": "str" },
43
+ { "p": "topic", "v": "ha", "vt": "str" }
44
+ ],
45
+ "repeat": "",
46
+ "crontab": "",
47
+ "once": false,
48
+ "onceDelay": 0.1,
49
+ "x": 140,
50
+ "y": 180,
51
+ "wires": [["inv_node_1"]]
52
+ },
53
+ {
54
+ "id": "inv_node_1",
55
+ "type": "InvertUltimate",
56
+ "z": "inv_tab_1",
57
+ "name": "Invert (HA)",
58
+ "payloadPropName": "payload",
59
+ "translatorConfig": "inv_trans_1",
60
+ "x": 360,
61
+ "y": 160,
62
+ "wires": [["inv_dbg_1"]]
63
+ },
64
+ {
65
+ "id": "inv_dbg_1",
66
+ "type": "debug",
67
+ "z": "inv_tab_1",
68
+ "name": "Output (inverted boolean)",
69
+ "active": true,
70
+ "tosidebar": true,
71
+ "console": false,
72
+ "tostatus": false,
73
+ "complete": "true",
74
+ "targetType": "full",
75
+ "statusVal": "",
76
+ "statusType": "auto",
77
+ "x": 620,
78
+ "y": 160,
79
+ "wires": []
80
+ },
81
+ {
82
+ "id": "inv_trans_1",
83
+ "type": "translator-config",
84
+ "name": "Home Assistant",
85
+ "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"
86
+ }
87
+ ]
88
+