Confused about combine logic result

Hi,

Thanks in advance to everyone who can help me with this problem.

With the combine node I evaluate a few window sensors (OR-Node) and 2 motion sensors (OR-Node). So far all are fine.
But why is the AND-combination of the OR-node-results "true" AND "false" equal to "true" ???
Do I understand the logic nodes wrong?

image

As shown in the image it does look wrong.
Tell us which node you are using (node-red-contrib-something possibly) and if you can, post a mini flow with the ORs AND and some inject nodes so that we can see if we can replicate the problem.

Hi Colin,

thanks for the quick reply. I´m using

node-red-contrib-combine 1.8.1 - combine-logic

I´ll also tested it with a simplified flow (please find it below).
I exchanged the windows sensors against injection nodes
Same issue.

[{"id":"c8b402b.103ff","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"268bff60.82206","type":"inject","z":"c8b402b.103ff","name":"","topic":"","payload":"false","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":430,"y":60,"wires":[["99eb519d.61be4"]]},{"id":"9d37c733.34e798","type":"inject","z":"c8b402b.103ff","name":"","topic":"","payload":"true","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":430,"y":380,"wires":[["7b88fb15.e9a524"]]},{"id":"3022200a.7b054","type":"inject","z":"c8b402b.103ff","name":"","topic":"","payload":"false","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":430,"y":100,"wires":[["99eb519d.61be4"]]},{"id":"bde79660.65b108","type":"inject","z":"c8b402b.103ff","name":"","topic":"","payload":"false","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":430,"y":220,"wires":[["7b88fb15.e9a524"]]},{"id":"c80e348b.cf7a18","type":"inject","z":"c8b402b.103ff","name":"","topic":"","payload":"false","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":430,"y":260,"wires":[["7b88fb15.e9a524"]]},{"id":"b8f39d9a.7b17c","type":"inject","z":"c8b402b.103ff","name":"","topic":"","payload":"false","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":430,"y":300,"wires":[["7b88fb15.e9a524"]]},{"id":"ef65333f.41dfc","type":"inject","z":"c8b402b.103ff","name":"","topic":"","payload":"false","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":430,"y":340,"wires":[["7b88fb15.e9a524"]]},{"id":"99eb519d.61be4","type":"combine-logic","z":"c8b402b.103ff","name":"","topic":"","operator":"or","defer":250,"timeout":0,"distinction":"topic","x":700,"y":60,"wires":[["53929354.27255c"]]},{"id":"7b88fb15.e9a524","type":"combine-logic","z":"c8b402b.103ff","name":"","topic":"","operator":"or","defer":250,"timeout":0,"distinction":"topic","x":700,"y":220,"wires":[["53929354.27255c"]]},{"id":"53929354.27255c","type":"combine-logic","z":"c8b402b.103ff","name":"","topic":"","operator":"and","defer":250,"timeout":0,"distinction":"topic","x":980,"y":60,"wires":[["bf5b352e.c337a8"]]},{"id":"bf5b352e.c337a8","type":"debug","z":"c8b402b.103ff","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":1200,"y":60,"wires":}]

In addition I also tested it on another Node-RED docker instance, with the same result:

Can you read this guide on how to post the flow so that it is importable (otherwise the forum messes with the format) and edit your previous post, then I will be able to try it.
https://discourse.nodered.org/t/how-to-share-code-or-flow-json/506/4

It would seem the node holds a message for the length of time you specify and then releases. In your case, you have it set to 250 ms so if a msg arrives and after 250ms no other msg has arrived, the msg is sent on.

As for how it works, I'm confused and can't figure out the logic it uses.

You might want to take a look at node-red-contrib-boolean-logic which seems to be understandable (at least to me)

Sorry Colin,

it was my first post here! :see_no_evil:

I hope it´s in the right format now. Thanks a lot for your help!

[{"id":"7ebdfe4c.5254a","type":"inject","z":"d5bbd0a3.e14e2","name":"","topic":"","payload":"false","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":430,"y":60,"wires":[["cbbdcdfe.65d8e"]]},{"id":"588b3ec.b1f68c","type":"inject","z":"d5bbd0a3.e14e2","name":"","topic":"","payload":"true","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":430,"y":380,"wires":[["271a5743.be0368"]]},{"id":"544f1e5f.a08da","type":"inject","z":"d5bbd0a3.e14e2","name":"","topic":"","payload":"true","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":430,"y":100,"wires":[["cbbdcdfe.65d8e"]]},{"id":"85e5a7a8.be6028","type":"inject","z":"d5bbd0a3.e14e2","name":"","topic":"","payload":"false","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":430,"y":220,"wires":[["271a5743.be0368"]]},{"id":"391f29d2.32d276","type":"inject","z":"d5bbd0a3.e14e2","name":"","topic":"","payload":"false","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":430,"y":260,"wires":[["271a5743.be0368"]]},{"id":"78ed2d88.b70dd4","type":"inject","z":"d5bbd0a3.e14e2","name":"","topic":"","payload":"false","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":430,"y":300,"wires":[["271a5743.be0368"]]},{"id":"a3172bc6.2707c8","type":"inject","z":"d5bbd0a3.e14e2","name":"","topic":"","payload":"false","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":430,"y":340,"wires":[["271a5743.be0368"]]},{"id":"8734d296.18bd6","type":"debug","z":"d5bbd0a3.e14e2","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":1200,"y":60,"wires":[]},{"id":"cbbdcdfe.65d8e","type":"combine-logic","z":"d5bbd0a3.e14e2","name":"","topic":"","operator":"or","defer":250,"timeout":0,"distinction":"topic","x":700,"y":60,"wires":[["eae11a0c.a30cb8"]]},{"id":"271a5743.be0368","type":"combine-logic","z":"d5bbd0a3.e14e2","name":"","topic":"","operator":"or","defer":250,"timeout":0,"distinction":"topic","x":700,"y":220,"wires":[["eae11a0c.a30cb8"]]},{"id":"eae11a0c.a30cb8","type":"combine-logic","z":"d5bbd0a3.e14e2","name":"","topic":"","operator":"and","defer":250,"timeout":0,"distinction":"topic","x":980,"y":60,"wires":[["8734d296.18bd6"]]}]

Thanks Zenofmud,

I will also give it a try with the node-red-contrib-boolean-logic

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