1) Give a description of the problem
I am attempting to keep track of prior events on a device at an interval of between 1 minute and 1 hour.
I unfortunately cannot find sufficient documentation to do so without help I super apologize. I cant tell how to use any of the arguments or expressions necessary to get what I want working on a piston.
2) What is the expected behaviour?
IF [Device] = [Open/Active] at least [X] times in the last [Y] Minutes THEN Do setVariable [Bool] = True ELSEIF [Device] = [Open/Active] less than [X] times in the last [Y] Minutes THEN Do setVariable [Bool] = False
3) What is happening/not happening?
I honestly cannot wrap my head around enough of the core scripting to get anything resembling what I am looking to do. I can’t tell if I need to create a shifting array (or how to use arrays in core for that matter) Or if there is a piston level system variable that stores old events that I can compare to the $now variable or If I need to store a variable each time the device triggers passing $now on trigger. I would greatly appreciate any guidance and or pistons that can achieve the effect.
Disclaimer I unfortunately am not looking for a “Was inactive” or “wait” I am looking to count the number of activations of a given event in the past [X] timeframe in minutes.
I’ve been searching all day and I can’t even get off the ground with this. Is this even possible?
PS I actually worked for ST in the past and was there during the migration to the new app