I thought there would be a difference between the following but both evaluate as TRUE when VacationON = FALSE (its normal state)
I want it to evaluate as TRUE only at the moment VacationON changes from True to False.
The time constraint test is applied on the time between the oldest and newest timestamps of all the terms. As this is an ordered sequence expression (using semicolons) the timestamps of the terms must also be in order so this would mean that the test is applied between Term1 and TermN.
(GuestSecureON; !GuestSecureON > 2:00) will be true when GuestSecureON last became false at least two minutes after it last became true - whenever that was.
(GuestSecureON; !GuestSecureON; NOW > 2:00) will be true when GuestSecureON is false and it is at least two minutes since it was last true. In practice the time constraint is 2:01 - 3:00 due to NOW occuring once per minute.
(VacationON; !VacationON) will be true when VacationOn last became false after it last became true. So this is exactly the same as !VacationON.
I want it to evaluate as TRUE only at the moment VacationON changes from True to False.
The following expressions are logically equivalent:
[ul][li](XXXX; !XXXX)
and
!XXXX[/li]
[li](!XXXX; XXXX)
and
XXXX[/li]
[li]XXXX and (XXXX; NOW > YYY < ZZZ)
and
(!XXXX; XXXX; NOW > YYY < ZZZ)[/li]
[li]!XXXX and (!XXXX; NOW > YYY < ZZZ)
and
(XXXX; !XXXX; NOW > YYY < ZZZ)[/li][/ul]
The first two give some insight to the behavior of the second two.
thanks guys, very helpful. I read the Syntax docs several times but the way you both explained it here is much more to the point on how those statements work. For example, I did not know or see on that page…
I’m struggling with my “Returning Home” condition…
Aaron AND (!Aaron; Aaron < 2:00)
… I want the Condition = TRUE when I return Home (Aaron is TRUE) but have been Away (Aaron is FALSE) and only the first 2 minutes of my return. I basically need a condition to detect when I have just returned home so it will disable the alarm… but I don’t want it triggering when I have a momentary issue (Aaron becomes FALSE accidentally or phone PING fails for a few pings.)
This part will be tough with the Aaron<2:00 part because PLEG won’t know if your device erroneously did not respond. If you are using a condition like this (pseudo)
NoAaron = !Ping and (!Ping;NOW>5:00)
where your timeout/retry for the Ping Sensor is less than 5:00. It should be a sturdier test for presence, but then you cannot use times less than 5:00 in Aaron<2:00
Perhaps you can come up with a time pair that works better if you are open to make the 2:00 a bit longer.
The full Condition is…
(!Aaron; Aaron < 2:00) AND (AwayON or StaySecureON or GuestSecureON or VacationON)
As you can see from the attached logs (and snippet below), at about 16:00 I arrived back home. AwayON is True and Aaron changed from False to True… but the Condition did not fire?
(!Aaron; Aaron < 2:00)
Failed because your returned more than 2 Minutes after you left … You returned 3:49:41 after you left.
Aaron
Is true when your are home;
Aaron; XXXX < 2:00
Will be true if XXXX was less that 2 Minutes from when you were home.
I am not sure what the XXX is in your use case.
Id you want AaronReturning to become false 2 minutes later …
Then XXXX can be NOW. But then it will not be true until NOW fires upto 1 minute later.
I take you want it to fire right away … but there is some problem with just using:
Aaron and (AwayOn or … VacationOn)
I do not see any logic that is depended on AaronReturning being false … You have a high degree of coupling to other logic that is not visible in the PLEG report.
I guess there is coupling between your Scene 90 and some of the other variables in this condition … It’s pretty difficult to understand your logic.
I was using…
Aaron and (AwayOn or … VacationOn)
… but when I moved from 5.9 + Variable Containers to 6.5 + MultiSwitch - it stopped working.
I suspect, the sister PLEG device, Occupancy Logic (report attached), was reacting so quickly to Aaron becoming TRUE, and changing the house modes (AwayOn or … VacationOn) before this PLEG device, Security Logic, could evaluate the Conditions again. Thus, the house modes were already FALSE and the Condition was then FALSE.
I need Aaron to be TRUE when the House Modes are FALSE.
should try a time delay tactic for the house modes too?
and/or would it be better to combine the PLEG devices?
thanks for the help, I think this is the last part that is not working since my move from 5.9 to 6.x
There were no changes from 5.9 to 6.x that should have effected this.
But if you are depending on timing for events running in parallel than you will have a fragile design.
You can split this into two conditions: c1 (AwayOn or … VacationOn)
Put a repeat on this. c2] Aaron and (c1; Aaron)
Then c2 will only be true if you arrive after previously getting a timestamp for c1.
This assumes c1 will get a timestamp when you leave.
Best Home Automation shopping experience. Shop at Ezlo!