Allow only 1 instance of a payload to go thru within X time

I’m sure this is an easy one, but before I try many different routes I want to make sure I start ‘attacking’ it with the most efficient way possible:
image
This particular ‘tilt’ sensor, as the name implies, detects angle ‘tilt’ and, once passed a threshold, then activates, sends its payload, etc. What I want to know is how to most efficiently allow only 1 INSTANCE of a msg/payload (for example, in this case, from C29B device) within a variable time (say 30 minutes or 1 hr) before allowing any additional msgs to go thru. This prevents from multiple in-the-moment or simultaneous ‘tilt’ actions triggering WFL, SMS and E-mail unnecessary in this particular application. Pardon the ‘goe’ in the graph :smiley:

Thanks in advance, :red_circle:

Hi @Jose_Cruz,

I would recommend using a Latch Node and an optional Date/Time Node. The Latch Node allows a workflow to easily do “one-time” branching with a reset, so you should be able to easily reset on a time condition. You can begin with a Device: Get Node that provides the last state report for the device, which also includes the timestamp. Then, you can optionally use your Date/Time Node to do a comparison of that state report timestamp and now, and save that on the payload. Over in your Latch Node, your reset condition would use that time difference variable to determine which path to take (example, timeDiff>30 minutes).

Let me know if I can help further!
Julia

1 Like

@JuliaKempf thank you; as always the needed :point_right: nudge on the right direction. I’m on it; I’ll let you know how it goes… j :red_circle:

1 Like

@JuliaKempf , after finally a cpl of days to work on this and a bit of testing back and forth, everything worked :medal_sports: EXACTLY :medal_sports: as you suggested above with these 3 nodes inserted in my WLF :
image
Thank you!!! :red_circle: :smiley:

1 Like