Front door auto-relock piston not triggering


#1

1) Give a description of the problem
Front door auto-relock piston not triggering

2) What is the expected behavior?
When the door is unlocked the piston will wait 5 minutes, confirm the door is closed (contact) and then lock the door as long as the house is in the right location mode

3) What is happening/not happening?
Front door auto-relock piston not triggering


#2

It doesn’t look as though {minutesOpen} will ever be equal to anything other than zero. Where and how that variable supposed to be incremented?


#3

Instead of what you currently have on lies 30 and 31… replace with:

IF
age([Device Name : Lock]) IS greater than 5 minutes
THEN

And loose the variable (which isn’t doing anything anyway as @bthrock pointed out.


#4

Thanks, this was left over code from another piston… appreciate the help


#5

Thanks–

I simplified and added the code:

age([Front Entry Door:lock])) is greater than 5 minutes

Which shows locked status, wouldn’t I need unlocked status here? Not sure how to get ‘unlocked for 5 mins’


#6

There is no attribute called unlocked, that would be a state… the lock attribute covers both states… a lock can be unlocked or locked.

The age([]) expression just tells you how long it’s been in the current state.

You can also use previousAge which tells you how long it was in a certain state before the last change.


#7

That makes sense… so i added an additional line to also check that the lock is unlocked. Is the format above accurate to get ‘5 minutes’ or do I need to convert the output of that expression to mins instead of ms


#8

The age expression returns millisecond, so you are looking for 600000, but I think WC does the conversion for you so should be ok.


#10

Still doesn’t seem to be triggering, the time out goes above 300000 and the door remains unlocked?


#11

it’s hard for me to test without a lock

Maybe just loose the age() altogether. and put a wait before the lock command. You also don’t need the ‘lock is unlocked’ condition as webcore optimises that part for you (it wont send a lock command to a locked lock).

IF
closed
AND
not override
THEN
with lock
wait 5 minutes
lock


#12

Thanks - will give that a shot!


#13

I’ll ask this functional question: why not just have the door lock when the contact closes?? Would simplify things immensely.


#14

It’s a pain when going in and out quickly for things … the 5 minute delay basically gives us time to go in and out etc

Seems to be working with the “wait” instead of the other option.

Will continue to test