Action after "wait" never fires


#1

1) Give a description of the problem
The action after the wait 10 seconds never fires

2) What is the expected behaviour?
The piston is “part 2” of 2 pistons. The first piston (not a problem with that) is triggered when my key box for house key (used by the cleaning lady) is opened. It causes all light to turn on and location mode set to “rengøring” (cleaning). The piston with the problem is the second one (as in the picture). When the cleaning lady closes the key box again and the house in in cleaning mode, it should turn off all lights, send me a push notification, then wait 10 seconds and set the location to “ude” (out). Lights turn off and I get the notification, but the location never changes.

I can get it to work without the “wait”. The issue here is, if I do not have a “wait” location changes to rapidly to “ude” thus firing the the first piston again.

**4) Post a Green Snapshot of the piston![image|45x37]


#2

The problem is that after the 10 second wait, the contact sensor rises is no longer true so it won’t go back into the then. It’s a funny thing about WC. You can set a boolean flag or use some other indicator added to your if to let the logic back in. One trick I have used is to add an or with condition contact sensor 1 is open (or risen?). This won’t trigger execution but will allow the pass through after the wait.


#3

I’m not sure if this is the right direction but have you tried NEVER CANCEL TASK??? (line 26)
(in a hurry didn’t read to whole thing so sorry)


#4

Ike is definitely going in the right direction, but the TCP set to Never should be on the WITH that contains the WAIT.


#5

Will try that @ike2018, thanks


#6

Lines 31, 32 and 33 are in their own block. Try moving them up into the ‘with’ block below the ‘turn off’.

If the ‘Never Cancel Task’ is placed at the ‘with’, it currently will not include the Wait, because it is in a different block.