Inconsistancy with triggers


#1

1) Give a description of the problem
Wake up in the morning and press a button. Thermostat sets up to 72 degrees everytime. Walk out to kitchen and motion sensor should set up a series of events

2) What is the expected behavior?
(PUT YOUR INFO HERE)

3) What is happening/not happening?
The events happened as expected the first 2 mornings, then would be triggered up to 30 minutes later

**4) Post a Green Snapshot of the piston![image|45x37]

5) Attach any logs (From ST IDE and by turning logging level to Full)
7:18:35 AM: info smartapp_pause called by smartAppName=webCoRE Piston, value=1500, smartAppVersionId=21b0a9a8-fda9-469b-bbcf-138ad64d516e
7:18:34 AM: info smartapp_pause called by smartAppName=webCoRE Piston, value=1500, smartAppVersionId=21b0a9a8-fda9-469b-bbcf-138ad64d516e
7:18:34 AM: trace β•‘β•‘ Executed virtual command [Front Door Lock].wait (0ms)
7:18:35 AM: trace β•‘β•‘ Executed [Mikes Light].on (6ms)
7:18:35 AM: debug β•‘β•‘ Cancelling statement #29’s schedules…
7:18:34 AM: trace β•‘β•‘ Executed [Front Door Lock].unlock (129ms)
7:18:34 AM: debug β•‘β•‘ Condition group #5 evaluated true (state changed) (31ms)
7:18:34 AM: debug β•‘β•‘ Condition #33 evaluated true (12ms)
7:18:34 AM: debug β•‘β•‘ Cancelling statement #37’s schedules…
7:18:34 AM: debug β•‘β•‘ Cancelling condition #5’s schedules…
7:18:34 AM: debug β•‘β•‘ Cancelling condition #33’s schedules…
7:18:34 AM: debug β•‘β•‘ Comparison (integer) 0 is_less_than (integer) 5 = true (1ms)
7:18:34 AM: debug β•‘β•‘ Condition #10 evaluated true (7ms)
7:18:34 AM: debug β•‘β•‘ Comparison (boolean) true is (boolean) true = true (2ms)
7:18:34 AM: debug β•‘β•‘ Condition #9 evaluated true (7ms)
7:18:34 AM: debug β•‘β•‘ Cancelling condition #9’s schedules…
7:18:34 AM: debug β•‘β•‘ Comparison (enum) active changes_to (string) active = true (1ms)
7:18:34 AM: trace β•‘ Runtime (43583 bytes) successfully initialized in 36ms (v0.3.109.20181207) (111ms)
7:18:34 AM: trace β•‘β•š Execution stage started

7:17:11 AM: trace β•‘ Runtime (43583 bytes) successfully initialized in 49ms (v0.3.109.20181207) (131ms)
7:16:51 AM: debug β•‘β•‘ Condition group #1 evaluated false (state did not change) (11ms)
7:16:51 AM: trace β•‘β•š Execution stage started
7:16:51 AM: trace β•‘ Runtime (43581 bytes) successfully initialized in 42ms (v0.3.109.20181207) (127ms)
7:16:51 AM: debug β•‘ RunTime Analysis CS > 20ms > PS > 42ms > PE > 63ms > CE
7:16:51 AM: info β•š Received event [Fridge Sensor].motion = inactive with a delay of 73ms
7:15:51 AM: debug β•‘β•‘ Condition group #5 evaluated false (state did not change) (28ms)
7:15:51 AM: debug β•‘β•‘ Condition #10 evaluated true (6ms)
7:15:51 AM: debug β•‘β•‘ Condition #9 evaluated true (8ms)
7:15:51 AM: debug β•‘β•‘ Comparison (boolean) true is (boolean) true = true (2ms)
7:15:51 AM: debug β•‘β•‘ Condition group #1 evaluated false (state did not change) (10ms)
7:15:51 AM: debug β•‘β•‘ Condition #11 evaluated false (9ms)
7:15:51 AM: trace β•‘β•š Execution stage started

7:10:00 AM: debug β•‘β•‘ Condition group #21 evaluated true (state did not change) (3ms)
7:10:00 AM: debug β•‘β•‘ Condition group #23 evaluated true (state did not change) (1ms)
7:10:00 AM: debug β•‘β•‘ Condition group #5 evaluated false (state did not change) (28ms)
7:10:00 AM: debug β•‘β•‘ Condition #10 evaluated true (6ms)
7:10:00 AM: debug β•‘β•‘ Condition #9 evaluated true (7ms)
7:10:00 AM: debug β•‘β•‘ Comparison (boolean) true is (boolean) true = true (2ms)
7:10:00 AM: debug β•‘β•‘ Comparison (enum) active changes_to (string) active = true (1ms)
7:10:00 AM: debug β•‘β•‘ Condition #11 evaluated false (8ms)
7:10:00 AM: trace β•‘ Runtime (43585 bytes) successfully initialized in 284ms (v0.3.109.20181207) (370ms)
7:09:59 AM: debug β•‘β•‘ Condition group #21 evaluated true (state did not change) (3ms)
7:09:59 AM: debug β•‘β•‘ Condition #9 evaluated false (8ms)
7:09:59 AM: debug β•‘β•‘ Condition group #5 evaluated false (state did not change) (9ms)
7:09:59 AM: debug β•‘β•‘ Comparison (enum) inactive changes_to (string) active = false (1ms)
7:09:59 AM: debug β•‘β•‘ Cancelling condition #9’s schedules…
7:09:59 AM: debug β•‘β•‘ Condition #11 evaluated false (8ms)0682ffcf-514b-488f-8733-6ee85877eb52 7:09:59 AM: debug β•‘β•‘ Condition group #1 evaluated false (state did not change) (9ms)
7:09:59 AM: trace β•‘β•š Execution stage started
7:09:59 AM: trace β•‘ Runtime (43581 bytes) successfully initialized in 53ms (v0.3.109.2018120

REMOVE BELOW AFTER READING
If a solution is found for your question then please mark the post as the solution.


#2

You don’t have any code for this here, unless you leave the kitchen for a few minutes, and then press the button again.


Also, 5 lux is incredibly dark…
If it were me, I’d delete line 42


#3

I had a wait command inserted to allow time to wait for the house to warm a bit before I wandered into the kitchen, but I was getting the same result. I’ll take out the lux requirement out for now and see if that is the culprit. Thanks


#4

I just noticed one more observation…

It might be more reliable if line 35 was moved up a bit (immediately before the Thermostat block)

My logic is:
Sometimes there is a bit of a delay communicating with thermostats. That delay would slow down the β€œvariable set”… which in turn would not always be correctly set when you first walked into the room.

In other words, if the variable is set before the Thermostat line fires, there should be no missed triggers when you walk in front of the motion sensor.