node-red-contrib-boolean-logic-ultimate 1.2.6 → 1.2.8
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.
- package/CHANGELOG.md +6 -1
- package/README.md +270 -137
- package/boolean-logic-ultimate/PresenceSimulatorUltimate.html +1 -0
- package/boolean-logic-ultimate/RateLimiterUltimate.html +2 -2
- package/boolean-logic-ultimate/StaircaseLightUltimate.html +1 -0
- package/examples/AlarmSystemUltimate.json +286 -0
- package/examples/README.md +30 -0
- package/img/alarm-system-ultimate.svg +69 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
# node-red-contrib-boolean-logic-ultimate
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
[](https://www.paypal.me/techtoday)
|
|
3
4
|
|
|
4
5
|
# CHANGELOG
|
|
5
6
|
|
|
7
|
+
<p>
|
|
8
|
+
<b>Version 1.2.8</b> January 2026<br/>
|
|
9
|
+
- Added youtube videos for the missing nodes and the relative links to the UI<br/>
|
|
10
|
+
</p>
|
|
6
11
|
|
|
7
12
|
<p>
|
|
8
13
|
<b>Version 1.2.6</b> January 2026<br/>
|
package/README.md
CHANGED
|
@@ -1,14 +1,20 @@
|
|
|
1
|
-

|
|
1
|
+

|
|
2
2
|
|
|
3
3
|
[![NPM version][npm-version-image]][npm-url]
|
|
4
|
+
|
|
4
5
|
[![NPM downloads per month][npm-downloads-month-image]][npm-url]
|
|
6
|
+
|
|
5
7
|
[![NPM downloads total][npm-downloads-total-image]][npm-url]
|
|
8
|
+
|
|
6
9
|
[![MIT License][license-image]][license-url]
|
|
10
|
+
|
|
7
11
|
[](https://standardjs.com)
|
|
12
|
+
|
|
8
13
|
[](https://www.paypal.me/techtoday)
|
|
9
|
-
[![youtube][youtube-image]][youtube-url]
|
|
10
14
|
|
|
11
|
-
|
|
15
|
+
[![youtube][youtube-image]][youtube-url]
|
|
16
|
+
|
|
17
|
+
A set of Node-RED enhanced boolean logic and utility nodes, with persistent values after reboot. Compatible also with Homeassistant values.
|
|
12
18
|
|
|
13
19
|
<br/>
|
|
14
20
|
<br/>
|
|
@@ -28,27 +34,29 @@ Importable Node-RED example flows are available in the [`examples/`](examples/)
|
|
|
28
34
|
|
|
29
35
|
- Node-RED editor → Menu (☰) → **Import** → **Examples** and select an example from `node-red-contrib-boolean-logic-ultimate`
|
|
30
36
|
|
|
31
|
-
|
|
32
37
|
<br/>
|
|
33
38
|
<br/>
|
|
34
39
|
|
|
35
40
|
# TRANSLATOR NODE
|
|
36
41
|
|
|
37
|
-
Other than true/false, all nodes accepts [Homeassistant](https://www.home-assistant.io) output strings.
|
|
42
|
+
Other than true/false, all nodes accepts [Homeassistant](https://www.home-assistant.io) output strings.
|
|
38
43
|
|
|
39
44
|
You can **even add your own input translation word list**, thanks to the translator-config node.
|
|
45
|
+
|
|
40
46
|
The translator node can translate an input payload, to a true/false boolean values.<br />
|
|
47
|
+
|
|
41
48
|
Each row in the text box, represents a translation command. <br/>
|
|
42
|
-
|
|
49
|
+
|
|
50
|
+
There are some default translation's rows, to make the _boolean-logic-ultimate_ nodes compatible with Homeassistant as default. <br/>
|
|
51
|
+
|
|
43
52
|
You can add your own translation row.<br/>
|
|
44
53
|
|
|
45
|
-
| | Description
|
|
46
|
-
| --------- |
|
|
54
|
+
| | Description |
|
|
55
|
+
| --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
47
56
|
| Translate | Add, delete or edit your own translation command. The row's translation command must be **input string:true(or false)**. For example: <code>open:true</code> <code>closed:false</code>. You can also use an expressions to be evaluated, like this <code>{{value>=50}}:true</code> and <code>{{value<50}}:false</code>. In this case, the tranlsator will evaluate (javascript eval) the expression and, if true, returns the choosen value. |
|
|
48
57
|
|
|
49
58
|

|
|
50
59
|
|
|
51
|
-
|
|
52
60
|
<br/>
|
|
53
61
|
<br/>
|
|
54
62
|
|
|
@@ -72,11 +80,11 @@ You can add your own translation row.<br/>
|
|
|
72
80
|
|
|
73
81
|
The node performs Boolean logic on the incoming payloads.<br/>
|
|
74
82
|
|
|
75
|
-
The node expects a fixed number of topics (configured in the settings) on which it will operate. It will only output a value
|
|
83
|
+
The node expects a fixed number of topics (configured in the settings) on which it will operate. It will only output a value
|
|
76
84
|
|
|
77
85
|
when it has seen the expected number of topics. If it ever sees more than the configured number of topics it will log a message then reset its state and start over.<br/>
|
|
78
86
|
|
|
79
|
-
The input message is preserved and passed to the output, changing only the topic and the payload.
|
|
87
|
+
The input message is preserved and passed to the output, changing only the topic and the payload.
|
|
80
88
|
|
|
81
89
|
The node performs some checks on the incoming boolean payloads and outputs all results at the same time, as follow:<br/>
|
|
82
90
|
|
|
@@ -84,7 +92,7 @@ The node performs some checks on the incoming boolean payloads and outputs all r
|
|
|
84
92
|
- Output "OR": true or false<br/>
|
|
85
93
|
- Output "XOR": true or false<br/>
|
|
86
94
|
|
|
87
|
-
If you need
|
|
95
|
+
If you need **_"NAND"_** or **_"NOR"_** gate, just put an **InvertUltimate** node respectively after the "AND" or "OR" output.
|
|
88
96
|
|
|
89
97
|
The node can have a persistent input: the input values are retained after a node-red reboot. That means, that if you reboot your node-red, you don't need to wait all inputs to arrive and initialize the node, before the node can output a payload.<br/>
|
|
90
98
|
|
|
@@ -94,24 +102,24 @@ The node can convert arbitrary input values to true/false. It supports Homeassis
|
|
|
94
102
|
|
|
95
103
|
### NODE CONFIGURATION
|
|
96
104
|
|
|
97
|
-
| Property | Description
|
|
98
|
-
| -------------------------------------------- |
|
|
99
|
-
| Inputs count | Set the number of different topics to be evaluated. The node will output a message to the flow, after this number of
|
|
100
|
-
| Evaluate | It's the msg property to be evaluated.
|
|
101
|
-
| Filter output | **Output both 'true' and 'false'** results: Standard behaviour, the node will output <b>true</b> and <b>false</b> whenever it receives an input and calculate the boolean logics as output. **Output only 'true'** results: whenever the node receives an input, it outputs a payload <b>true</b> only if the result of the logic is true. <b>False</b> results are filtered out.
|
|
102
|
-
| Trigger mode | **All topics**: standard behaviour, the node will evaluate each input topic and ouputs the values. At each input change, it will output a msg on the flow. **Single topic + eval other inputs**: the node evaluates all the input topics, but only whenever it receives a msg input with the **specified topic**, it
|
|
105
|
+
| Property | Description |
|
|
106
|
+
| -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
107
|
+
| Inputs count | Set the number of different topics to be evaluated. The node will output a message to the flow, after this number of _different_ topics arrives. _Remember: each input topic must be different. For example, if you set this field to 3, the node expects 3 different topics._ |
|
|
108
|
+
| Evaluate | It's the msg property to be evaluated. _By default, it is "payload", but you can also specify other properties, for example "payload.value"_ |
|
|
109
|
+
| Filter output | **Output both 'true' and 'false'** results: Standard behaviour, the node will output <b>true</b> and <b>false</b> whenever it receives an input and calculate the boolean logics as output. **Output only 'true'** results: whenever the node receives an input, it outputs a payload <b>true</b> only if the result of the logic is true. <b>False</b> results are filtered out. |
|
|
110
|
+
| Trigger mode | **All topics**: standard behaviour, the node will evaluate each input topic and ouputs the values. At each input change, it will output a msg on the flow. **Single topic + eval other inputs**: the node evaluates all the input topics, but only whenever it receives a msg input with the **specified topic**, it outputs a msg to the flow. |
|
|
103
111
|
| If input states are undefined | Every time you create a node or modify the node, all inputs are set to undefined. This means that the node will wait the arrive of all topics (for example 3 topics, if you've selected 3 topics in the option), before it can output a payload. This can be a problem if your logic must be operative as soon as you deploy the flow. To overcome this problem, you can "initialize" all the undefined inputs with True or False. **Leave undefined**: Standard behaviour, the node will wait all the "undefined" topics to arrive, then starts a flow with the result. **True or False**: The node is immediately operative, by force the initialization of the "undefined" inputs with "true" or "false". |
|
|
104
|
-
| Remember latest input values after reboot | If checked, the input values are retained after a node-red reboot. That means, that if you reboot your node-red, you don't need to wait all inputs to arrive and initialize the node, before the node can output a payload. Every time you modify the node's config, <b>the retained values are cleared</b>.
|
|
105
|
-
| Reject non boolean (true/false) input values | If checked, the node will accept only boolean true/false values. Otherwise, it will try to convert the payload value to a logic true/false boolean.
|
|
106
|
-
| Delay evaluation (ms) | Delays the evaluation until this time (in milliseconds) is elapsed. Each time a message or "topic trigger message" (see **Trigger mode**) arrives, the delay is restarted. This option is useful for debouncing pourposes or simply for adding some delay. For example, you can turn on a light if the room is occupied for a long time, allowing people to fast transit repeatedly, without the need of turning the light on. Another example, if you have many sensors changing state rapidly, you can wait until these sensor reach a quiet state, then evaluate the inputs.
|
|
112
|
+
| Remember latest input values after reboot | If checked, the input values are retained after a node-red reboot. That means, that if you reboot your node-red, you don't need to wait all inputs to arrive and initialize the node, before the node can output a payload. Every time you modify the node's config, <b>the retained values are cleared</b>. |
|
|
113
|
+
| Reject non boolean (true/false) input values | If checked, the node will accept only boolean true/false values. Otherwise, it will try to convert the payload value to a logic true/false boolean. |
|
|
114
|
+
| Delay evaluation (ms) | Delays the evaluation until this time (in milliseconds) is elapsed. Each time a message or "topic trigger message" (see **Trigger mode**) arrives, the delay is restarted. This option is useful for debouncing pourposes or simply for adding some delay. For example, you can turn on a light if the room is occupied for a long time, allowing people to fast transit repeatedly, without the need of turning the light on. Another example, if you have many sensors changing state rapidly, you can wait until these sensor reach a quiet state, then evaluate the inputs. |
|
|
107
115
|
|
|
108
116
|
<br/>
|
|
109
117
|
|
|
110
118
|
**INPUT MSG TO THE NODE**
|
|
111
119
|
|
|
112
|
-
| Input msg | Description
|
|
113
|
-
| ---------------- |
|
|
114
|
-
| msg.reset = true | Resets all saved input values to undefined
|
|
120
|
+
| Input msg | Description |
|
|
121
|
+
| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
122
|
+
| msg.reset = true | Resets all saved input values to undefined |
|
|
115
123
|
| msg.inputcount | Changes the inputs count property. For example, <b>msg.inputcount = 3</b> Whenever you lower the inputcount from a higher number to a lower one, for example from 3 to 2, it's suggested to do a <b>msg.reset=true</b> to reset all stored input values. |
|
|
116
124
|
|
|
117
125
|
<br/>
|
|
@@ -126,10 +134,10 @@ The interrupt flows is able to stop the input messages to exiting the node.
|
|
|
126
134
|
|
|
127
135
|
### NODE CONFIGURATION
|
|
128
136
|
|
|
129
|
-
| Property | Description
|
|
130
|
-
| ---------------- |
|
|
131
|
-
| Trigger by topic | Whenever the node receives a payload = false from this topic,it stops output messages to the flow. As soon it receives payload = true from this topic, the output messages start to flow out again. The node will output the current stored message plus an added property "isReplay = true", as soon as it receives a
|
|
132
|
-
| With Input | It's the msg property to be evaluated.
|
|
137
|
+
| Property | Description |
|
|
138
|
+
| ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
139
|
+
| Trigger by topic | Whenever the node receives a payload = false from this topic,it stops output messages to the flow. As soon it receives payload = true from this topic, the output messages start to flow out again. The node will output the current stored message plus an added property "isReplay = true", as soon as it receives a **_msg.play = true_** from this topic. The node will clear the current stored message, as soon as it receives a **_msg.reset = true_** from this topic. |
|
|
140
|
+
| With Input | It's the msg property to be evaluated. _By default, it is "payload", but you can also specify other properties, for example "payload.value"_ |
|
|
133
141
|
| Then | This property, allow you to auto toggle the selected start state (pass or block) after a timer has elapsed. You can choose from some pre-defined delays. If you have, for example, an Homekit-Bridged nodeset with a thermostat node or security system node in your flow, once node-red restarts, these homekit nodes output a default message to the flow. Just put an InterruptFlow node with a "block at start" behaviour and a toggle delay enabled behind homekit nodes, to temporary stop the chained nodes to receive the unwanted startup message. |
|
|
134
142
|
|
|
135
143
|
<br/>
|
|
@@ -198,9 +206,9 @@ The input message is preserved and passed to the output, changing only the topic
|
|
|
198
206
|
|
|
199
207
|
### NODE CONFIGURATION
|
|
200
208
|
|
|
201
|
-
| Property | Description
|
|
202
|
-
| -------- |
|
|
203
|
-
| Input | It's the msg property to be evaluated.
|
|
209
|
+
| Property | Description |
|
|
210
|
+
| -------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
211
|
+
| Input | It's the msg property to be evaluated. _By default, it is "payload", but you can also specify other properties, for example "payload.value"_ |
|
|
204
212
|
|
|
205
213
|
<br/>
|
|
206
214
|
|
|
@@ -222,9 +230,9 @@ The input message is preserved and passed to the output, changing only the topic
|
|
|
222
230
|
|
|
223
231
|
### NODE CONFIGURATION
|
|
224
232
|
|
|
225
|
-
| Property | Description
|
|
226
|
-
| -------- |
|
|
227
|
-
| Input | It's the msg property to be evaluated.
|
|
233
|
+
| Property | Description |
|
|
234
|
+
| -------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
235
|
+
| Input | It's the msg property to be evaluated. _By default, it is "payload", but you can also specify other properties, for example "payload.value"_ |
|
|
228
236
|
|
|
229
237
|
<br/>
|
|
230
238
|
|
|
@@ -246,9 +254,9 @@ output2 : outputs the inverted value false/true<br/>
|
|
|
246
254
|
|
|
247
255
|
### NODE CONFIGURATION
|
|
248
256
|
|
|
249
|
-
| Property | Description
|
|
250
|
-
| -------- |
|
|
251
|
-
| Input | It's the msg property to be evaluated.
|
|
257
|
+
| Property | Description |
|
|
258
|
+
| -------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
259
|
+
| Input | It's the msg property to be evaluated. _By default, it is "payload", but you can also specify other properties, for example "payload.value"_ |
|
|
252
260
|
|
|
253
261
|
<br/>
|
|
254
262
|
|
|
@@ -283,9 +291,9 @@ This is useful if you need to simply send a true or false payload.
|
|
|
283
291
|
|
|
284
292
|
### NODE CONFIGURATION
|
|
285
293
|
|
|
286
|
-
| Property | Description
|
|
287
|
-
| -------- |
|
|
288
|
-
| Input | It's the msg property to be evaluated.
|
|
294
|
+
| Property | Description |
|
|
295
|
+
| -------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
296
|
+
| Input | It's the msg property to be evaluated. _By default, it is "payload", but you can also specify other properties, for example "payload.value"_ |
|
|
289
297
|
|
|
290
298
|
<br/>
|
|
291
299
|
|
|
@@ -307,7 +315,7 @@ This is useful if you need to simply send a true or false payload.
|
|
|
307
315
|
|
|
308
316
|
The pourpose of this node is to send a message with payload TRUE on the first output, FALSE on second output and a TOGGLE (true/false) on the third output, by pressing the pushbutton.<br />
|
|
309
317
|
|
|
310
|
-
This is useful if you need to simply test your flow.
|
|
318
|
+
This is useful if you need to simply test your flow.
|
|
311
319
|
|
|
312
320
|
<img src='https://raw.githubusercontent.com/Supergiovane/node-red-contrib-boolean-logic-ultimate/master/img/Inject.png' width='60%'>
|
|
313
321
|
|
|
@@ -357,24 +365,24 @@ The pourpose of this node is to send a sequence of pulsed commands to for exampl
|
|
|
357
365
|
|
|
358
366
|
### NODE CONFIGURATION
|
|
359
367
|
|
|
360
|
-
| Property | Description
|
|
361
|
-
| -------- |
|
|
362
|
-
| Input | It's the msg property to be evaluated.
|
|
368
|
+
| Property | Description |
|
|
369
|
+
| -------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
370
|
+
| Input | It's the msg property to be evaluated. _By default, it is "payload", but you can also specify other properties, for example "payload.value"_ |
|
|
363
371
|
|
|
364
372
|
<br/>
|
|
365
373
|
|
|
366
374
|
**Avaiable Commands**<br />
|
|
367
375
|
|
|
368
|
-
Commands are to be wrote in the format: command:value. For example
|
|
376
|
+
Commands are to be wrote in the format: command:value. For example **_send:200_**, **_wait:2000_**. Each row represents a command.<br />
|
|
369
377
|
|
|
370
378
|
<br /><b>send</b><br />
|
|
371
|
-
sends a value. For example:
|
|
379
|
+
sends a value. For example: **_send:true_** or **_send:100_** or **_send:Hello_**<br />
|
|
372
380
|
<br /><b>wait</b><br />
|
|
373
|
-
wait for specified time (in milliseconds). For example
|
|
381
|
+
wait for specified time (in milliseconds). For example **_wait:500_** waits for 500 milliseconds<br />
|
|
374
382
|
<br /><b>restart</b><br />
|
|
375
|
-
Restart the sequence from the beginning. Use
|
|
383
|
+
Restart the sequence from the beginning. Use **_restart_** alone, without **:** and extra value. For example **_restart_** <br />
|
|
376
384
|
<br /><b>//</b><br />
|
|
377
|
-
comment. For example:
|
|
385
|
+
comment. For example: **_// This opens the garage_**. The comment are ignored, so you can write what you want.<br />
|
|
378
386
|
<br />
|
|
379
387
|
|
|
380
388
|
Pass <code>msg.payload = true</code> to the node to start the sequence</br>
|
|
@@ -404,9 +412,9 @@ The pourpose of this node is to do maths on the incoming values. Each incoming m
|
|
|
404
412
|
|
|
405
413
|
### NODE CONFIGURATION
|
|
406
414
|
|
|
407
|
-
| Property | Description
|
|
408
|
-
| -------- |
|
|
409
|
-
| Input | It's the msg property to be evaluated.
|
|
415
|
+
| Property | Description |
|
|
416
|
+
| -------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
417
|
+
| Input | It's the msg property to be evaluated. _By default, it is "payload", but you can also specify other properties, for example "payload.value"_ |
|
|
410
418
|
|
|
411
419
|
<br/>
|
|
412
420
|
|
|
@@ -441,9 +449,9 @@ The pourpose of this node is to toggle between true/false, everytime an inboud m
|
|
|
441
449
|
|
|
442
450
|
### NODE CONFIGURATION
|
|
443
451
|
|
|
444
|
-
| Property | Description
|
|
445
|
-
| -------- |
|
|
446
|
-
| Input | It's the msg property to be evaluated.
|
|
452
|
+
| Property | Description |
|
|
453
|
+
| -------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
454
|
+
| Input | It's the msg property to be evaluated. _By default, it is "payload", but you can also specify other properties, for example "payload.value"_ |
|
|
447
455
|
|
|
448
456
|
<br/>
|
|
449
457
|
|
|
@@ -465,16 +473,16 @@ The railway switcher, redirect the incoming messages to one ot the avaiable outp
|
|
|
465
473
|
|
|
466
474
|
### NODE CONFIGURATION
|
|
467
475
|
|
|
468
|
-
| Property | Description
|
|
469
|
-
| -------------- |
|
|
470
|
-
| Switcher topic | Whenever the node receives a payload from this **topic**, it redirects the input messages to a choosen output PIN.
|
|
471
|
-
| Output pins | Number of output pins (outputs) to show. Default is 5, range is 1..10.
|
|
472
|
-
| With Input | It's the msg property to be evaluated.
|
|
473
|
-
| Translator | Translates the incoming <code>payload</code> value. This allows the compatibility with, for example, **HomeAssistant** nodes.
|
|
476
|
+
| Property | Description |
|
|
477
|
+
| -------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
478
|
+
| Switcher topic | Whenever the node receives a payload from this **topic**, it redirects the input messages to a choosen output PIN. |
|
|
479
|
+
| Output pins | Number of output pins (outputs) to show. Default is 5, range is 1..10. |
|
|
480
|
+
| With Input | It's the msg property to be evaluated. _By default, it is "payload", but you can also specify other properties, for example "payload.value"_ |
|
|
481
|
+
| Translator | Translates the incoming <code>payload</code> value. This allows the compatibility with, for example, **HomeAssistant** nodes. |
|
|
474
482
|
|
|
475
483
|
### Inputs
|
|
476
484
|
|
|
477
|
-
The
|
|
485
|
+
The _Switcher topic_ controls where the railway switch must be switched, between the output PINs.
|
|
478
486
|
|
|
479
487
|
Once an output PIN has been choosen, all messages passing through the node will be deviated to te choosen output PIN.
|
|
480
488
|
|
|
@@ -484,36 +492,36 @@ Once an output PIN has been choosen, all messages passing through the node will
|
|
|
484
492
|
|
|
485
493
|
### JSON switcher message
|
|
486
494
|
|
|
487
|
-
Take the example where you choosen such properties:
|
|
495
|
+
Take the example where you choosen such properties:
|
|
488
496
|
|
|
489
|
-
**Switcher topic**: "switcher"
|
|
497
|
+
**Switcher topic**: "switcher"
|
|
490
498
|
|
|
491
|
-
**With Input**: "payload"
|
|
499
|
+
**With Input**: "payload"
|
|
492
500
|
|
|
493
|
-
this JSON input message redirects all input messages to the first PIN
|
|
501
|
+
this JSON input message redirects all input messages to the first PIN
|
|
494
502
|
|
|
495
503
|
```json
|
|
496
504
|
{
|
|
497
|
-
|
|
498
|
-
|
|
505
|
+
"topic": "switcher",
|
|
506
|
+
"payload": 0
|
|
499
507
|
}
|
|
500
508
|
```
|
|
501
509
|
|
|
502
|
-
this JSON input message redirects all input messages to the second PIN
|
|
510
|
+
this JSON input message redirects all input messages to the second PIN
|
|
503
511
|
|
|
504
512
|
```json
|
|
505
513
|
{
|
|
506
|
-
|
|
507
|
-
|
|
514
|
+
"topic": "switcher",
|
|
515
|
+
"payload": 1
|
|
508
516
|
}
|
|
509
517
|
```
|
|
510
518
|
|
|
511
|
-
this JSON input message redirects all input messages to the third PIN, and so on...
|
|
519
|
+
this JSON input message redirects all input messages to the third PIN, and so on...
|
|
512
520
|
|
|
513
521
|
```json
|
|
514
522
|
{
|
|
515
|
-
|
|
516
|
-
|
|
523
|
+
"topic": "switcher",
|
|
524
|
+
"payload": 2
|
|
517
525
|
}
|
|
518
526
|
```
|
|
519
527
|
|
|
@@ -526,7 +534,92 @@ See the example below.<br/>
|
|
|
526
534
|
Copy and paste it into your flow
|
|
527
535
|
|
|
528
536
|
```javascript
|
|
529
|
-
[
|
|
537
|
+
[
|
|
538
|
+
{
|
|
539
|
+
id: "8243309f7c926112",
|
|
540
|
+
type: "RailwaySwitchUltimate",
|
|
541
|
+
z: "aa3efc585a6c7b9b",
|
|
542
|
+
name: "Railway Switch",
|
|
543
|
+
triggertopic: "switcher",
|
|
544
|
+
outputs: 5,
|
|
545
|
+
initializewith: "3",
|
|
546
|
+
payloadPropName: "payload",
|
|
547
|
+
translatorConfig: "",
|
|
548
|
+
x: 350,
|
|
549
|
+
y: 260,
|
|
550
|
+
wires: [["7f5a2c19a9ef64c8"], ["5a35a650b225d910"], [], [], []],
|
|
551
|
+
},
|
|
552
|
+
{
|
|
553
|
+
id: "d7bbc077bc20f4ea",
|
|
554
|
+
type: "InjectUltimate",
|
|
555
|
+
z: "aa3efc585a6c7b9b",
|
|
556
|
+
name: "Junction switcher to Rail 0",
|
|
557
|
+
topic: "",
|
|
558
|
+
curVal: true,
|
|
559
|
+
outputJSON: '{ \n\t"payload":0,\n\t"topic":"switcher"\n}',
|
|
560
|
+
x: 350,
|
|
561
|
+
y: 80,
|
|
562
|
+
wires: [[], [], [], ["8243309f7c926112"]],
|
|
563
|
+
},
|
|
564
|
+
{
|
|
565
|
+
id: "5656d0c2ba66ed5e",
|
|
566
|
+
type: "InjectUltimate",
|
|
567
|
+
z: "aa3efc585a6c7b9b",
|
|
568
|
+
name: "Junction switcher to Rail 1",
|
|
569
|
+
topic: "",
|
|
570
|
+
curVal: true,
|
|
571
|
+
outputJSON: '{ \n\t"payload":"1",\n\t"topic":"switcher"\n}',
|
|
572
|
+
x: 350,
|
|
573
|
+
y: 160,
|
|
574
|
+
wires: [[], [], [], ["8243309f7c926112"]],
|
|
575
|
+
},
|
|
576
|
+
{
|
|
577
|
+
id: "2253336fa8374c78",
|
|
578
|
+
type: "InjectUltimate",
|
|
579
|
+
z: "aa3efc585a6c7b9b",
|
|
580
|
+
name: "Train",
|
|
581
|
+
topic: "",
|
|
582
|
+
curVal: true,
|
|
583
|
+
outputJSON: '{ \n\t"payload":"hello",\n\t"topic":"I\'m a train!"\n}',
|
|
584
|
+
x: 110,
|
|
585
|
+
y: 280,
|
|
586
|
+
wires: [["8243309f7c926112"], [], [], []],
|
|
587
|
+
},
|
|
588
|
+
{
|
|
589
|
+
id: "7f5a2c19a9ef64c8",
|
|
590
|
+
type: "debug",
|
|
591
|
+
z: "aa3efc585a6c7b9b",
|
|
592
|
+
name: "Rail 0",
|
|
593
|
+
active: true,
|
|
594
|
+
tosidebar: true,
|
|
595
|
+
console: false,
|
|
596
|
+
tostatus: true,
|
|
597
|
+
complete: "payload",
|
|
598
|
+
targetType: "msg",
|
|
599
|
+
statusVal: "payload",
|
|
600
|
+
statusType: "auto",
|
|
601
|
+
x: 590,
|
|
602
|
+
y: 260,
|
|
603
|
+
wires: [],
|
|
604
|
+
},
|
|
605
|
+
{
|
|
606
|
+
id: "5a35a650b225d910",
|
|
607
|
+
type: "debug",
|
|
608
|
+
z: "aa3efc585a6c7b9b",
|
|
609
|
+
name: "Rail 1",
|
|
610
|
+
active: true,
|
|
611
|
+
tosidebar: true,
|
|
612
|
+
console: false,
|
|
613
|
+
tostatus: true,
|
|
614
|
+
complete: "payload",
|
|
615
|
+
targetType: "msg",
|
|
616
|
+
statusVal: "payload",
|
|
617
|
+
statusType: "auto",
|
|
618
|
+
x: 590,
|
|
619
|
+
y: 300,
|
|
620
|
+
wires: [],
|
|
621
|
+
},
|
|
622
|
+
];
|
|
530
623
|
```
|
|
531
624
|
|
|
532
625
|
<br/>
|
|
@@ -538,25 +631,24 @@ Copy and paste it into your flow
|
|
|
538
631
|
|
|
539
632
|
## Outputs the Kalman filtered input.
|
|
540
633
|
|
|
541
|
-
Please refer to [this](https://github.com/wouterbulten/kalmanjs) link, on how it works.
|
|
542
|
-
|
|
543
|
-
|
|
634
|
+
Please refer to [this](https://github.com/wouterbulten/kalmanjs) link, on how it works.
|
|
544
635
|
|
|
545
636
|

|
|
546
637
|
|
|
547
|
-
| Property
|
|
548
|
-
|
|
|
549
|
-
| Input
|
|
550
|
-
| Measurement noise | Kalman's <code>R</code> parameter.
|
|
551
|
-
| Process noise | Kalman's <code>Q</code> parameter.
|
|
552
|
-
| Translator Input
|
|
638
|
+
| Property | Description |
|
|
639
|
+
| ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
640
|
+
| Input | It's the msg property to be evaluated. _By default, it is "payload", but you can also specify other properties, for example "payload.value"_ |
|
|
641
|
+
| Measurement noise | Kalman's <code>R</code> parameter. |
|
|
642
|
+
| Process noise | Kalman's <code>Q</code> parameter. |
|
|
643
|
+
| Translator Input | Translates the incoming <code>payload</code> value, to true/false. This allows the compatibility with, for example, **HomeAssistant** nodes. |
|
|
553
644
|
|
|
554
645
|
<br/>
|
|
555
646
|
|
|
556
647
|
### Inputs
|
|
557
648
|
|
|
558
649
|
: reset (any) : by passing msg.reset, the Kalman filter will be reset.
|
|
559
|
-
|
|
650
|
+
|
|
651
|
+
: payload (number) : the payload containing the number. If you've changed the incoming evaluation property in the **_Input_** field, the number to be evaluated must be put in such message's property, instead of the _payload_ property.
|
|
560
652
|
|
|
561
653
|
<br/>
|
|
562
654
|
|
|
@@ -566,20 +658,20 @@ Gateway per sensori e dispositivi troppo “chiacchieroni”: limita burst e rim
|
|
|
566
658
|
|
|
567
659
|
### NODE CONFIGURATION
|
|
568
660
|
|
|
569
|
-
| Property
|
|
570
|
-
|
|
|
571
|
-
| Mode
|
|
572
|
-
| Wait (ms)
|
|
573
|
-
| Emit
|
|
574
|
-
| Interval (ms)
|
|
575
|
-
| Emit trailing
|
|
576
|
-
| Window size (ms) | Larghezza della finestra mobile in modalità window.
|
|
577
|
-
| Max messages
|
|
578
|
-
| On limit
|
|
579
|
-
| Control topic
|
|
580
|
-
| With Input
|
|
581
|
-
| Stats every (s)
|
|
582
|
-
| Translator
|
|
661
|
+
| Property | Description |
|
|
662
|
+
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
663
|
+
| Mode | Seleziona la logica: _Debounce_ (attende quiete), _Throttle_ (impone un intervallo minimo), _Window_ (massimo N messaggi per finestra temporale). |
|
|
664
|
+
| Wait (ms) | Ritardo di quiete per la modalità debounce. |
|
|
665
|
+
| Emit | Per debounce: scegli tra _Leading_ (subito), _Trailing_ (ultimo), _Both_. |
|
|
666
|
+
| Interval (ms) | Intervallo minimo tra messaggi in modalità throttle. |
|
|
667
|
+
| Emit trailing | In throttle, inoltra l’ultimo messaggio ricevuto allo scadere dell’intervallo. |
|
|
668
|
+
| Window size (ms) | Larghezza della finestra mobile in modalità window. |
|
|
669
|
+
| Max messages | Numero di messaggi ammessi nella finestra. |
|
|
670
|
+
| On limit | _Drop_ scarta i messaggi extra, _Queue last_ accoda l’ultimo e lo riproduce appena possibile. |
|
|
671
|
+
| Control topic | Topic dei messaggi di controllo (default `rate`). |
|
|
672
|
+
| With Input | Proprietà del messaggio da monitorare (default `msg.payload`). |
|
|
673
|
+
| Stats every (s) | Ogni quanti secondi emettere un riepilogo statistico (0 = disattivato). |
|
|
674
|
+
| Translator | Nodo translator-config opzionale per adattare le stringhe d’ingresso a true/false. |
|
|
583
675
|
|
|
584
676
|
<br/>
|
|
585
677
|
|
|
@@ -605,16 +697,16 @@ The purpose of this node is to replay a programmable sequence of messages in ord
|
|
|
605
697
|
|
|
606
698
|
### NODE CONFIGURATION
|
|
607
699
|
|
|
608
|
-
| Property
|
|
609
|
-
|
|
|
610
|
-
| Control topic | Topic used for runtime commands such as start/stop/reset.
|
|
611
|
-
| Auto start
|
|
612
|
-
| Loop sequence | Repeats the sequence when it reaches the end.
|
|
613
|
-
| Random delays | Enables a random variation of the programmed delays.
|
|
614
|
-
| Jitter (%)
|
|
615
|
-
| With Input
|
|
616
|
-
| Translator
|
|
617
|
-
| Sequence
|
|
700
|
+
| Property | Description |
|
|
701
|
+
| ------------- | ---------------------------------------------------------------------------------------------- |
|
|
702
|
+
| Control topic | Topic used for runtime commands such as start/stop/reset. |
|
|
703
|
+
| Auto start | Starts the sequence automatically after deploy or restart. |
|
|
704
|
+
| Loop sequence | Repeats the sequence when it reaches the end. |
|
|
705
|
+
| Random delays | Enables a random variation of the programmed delays. |
|
|
706
|
+
| Jitter (%) | Maximum percentage of variation applied when random delays are enabled. |
|
|
707
|
+
| With Input | Message property to inspect for inline events (default `payload`). |
|
|
708
|
+
| Translator | Optional translator-config to convert incoming values. |
|
|
709
|
+
| Sequence | One JSON object per line, each containing at least `delay` (ms) plus the properties to output. |
|
|
618
710
|
|
|
619
711
|
### CONTROL MESSAGES (`msg.topic === controlTopic`)
|
|
620
712
|
|
|
@@ -628,24 +720,81 @@ Each event in the sequence outputs a message configured in the JSON line. When r
|
|
|
628
720
|
|
|
629
721
|
<br/>
|
|
630
722
|
|
|
723
|
+
# ALARM SYSTEM ULTIMATE (BETA)
|
|
724
|
+
|
|
725
|
+
This node implements an alarm control panel with multi-mode arming, zones, entry/exit delays, bypass, tamper/fire 24h zones, siren control, status and event log.
|
|
726
|
+
|
|
727
|
+
Example flow: [`examples/AlarmSystemUltimate.json`](examples/AlarmSystemUltimate.json)
|
|
728
|
+
|
|
729
|
+
### NODE CONFIGURATION
|
|
730
|
+
|
|
731
|
+
| Property | Description |
|
|
732
|
+
| --------------------------- | ------------------------------------------------------------------------------------------------------------ |
|
|
733
|
+
| Control topic | Topic that receives runtime commands such as arm/disarm/status/bypass. |
|
|
734
|
+
| With Input | Message property evaluated as sensor value (default `payload`). |
|
|
735
|
+
| Persist state | Persists arming mode, bypass list and last log entries across restarts. |
|
|
736
|
+
| Require code for arm/disarm | Enables PIN checks using `msg.code` (or `msg.pin`). |
|
|
737
|
+
| Exit/Entry delay (s) | Global exit/entry delays (each zone can override entry delay). |
|
|
738
|
+
| Siren topic | Topic used on output 2 to turn the siren on/off. |
|
|
739
|
+
| Siren payloads | Values emitted on output 2 for siren on/off (typed). |
|
|
740
|
+
| Siren duration (s) | Auto stop duration (0 = latch until disarm). |
|
|
741
|
+
| Emit restore events | Emits `zone_restore` when a zone returns to false. |
|
|
742
|
+
| Event log size | Max stored log entries in node context. |
|
|
743
|
+
| Zones | One JSON object per line (legacy) or a JSON array (formatted). Use **Format** in the editor to pretty-print. |
|
|
744
|
+
|
|
745
|
+
Esempio JSON di una zona:
|
|
746
|
+
|
|
747
|
+
```json
|
|
748
|
+
{
|
|
749
|
+
"id": "front_door",
|
|
750
|
+
"name": "Front Door",
|
|
751
|
+
"topic": "house/door/front",
|
|
752
|
+
"type": "perimeter",
|
|
753
|
+
"modes": ["away", "night"],
|
|
754
|
+
"entry": true,
|
|
755
|
+
"entryDelaySeconds": 30,
|
|
756
|
+
"bypassable": true,
|
|
757
|
+
"chime": true
|
|
758
|
+
}
|
|
759
|
+
```
|
|
760
|
+
|
|
761
|
+
### OUTPUTS
|
|
762
|
+
|
|
763
|
+
- Output 1 (Events): `msg.topic = <controlTopic>/event`, with `msg.event` and `msg.payload` (state + details).
|
|
764
|
+
- Output 2 (Siren): emits siren on/off commands on `sirenTopic` with the configured payloads.
|
|
765
|
+
|
|
766
|
+
### CONTROL MESSAGES (`msg.topic === controlTopic`)
|
|
767
|
+
|
|
768
|
+
- Arm: `msg.command = 'arm_away'|'arm_home'|'arm_night'` or `msg.arm = 'away'|'home'|'night'`
|
|
769
|
+
- Disarm: `msg.command = 'disarm'` or `msg.disarm = true`
|
|
770
|
+
- Status: `msg.command = 'status'` or `msg.status = true`
|
|
771
|
+
- Bypass: `msg.command = 'bypass'|'unbypass'` with `msg.zone = '<zone id>'`
|
|
772
|
+
- Panic: `msg.command = 'panic'` or `msg.command = 'panic_silent'`
|
|
773
|
+
- Siren: `msg.command = 'siren_on'|'siren_off'`
|
|
774
|
+
- Reset: `msg.command = 'reset'` or `msg.reset = true`
|
|
775
|
+
|
|
776
|
+
When codes are enabled, pass `msg.code` (or `msg.pin`). If `duressCode` matches, the node raises a silent duress alarm event.
|
|
777
|
+
|
|
778
|
+
<br/>
|
|
779
|
+
|
|
631
780
|
# STAIRCASE LIGHT ULTIMATE
|
|
632
781
|
|
|
633
782
|
The purpose of this node is to control staircase lighting with a timer, pre-off warning and optional extension on every trigger.
|
|
634
783
|
|
|
635
784
|
### NODE CONFIGURATION
|
|
636
785
|
|
|
637
|
-
| Property
|
|
638
|
-
|
|
|
639
|
-
| Control topic
|
|
640
|
-
| Duration (s)
|
|
641
|
-
| Warning before off | Enables emission of a pre-off warning on output 2.
|
|
642
|
-
| Warning offset (s) | Seconds before switch-off when the warning is sent.
|
|
643
|
-
| Restart on trigger | Restarts the timer when a new trigger arrives while active.
|
|
644
|
-
| Allow off input
|
|
645
|
-
| With Input
|
|
646
|
-
| Translator
|
|
647
|
-
| On/Off payload
|
|
648
|
-
| Warning payload
|
|
786
|
+
| Property | Description |
|
|
787
|
+
| ------------------ | ------------------------------------------------------------------ |
|
|
788
|
+
| Control topic | Topic that receives manual commands such as `on`, `off`, `extend`. |
|
|
789
|
+
| Duration (s) | Lighting duration for each trigger. |
|
|
790
|
+
| Warning before off | Enables emission of a pre-off warning on output 2. |
|
|
791
|
+
| Warning offset (s) | Seconds before switch-off when the warning is sent. |
|
|
792
|
+
| Restart on trigger | Restarts the timer when a new trigger arrives while active. |
|
|
793
|
+
| Allow off input | Allows a `false` from the main input to switch off immediately. |
|
|
794
|
+
| With Input | Message property evaluated as trigger (default `payload`). |
|
|
795
|
+
| Translator | Optional translator-config for true/false conversion. |
|
|
796
|
+
| On/Off payload | Values emitted on output 1 to turn the light on/off. |
|
|
797
|
+
| Warning payload | Value emitted on output 2 when the warning fires. |
|
|
649
798
|
|
|
650
799
|
### CONTROL MESSAGES (`msg.topic === controlTopic`)
|
|
651
800
|
|
|
@@ -658,27 +807,11 @@ Output 1 delivers the ON/OFF command. Output 2 delivers the warning and includes
|
|
|
658
807
|
|
|
659
808
|
<br/>
|
|
660
809
|
|
|
661
|
-
# DEVELOPMENT
|
|
662
|
-
|
|
663
|
-
Per eseguire i test automatici:
|
|
664
|
-
|
|
665
|
-
1. `npm install`
|
|
666
|
-
2. `npm test`
|
|
667
|
-
|
|
668
|
-
<br/>
|
|
669
|
-
|
|
670
810
|
[license-image]: https://img.shields.io/badge/license-MIT-blue.svg
|
|
671
|
-
|
|
672
811
|
[license-url]: https://github.com/Supergiovane/node-red-contrib-boolean-logic-ultimate/master/LICENSE
|
|
673
|
-
|
|
674
812
|
[npm-url]: https://npmjs.org/package/node-red-contrib-boolean-logic-ultimate
|
|
675
|
-
|
|
676
813
|
[npm-version-image]: https://img.shields.io/npm/v/node-red-contrib-boolean-logic-ultimate.svg
|
|
677
|
-
|
|
678
814
|
[npm-downloads-month-image]: https://img.shields.io/npm/dm/node-red-contrib-boolean-logic-ultimate.svg
|
|
679
|
-
|
|
680
815
|
[npm-downloads-total-image]: https://img.shields.io/npm/dt/node-red-contrib-boolean-logic-ultimate.svg
|
|
681
|
-
|
|
682
816
|
[youtube-image]: https://img.shields.io/badge/Visit%20me-youtube-red
|
|
683
|
-
|
|
684
817
|
[youtube-url]: https://youtube.com/playlist?list=PL9Yh1bjbLAYoRH4IyQB7EL5srHAihiKpy
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
<div class="form-row">
|
|
35
35
|
<b>Presence Simulator Ultimate</b>
|
|
36
36
|
<span style="color:red"><i class="fa fa-question-circle"></i> <a target="_blank" href="https://github.com/Supergiovane/node-red-contrib-boolean-logic-ultimate"><u>Help online</u></a></span>
|
|
37
|
+
<span style="color:red"><i class="fa fa-youtube-play"></i> <a target="_blank" href="https://youtu.be/VqI3Qeyx0Bg"><u>Youtube Sample</u></a></span>
|
|
37
38
|
</div>
|
|
38
39
|
|
|
39
40
|
<div class="form-row">
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
<div class="form-row">
|
|
60
60
|
<b>Rate Limiter Ultimate</b>
|
|
61
61
|
<span style="color:red"><i class="fa fa-question-circle"></i> <a target="_blank" href="https://github.com/Supergiovane/node-red-contrib-boolean-logic-ultimate"><u>Help online</u></a></span>
|
|
62
|
-
<span style="color:red"><i class="fa fa-youtube-play"></i> <a target="_blank" href="https://youtu.be/
|
|
62
|
+
<span style="color:red"><i class="fa fa-youtube-play"></i> <a target="_blank" href="https://youtu.be/_L1tIbxmqRI"><u>Youtube Sample</u></a></span>
|
|
63
63
|
</div>
|
|
64
64
|
|
|
65
65
|
<div class="form-row">
|
|
@@ -161,4 +161,4 @@ The purpose of this node is to moderate the frequency of incoming messages.
|
|
|
161
161
|
- `msg.interval`, `msg.wait`, `msg.windowSize`, `msg.maxInWindow` – adjust the related thresholds.
|
|
162
162
|
|
|
163
163
|
The **With Input** field selects which message property to evaluate (default `msg.payload`). When configured, it can be translated through the **translator-config** node for Home Assistant compatibility.
|
|
164
|
-
</script>
|
|
164
|
+
</script>
|
|
@@ -64,6 +64,7 @@
|
|
|
64
64
|
<div class="form-row">
|
|
65
65
|
<b>Staircase Light Ultimate</b>
|
|
66
66
|
<span style="color:red"><i class="fa fa-question-circle"></i> <a target="_blank" href="https://github.com/Supergiovane/node-red-contrib-boolean-logic-ultimate"><u>Help online</u></a></span>
|
|
67
|
+
<span style="color:red"><i class="fa fa-youtube-play"></i> <a target="_blank" href="https://youtu.be/W8iwIqOSB30"><u>Youtube Sample</u></a></span>
|
|
67
68
|
</div>
|
|
68
69
|
|
|
69
70
|
<div class="form-row">
|
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"id": "al_tab_1",
|
|
4
|
+
"type": "tab",
|
|
5
|
+
"label": "AlarmSystemUltimate - demo base",
|
|
6
|
+
"disabled": false,
|
|
7
|
+
"info": "Esempio per il nodo ALARM (Alarm System Ultimate - BETA): armo/disarmo, bypass zone, trigger sensori, eventi e sirena."
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"id": "al_cmt_1",
|
|
11
|
+
"type": "comment",
|
|
12
|
+
"z": "al_tab_1",
|
|
13
|
+
"name": "Topic di controllo = alarm | Topic sirena = siren",
|
|
14
|
+
"info": "Comandi principali (topic=alarm): arm_away/arm_home/arm_night, disarm, status, bypass/unbypass (con msg.zone). I sensori entrano con msg.topic uguale a quello configurato nelle zone e payload booleano true/false.",
|
|
15
|
+
"x": 260,
|
|
16
|
+
"y": 60,
|
|
17
|
+
"wires": []
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"id": "al_inj_arm_away",
|
|
21
|
+
"type": "inject",
|
|
22
|
+
"z": "al_tab_1",
|
|
23
|
+
"name": "ARM AWAY (code=1234)",
|
|
24
|
+
"props": [
|
|
25
|
+
{ "p": "topic", "v": "alarm", "vt": "str" },
|
|
26
|
+
{ "p": "command", "v": "arm_away", "vt": "str" },
|
|
27
|
+
{ "p": "code", "v": "1234", "vt": "str" }
|
|
28
|
+
],
|
|
29
|
+
"repeat": "",
|
|
30
|
+
"crontab": "",
|
|
31
|
+
"once": false,
|
|
32
|
+
"onceDelay": 0.1,
|
|
33
|
+
"x": 160,
|
|
34
|
+
"y": 140,
|
|
35
|
+
"wires": [["al_alarm_1"]]
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"id": "al_inj_arm_home",
|
|
39
|
+
"type": "inject",
|
|
40
|
+
"z": "al_tab_1",
|
|
41
|
+
"name": "ARM HOME (code=1234)",
|
|
42
|
+
"props": [
|
|
43
|
+
{ "p": "topic", "v": "alarm", "vt": "str" },
|
|
44
|
+
{ "p": "command", "v": "arm_home", "vt": "str" },
|
|
45
|
+
{ "p": "code", "v": "1234", "vt": "str" }
|
|
46
|
+
],
|
|
47
|
+
"repeat": "",
|
|
48
|
+
"crontab": "",
|
|
49
|
+
"once": false,
|
|
50
|
+
"onceDelay": 0.1,
|
|
51
|
+
"x": 160,
|
|
52
|
+
"y": 180,
|
|
53
|
+
"wires": [["al_alarm_1"]]
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"id": "al_inj_disarm",
|
|
57
|
+
"type": "inject",
|
|
58
|
+
"z": "al_tab_1",
|
|
59
|
+
"name": "DISARM (code=1234)",
|
|
60
|
+
"props": [
|
|
61
|
+
{ "p": "topic", "v": "alarm", "vt": "str" },
|
|
62
|
+
{ "p": "command", "v": "disarm", "vt": "str" },
|
|
63
|
+
{ "p": "code", "v": "1234", "vt": "str" }
|
|
64
|
+
],
|
|
65
|
+
"repeat": "",
|
|
66
|
+
"crontab": "",
|
|
67
|
+
"once": false,
|
|
68
|
+
"onceDelay": 0.1,
|
|
69
|
+
"x": 160,
|
|
70
|
+
"y": 220,
|
|
71
|
+
"wires": [["al_alarm_1"]]
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"id": "al_inj_status",
|
|
75
|
+
"type": "inject",
|
|
76
|
+
"z": "al_tab_1",
|
|
77
|
+
"name": "STATUS",
|
|
78
|
+
"props": [
|
|
79
|
+
{ "p": "topic", "v": "alarm", "vt": "str" },
|
|
80
|
+
{ "p": "command", "v": "status", "vt": "str" }
|
|
81
|
+
],
|
|
82
|
+
"repeat": "",
|
|
83
|
+
"crontab": "",
|
|
84
|
+
"once": false,
|
|
85
|
+
"onceDelay": 0.1,
|
|
86
|
+
"x": 110,
|
|
87
|
+
"y": 260,
|
|
88
|
+
"wires": [["al_alarm_1"]]
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"id": "al_inj_bypass_front",
|
|
92
|
+
"type": "inject",
|
|
93
|
+
"z": "al_tab_1",
|
|
94
|
+
"name": "BYPASS front_door",
|
|
95
|
+
"props": [
|
|
96
|
+
{ "p": "topic", "v": "alarm", "vt": "str" },
|
|
97
|
+
{ "p": "command", "v": "bypass", "vt": "str" },
|
|
98
|
+
{ "p": "zone", "v": "front_door", "vt": "str" }
|
|
99
|
+
],
|
|
100
|
+
"repeat": "",
|
|
101
|
+
"crontab": "",
|
|
102
|
+
"once": false,
|
|
103
|
+
"onceDelay": 0.1,
|
|
104
|
+
"x": 140,
|
|
105
|
+
"y": 320,
|
|
106
|
+
"wires": [["al_alarm_1"]]
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"id": "al_inj_unbypass_front",
|
|
110
|
+
"type": "inject",
|
|
111
|
+
"z": "al_tab_1",
|
|
112
|
+
"name": "UNBYPASS front_door",
|
|
113
|
+
"props": [
|
|
114
|
+
{ "p": "topic", "v": "alarm", "vt": "str" },
|
|
115
|
+
{ "p": "command", "v": "unbypass", "vt": "str" },
|
|
116
|
+
{ "p": "zone", "v": "front_door", "vt": "str" }
|
|
117
|
+
],
|
|
118
|
+
"repeat": "",
|
|
119
|
+
"crontab": "",
|
|
120
|
+
"once": false,
|
|
121
|
+
"onceDelay": 0.1,
|
|
122
|
+
"x": 150,
|
|
123
|
+
"y": 360,
|
|
124
|
+
"wires": [["al_alarm_1"]]
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"id": "al_cmt_2",
|
|
128
|
+
"type": "comment",
|
|
129
|
+
"z": "al_tab_1",
|
|
130
|
+
"name": "Sensori (topic = zona) | payload true = trigger | payload false = restore",
|
|
131
|
+
"info": "La zona front_door è con entry delay e chime quando disarmata. pir_living è attiva solo in away. smoke è fire 24/7 (sempre attiva).",
|
|
132
|
+
"x": 320,
|
|
133
|
+
"y": 420,
|
|
134
|
+
"wires": []
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"id": "al_inj_front_open",
|
|
138
|
+
"type": "inject",
|
|
139
|
+
"z": "al_tab_1",
|
|
140
|
+
"name": "Front door OPEN (true)",
|
|
141
|
+
"props": [
|
|
142
|
+
{ "p": "topic", "v": "sensor/frontdoor", "vt": "str" },
|
|
143
|
+
{ "p": "payload", "v": "true", "vt": "bool" }
|
|
144
|
+
],
|
|
145
|
+
"repeat": "",
|
|
146
|
+
"crontab": "",
|
|
147
|
+
"once": false,
|
|
148
|
+
"onceDelay": 0.1,
|
|
149
|
+
"x": 170,
|
|
150
|
+
"y": 500,
|
|
151
|
+
"wires": [["al_alarm_1"]]
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"id": "al_inj_front_close",
|
|
155
|
+
"type": "inject",
|
|
156
|
+
"z": "al_tab_1",
|
|
157
|
+
"name": "Front door CLOSE (false)",
|
|
158
|
+
"props": [
|
|
159
|
+
{ "p": "topic", "v": "sensor/frontdoor", "vt": "str" },
|
|
160
|
+
{ "p": "payload", "v": "false", "vt": "bool" }
|
|
161
|
+
],
|
|
162
|
+
"repeat": "",
|
|
163
|
+
"crontab": "",
|
|
164
|
+
"once": false,
|
|
165
|
+
"onceDelay": 0.1,
|
|
166
|
+
"x": 180,
|
|
167
|
+
"y": 540,
|
|
168
|
+
"wires": [["al_alarm_1"]]
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"id": "al_inj_pir",
|
|
172
|
+
"type": "inject",
|
|
173
|
+
"z": "al_tab_1",
|
|
174
|
+
"name": "PIR living (true)",
|
|
175
|
+
"props": [
|
|
176
|
+
{ "p": "topic", "v": "sensor/living_pir", "vt": "str" },
|
|
177
|
+
{ "p": "payload", "v": "true", "vt": "bool" }
|
|
178
|
+
],
|
|
179
|
+
"repeat": "",
|
|
180
|
+
"crontab": "",
|
|
181
|
+
"once": false,
|
|
182
|
+
"onceDelay": 0.1,
|
|
183
|
+
"x": 150,
|
|
184
|
+
"y": 600,
|
|
185
|
+
"wires": [["al_alarm_1"]]
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"id": "al_inj_smoke",
|
|
189
|
+
"type": "inject",
|
|
190
|
+
"z": "al_tab_1",
|
|
191
|
+
"name": "SMOKE (true)",
|
|
192
|
+
"props": [
|
|
193
|
+
{ "p": "topic", "v": "sensor/smoke", "vt": "str" },
|
|
194
|
+
{ "p": "payload", "v": "true", "vt": "bool" }
|
|
195
|
+
],
|
|
196
|
+
"repeat": "",
|
|
197
|
+
"crontab": "",
|
|
198
|
+
"once": false,
|
|
199
|
+
"onceDelay": 0.1,
|
|
200
|
+
"x": 130,
|
|
201
|
+
"y": 640,
|
|
202
|
+
"wires": [["al_alarm_1"]]
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
"id": "al_alarm_1",
|
|
206
|
+
"type": "AlarmSystemUltimate",
|
|
207
|
+
"z": "al_tab_1",
|
|
208
|
+
"name": "ALARM",
|
|
209
|
+
"controlTopic": "alarm",
|
|
210
|
+
"payloadPropName": "payload",
|
|
211
|
+
"translatorConfig": "",
|
|
212
|
+
"persistState": true,
|
|
213
|
+
"requireCodeForArm": true,
|
|
214
|
+
"requireCodeForDisarm": true,
|
|
215
|
+
"armCode": "1234",
|
|
216
|
+
"duressCode": "9999",
|
|
217
|
+
"blockArmOnViolations": true,
|
|
218
|
+
"exitDelaySeconds": 10,
|
|
219
|
+
"entryDelaySeconds": 5,
|
|
220
|
+
"sirenDurationSeconds": 15,
|
|
221
|
+
"sirenLatchUntilDisarm": false,
|
|
222
|
+
"sirenTopic": "siren",
|
|
223
|
+
"sirenOnPayload": true,
|
|
224
|
+
"sirenOnPayloadType": "bool",
|
|
225
|
+
"sirenOffPayload": false,
|
|
226
|
+
"sirenOffPayloadType": "bool",
|
|
227
|
+
"emitRestoreEvents": true,
|
|
228
|
+
"maxLogEntries": 50,
|
|
229
|
+
"zones": "{\"id\":\"front_door\",\"name\":\"Porta ingresso\",\"topic\":\"sensor/frontdoor\",\"type\":\"perimeter\",\"entry\":true,\"modes\":[\"away\",\"home\",\"night\"],\"bypassable\":true,\"chime\":true}\n{\"id\":\"pir_living\",\"name\":\"PIR soggiorno\",\"topic\":\"sensor/living_pir\",\"type\":\"motion\",\"modes\":[\"away\"],\"entry\":false,\"bypassable\":true,\"cooldownSeconds\":5}\n{\"id\":\"smoke\",\"name\":\"Fumo\",\"topic\":\"sensor/smoke\",\"type\":\"fire\",\"modes\":[],\"entry\":false,\"bypassable\":false}",
|
|
230
|
+
"x": 450,
|
|
231
|
+
"y": 280,
|
|
232
|
+
"wires": [["al_dbg_evt"], ["al_dbg_siren"]]
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
"id": "al_dbg_evt",
|
|
236
|
+
"type": "debug",
|
|
237
|
+
"z": "al_tab_1",
|
|
238
|
+
"name": "Events (output 1)",
|
|
239
|
+
"active": true,
|
|
240
|
+
"tosidebar": true,
|
|
241
|
+
"console": false,
|
|
242
|
+
"tostatus": false,
|
|
243
|
+
"complete": "true",
|
|
244
|
+
"targetType": "full",
|
|
245
|
+
"statusVal": "",
|
|
246
|
+
"statusType": "auto",
|
|
247
|
+
"x": 680,
|
|
248
|
+
"y": 260,
|
|
249
|
+
"wires": []
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
"id": "al_dbg_siren",
|
|
253
|
+
"type": "debug",
|
|
254
|
+
"z": "al_tab_1",
|
|
255
|
+
"name": "Siren (output 2)",
|
|
256
|
+
"active": true,
|
|
257
|
+
"tosidebar": true,
|
|
258
|
+
"console": false,
|
|
259
|
+
"tostatus": false,
|
|
260
|
+
"complete": "true",
|
|
261
|
+
"targetType": "full",
|
|
262
|
+
"statusVal": "",
|
|
263
|
+
"statusType": "auto",
|
|
264
|
+
"x": 680,
|
|
265
|
+
"y": 300,
|
|
266
|
+
"wires": []
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
"id": "al_inj_disarm_duress",
|
|
270
|
+
"type": "inject",
|
|
271
|
+
"z": "al_tab_1",
|
|
272
|
+
"name": "DISARM (DURESS 9999)",
|
|
273
|
+
"props": [
|
|
274
|
+
{ "p": "topic", "v": "alarm", "vt": "str" },
|
|
275
|
+
{ "p": "command", "v": "disarm", "vt": "str" },
|
|
276
|
+
{ "p": "code", "v": "9999", "vt": "str" }
|
|
277
|
+
],
|
|
278
|
+
"repeat": "",
|
|
279
|
+
"crontab": "",
|
|
280
|
+
"once": false,
|
|
281
|
+
"onceDelay": 0.1,
|
|
282
|
+
"x": 160,
|
|
283
|
+
"y": 400,
|
|
284
|
+
"wires": [["al_alarm_1"]]
|
|
285
|
+
}
|
|
286
|
+
]
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Examples
|
|
2
|
+
|
|
3
|
+
Importable Node-RED example flows (one JSON per node).
|
|
4
|
+
|
|
5
|
+
How to import:
|
|
6
|
+
|
|
7
|
+
- Node-RED editor → Menu (☰) → **Import** → **Examples** → `node-red-contrib-boolean-logic-ultimate`
|
|
8
|
+
|
|
9
|
+
## Available example flows
|
|
10
|
+
|
|
11
|
+
- `AlarmSystemUltimate.json` — Alarm System Ultimate (BETA)
|
|
12
|
+
- `BlinkerUltimate.json` — BlinkerUltimate
|
|
13
|
+
- `BooleanLogicUltimate.json` — BooleanLogicUltimate
|
|
14
|
+
- `Comparator.json` — Comparator
|
|
15
|
+
- `FilterUltimate.json` — FilterUltimate
|
|
16
|
+
- `ImpulseUltimate.json` — ImpulseUltimate
|
|
17
|
+
- `InjectUltimate.json` — InjectUltimate
|
|
18
|
+
- `InterruptFlowUltimate.json` — InterruptFlowUltimate
|
|
19
|
+
- `InvertUltimate.json` — InvertUltimate
|
|
20
|
+
- `KalmanFilterUltimate.json` — KalmanFilterUltimate
|
|
21
|
+
- `PresenceSimulatorUltimate.json` — PresenceSimulatorUltimate
|
|
22
|
+
- `RailwaySwitchUltimate.json` — RailwaySwitchUltimate
|
|
23
|
+
- `RateLimiterUltimate.json` — RateLimiterUltimate
|
|
24
|
+
- `SimpleOutputUltimate.json` — SimpleOutputUltimate
|
|
25
|
+
- `StaircaseLightUltimate.json` — StaircaseLightUltimate
|
|
26
|
+
- `StatusUltimate.json` — StatusUltimate
|
|
27
|
+
- `SumUltimate.json` — SumUltimate
|
|
28
|
+
- `toggleUltimate.json` — toggleUltimate
|
|
29
|
+
- `translator-config.json` — translator-config
|
|
30
|
+
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="1200" height="500" viewBox="0 0 1200 500" role="img" aria-label="Alarm System Ultimate illustration">
|
|
2
|
+
<defs>
|
|
3
|
+
<linearGradient id="g" x1="0" x2="1" y1="0" y2="1">
|
|
4
|
+
<stop offset="0" stop-color="#ff8080"/>
|
|
5
|
+
<stop offset="1" stop-color="#ff4d4d"/>
|
|
6
|
+
</linearGradient>
|
|
7
|
+
<filter id="shadow" x="-20%" y="-20%" width="140%" height="140%">
|
|
8
|
+
<feDropShadow dx="0" dy="10" stdDeviation="12" flood-color="#000" flood-opacity="0.25"/>
|
|
9
|
+
</filter>
|
|
10
|
+
</defs>
|
|
11
|
+
|
|
12
|
+
<rect x="0" y="0" width="1200" height="500" fill="#0b1220"/>
|
|
13
|
+
|
|
14
|
+
<g filter="url(#shadow)">
|
|
15
|
+
<rect x="90" y="70" width="1020" height="360" rx="28" fill="#111a2e" stroke="#263450" stroke-width="2"/>
|
|
16
|
+
</g>
|
|
17
|
+
|
|
18
|
+
<g transform="translate(140 120)">
|
|
19
|
+
<rect x="0" y="0" width="320" height="260" rx="22" fill="#0f1730" stroke="#2b3b5a" stroke-width="2"/>
|
|
20
|
+
<text x="22" y="44" fill="#cfe2ff" font-family="system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif" font-size="22" font-weight="700">ALARM PANEL</text>
|
|
21
|
+
|
|
22
|
+
<g transform="translate(24 70)">
|
|
23
|
+
<circle cx="16" cy="16" r="10" fill="url(#g)"/>
|
|
24
|
+
<text x="40" y="22" fill="#d9e6ff" font-family="system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif" font-size="16">Mode: Away</text>
|
|
25
|
+
|
|
26
|
+
<circle cx="16" cy="56" r="10" fill="#ffd166"/>
|
|
27
|
+
<text x="40" y="62" fill="#d9e6ff" font-family="system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif" font-size="16">Entry delay</text>
|
|
28
|
+
|
|
29
|
+
<circle cx="16" cy="96" r="10" fill="#64dfdf"/>
|
|
30
|
+
<text x="40" y="102" fill="#d9e6ff" font-family="system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif" font-size="16">Zones</text>
|
|
31
|
+
|
|
32
|
+
<rect x="0" y="126" width="272" height="90" rx="12" fill="#0b1220" stroke="#2b3b5a" stroke-width="2"/>
|
|
33
|
+
<text x="14" y="156" fill="#cfe2ff" font-family="ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace" font-size="13">front_door: true</text>
|
|
34
|
+
<text x="14" y="180" fill="#cfe2ff" font-family="ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace" font-size="13">pir_living: false</text>
|
|
35
|
+
<text x="14" y="204" fill="#cfe2ff" font-family="ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace" font-size="13">smoke: false</text>
|
|
36
|
+
</g>
|
|
37
|
+
</g>
|
|
38
|
+
|
|
39
|
+
<g transform="translate(520 110)">
|
|
40
|
+
<path d="M260 0c92 0 168 76 168 168 0 135-120 232-168 260-48-28-168-125-168-260C92 76 168 0 260 0z" fill="url(#g)" opacity="0.95"/>
|
|
41
|
+
<path d="M260 42c-70 0-126 56-126 126 0 104 84 184 126 208 42-24 126-104 126-208 0-70-56-126-126-126z" fill="#0b1220" opacity="0.25"/>
|
|
42
|
+
|
|
43
|
+
<g transform="translate(180 120)">
|
|
44
|
+
<path d="M80 0c38 0 70 32 70 70v14c0 8-6 14-14 14H24c-8 0-14-6-14-14V70C10 32 42 0 80 0z" fill="#0b1220" opacity="0.55"/>
|
|
45
|
+
<path d="M80 6c34 0 62 28 62 62v16H18V68C18 34 46 6 80 6z" fill="#ffffff" opacity="0.9"/>
|
|
46
|
+
<rect x="32" y="92" width="96" height="82" rx="18" fill="#ffffff" opacity="0.9"/>
|
|
47
|
+
<circle cx="80" cy="194" r="14" fill="#ffffff" opacity="0.9"/>
|
|
48
|
+
</g>
|
|
49
|
+
|
|
50
|
+
<text x="260" y="468" text-anchor="middle" fill="#cfe2ff" font-family="system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif" font-size="22" font-weight="700">Alarm System Ultimate</text>
|
|
51
|
+
<text x="260" y="494" text-anchor="middle" fill="#9fb7e0" font-family="system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif" font-size="14">Zones • Entry/Exit • Bypass • Siren</text>
|
|
52
|
+
</g>
|
|
53
|
+
|
|
54
|
+
<g transform="translate(900 140)">
|
|
55
|
+
<rect x="0" y="0" width="220" height="240" rx="22" fill="#0f1730" stroke="#2b3b5a" stroke-width="2"/>
|
|
56
|
+
<text x="20" y="42" fill="#cfe2ff" font-family="system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif" font-size="18" font-weight="700">SIREN</text>
|
|
57
|
+
|
|
58
|
+
<g transform="translate(40 70)">
|
|
59
|
+
<rect x="40" y="28" width="100" height="92" rx="18" fill="#ffffff" opacity="0.9"/>
|
|
60
|
+
<path d="M60 28c0-28 40-28 40 0" fill="none" stroke="#ffffff" stroke-width="10" opacity="0.9" stroke-linecap="round"/>
|
|
61
|
+
<path d="M26 84c-18 0-26 16-26 30 0 18 10 34 26 34" fill="none" stroke="#ffd166" stroke-width="10" stroke-linecap="round"/>
|
|
62
|
+
<path d="M154 84c18 0 26 16 26 30 0 18-10 34-26 34" fill="none" stroke="#ffd166" stroke-width="10" stroke-linecap="round"/>
|
|
63
|
+
</g>
|
|
64
|
+
|
|
65
|
+
<text x="20" y="210" fill="#9fb7e0" font-family="ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace" font-size="13">topic: siren</text>
|
|
66
|
+
<text x="20" y="232" fill="#9fb7e0" font-family="ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace" font-size="13">payload: true/false</text>
|
|
67
|
+
</g>
|
|
68
|
+
</svg>
|
|
69
|
+
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-red-contrib-boolean-logic-ultimate",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.8",
|
|
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": {
|