Multiple triggers running in the same routine within the same statement


#1

I am trying to get all the bathroom exhaust fans to have a routine that if left on, they all get turned off after 60 minutes. When i run the attached routine, they all turn off 60 minutes after the first one turned on. I can see how this happened, i just needed this in place to at least stop the current nonsense.

Question is, how do i get to have it respect each fans timers individually without making one per fan? So as each fan is triggered, it has its own timer within one routine? I tried using $currenteventdevice and that only stopped the last fan triggered. $devices, doesn’t seem to work either to hold all triggered devices.


#2

set TSP to allow multiple for the with statement

image


#3

As mentioned above change your TSP.

Also need to restructure your piston. There is no need for a while loop.

If any of switch 1, switch 2, switch n... changes to on
Then 
With $currentEventDevice...
Wait 60 minutes
Turn off
End if

#4

So I edited my “while” loop back to an “if” and then went to edit the properties, but I do not have the “Task Scheduling Policy” option. Stupid question, how do i get that to appear?


#5

click on the with


#6

perfect


#7

if you add more switches, probably should check with @ady624 on how many timers are supported per piston.


#8

Back to the original issue, doesn’t trigger the other fans, just the first one gets turned off.


#9

on the with also set TCP to never.


#10

that was it :slight_smile: