# node-red-contrib-boolean-logic-ultimate
[![NPM version][npm-version-image]][npm-url]
[![NPM downloads per month][npm-downloads-month-image]][npm-url]
[![NPM downloads total][npm-downloads-total-image]][npm-url]
[![MIT License][license-image]][license-url]
[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
[![Donate via PayPal](https://img.shields.io/badge/Donate-PayPal-blue.svg?style=flat-square)](https://www.paypal.me/techtoday)
## DESCRIPTION
The node performs Boolean logic on the incoming payloads.
The node performs 3 checks (AND,OR,XOR) on the incoming boolean payloads and outputs the result at the same time, as follow:
- Output "AND": true or false
- Output "OR": true or false
- Output "XOR": true or false
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.
## ADDITIONAL FUNCTIONS
* Filter ouput results (outputs only true or trye/false)
* Trigger mode selection (Can output a payload only by single input's topic trigger and after evaluation ot other inputs, or can oputput a payload by change of every input)
## CHANGELOG
* See here the changelog
## CONFIGURATION
The node expects a fixed number of topics (configured in the settings) on which it will operate. It will only output a value
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.
Changing the topic is usually only needed when chaining multiple boolean nodes after each other becuse the topics will then all be the same when delivered to the nodes further down the chain.
***Number of different topics to evaluate***
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.
***Filter output result***
if (msg.topic == specified topic)
{
If (all other inputs are true) -> outputs true otherwise false
}
# OTHER USEFUL NODES
**Interrupt Flow**
Whenever this node receives a payload = false from a specific 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.
**Invert Ultimate**
Outputs the inverted input. For example true -> false
**Filter Ultimate**
This node has 2 outputs.
If the input payload is true, the node will send true
on output 1 and nothing on oputput 2
If the input payload is false, the node will send nothing on output 1, and false
on oputput 2
[license-image]: https://img.shields.io/badge/license-MIT-blue.svg
[license-url]: https://github.com/Supergiovane/node-red-contrib-boolean-logic-ultimate/master/LICENSE
[npm-url]: https://npmjs.org/package/node-red-contrib-boolean-logic-ultimate
[npm-version-image]: https://img.shields.io/npm/v/node-red-contrib-boolean-logic-ultimate.svg
[npm-downloads-month-image]: https://img.shields.io/npm/dm/node-red-contrib-boolean-logic-ultimate.svg
[npm-downloads-total-image]: https://img.shields.io/npm/dt/node-red-contrib-boolean-logic-ultimate.svg