Your home at your fingertips

Learning – Logic AND / OR / XOR

Home >> Node-RED App Library

This flow demonstrates how to use :

  • realknx-in
  • boolean logic
  • realknx-out

AND: If all the entries are equal to “true” then the result will be “true”. If any entry is “false”, the result will be “false”.
OR:  If any entry is “true” then the result will be “true”. “False” will be sent only when all entries are “false”.
XOR:   “One or the other but not both”. The result is “true”  when the number of true inputs is odd.  So if all the entries are “true” or “false”, the result will be “false”

 

3-input XOR gate



Note: Remember to set the option  “Convert output to boolean”  in the realknx-in module.

How it works:

In this flow the state of three KNX lights are connected to an OR node. If one of the lights are ON (true) the output is true. In this case the realKNX output node (Garage – Lights State) will be set to true whenever one of the light is on.

Download Codelearning-logic-and-or.json

How-to import: Video Tutorial