node-red-contrib-boolean-logic-ultimate 1.0.55 → 1.0.57

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 CHANGED
@@ -3,6 +3,15 @@
3
3
 
4
4
  # CHANGELOG
5
5
 
6
+ <p>
7
+ <b>Version 1.0.57</b> September 2022<br/>
8
+ - Added node help in the node-red help tab.</br>
9
+ </p>
10
+ <p>
11
+ <b>Version 1.0.56</b> August 2022<br/>
12
+ - NEW: added string conversion from "true", "false", "0", "1", "close" to boolean.</br>
13
+ - Updated the README</br>
14
+ </p>
6
15
  <p>
7
16
  <b>Version 1.0.55</b> July 2022<br/>
8
17
  - NEW: you can now specify the input property name from witch the node picks up the payload.</br>
package/README.md CHANGED
@@ -30,7 +30,11 @@ Other than true/false, all nodes accepts these strings and convert it to true/fa
30
30
  | "active" | true |
31
31
  | "inactive" | false |
32
32
  | "open" | true |
33
- | "closed" | false |
33
+ | "closed" or "close" | false |
34
+ | "true" | true |
35
+ | "false" | false |
36
+ | "1" | true |
37
+ | "0" | false |
34
38
 
35
39
 
36
40
  <br/>
@@ -58,14 +62,14 @@ Other than true/false, all nodes accepts these strings and convert it to true/fa
58
62
  The node performs Boolean logic on the incoming payloads.<br/>
59
63
  The node expects a fixed number of topics (configured in the settings) on which it will operate. It will only output a value
60
64
  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/>
61
- The input message is preserved and passed to the output pin, changing only the topic and the payload.
65
+ The input message is preserved and passed to the output, changing only the topic and the payload.
62
66
 
63
67
  The node performs some checks on the incoming boolean payloads and outputs all results at the same time, as follow:<br/>
64
68
  - Output "AND": true or false<br/>
65
69
  - Output "OR": true or false<br/>
66
70
  - Output "XOR": true or false<br/>
67
71
 
68
- If you need ***"NAND"*** or ***"NOR"*** gate, just put an **InvertUltimate** node respectively after the "AND" or "OR" pin.
72
+ If you need ***"NAND"*** or ***"NOR"*** gate, just put an **InvertUltimate** node respectively after the "AND" or "OR" output.
69
73
 
70
74
  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/>
71
75
  You can also set the default values of the topic inputs.<br/>
@@ -176,7 +180,7 @@ This allow to save the state of a node and then replay it back whenever you want
176
180
  # INVERT ULTIMATE
177
181
 
178
182
  Outputs the inverted input. For example true -> false<br />
179
- The input message is preserved and passed to the output pin, changing only the topic and the payload. If the input message has it's own topic, it'll be preserved as well.<br/>
183
+ 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/>
180
184
 
181
185
  ### NODE CONFIGURATION
182
186
 
@@ -197,8 +201,8 @@ The input message is preserved and passed to the output pin, changing only the t
197
201
 
198
202
  This node has 2 outputs.<br />
199
203
  If the input payload is true, the node will send <code>true</code> on output 1 and nothing on oputput 2<br />
200
- If the input payload is false, the node will send nothing on output 1, and <code>false</code> on oputput 2<br />
201
- The input message is preserved and passed to the output pin, changing only the topic and the payload. If the input message has it's own topic, it'll be preserved as well.<br/>
204
+ If the input payload is false, the node will send nothing on output 1 and <code>false</code> on oputput 2<br />
205
+ 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/>
202
206
 
203
207
  ### NODE CONFIGURATION
204
208
 
@@ -218,8 +222,8 @@ The input message is preserved and passed to the output pin, changing only the t
218
222
  # BLINKER ULTIMATE
219
223
 
220
224
  The pourpose of this node is to blink a led or something.<br />
221
- Output PIN1 : outputs the value true/false<br/>
222
- Output PIN2 : outputs the inverted value false/true<br/>
225
+ output1 : outputs the value true/false<br/>
226
+ output2 : outputs the inverted value false/true<br/>
223
227
  <br/>
