not familiar with sequencing conditions.
I want PLEG to disarm the alarm if the alarm is on, the door is unlocked and then the door is opened within 10 seconds.
AlarmIsArmed AND DoorIsOpened AND (DoorIsUnlockedWithPin ; DoorIsOpened < 10)
Do I need the bold part? I want to make sure that it won’t trigger when I don’t want it to, obviously.
However I’m thinking that the two timestamps could qualify as true, if for example the last time the door was opened it was unlocked with the pin. In that case, if the alarm is armed, I can see this condition disarming the alarm immediately. adding the DoorIsOpened assures that in fact, this just happened.
Perhaps it is better to use:
AlarmIsArmed AND (DoorIsUnlockedWithPin ; DoorIsOpened < 10; NOW)
My concern is that the alarm will not be shut off in time, waiting for the next NOW update. As I understand it, NOW can take up to 60 seconds to update the status of the condition.
Any thoughts?
AlarmIsArmed [b]AND DoorIsOpened[/b] AND (DoorIsUnlockedWithPin ; DoorIsOpened < 10)
Do I need the bold part? I want to make sure that it won’t trigger when I don’t want it to, obviously.
Yes, the bold part is necessary to avoid a premature true based on the previous
DoorIsOpened event.
Perhaps it is better to use:
AlarmIsArmed AND (DoorIsUnlockedWithPin ; DoorIsOpened < 10; NOW)
My concern is that the alarm will not be shut off in time, waiting for the next NOW update. As I understand it, NOW can take up to 60 seconds to update the status of the condition.
I’m afraid that expression is not valid. You would need to split this into two Conditions but I don’t think it is what you want anyway. As you say, the term Now becomes true every 60 seconds so it could occur at any point from 0 to 59.999 seconds from the last evaluation.
Perhaps the safest expression would be this:
AlarmIsArmed AND DoorIsOpened AND (AlarmIsArmed; DoorIsUnlockedWithPin) AND ((DoorIsUnlockedWithPin ; DoorIsOpened < 10)
thanks! I saw the problem with the expression when I tested it, but I knew you would be able to tell that I was looking for those three events in that order, with a delay. I totally get it now and appreciate your help.
PLEG really adds a lot to what can be done with Vera.
PLEG really adds a lot to what can be done with Vera.
IMHO, Vera isn't really worth having [u]without[/u] PLEG. ;)
particularly once you get past just turning lights on at sunset, kind of things…