node-red-contrib-boolean-logic-ultimate 1.0.56 → 1.0.58
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 +9 -0
- package/README.md +20 -18
- package/boolean-logic-ultimate/BlinkerUltimate.html +14 -8
- package/boolean-logic-ultimate/BooleanLogicUltimate.html +15 -9
- package/boolean-logic-ultimate/FilterUltimate.html +12 -8
- package/boolean-logic-ultimate/ImpulseUltimate.html +27 -9
- package/boolean-logic-ultimate/InjectUltimate.html +6 -8
- package/boolean-logic-ultimate/InterruptFlowUltimate.html +19 -8
- package/boolean-logic-ultimate/InvertUltimate.html +10 -8
- package/boolean-logic-ultimate/RailwaySwitchUltimate.html +16 -8
- package/boolean-logic-ultimate/SimpleOutputUltimate.html +10 -8
- package/boolean-logic-ultimate/StatusUltimate.html +9 -9
- package/boolean-logic-ultimate/SumUltimate.html +9 -8
- package/boolean-logic-ultimate/toggleUltimate.html +12 -9
- package/boolean-logic-ultimate/utils.js +3 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,15 @@
|
|
|
3
3
|
|
|
4
4
|
# CHANGELOG
|
|
5
5
|
|
|
6
|
+
<p>
|
|
7
|
+
<b>Version 1.0.58</b> December 2022<br/>
|
|
8
|
+
- NEW: added string conversion from "home", "not_home" to boolean.</br>
|
|
9
|
+
- Updated the README</br>
|
|
10
|
+
</p>
|
|
11
|
+
<p>
|
|
12
|
+
<b>Version 1.0.57</b> September 2022<br/>
|
|
13
|
+
- Added node help in the node-red help tab.</br>
|
|
14
|
+
</p>
|
|
6
15
|
<p>
|
|
7
16
|
<b>Version 1.0.56</b> August 2022<br/>
|
|
8
17
|
- NEW: added string conversion from "true", "false", "0", "1", "close" to boolean.</br>
|
package/README.md
CHANGED
|
@@ -35,6 +35,8 @@ Other than true/false, all nodes accepts these strings and convert it to true/fa
|
|
|
35
35
|
| "false" | false |
|
|
36
36
|
| "1" | true |
|
|
37
37
|
| "0" | false |
|
|
38
|
+
| "home" | true |
|
|
39
|
+
| "not_home" | false |
|
|
38
40
|
|
|
39
41
|
|
|
40
42
|
<br/>
|
|
@@ -62,14 +64,14 @@ Other than true/false, all nodes accepts these strings and convert it to true/fa
|
|
|
62
64
|
The node performs Boolean logic on the incoming payloads.<br/>
|
|
63
65
|
The node expects a fixed number of topics (configured in the settings) on which it will operate. It will only output a value
|
|
64
66
|
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/>
|
|
65
|
-
The input message is preserved and passed to the output
|
|
67
|
+
The input message is preserved and passed to the output, changing only the topic and the payload.
|
|
66
68
|
|
|
67
69
|
The node performs some checks on the incoming boolean payloads and outputs all results at the same time, as follow:<br/>
|
|
68
70
|
- Output "AND": true or false<br/>
|
|
69
71
|
- Output "OR": true or false<br/>
|
|
70
72
|
- Output "XOR": true or false<br/>
|
|
71
73
|
|
|
72
|
-
If you need ***"NAND"*** or ***"NOR"*** gate, just put an **InvertUltimate** node respectively after the "AND" or "OR"
|
|
74
|
+
If you need ***"NAND"*** or ***"NOR"*** gate, just put an **InvertUltimate** node respectively after the "AND" or "OR" output.
|
|
73
75
|
|
|
74
76
|
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/>
|
|
75
77
|
You can also set the default values of the topic inputs.<br/>
|
|
@@ -180,7 +182,7 @@ This allow to save the state of a node and then replay it back whenever you want
|
|
|
180
182
|
# INVERT ULTIMATE
|
|
181
183
|
|
|
182
184
|
Outputs the inverted input. For example true -> false<br />
|
|
183
|
-
The input message is preserved and passed to the output
|
|
185
|
+
The input message is preserved and passed to the output, changing only the topic and the payload. If the input message has it's own topic, it'll be preserved as well.<br/>
|
|
184
186
|
|
|
185
187
|
### NODE CONFIGURATION
|
|
186
188
|
|
|
@@ -200,9 +202,9 @@ The input message is preserved and passed to the output pin, changing only the t
|
|
|
200
202
|
# FILTER ULTIMATE
|
|
201
203
|
|
|
202
204
|
This node has 2 outputs.<br />
|
|
203
|
-
If the input payload is true, the node will send <code>true</code> on output 1 and nothing on
|
|
204
|
-
If the input payload is false, the node will send nothing on output 1
|
|
205
|
-
The input message is preserved and passed to the output
|
|
205
|
+
If the input payload is true, the node will send <code>true</code> on output 1 and nothing on output 2<br />
|
|
206
|
+
If the input payload is false, the node will send nothing on output 1 and <code>false</code> on output 2<br />
|
|
207
|
+
The input message is preserved and passed to the output, changing only the topic and the payload. If the input message has it's own topic, it'll be preserved as well.<br/>
|
|
206
208
|
|
|
207
209
|
### NODE CONFIGURATION
|
|
208
210
|
|
|
@@ -222,8 +224,8 @@ The input message is preserved and passed to the output pin, changing only the t
|
|
|
222
224
|
# BLINKER ULTIMATE
|
|
223
225
|
|
|
224
226
|
The pourpose of this node is to blink a led or something.<br />
|
|
225
|
-
|
|
226
|
-
|
|
227
|
+
output1 : outputs the value true/false<br/>
|
|
228
|
+
output2 : outputs the inverted value false/true<br/>
|
|
227
229
|
<br/>
|
|
228
230
|
|
|
229
231
|
### NODE CONFIGURATION
|
|
@@ -239,8 +241,8 @@ Pass <code>msg.payload = true</code> to start blinking</br>
|
|
|
239
241
|
Pass <code>msg.payload = false</code> to stop blinking</br>
|
|
240
242
|
Pass <code>msg.interval = 2000</code> to change the blinking interval</br>
|
|
241
243
|
|
|
242
|
-
-
|
|
243
|
-
-
|
|
244
|
+
- output1 stop behavior : when the blinker receives the stop message, you can select the behavior of the output1<br/>
|
|
245
|
+
- output2 stop behavior : when the blinker receives the stop message, you can select the behavior of the output2<br/>
|
|
244
246
|
|
|
245
247
|
|
|
246
248
|
<img src='https://raw.githubusercontent.com/Supergiovane/node-red-contrib-boolean-logic-ultimate/master/img/blinker.png' width='60%'>
|
|
@@ -259,7 +261,7 @@ Pass <code>msg.interval = 2000</code> to change the blinking interval</br>
|
|
|
259
261
|
|
|
260
262
|
# SIMPLE OUTPUT ULTIMATE
|
|
261
263
|
|
|
262
|
-
The pourpose of this node is to send a message with payload TRUE on the first
|
|
264
|
+
The pourpose of this node is to send a message with payload TRUE on the first output and FALSE on second output, independently from the msg input.<br />
|
|
263
265
|
This is useful if you need to simply send a true or false payload.
|
|
264
266
|
|
|
265
267
|
### NODE CONFIGURATION
|
|
@@ -275,7 +277,7 @@ This is useful if you need to simply send a true or false payload.
|
|
|
275
277
|
|
|
276
278
|
<details><summary>CLICK HERE, copy and paste it into your flow</summary>
|
|
277
279
|
<code>
|
|
278
|
-
[{"id":"e1149e22.c9b298","type":"inject","z":"81a64dae.012c18","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":820,"wires":[["6a419c72.5a4e7c"]]},{"id":"6a419c72.5a4e7c","type":"SimpleOutputUltimate","z":"81a64dae.012c18","name":"T/F","x":290,"y":820,"wires":[["8ba3f611.26beb8"],["b469193b.950598"]]},{"id":"8ba3f611.26beb8","type":"debug","z":"81a64dae.012c18","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":530,"y":800,"wires":[]},{"id":"b469193b.950598","type":"debug","z":"81a64dae.012c18","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":530,"y":840,"wires":[]},{"id":"2451f593.04e62a","type":"comment","z":"81a64dae.012c18","name":"Whatever the input is, output msg with payload TRUE on first and FALSE on second
|
|
280
|
+
[{"id":"e1149e22.c9b298","type":"inject","z":"81a64dae.012c18","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":820,"wires":[["6a419c72.5a4e7c"]]},{"id":"6a419c72.5a4e7c","type":"SimpleOutputUltimate","z":"81a64dae.012c18","name":"T/F","x":290,"y":820,"wires":[["8ba3f611.26beb8"],["b469193b.950598"]]},{"id":"8ba3f611.26beb8","type":"debug","z":"81a64dae.012c18","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":530,"y":800,"wires":[]},{"id":"b469193b.950598","type":"debug","z":"81a64dae.012c18","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":530,"y":840,"wires":[]},{"id":"2451f593.04e62a","type":"comment","z":"81a64dae.012c18","name":"Whatever the input is, output msg with payload TRUE on first and FALSE on second output.","info":"","x":330,"y":760,"wires":[]}]
|
|
279
281
|
</code>
|
|
280
282
|
</details>
|
|
281
283
|
|
|
@@ -287,8 +289,8 @@ This is useful if you need to simply send a true or false payload.
|
|
|
287
289
|
|
|
288
290
|
# INJECT ULTIMATE
|
|
289
291
|
|
|
290
|
-
The pourpose of this node is to send a message with payload TRUE on the first
|
|
291
|
-
This is useful if you need to simply test your flow.
|
|
292
|
+
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 />
|
|
293
|
+
This is useful if you need to simply test your flow.
|
|
292
294
|
|
|
293
295
|
<img src='https://raw.githubusercontent.com/Supergiovane/node-red-contrib-boolean-logic-ultimate/master/img/Inject.png' width='60%'>
|
|
294
296
|
|
|
@@ -439,7 +441,7 @@ Any message that arrives on input, will be passwd through to the output with the
|
|
|
439
441
|
|
|
440
442
|
# RAILWAY SWITCH ULTIMATE
|
|
441
443
|
|
|
442
|
-
The railway switcher, switches the input msg flow to one ot the two
|
|
444
|
+
The railway switcher, switches the input msg flow to one ot the two outputs (upper or lower).
|
|
443
445
|
|
|
444
446
|
<img src='https://raw.githubusercontent.com/Supergiovane/node-red-contrib-boolean-logic-ultimate/master/img/railroadSwitchScambio.png' width='80%'>
|
|
445
447
|
|
|
@@ -447,7 +449,7 @@ The railway switcher, switches the input msg flow to one ot the two output pins
|
|
|
447
449
|
|
|
448
450
|
|Property|Description|
|
|
449
451
|
|--|--|
|
|
450
|
-
| Switcher topic | Whenever the node receives a payload from this **topic**, it switches the input messages to an output
|
|
452
|
+
| Switcher topic | Whenever the node receives a payload from this **topic**, it switches the input messages to an output. |
|
|
451
453
|
| With Input | Set the property where the input payload is. *By default, it is "payload", but you can also specify other properties, for example "payload.value"* |
|
|
452
454
|
| Then | This property, allow you to auto toggle the selected start state after some time. |
|
|
453
455
|
|
|
@@ -458,8 +460,8 @@ The railway switcher, switches the input msg flow to one ot the two output pins
|
|
|
458
460
|
|
|
459
461
|
**INPUT MSG WITH "TRIGGER" TOPIC**
|
|
460
462
|
|
|
461
|
-
Pass <code>msg.payload = false</code> switches the msg input to the UPPER
|
|
462
|
-
Pass <code>msg.payload = true</code> switches the msg input to the LOWER
|
|
463
|
+
Pass <code>msg.payload = false</code> switches the msg input to the UPPER output</br>
|
|
464
|
+
Pass <code>msg.payload = true</code> switches the msg input to the LOWER output</br>
|
|
463
465
|
|
|
464
466
|
</br>
|
|
465
467
|
|
|
@@ -81,15 +81,21 @@
|
|
|
81
81
|
</div>
|
|
82
82
|
</script>
|
|
83
83
|
|
|
84
|
-
<script type="text/
|
|
85
|
-
|
|
86
|
-
SEE THE README FOR HELP CONFIGURING THE NODE
|
|
87
|
-
</p>
|
|
84
|
+
<script type="text/markdown" data-help-name="BlinkerUltimate">
|
|
85
|
+
[SEE THE README FOR FULL HELP AND SAMPLES](https://github.com/Supergiovane/node-red-contrib-boolean-logic-ultimate)
|
|
88
86
|
|
|
89
|
-
|
|
90
|
-
<a href="https://github.com/Supergiovane/node-red-contrib-boolean-logic-ultimate" target="_blank">Click here to learn how to configure the node.</a>
|
|
91
|
-
</p>
|
|
87
|
+
[Find it useful?](https://www.paypal.me/techtoday)
|
|
92
88
|
|
|
93
|
-
|
|
89
|
+
|
|
90
|
+
|Property|Description|
|
|
91
|
+
|--|--|
|
|
92
|
+
| Input | Set the property where the input payload is. *By default, it is "payload", but you can also specify other properties, for example "payload.value"* |
|
|
93
|
+
|
|
94
|
+
<br/>
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
Pass <code>msg.payload = true</code> to start blinking</br>
|
|
98
|
+
Pass <code>msg.payload = false</code> to stop blinking</br>
|
|
99
|
+
Pass <code>msg.interval = 2000</code> to change the blinking interval</br>
|
|
94
100
|
|
|
95
101
|
</script>
|
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
<label for="node-input-inputCount"><i class="fa fa-step-forward"></i> Inputs count</label>
|
|
132
132
|
<input style="width:100px" type="text" id="node-input-inputCount" placeholder="Inputs count, for example: 2">
|
|
133
133
|
</div>
|
|
134
|
-
<div class="form-tips" style="margin-top: 8px;
|
|
134
|
+
<div class="form-tips" style="margin-top: 8px;text-align:center">Inputs count: each incoming msg.topic represents one input.</div>
|
|
135
135
|
<br/>
|
|
136
136
|
<div class="form-row">
|
|
137
137
|
<label for="node-input-name"><i class="icon-tag"></i> Name</label>
|
|
@@ -191,14 +191,20 @@
|
|
|
191
191
|
<br/>
|
|
192
192
|
</script>
|
|
193
193
|
|
|
194
|
-
<script type="text/
|
|
195
|
-
|
|
196
|
-
SEE THE README FOR HELP CONFIGURING THE NODE
|
|
197
|
-
</p>
|
|
194
|
+
<script type="text/markdown" data-help-name="BooleanLogicUltimate">
|
|
195
|
+
[SEE THE README FOR FULL HELP AND SAMPLES](https://github.com/Supergiovane/node-red-contrib-boolean-logic-ultimate)
|
|
198
196
|
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
197
|
+
[Find it useful?](https://www.paypal.me/techtoday)
|
|
198
|
+
|
|
199
|
+
|Property|Description|
|
|
200
|
+
|--|--|
|
|
201
|
+
| 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.* |
|
|
202
|
+
| Input | Set the property where the input payload is. *By default, it is "payload", but you can also specify other properties, for example "payload.value"* |
|
|
203
|
+
| 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. |
|
|
204
|
+
| 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.|
|
|
205
|
+
| 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".|
|
|
206
|
+
| 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>.|
|
|
207
|
+
| 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. |
|
|
208
|
+
| 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.|
|
|
202
209
|
|
|
203
|
-
<a href="https://www.paypal.me/techtoday" target="_blank"><img src='https://img.shields.io/badge/Donate-PayPal-blue.svg?style=flat-square' width='30%'></a>
|
|
204
210
|
</script>
|
|
@@ -55,15 +55,19 @@
|
|
|
55
55
|
</div>
|
|
56
56
|
</script>
|
|
57
57
|
|
|
58
|
-
<script type="text/
|
|
59
|
-
|
|
60
|
-
SEE THE README FOR HELP CONFIGURING THE NODE
|
|
61
|
-
</p>
|
|
58
|
+
<script type="text/markdown" data-help-name="FilterUltimate">
|
|
59
|
+
[SEE THE README FOR FULL HELP AND SAMPLES](https://github.com/Supergiovane/node-red-contrib-boolean-logic-ultimate)
|
|
62
60
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
61
|
+
[Find it useful?](https://www.paypal.me/techtoday)
|
|
62
|
+
|
|
63
|
+
This node has 2 outputs.<br />
|
|
64
|
+
If the input payload is true, the node will send <code>true</code> on output 1 and nothing on output 2<br />
|
|
65
|
+
If the input payload is false, the node will send nothing on output 1 and <code>false</code> on output 2<br />
|
|
66
|
+
The input message is preserved and passed to the output, changing only the topic and the payload. If the input message has it's own topic, it'll be preserved as well.<br/>
|
|
67
|
+
|
|
68
|
+
|Property|Description|
|
|
69
|
+
|--|--|
|
|
70
|
+
| Input | Set the property where the input payload is. *By default, it is "payload", but you can also specify other properties, for example "payload.value"* |
|
|
66
71
|
|
|
67
|
-
<a href="https://www.paypal.me/techtoday" target="_blank"><img src='https://img.shields.io/badge/Donate-PayPal-blue.svg?style=flat-square' width='30%'></a>
|
|
68
72
|
|
|
69
73
|
</script>
|
|
@@ -81,15 +81,33 @@
|
|
|
81
81
|
|
|
82
82
|
</script>
|
|
83
83
|
|
|
84
|
-
<script type="text/
|
|
85
|
-
|
|
86
|
-
SEE THE README FOR HELP CONFIGURING THE NODE
|
|
87
|
-
</p>
|
|
84
|
+
<script type="text/markdown" data-help-name="ImpulseUltimate">
|
|
85
|
+
[SEE THE README FOR FULL HELP AND SAMPLES](https://github.com/Supergiovane/node-red-contrib-boolean-logic-ultimate)
|
|
88
86
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
87
|
+
[Find it useful?](https://www.paypal.me/techtoday)
|
|
88
|
+
|
|
89
|
+
The pourpose of this node is to send a sequence of pulsed commands to for example, open a garage door or to command an appliance requiring a set of timed commands.<br />
|
|
90
|
+
|
|
91
|
+
|Property|Description|
|
|
92
|
+
|--|--|
|
|
93
|
+
| Input | Set the property where the input payload is. *By default, it is "payload", but you can also specify other properties, for example "payload.value"* |
|
|
94
|
+
|
|
95
|
+
**Avaiable Commands**<br />
|
|
96
|
+
Commands are to be wrote in the format: command:value. For example ***send:200***, ***wait:2000***. Each row represents a command.<br />
|
|
97
|
+
<br /><b>send</b><br />
|
|
98
|
+
sends a value. For example: ***send:true*** or ***send:100*** or ***send:Hello***<br />
|
|
99
|
+
<br /><b>wait</b><br />
|
|
100
|
+
wait for specified time (in milliseconds). For example ***wait:500*** waits for 500 milliseconds<br />
|
|
101
|
+
<br /><b>restart</b><br />
|
|
102
|
+
Restart the sequence from the beginning. Use ***restart*** alone, without **:** and extra value. For example ***restart*** <br />
|
|
103
|
+
<br /><b>//</b><br />
|
|
104
|
+
comment. For example: ***// This opens the garage***. The comment are ignored, so you can write what you want.<br />
|
|
105
|
+
<br />
|
|
106
|
+
|
|
107
|
+
Pass <code>msg.payload = true</code> to the node to start the sequence</br>
|
|
108
|
+
Pass <code>msg.payload = false</code> to the node to stop the running sequence</br>
|
|
109
|
+
<br />
|
|
110
|
+
|
|
111
|
+
- Output: the node outputs a message you specified in the command textbox<br/>
|
|
92
112
|
|
|
93
|
-
<a href="https://www.paypal.me/techtoday" target="_blank"><img src='https://img.shields.io/badge/Donate-PayPal-blue.svg?style=flat-square' width='30%'></a>
|
|
94
|
-
|
|
95
113
|
</script>
|
|
@@ -76,15 +76,13 @@
|
|
|
76
76
|
</div>
|
|
77
77
|
</script>
|
|
78
78
|
|
|
79
|
-
<script type="text/
|
|
80
|
-
<p>
|
|
81
|
-
SEE THE README FOR HELP CONFIGURING THE NODE
|
|
82
|
-
</p>
|
|
79
|
+
<script type="text/markdown" data-help-name="InjectUltimate">
|
|
83
80
|
|
|
84
|
-
|
|
85
|
-
<a href="https://github.com/Supergiovane/node-red-contrib-boolean-logic-ultimate" target="_blank">Click here to learn how to configure the node.</a>
|
|
86
|
-
</p>
|
|
81
|
+
[SEE THE README FOR FULL HELP AND SAMPLES](https://github.com/Supergiovane/node-red-contrib-boolean-logic-ultimate)
|
|
87
82
|
|
|
88
|
-
|
|
83
|
+
[Find it useful?](https://www.paypal.me/techtoday)
|
|
84
|
+
|
|
85
|
+
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 />
|
|
86
|
+
This is useful if you need to simply test your flow.
|
|
89
87
|
|
|
90
88
|
</script>
|
|
@@ -86,15 +86,26 @@
|
|
|
86
86
|
</div>
|
|
87
87
|
</script>
|
|
88
88
|
|
|
89
|
-
<script type="text/
|
|
90
|
-
|
|
91
|
-
SEE THE README FOR HELP CONFIGURING THE NODE
|
|
92
|
-
</p>
|
|
89
|
+
<script type="text/markdown" data-help-name="InterruptFlowUltimate">
|
|
90
|
+
[SEE THE README FOR FULL HELP AND SAMPLES](https://github.com/Supergiovane/node-red-contrib-boolean-logic-ultimate)
|
|
93
91
|
|
|
94
|
-
|
|
95
|
-
<a href="https://github.com/Supergiovane/node-red-contrib-boolean-logic-ultimate" target="_blank">Click here to learn how to configure the node.</a>
|
|
96
|
-
</p>
|
|
92
|
+
[Find it useful?](https://www.paypal.me/techtoday)
|
|
97
93
|
|
|
98
|
-
|
|
94
|
+
The interrupt flows is able to stop the input messages to exiting the node.
|
|
95
|
+
|
|
96
|
+
### NODE CONFIGURATION
|
|
97
|
+
|
|
98
|
+
|Property|Description|
|
|
99
|
+
|--|--|
|
|
100
|
+
| 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. |
|
|
101
|
+
| With Input | Set the property where the input payload is. *By default, it is "payload", but you can also specify other properties, for example "payload.value"* |
|
|
102
|
+
| 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.|
|
|
103
|
+
|
|
104
|
+
**INPUT MSG WITH "TRIGGER" TOPIC**
|
|
105
|
+
|
|
106
|
+
Pass <code>msg.payload = true</code> to allow messages to pass through</br>
|
|
107
|
+
Pass <code>msg.payload = false</code> to prevent messages from passing through</br>
|
|
108
|
+
Pass <code>msg.play = true</code> from a message having the "trigger" topic, to replay the last stored message</br>
|
|
109
|
+
Pass <code>msg.reset = true</code> from a message having the "trigger" topic, to clear the last stored message</br>
|
|
99
110
|
|
|
100
111
|
</script>
|
|
@@ -42,15 +42,17 @@
|
|
|
42
42
|
</div>
|
|
43
43
|
</script>
|
|
44
44
|
|
|
45
|
-
<script type="text/
|
|
46
|
-
|
|
47
|
-
SEE THE README FOR HELP CONFIGURING THE NODE
|
|
48
|
-
</p>
|
|
45
|
+
<script type="text/markdown" data-help-name="InvertUltimate">
|
|
46
|
+
[SEE THE README FOR FULL HELP AND SAMPLES](https://github.com/Supergiovane/node-red-contrib-boolean-logic-ultimate)
|
|
49
47
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
48
|
+
[Find it useful?](https://www.paypal.me/techtoday)
|
|
49
|
+
|
|
50
|
+
Outputs the inverted input. For example true -> false<br />
|
|
51
|
+
The input message is preserved and passed to the output, changing only the topic and the payload. If the input message has it's own topic, it'll be preserved as well.<br/>
|
|
52
|
+
|
|
53
|
+
|Property|Description|
|
|
54
|
+
|--|--|
|
|
55
|
+
| Input | Set the property where the input payload is. *By default, it is "payload", but you can also specify other properties, for example "payload.value"* |
|
|
53
56
|
|
|
54
|
-
<a href="https://www.paypal.me/techtoday" target="_blank"><img src='https://img.shields.io/badge/Donate-PayPal-blue.svg?style=flat-square' width='30%'></a>
|
|
55
57
|
|
|
56
58
|
</script>
|
|
@@ -87,15 +87,23 @@
|
|
|
87
87
|
</div>
|
|
88
88
|
</script>
|
|
89
89
|
|
|
90
|
-
<script type="text/
|
|
91
|
-
|
|
92
|
-
SEE THE README FOR HELP CONFIGURING THE NODE
|
|
93
|
-
</p>
|
|
90
|
+
<script type="text/markdown" data-help-name="RailwaySwitchUltimate">
|
|
91
|
+
[SEE THE README FOR FULL HELP AND SAMPLES](https://github.com/Supergiovane/node-red-contrib-boolean-logic-ultimate)
|
|
94
92
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
93
|
+
[Find it useful?](https://www.paypal.me/techtoday)
|
|
94
|
+
|
|
95
|
+
The railway switcher, switches the input msg flow to one ot the two outputs (upper or lower).
|
|
96
|
+
|
|
97
|
+
|Property|Description|
|
|
98
|
+
|--|--|
|
|
99
|
+
| Switcher topic | Whenever the node receives a payload from this **topic**, it switches the input messages to an output. |
|
|
100
|
+
| With Input | Set the property where the input payload is. *By default, it is "payload", but you can also specify other properties, for example "payload.value"* |
|
|
101
|
+
| Then | This property, allow you to auto toggle the selected start state after some time. |
|
|
102
|
+
|
|
103
|
+
**INPUT MSG WITH "TRIGGER" TOPIC**
|
|
104
|
+
|
|
105
|
+
Pass <code>msg.payload = false</code> switches the msg input to the UPPER output</br>
|
|
106
|
+
Pass <code>msg.payload = true</code> switches the msg input to the LOWER output</br>
|
|
98
107
|
|
|
99
|
-
<a href="https://www.paypal.me/techtoday" target="_blank"><img src='https://img.shields.io/badge/Donate-PayPal-blue.svg?style=flat-square' width='30%'></a>
|
|
100
108
|
|
|
101
109
|
</script>
|
|
@@ -46,15 +46,17 @@
|
|
|
46
46
|
</div>
|
|
47
47
|
</script>
|
|
48
48
|
|
|
49
|
-
<script type="text/
|
|
50
|
-
|
|
51
|
-
SEE THE README FOR HELP CONFIGURING THE NODE
|
|
52
|
-
</p>
|
|
49
|
+
<script type="text/markdown" data-help-name="SimpleOutputUltimate">
|
|
50
|
+
[SEE THE README FOR FULL HELP AND SAMPLES](https://github.com/Supergiovane/node-red-contrib-boolean-logic-ultimate)
|
|
53
51
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
52
|
+
[Find it useful?](https://www.paypal.me/techtoday)
|
|
53
|
+
|
|
54
|
+
The pourpose of this node is to send a message with payload TRUE on the first output and FALSE on second output, independently from the msg input.<br />
|
|
55
|
+
This is useful if you need to simply send a true or false payload.
|
|
56
|
+
|
|
57
|
+
|Property|Description|
|
|
58
|
+
|--|--|
|
|
59
|
+
| Input | Set the property where the input payload is. *By default, it is "payload", but you can also specify other properties, for example "payload.value"* |
|
|
57
60
|
|
|
58
|
-
<a href="https://www.paypal.me/techtoday" target="_blank"><img src='https://img.shields.io/badge/Donate-PayPal-blue.svg?style=flat-square' width='30%'></a>
|
|
59
61
|
|
|
60
62
|
</script>
|
|
@@ -41,15 +41,15 @@
|
|
|
41
41
|
</div>
|
|
42
42
|
</script>
|
|
43
43
|
|
|
44
|
-
<script type="text/
|
|
45
|
-
|
|
46
|
-
SEE THE README FOR HELP CONFIGURING THE NODE
|
|
47
|
-
</p>
|
|
44
|
+
<script type="text/markdown" data-help-name="StatusUltimate">
|
|
45
|
+
[SEE THE README FOR FULL HELP AND SAMPLES](https://github.com/Supergiovane/node-red-contrib-boolean-logic-ultimate)
|
|
48
46
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
47
|
+
[Find it useful?](https://www.paypal.me/techtoday)
|
|
48
|
+
|
|
49
|
+
The pourpose of this node is to show a status of the passingthrough message.<br />
|
|
50
|
+
|
|
51
|
+
**Show msg.**
|
|
52
|
+
|
|
53
|
+
- Write here the property you want to get the status from. For example, "payload", "mycar.color", etc.
|
|
52
54
|
|
|
53
|
-
<a href="https://www.paypal.me/techtoday" target="_blank"><img src='https://img.shields.io/badge/Donate-PayPal-blue.svg?style=flat-square' width='30%'></a>
|
|
54
|
-
|
|
55
55
|
</script>
|
|
@@ -55,15 +55,16 @@
|
|
|
55
55
|
</div>
|
|
56
56
|
</script>
|
|
57
57
|
|
|
58
|
-
<script type="text/
|
|
59
|
-
|
|
60
|
-
SEE THE README FOR HELP CONFIGURING THE NODE
|
|
61
|
-
</p>
|
|
58
|
+
<script type="text/markdown" data-help-name="SumUltimate">
|
|
59
|
+
[SEE THE README FOR FULL HELP AND SAMPLES](https://github.com/Supergiovane/node-red-contrib-boolean-logic-ultimate)
|
|
62
60
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
61
|
+
[Find it useful?](https://www.paypal.me/techtoday)
|
|
62
|
+
|
|
63
|
+
The pourpose of this node is to do maths on the incoming values. Each incoming message MUST HAVE OWN TOPIC.<br />
|
|
64
|
+
|
|
65
|
+
|Property|Description|
|
|
66
|
+
|--|--|
|
|
67
|
+
| Input | Set the property where the input payload is. *By default, it is "payload", but you can also specify other properties, for example "payload.value"* |
|
|
66
68
|
|
|
67
|
-
<a href="https://www.paypal.me/techtoday" target="_blank"><img src='https://img.shields.io/badge/Donate-PayPal-blue.svg?style=flat-square' width='30%'></a>
|
|
68
69
|
|
|
69
70
|
</script>
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
<div class="form-row">
|
|
45
45
|
<label style="width:160px" for="node-input-valueToToggle"><i class="fa fa-toggle-on"></i> Initial value</label>
|
|
46
46
|
<select type="text" id="node-input-valueToToggle" placeholder="">
|
|
47
|
-
<option value="true">Initialize
|
|
47
|
+
<option value="true">Initialize with True</option>
|
|
48
48
|
<option value="false">Initialize with False</option>
|
|
49
49
|
</select>
|
|
50
50
|
</div>
|
|
@@ -59,15 +59,18 @@
|
|
|
59
59
|
|
|
60
60
|
</script>
|
|
61
61
|
|
|
62
|
-
<script type="text/
|
|
63
|
-
|
|
64
|
-
SEE THE README FOR HELP CONFIGURING THE NODE
|
|
65
|
-
</p>
|
|
62
|
+
<script type="text/markdown" data-help-name="toggleUltimate">
|
|
63
|
+
[SEE THE README FOR FULL HELP AND SAMPLES](https://github.com/Supergiovane/node-red-contrib-boolean-logic-ultimate)
|
|
66
64
|
|
|
67
|
-
|
|
68
|
-
<a href="https://github.com/Supergiovane/node-red-contrib-boolean-logic-ultimate" target="_blank">Click here to learn how to configure the node.</a>
|
|
69
|
-
</p>
|
|
65
|
+
[Find it useful?](https://www.paypal.me/techtoday)
|
|
70
66
|
|
|
71
|
-
|
|
67
|
+
The pourpose of this node is to toggle between true/false, everytime an inboud message arrives.<br />
|
|
72
68
|
|
|
69
|
+
|Property|Description|
|
|
70
|
+
|--|--|
|
|
71
|
+
| Input | Set the property where the input payload is. *By default, it is "payload", but you can also specify other properties, for example "payload.value"* |
|
|
72
|
+
|
|
73
|
+
**INPUT**<br />
|
|
74
|
+
|
|
75
|
+
Any message that arrives on input, will be passwd through to the output with the payload toggled between true and false.
|
|
73
76
|
</script>
|
|
@@ -22,6 +22,9 @@ module.exports.ToBoolean = function ToBoolean(value) {
|
|
|
22
22
|
if (value.toLowerCase() === "true") return true;
|
|
23
23
|
if (value.toLowerCase() === "false") return false;
|
|
24
24
|
|
|
25
|
+
if (value.toLowerCase() === "home") return true;
|
|
26
|
+
if (value.toLowerCase() === "not_home") return false;
|
|
27
|
+
|
|
25
28
|
} else if (typeof value === 'number') {
|
|
26
29
|
// Is it formated as a decimal number?
|
|
27
30
|
if (decimal.test(value)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-red-contrib-boolean-logic-ultimate",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.58",
|
|
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": {
|