1) Give a description of the problem
I have a nested IF condition that is evaluating true when it shouldn’t
2) What is the expected behavior?
I am trying to set up an IF condition where IF the value of any two presence devices is “present” and AND the value of a variable is either “arriving” or “away” the IF is true then stuff happens which includes changing the tested variable to “home”. Changing the variable to “home” should make the IF condition return false anytime the presence devices change value until the variable is “away” or “arriving”
3) What is happening/not happening?
The IF is evaluating as TRUE when either presence device is present and seems to be independent of the variable. The IF that I am referring too is the second main IF that is based on two presence devices and a variable. It is IF #55. I am thinking it should read that the IF results in TRUE only when one of the presence devices is one of the values indicated AND when the variable is one of the value indicated. It seems the IF is not based on the two OR conditions together and analyses each OR condition on its own.
**4)
**5) Here is my Log. According to how the piston should work the execution at time 7:44 shows that the IF was tested as true and then the variable was set which should of set the variable to “away” which should then cause the same IF to result in a false outcome until the variable is set to “arriving” or “home”. However, at time 7:56 the IF condition is determine to be true and the piston runs and does the same steps again including setting the variable to “away” If I want the IF to be based on two OR conditions ANDed together do I need to imbed the one OR condition in from the other or can I have them on the same level like I do and am just setting it up wrong?
10/30/2017, 7:56:51 AM +265ms
+1ms ╔Received event [Amy Life360].presence = not present with a delay of 163ms
+187ms ║RunTime Analysis CS > 23ms > PS > 42ms > PE > 123ms > CE
+197ms ║Runtime (59401 bytes) successfully initialized in 42ms (v0.2.0fb.20171026) (194ms)
+198ms ║╔Execution stage started
+211ms ║║Comparison (enum) not present changes_to (string) present = false (1ms)
+213ms ║║Condition #107 evaluated false (7ms)
+221ms ║║Condition #108 evaluated false (8ms)
+222ms ║║Condition group #106 evaluated false (state did not change) (17ms)
+223ms ║║Condition group #1 evaluated false (state did not change) (19ms)
+232ms ║║Comparison (enum) not present changes_to (string) not present = true (1ms)
+234ms ║║Cancelling condition #111’s schedules…
+235ms ║║Condition #111 evaluated true (7ms)
+236ms ║║Cancelling condition #110’s schedules…
+237ms ║║Condition group #110 evaluated true (state changed) (9ms)
+242ms ║║Comparison (dynamic) home is (string) arriving = false (2ms)
+244ms ║║Cancelling condition #118’s schedules…
+245ms ║║Condition #118 evaluated false (6ms)
+249ms ║║Comparison (dynamic) home is (string) home = true (1ms)
+251ms ║║Condition #119 evaluated true (6ms)
+252ms ║║Condition group #117 evaluated true (state did not change) (14ms)
+253ms ║║Cancelling condition #55’s schedules…
+254ms ║║Condition group #55 evaluated true (state changed) (27ms)
+256ms ║║Cancelling statement #98’s schedules…
+260ms ║║Executed virtual command setVariable (1ms)
+281ms ║║Executed virtual command sendSMSNotification (14ms)
+320ms ║║Comparison (enum) off did_not_change = true (29ms)
+321ms ║║Condition #59 evaluated true (37ms)
+331ms ║║Comparison (enum) closed is (string) open = false (2ms)
+332ms ║║Condition #60 evaluated false (10ms)
+333ms ║║Condition group #56 evaluated false (state did not change) (49ms)
+340ms ║║Comparison (dynamic) arriving is (string) home = false (1ms)
+342ms ║║Condition #78 evaluated false (6ms)
+343ms ║║Condition group #77 evaluated false (state did not change) (7ms)
+349ms ║║Comparison (dynamic) away changes_to (string) away = false (1ms)
+350ms ║║Condition #76 evaluated false (4ms)
+351ms ║║Condition group #73 evaluated false (state did not change) (6ms)
+354ms ║║Cancelling statement #124’s schedules…
+358ms ║║Executed virtual command wait (1ms)
+359ms ║║Requesting a wake up for Mon, Oct 30 2017 @ 7:57:51 AM EDT (in 60.0s)
+364ms ║╚Execution stage complete. (167ms)
+366ms ║Setting up scheduled job for Mon, Oct 30 2017 @ 7:57:51 AM EDT (in 59.995s)
+381ms ╚Event processed successfully (381ms)
10/30/2017, 7:46:51 AM +863ms
+2ms ╔Received event [Amy Webcore].leavingPlace = with a delay of 158ms
+171ms ║RunTime Analysis CS > 16ms > PS > 34ms > PE > 120ms > CE
+184ms ║Runtime (59397 bytes) successfully initialized in 34ms (v0.2.0fb.20171026) (181ms)
+185ms ║╔Execution stage started
+201ms ║║Condition #107 evaluated false (8ms)
+211ms ║║Condition #108 evaluated false (9ms)
+212ms ║║Condition group #106 evaluated false (state did not change) (20ms)
+213ms ║║Condition group #1 evaluated false (state did not change) (20ms)
+222ms ║║Condition #111 evaluated false (6ms)
+228ms ║║Comparison (string) changes_to (string) Home = false (1ms)
+229ms ║║Condition #112 evaluated false (6ms)
+230ms ║║Condition group #110 evaluated false (state did not change) (14ms)
+231ms ║║Condition group #55 evaluated false (state did not change) (16ms)
+233ms ║╚Execution stage complete. (48ms)
+546ms ╚Event processed successfully (546ms)
10/30/2017, 7:45:42 AM +644ms
+0ms ╔Received event [Home].time = 1509363942655 with a delay of -12ms
+191ms ║RunTime Analysis CS > 25ms > PS > 34ms > PE > 133ms > CE
+203ms ║Runtime (59395 bytes) successfully initialized in 34ms (v0.2.0fb.20171026) (201ms)
+204ms ║╔Execution stage started
+279ms ║╚Execution stage complete. (76ms)
+402ms ╚Event processed successfully (402ms)
10/30/2017, 7:44:43 AM +328ms
+1ms ╔Received event [Home].:af103ce89aaeec5d0b08004e47e18440: = @AmyLocation with a delay of 268ms
+195ms ║RunTime Analysis CS > 21ms > PS > 22ms > PE > 151ms > CE
+206ms ║Runtime (59424 bytes) successfully initialized in 22ms (v0.2.0fb.20171026) (205ms)
+207ms ║╔Execution stage started
+220ms ║║Condition #107 evaluated false (6ms)
+227ms ║║Condition #108 evaluated false (6ms)
+228ms ║║Condition group #106 evaluated false (state did not change) (14ms)
+229ms ║║Condition group #1 evaluated false (state did not change) (16ms)
+238ms ║║Condition #111 evaluated false (5ms)
+245ms ║║Condition #112 evaluated false (7ms)
+246ms ║║Condition group #110 evaluated false (state did not change) (14ms)
+247ms ║║Condition group #55 evaluated false (state did not change) (16ms)
+250ms ║╚Execution stage complete. (43ms)
+252ms ║Setting up scheduled job for Mon, Oct 30 2017 @ 7:45:42 AM EDT (in 59.076s)
+268ms ╚Event processed successfully (268ms)
10/30/2017, 7:44:42 AM +54ms
+1ms ╔Received event [Amy Webcore].leavingPlace = Home with a delay of 147ms
+163ms ║RunTime Analysis CS > 13ms > PS > 24ms > PE > 125ms > CE
+182ms ║Runtime (59394 bytes) successfully initialized in 24ms (v0.2.0fb.20171026) (180ms)
+183ms ║╔Execution stage started
+198ms ║║Condition #107 evaluated false (8ms)
+207ms ║║Condition #108 evaluated false (8ms)
+208ms ║║Condition group #106 evaluated false (state did not change) (18ms)
+209ms ║║Condition group #1 evaluated false (state did not change) (20ms)
+220ms ║║Condition #111 evaluated false (7ms)
+225ms ║║Comparison (string) Home changes_to (string) Home = true (1ms)
+227ms ║║Cancelling condition #112’s schedules…
+228ms ║║Condition #112 evaluated true (7ms)
+229ms ║║Cancelling condition #110’s schedules…
+230ms ║║Condition group #110 evaluated true (state changed) (17ms)
+236ms ║║Comparison (dynamic) arriving is (string) arriving = true (2ms)
+238ms ║║Cancelling condition #118’s schedules…
+238ms ║║Condition #118 evaluated true (7ms)
+239ms ║║Condition group #117 evaluated true (state did not change) (8ms)
+241ms ║║Cancelling condition #55’s schedules…
+241ms ║║Condition group #55 evaluated true (state changed) (29ms)
+244ms ║║Cancelling statement #98’s schedules…
+249ms ║║Executed virtual command setVariable (1ms)
+268ms ║║Executed virtual command sendSMSNotification (11ms)
+554ms ║║Comparison (enum) off did_not_change = true (276ms)
+555ms ║║Condition #59 evaluated true (284ms)
+565ms ║║Comparison (enum) closed is (string) open = false (2ms)
+567ms ║║Condition #60 evaluated false (11ms)
+568ms ║║Condition group #56 evaluated false (state did not change) (298ms)
+576ms ║║Comparison (dynamic) arriving is (string) home = false (2ms)
+578ms ║║Condition #78 evaluated false (7ms)
+579ms ║║Condition group #77 evaluated false (state did not change) (8ms)
+586ms ║║Comparison (dynamic) away changes_to (string) away = false (1ms)
+588ms ║║Cancelling condition #76’s schedules…
+589ms ║║Condition #76 evaluated false (6ms)
+590ms ║║Cancelling condition #73’s schedules…
+591ms ║║Condition group #73 evaluated false (state changed) (9ms)
+595ms ║║Cancelling statement #124’s schedules…
+599ms ║║Executed virtual command wait (1ms)
+600ms ║║Requesting a wake up for Mon, Oct 30 2017 @ 7:45:42 AM EDT (in 60.0s)
+667ms ║║Comparison (enum) present was (string) present = true (16ms)
+669ms ║║Condition #123 evaluated true (29ms)
+670ms ║║Condition group #120 evaluated true (state did not change) (30ms)
+673ms ║║Cancelling statement #121’s schedules…
+677ms ║║Executed virtual command setVariable (1ms)
+689ms ║║Condition #111 evaluated false (7ms)
+696ms ║║Cancelling condition #112’s schedules…
+697ms ║║Condition #112 evaluated false (7ms)
+698ms ║║Cancelling condition #110’s schedules…
+699ms ║║Condition group #110 evaluated false (state changed) (17ms)
+700ms ║║Cancelling condition #55’s schedules…
+701ms ║║Condition group #55 evaluated false (state changed) (20ms)
+704ms ║╚Execution stage complete. (521ms)
+706ms ║Setting up scheduled job for Mon, Oct 30 2017 @ 7:45:42 AM EDT (in 59.896s)
+939ms ╚Event processed successfully (939ms)