224
228
 
225
229
  ### NODE CONFIGURATION
@@ -235,8 +239,8 @@ Pass <code>msg.payload = true</code> to start blinking</br>
235
239
  Pass <code>msg.payload = false</code> to stop blinking</br>
236
240
  Pass <code>msg.interval = 2000</code> to change the blinking interval</br>
237
241
 
238
- - PIN1 stop behavior : when the blinker receives the stop message, you can select the behavior of the pin1<br/>
239
- - PIN2 stop behavior : when the blinker receives the stop message, you can select the behavior of the pin2<br/>
242
+ - output1 stop behavior : when the blinker receives the stop message, you can select the behavior of the output1<br/>
243
+ - output2 stop behavior : when the blinker receives the stop message, you can select the behavior of the output2<br/>
240
244
 
241
245
 
242
246
  <img src='https://raw.githubusercontent.com/Supergiovane/node-red-contrib-boolean-logic-ultimate/master/img/blinker.png' width='60%'>
@@ -255,7 +259,7 @@ Pass <code>msg.interval = 2000</code> to change the blinking interval</br>
255
259
 
256
260
  # SIMPLE OUTPUT ULTIMATE
257
261
 
258
- The pourpose of this node is to send a message with payload TRUE on the first pin and FALSE on second pin, independently from the msg input.<br />
262
+ 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 />
259
263
  This is useful if you need to simply send a true or false payload.
260
264
 
261
265
  ### NODE CONFIGURATION
@@ -271,7 +275,7 @@ This is useful if you need to simply send a true or false payload.
271
275
 
272
276
  <details><summary>CLICK HERE, copy and paste it into your flow</summary>
273
277
  <code>
274
- [{"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 pin.","info":"","x":330,"y":760,"wires":[]}]
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 output.","info":"","x":330,"y":760,"wires":[]}]
275
279
  </code>
276
280
  </details>
277
281
 
@@ -283,8 +287,8 @@ This is useful if you need to simply send a true or false payload.
283
287
 
284
288
  # INJECT ULTIMATE
285
289
 
286
- The pourpose of this node is to send a message with payload TRUE on the first pin, FALSE on second pin and a TOGGLE (true/false) on the third pin, by pressing the pushbutton.<br />
287
- This is useful if you need to simply test your flow. The node is simpler as the default node-red inject node.
290
+ 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 />
291
+ This is useful if you need to simply test your flow.
288
292
 
289
293
  <img src='https://raw.githubusercontent.com/Supergiovane/node-red-contrib-boolean-logic-ultimate/master/img/Inject.png' width='60%'>
290
294
 
@@ -435,7 +439,7 @@ Any message that arrives on input, will be passwd through to the output with the
435
439
 
436
440
  # RAILWAY SWITCH ULTIMATE
437
441
 
438
- The railway switcher, switches the input msg flow to one ot the two output pins (upper or lower).
442
+ The railway switcher, switches the input msg flow to one ot the two outputs (upper or lower).
439
443
 
440
444
  <img src='https://raw.githubusercontent.com/Supergiovane/node-red-contrib-boolean-logic-ultimate/master/img/railroadSwitchScambio.png' width='80%'>
441
445
 
@@ -443,7 +447,7 @@ The railway switcher, switches the input msg flow to one ot the two output pins
443
447
 
444
448
  |Property|Description|
445
449
  |--|--|
446
- | Switcher topic | Whenever the node receives a payload from this **topic**, it switches the input messages to an output PIN. |
450
+ | Switcher topic | Whenever the node receives a payload from this **topic**, it switches the input messages to an output. |
447
451
  | 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"* |
448
452
  | Then | This property, allow you to auto toggle the selected start state after some time. |
449
453
 
@@ -454,8 +458,8 @@ The railway switcher, switches the input msg flow to one ot the two output pins
454
458
 
455
459
  **INPUT MSG WITH "TRIGGER" TOPIC**
456
460
 
