OR Node or similiar solution

Hi guys!

I have bollean inputs and want to have an output which is TRUE if ONE of the three inputs is true.

What‘s the easiest way to do that?

Wishes
Andreas

This is an easy one - but I suspect that the question isn't quite right :slight_smile:

Just use a switch node and check if payload is true

image

It will pass the message on if any message that arrives is true

...but what if 2 of the inputs are true?

Is this what you want?

[{"id":"8de4dac57ab390a5","type":"inject","z":"a0d0f696507d618e","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"topic2","payload":"true","payloadType":"bool","x":140,"y":1740,"wires":[["b4c57c93001b84df"]]},{"id":"b4c57c93001b84df","type":"junction","z":"a0d0f696507d618e","x":280,"y":1760,"wires":[["a39f0bd25c5def86","43efefe2ee156e2e"]]},{"id":"14b1c9cf8a5a3f33","type":"inject","z":"a0d0f696507d618e","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"topic2","payload":"false","payloadType":"bool","x":150,"y":1800,"wires":[["b4c57c93001b84df"]]},{"id":"a39f0bd25c5def86","type":"and","z":"a0d0f696507d618e","name":"","topic":"","property":"payload","minData":"3","x":450,"y":1660,"wires":[["f12ba76774ecb30a"]]},{"id":"43efefe2ee156e2e","type":"or","z":"a0d0f696507d618e","name":"","topic":"","property":"payload","minData":"1","x":450,"y":1760,"wires":[["93d310374af76254"]]},{"id":"3eb28492ef83a2a9","type":"junction","z":"a0d0f696507d618e","x":280,"y":1640,"wires":[["43efefe2ee156e2e","a39f0bd25c5def86"]]},{"id":"2cc3bf5f14175362","type":"junction","z":"a0d0f696507d618e","x":280,"y":1880,"wires":[["a39f0bd25c5def86","43efefe2ee156e2e"]]},{"id":"f12ba76774ecb30a","type":"debug","z":"a0d0f696507d618e","name":"debug 27","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":700,"y":1660,"wires":[]},{"id":"93d310374af76254","type":"debug","z":"a0d0f696507d618e","name":"debug 26","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":700,"y":1760,"wires":[]},{"id":"2274c8c775d6dd84","type":"inject","z":"a0d0f696507d618e","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"topic1","payload":"true","payloadType":"bool","x":140,"y":1620,"wires":[["3eb28492ef83a2a9"]]},{"id":"3b70577ea11ce441","type":"inject","z":"a0d0f696507d618e","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"topic1","payload":"false","payloadType":"bool","x":150,"y":1680,"wires":[["3eb28492ef83a2a9"]]},{"id":"29b24e6cc693cfab","type":"inject","z":"a0d0f696507d618e","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"topic3","payload":"true","payloadType":"bool","x":140,"y":1860,"wires":[["2cc3bf5f14175362"]]},{"id":"9039559762e56e4c","type":"inject","z":"a0d0f696507d618e","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"topic3","payload":"false","payloadType":"bool","x":150,"y":1920,"wires":[["2cc3bf5f14175362"]]},{"id":"aa0b522928e906bd","type":"comment","z":"a0d0f696507d618e","name":"@mschaeffler/node-red-logic","info":"","x":500,"y":1840,"wires":[]}]

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.