Using multiple TRIGGERS in single IF


#1

1) Give a description of the problem
I have 3 ways of triggering the IF. (by using OR)
1 - Voice
2 - Time
3 - Other rooms changing
Sometimes it does not change the value of the variable.
For instance this morning at 7.10am the variable was not ZERO.

2) What is the expected behavior?
Variable to change everytime IF one of the criterias met.

3) What is happening/not happening?
Sometimes it does not work.
When I check the variable it looks as if nothing triggered it.

4) Post a Green Snapshot of the pistonimage
07%20PM

I was wondering if there is a better way of using multiple OR IF structer.


#2

When it fails to trigger, is it always the variables or does it sometimes miss the 7am as well?

If it’s only the variable - have you seen times where, for example, @MovieRoomPhase changes to 2 but the piston is not triggered? Or is it the other way… the @MovieRoomPhases should have changed to 2, but it doesn’t, so the piston isn’t triggered?


#3

Great questions michicago:
Sometimes it’s after 7am and the variable doesn’t change… and today I was trying to do it around 4pm the piston got triggered (Green line) but the variable @mainentrancephases changed around 4;02pm
I believe i should observe better and add some logs here…


#4

If you could do that and post the piston (or segments) that drive the global variables, we can probably get to the bottom of what’s going on here. :slight_smile:


#5

Here is the log…
This one didn’t even fire this morning at 5.00am
At 5.00am the variable had to become 2 but right now (6.15am) still reads ZERO
Last time was last evening…

52%20AM


#6

Pic of global variable list?


#7

There you go…
I just changed it manually
48%20AM


#8

I don’t see @MovieRoomPhases and @Mbedroomphases?


#9

09%20AM


#10

there you go…
Since I was focusing on why it did not work at 5.00 am i forgot about the other parts of the piston:)))))


#11

I am a little baffled as to why you do not have 7 symbols in the left margin identifying triggers…


#12

let me check
but I believe I was in EDIT mode while I got the screen shot.


#13

Same thing happened again…
At 7.00am @mainentrancephases had to be “0”
Piston ran but nothing changed…
Here is the log for 6.59AM

10/31/2018, 6:59:59 AM +333ms
+1ms ╔Received event [Home].time = 1541005200000 with a delay of -667ms
+208ms ║RunTime Analysis CS > 58ms > PS > 85ms > PE > 64ms > CE
+210ms ║Runtime (44714 bytes) successfully initialized in 85ms (v0.3.108.20180906) (208ms)
+212ms ║╔Execution stage started
+223ms ║║Comparison (time) 25199552 happens_daily_at (time) 25200000 = true (0ms)
+224ms ║║Time restriction check passed
+226ms ║║Cancelling condition #2’s schedules…
+227ms ║║Condition #2 evaluated true (8ms)
+229ms ║║Cancelling statement #2’s schedules…
+235ms ║║Requesting time schedule wake up at Thu, Nov 1 2018 @ 7:00:00 AM HST
+239ms ║║Cancelling condition #1’s schedules…
+241ms ║║Condition group #1 evaluated true (state changed) (22ms)
+244ms ║║Cancelling statement #5’s schedules…
+250ms ║║Executed virtual command setVariable (1ms)
+294ms ║║Comparison (time) 25199588 happens_daily_at (time) 1541044860000 = false (1ms)
+296ms ║║Condition #8 evaluated false (42ms)
+318ms ║║Cancelling statement #8’s schedules…
+328ms ║║Requesting time schedule wake up at Wed, Oct 31 2018 @ 5:01:00 PM HST
+332ms ║║Condition group #7 evaluated false (state did not change) (78ms)
+341ms ║║Comparison (time) 25199670 happens_daily_at (time) 18000000 = false (1ms)
+344ms ║║Condition #12 evaluated false (6ms)
+346ms ║║Cancelling statement #12’s schedules…
+351ms ║║Requesting time schedule wake up at Thu, Nov 1 2018 @ 5:00:00 AM HST
+355ms ║║Condition group #11 evaluated false (state did not change) (18ms)
+368ms ║║Condition #16 evaluated false (8ms)
+369ms ║║Condition group #15 evaluated false (state did not change) (11ms)
+375ms ║╚Execution stage complete. (163ms)
+378ms ║Setting up scheduled job for Wed, Oct 31 2018 @ 5:01:00 PM HST (in 36060.29s), with 2 more jobs pending
+387ms ╚Event processed successfully (387ms)


#14

is it normal that when I do anonymized snapshot trigger symbols are not shown???


#15

This looks like the variable was set to ‘0’ at 7am. Can you confirm that the global changed correctly? If so, then the focus should be on the other piston that is monitoring that global.


They always show for me… I wonder if it depends on which browser you are using…
(as long as they are there as triggers, all is good, but triggers are one of the important things I look at when troubleshooting a piston)

temp


#16

It did NOT change… When I looked at 8.20ish it was still 2
I changed it manually.


#17

and YES it is a browser thing… Chrome just showed all of the triggers in anoym screen shot


#18

I tested with SWITCH and global variables do change.
I tested with changing another global variable @movieroomphases and it worked.

What doesn’t work is HAPPENS DAILY AT


#19

There have been some strange occurances with the various timers I have seen as of late. I am still working on identifying the strengths and weaknesses for each of them before making a detailed post for reference.

In the meantime, you could remove the line referring to the time, and make a new block:

Every day at 7am
  Do
    Set variable to 0
End Every

#20

if you mean TIMER,
I just did
AND IT WORKED…

nice
WCmore to the rescue one more time:)

now I am just curious why HAPPENS DAILY AT is not working?