457
- Pass <code>msg.payload = false</code> switches the msg input to the UPPER PIN</br>
458
- Pass <code>msg.payload = true</code> switches the msg input to the LOWER PIN</br>
461
+ Pass <code>msg.payload = false</code> switches the msg input to the UPPER output</br>
462
+ Pass <code>msg.payload = true</code> switches the msg input to the LOWER output</br>
459
463
 
460
464
  </br>
461
465
 
@@ -81,15 +81,21 @@
81
81
  </div>
82
82
  </script>
83
83
 
84
- <script type="text/x-red" data-help-name="BlinkerUltimate">
85
- <p>
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
- <p>
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
- <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>
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;background-color:lightgreen;text-align:center">Inputs count: each incoming msg.topic represents one input.</div>
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/x-red" data-help-name="BooleanLogicUltimate">
195
- <p>
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
- <p>
200
- <a href="https://github.com/Supergiovane/node-red-contrib-boolean-logic-ultimate" target="_blank">Click here to learn how to configure the node.</a>
201
- </p>
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/x-red" data-help-name="FilterUltimate">
59
- <p>
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
- <p>
64
- <a href="https://github.com/Supergiovane/node-red-contrib-boolean-logic-ultimate" target="_blank">Click here to learn how to configure the node.</a>
65
- </p>
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 oputput 2<br />
65
+ If the input payload is false, the node will send nothing on output 1 and <code>false</code> on oputput 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/x-red" data-help-name="ImpulseUltimate">
85
- <p>
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
- <p>
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)
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/x-red" data-help-name="InjectUltimate">
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
- <p>
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
- <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>
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/x-red" data-help-name="InterruptFlowUltimate">
90
- <p>
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
- <p>
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
- <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
+ 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/x-red" data-help-name="InvertUltimate">
46
- <p>
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
- <p>
51
- <a href="https://github.com/Supergiovane/node-red-contrib-boolean-logic-ultimate" target="_blank">Click here to learn how to configure the node.</a>
52
- </p>
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/x-red" data-help-name="RailwaySwitchUltimate">
91
- <p>
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
- <p>
96
- <a href="https://github.com/Supergiovane/node-red-contrib-boolean-logic-ultimate" target="_blank">Click here to learn how to configure the node.</a>
97
- </p>
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/x-red" data-help-name="SimpleOutputUltimate">
50
- <p>
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
- <p>
55
- <a href="https://github.com/Supergiovane/node-red-contrib-boolean-logic-ultimate" target="_blank">Click here to learn how to configure the node.</a>
56
- </p>
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/x-red" data-help-name="StatusUltimate">
45
- <p>
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
- <p>
50
- <a href="https://github.com/Supergiovane/node-red-contrib-boolean-logic-ultimate" target="_blank">Click here to learn how to configure the node.</a>
51
- </p>
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/x-red" data-help-name="SumUltimate">
59
- <p>
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
- <p>
64
- <a href="https://github.com/Supergiovane/node-red-contrib-boolean-logic-ultimate" target="_blank">Click here to learn how to configure the node.</a>
65
- </p>
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 wiht True</option>
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/x-red" data-help-name="toggleUltimate">
63
- <p>
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
- <p>
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
- <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>
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>
@@ -14,6 +14,13 @@ module.exports.ToBoolean = function ToBoolean(value) {
14
14
 
15
15
  if (value.toLowerCase() === "open") return true;
16
16
  if (value.toLowerCase() === "closed") return false;
17
+ if (value.toLowerCase() === "close") return false;
18
+
19
+ if (value.toLowerCase() === "1") return true;
20
+ if (value.toLowerCase() === "0") return false;
21
+
22
+ if (value.toLowerCase() === "true") return true;
23
+ if (value.toLowerCase() === "false") return false;
17
24
 
18
25
  } else if (typeof value === 'number') {
19
26
  // Is it formated as a decimal number?
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-red-contrib-boolean-logic-ultimate",
3
- "version": "1.0.55",
3
+ "version": "1.0.57",
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": {