Output when two different inputs are true simoultaneusly

I placed two motions sensors intercepting the motion around a door. I used two sensors to limit the false positive events caused by one sensor only. I would like to obtain an output only when the two inputs are simultaneously true
I used a Boolean logic utlimate node from node-red-contrib-boolean-logic-ultimate but it doesn't work as I expected. It memorizes one input if true and when the second one become true it outputs true even ht first one is back false.

Is there any way to check both inputs simultaneously?

Thanks

Node.js in general and node-red specifically does not really operate synchronously.

All you can really do is have the two incoming sensors update a common flow/global variable but if the sensors trigger very close together, you will probably still get some issues. Really, you need to make sure that the sensor outputs are synchronised and it would be better to do that in firmware rather than Node-RED though I appreciate that might not be feasible if not working with sensors that you can program.

The alternative approach is likely to be that you need to ensure that the sensors don't trigger too quickly and then you can create a slight delay in Node-RED so that you can be sure that you have both signals, combine them and do the output before either of the sensors triggers again.

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