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,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
+
@@ -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
+