node-red-contrib-boolean-logic-ultimate 1.0.62 → 1.1.0
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 +8 -0
- package/README.md +11 -10
- package/boolean-logic-ultimate/BlinkerUltimate.html +1 -1
- package/boolean-logic-ultimate/BooleanLogicUltimate.html +13 -2
- package/boolean-logic-ultimate/BooleanLogicUltimate.js +488 -338
- package/boolean-logic-ultimate/Comparator.html +102 -0
- package/boolean-logic-ultimate/Comparator.js +99 -0
- package/boolean-logic-ultimate/FilterUltimate.html +16 -4
- package/boolean-logic-ultimate/FilterUltimate.js +67 -46
- package/boolean-logic-ultimate/ImpulseUltimate.html +1 -1
- package/boolean-logic-ultimate/InterruptFlowUltimate.html +15 -3
- package/boolean-logic-ultimate/InterruptFlowUltimate.js +155 -93
- package/boolean-logic-ultimate/InvertUltimate.html +14 -5
- package/boolean-logic-ultimate/InvertUltimate.js +74 -46
- package/boolean-logic-ultimate/RailwaySwitchUltimate.html +13 -2
- package/boolean-logic-ultimate/RailwaySwitchUltimate.js +110 -71
- package/boolean-logic-ultimate/SimpleOutputUltimate.html +1 -1
- package/boolean-logic-ultimate/SumUltimate.html +1 -1
- package/boolean-logic-ultimate/toggleUltimate.html +13 -3
- package/boolean-logic-ultimate/toggleUltimate.js +1 -1
- package/boolean-logic-ultimate/translator-config.html +63 -0
- package/boolean-logic-ultimate/translator-config.js +8 -0
- package/boolean-logic-ultimate/utils.js +52 -43
- package/package.json +4 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
|
|
4
4
|
# CHANGELOG
|
|
5
5
|
|
|
6
|
+
<p>
|
|
7
|
+
<b>Version 1.1.0</b> September 2023<br/>
|
|
8
|
+
- NEW: Translator config node. Each boolean logic node can now translate the input payload to a boolean value. For example, you can add "done:true" to the translation table, to convert the input payload "done", to a boolean <i>TRUE</> value.</br>
|
|
9
|
+
</p>
|
|
10
|
+
<p>
|
|
11
|
+
<b>Version 1.0.63</b> September 2023<br/>
|
|
12
|
+
- NEW: Comparator node. Compare the values from 2 input messages.</br>
|
|
13
|
+
</p>
|
|
6
14
|
<p>
|
|
7
15
|
<b>Version 1.0.62</b> August 2023<br/>
|
|
8
16
|
- Math node: added "subtract option".</br>
|
package/README.md
CHANGED
|
@@ -38,6 +38,7 @@ Other than true/false, all nodes accepts these strings and convert it to true/fa
|
|
|
38
38
|
| "home" | true |
|
|
39
39
|
| "not_home" | false |
|
|
40
40
|
|
|
41
|
+
You can add your own translation command, thanks to the translator-config node.
|
|
41
42
|
|
|
42
43
|
<br/>
|
|
43
44
|
<br/>
|
|
@@ -84,7 +85,7 @@ The node can convert arbitrary input values to true/false. It supports Homeassis
|
|
|
84
85
|
|Property|Description|
|
|
85
86
|
|--|--|
|
|
86
87
|
| 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.* |
|
|
87
|
-
| Evaluate |
|
|
88
|
+
| 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"* |
|
|
88
89
|
| 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. |
|
|
89
90
|
| 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.|
|
|
90
91
|
| 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".|
|
|
@@ -118,7 +119,7 @@ The interrupt flows is able to stop the input messages to exiting the node.
|
|
|
118
119
|
|Property|Description|
|
|
119
120
|
|--|--|
|
|
120
121
|
| 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. |
|
|
121
|
-
| With Input |
|
|
122
|
+
| 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"* |
|
|
122
123
|
| 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.|
|
|
123
124
|
|
|
124
125
|
|
|
@@ -190,7 +191,7 @@ The input message is preserved and passed to the output, changing only the topic
|
|
|
190
191
|
|
|
191
192
|
|Property|Description|
|
|
192
193
|
|--|--|
|
|
193
|
-
| Input |
|
|
194
|
+
| 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"* |
|
|
194
195
|
|
|
195
196
|
<br/>
|
|
196
197
|
|
|
@@ -212,7 +213,7 @@ The input message is preserved and passed to the output, changing only the topic
|
|
|
212
213
|
|
|
213
214
|
|Property|Description|
|
|
214
215
|
|--|--|
|
|
215
|
-
| Input |
|
|
216
|
+
| 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"* |
|
|
216
217
|
|
|
217
218
|
<br/>
|
|
218
219
|
|
|
@@ -234,7 +235,7 @@ output2 : outputs the inverted value false/true<br/>
|
|
|
234
235
|
|
|
235
236
|
|Property|Description|
|
|
236
237
|
|--|--|
|
|
237
|
-
| Input |
|
|
238
|
+
| 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"* |
|
|
238
239
|
|
|
239
240
|
<br/>
|
|
240
241
|
|
|
@@ -270,7 +271,7 @@ This is useful if you need to simply send a true or false payload.
|
|
|
270
271
|
|
|
271
272
|
|Property|Description|
|
|
272
273
|
|--|--|
|
|
273
|
-
| Input |
|
|
274
|
+
| 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"* |
|
|
274
275
|
|
|
275
276
|
<br/>
|
|
276
277
|
|
|
@@ -344,7 +345,7 @@ The pourpose of this node is to send a sequence of pulsed commands to for exampl
|
|
|
344
345
|
|
|
345
346
|
|Property|Description|
|
|
346
347
|
|--|--|
|
|
347
|
-
| Input |
|
|
348
|
+
| 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"* |
|
|
348
349
|
|
|
349
350
|
<br/>
|
|
350
351
|
|
|
@@ -389,7 +390,7 @@ The pourpose of this node is to do maths on the incoming values. Each incoming m
|
|
|
389
390
|
|
|
390
391
|
|Property|Description|
|
|
391
392
|
|--|--|
|
|
392
|
-
| Input |
|
|
393
|
+
| 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"* |
|
|
393
394
|
|
|
394
395
|
<br/>
|
|
395
396
|
|
|
@@ -427,7 +428,7 @@ The pourpose of this node is to toggle between true/false, everytime an inboud m
|
|
|
427
428
|
|
|
428
429
|
|Property|Description|
|
|
429
430
|
|--|--|
|
|
430
|
-
| Input |
|
|
431
|
+
| 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"* |
|
|
431
432
|
|
|
432
433
|
<br/>
|
|
433
434
|
|
|
@@ -452,7 +453,7 @@ The railway switcher, switches the input msg flow to one ot the two outputs (upp
|
|
|
452
453
|
|Property|Description|
|
|
453
454
|
|--|--|
|
|
454
455
|
| Switcher topic | Whenever the node receives a payload from this **topic**, it switches the input messages to an output. |
|
|
455
|
-
| With Input |
|
|
456
|
+
| 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"* |
|
|
456
457
|
| Then | This property, allow you to auto toggle the selected start state after some time. |
|
|
457
458
|
|
|
458
459
|
<br/>
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
|
|
87
87
|
|Property|Description|
|
|
88
88
|
|--|--|
|
|
89
|
-
| Input |
|
|
89
|
+
| 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"* |
|
|
90
90
|
|
|
91
91
|
<br/>
|
|
92
92
|
|
|
@@ -35,7 +35,8 @@
|
|
|
35
35
|
}
|
|
36
36
|
},
|
|
37
37
|
restrictinputevaluation: { value: false },
|
|
38
|
-
delayEvaluation: { value: 0 }
|
|
38
|
+
delayEvaluation: { value: 0 },
|
|
39
|
+
translatorConfig: { type: "translator-config", required: false }
|
|
39
40
|
},
|
|
40
41
|
inputs: 1,
|
|
41
42
|
outputs: 3,
|
|
@@ -201,6 +202,15 @@
|
|
|
201
202
|
(ms)</label>
|
|
202
203
|
<input style="width:150px" type="text" id="node-input-delayEvaluation" placeholder="Set 0 for no delay">
|
|
203
204
|
</div>
|
|
205
|
+
<div class="form-row">
|
|
206
|
+
<br />
|
|
207
|
+
<b>Translator</b>
|
|
208
|
+
<br />
|
|
209
|
+
<label for="node-input-translatorConfig">
|
|
210
|
+
<font color="green" size="4px"><i class="fa fa-sign-in" aria-hidden="true"></i></font> Input
|
|
211
|
+
</label>
|
|
212
|
+
<input type="text" id="node-input-translatorConfig" />
|
|
213
|
+
</div>
|
|
204
214
|
</p>
|
|
205
215
|
</div>
|
|
206
216
|
|
|
@@ -218,7 +228,7 @@
|
|
|
218
228
|
|Property|Description|
|
|
219
229
|
|--|--|
|
|
220
230
|
| 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.* |
|
|
221
|
-
| Evaluate |
|
|
231
|
+
| 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"* |
|
|
222
232
|
|
|
223
233
|
<br/>
|
|
224
234
|
|
|
@@ -232,6 +242,7 @@
|
|
|
232
242
|
| 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>.|
|
|
233
243
|
| 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. |
|
|
234
244
|
| 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.|
|
|
245
|
+
| Translator Input | Translates the incoming <code>payload</code> value, to true/false. This allows the compatibility with, for example, **HomeAssistant** nodes. |
|
|
235
246
|
|
|
236
247
|
<br/>
|
|
237
248
|
|