Hey all,
I'm relatively new to NR, but absolutely LOVING it.
I'm working on a flow which will let me know if a cupboard has been left open. The input is a reed switch connected to a RPi GPIO pin (this is working), the output is an email node (this is also working).
What I'm unsure how to achieve is the bit in the middle.
Basically, I only want to pass a trigger to the email node if the switch contact is open for 60 seconds.
I thought I could maybe use a 60 second delay and an AND node, but I'm not sure it works since the GPIO signal is continuously 1 or 0, as opposed to discrete, timed pulses.
I also tried node-red-contrib-timeframerlt, but found a similar problem (it will pass a signal after it is received x times in x seconds, but, again, it needs discrete pulses to work.)
I thought that maybe there is a way to use the trigger node to generate a True signal every 1 second that the input is held as True, but I'm not sure sure that's the best solution.
Could someone please point me in the direction of the right node I should be using for this?
I also found that the inject node works as a single pulse (ie you can't hold it down to transmit a continuous True/False signal), so I can't really test this without using the actual GPIO input.
- A side question: Is it detrimental in any way (performance/etc) to have a lot of nodes installed, but not in use?
Thank you for reading this far!
All the best,
Dax.