1) Give a description of the problem
I initally designed the piston based off of my piston for my bed room so that 1 push would dim the lights up or down, double push would change the direction of dimming and held would turn the lights on or off. I installed a door sensor on our garage door (the door into the house not the big car door) so that every time it would be opened after a certain time it would turn the lights on for 15 mins, 5 mins at 100% brightness and then 10mins at 50% brightness then off. This worked fine with the way I set up the piston to begin with, then I decided I should probably put in a way to turn the lights on and off without it being a certain time of day so to that same piston I haded an ‘on events from’ part for a smartthings button that does what I described above and that too seemed to work. In order to get it to work I had to set the tasks that were set up by the door sensor to be cancelled when the door button was pressed. I did this by having the piston change its state to ‘cancelled’ if the button was pressed and this caused the tasks from the door sensor to be overriden. This all seemed to work fine for awhile but now it will turn on the lights with the door at the proper time and the button can turn the lights on and off but it never dims automatically nor shuts off. In the logs you can see that it says 'requesting wake up in 300.0s (5 mins) which is correct but nothing ever happens now and I don’t see any errors in the logs nor a reason in the code for this not to work. Initally I had the door sensor turn the piston state to ‘excuting’ and then it when into the ‘if the lights are off turn them on at 100% and wait 5 mins, then turn to 50% then wait 10 mins then turn off’ which worked before now, but I tried to move it into the main block where it would only be executed (piston state change) if the lights were off and the lights were turned on by the door sensor but I get the same result. What is going on here? Is it because of the TCP? It use to work just fine though so I am pretty sure that its not due to TCP. the TCP is to cancel all tasks if the piston state changes after those tasks have started which it never does, see the logs.
2) What is the expected behaviour?
Lights to turn on at 100%, then wait 5 mins, then turn to 50% then wait 10 mins then turn off (this use to work just fine) Also I have already tried rebuilding the cache on webcore from within smart things)
3) What is happening/not happening?
not dimming or turning off lights like it use to
**4) Post a Green Snapshot of the piston!
5) Attach logs after turning logging level to Full
### Logs
12/30/2019, 7:55:48 PM +305ms
+2ms ╔Received event [Inside Garage Door Sensor].contact = closed with a delay of 134ms
+115ms ║RunTime Analysis CS > 20ms > PS > 45ms > PE > 49ms > CE
+118ms ║Runtime (52145 bytes) successfully initialized in 45ms (v0.3.110.20191009) (115ms)
+118ms ║╔Execution stage started
+122ms ║║Condition group #1 evaluated true (state did not change) (1ms)
+123ms ║║Condition group #null evaluated true (state did not change) (2ms)
+139ms ║║Comparison (enum) on is_not (string) on = false (1ms)
+141ms ║║Comparison (enum) on is_not (string) on = false (2ms)
+142ms ║║Cancelling condition #22's schedules...
+143ms ║║Condition #22 evaluated false (17ms)
+144ms ║║Cancelling condition #4's schedules...
+145ms ║║Condition group #4 evaluated false (state changed) (19ms)
+149ms ║╚Execution stage complete. (31ms)
+150ms ╚Event processed successfully (150ms)
12/30/2019, 7:55:45 PM +441ms
+1ms ╔Received event [Inside Garage Door Sensor].contact = open with a delay of 120ms
+120ms ║RunTime Analysis CS > 18ms > PS > 43ms > PE > 59ms > CE
+124ms ║Runtime (52141 bytes) successfully initialized in 43ms (v0.3.110.20191009) (121ms)
+125ms ║╔Execution stage started
+128ms ║║Condition group #1 evaluated true (state did not change) (0ms)
+129ms ║║Condition group #null evaluated true (state did not change) (2ms)
+145ms ║║Comparison (enum) off is_not (string) on = true (1ms)
+147ms ║║Cancelling condition #22's schedules...
+148ms ║║Condition #22 evaluated true (15ms)
+149ms ║║Cancelling condition #4's schedules...
+150ms ║║Condition group #4 evaluated true (state changed) (18ms)
+194ms ║║Comparison (time) 71745593 is_between (time) 1577745960000 .. (time) 1577713860000 = true (9ms)
+195ms ║║Time restriction check passed
+197ms ║║Condition #7 evaluated true (46ms)
+202ms ║║Comparison (enum) open is (string) open = true (2ms)
+203ms ║║Condition #8 evaluated true (5ms)
+204ms ║║Condition group #6 evaluated true (state did not change) (53ms)
+205ms ║║Condition group #4 evaluated true (state did not change) (55ms)
+207ms ║║Cancelling statement #23's schedules...
+211ms ║║Executed virtual command setState (0ms)
+216ms ║║Comparison (string) :ea54d0a6f35719b99744c137970d101f: is_any_of (string) :ea54d0a6f35719b99744c137970d101f:,:c655209e5ef4794becab5b7636986f0e: = true (1ms)
+218ms ║║Condition #21 evaluated true (5ms)
+219ms ║║Condition group #14 evaluated true (state did not change) (6ms)
+220ms ║║Cancelling statement #14's schedules...
+235ms ║║Executed physical command [Entry Light 1].on() (12ms)
+236ms ║║Executed [Entry Light 1].on (14ms)
+249ms ║║Executed physical command [Entry Light 2].on() (11ms)
+250ms ║║Executed [Entry Light 2].on (13ms)
+263ms ║║Executed physical command [Entry Light 1].setLevel([100]) (10ms)
+264ms ║║Executed [Entry Light 1].setLevel (11ms)
+276ms ║║Executed physical command [Entry Light 2].setLevel([100]) (10ms)
+277ms ║║Executed [Entry Light 2].setLevel (12ms)
+281ms ║║Executed virtual command [Entry Light 1, Entry Light 2].wait (0ms)
+282ms ║║Requesting a wake up for Mon, Dec 30 2019 @ 8:00:45 PM CST (in 300.0s)
+289ms ║╚Execution stage complete. (165ms)
+290ms ╚Event processed successfully (290ms)
12/30/2019, 7:55:40 PM +842ms
+1ms ╔Received event [Entryway Lights Button].button = held with a delay of 104ms
+93ms ║RunTime Analysis CS > 16ms > PS > 30ms > PE > 47ms > CE
+96ms ║Runtime (52138 bytes) successfully initialized in 30ms (v0.3.110.20191009) (95ms)
+97ms ║╔Execution stage started
+101ms ║║Condition group #1 evaluated true (state did not change) (1ms)
+102ms ║║Condition group #null evaluated true (state did not change) (2ms)
+106ms ║║Cancelling statement #65's schedules...
+109ms ║║Executed virtual command setState (0ms)
+115ms ║║Comparison (enum) held gets (string) held = true (1ms)
+116ms ║║Condition #70 evaluated true (4ms)
+117ms ║║Condition group #67 evaluated true (state did not change) (6ms)
+128ms ║║Evaluating switch with values [[i::1f48dc9f0bf95369202a96c1fe836db7::switch, v:[t:enum, v:on, d::1f48dc9f0bf95369202a96c1fe836db7:, a:switch, i:null, x:false, vt:string, p:a]], [i::34c24b0fa30ebd5ff7b5e90ad7050f23::switch, v:[t:enum, v:on, d::34c24b0fa30ebd5ff7b5e90ad7050f23:, a:switch, i:null, x:false, vt:string, p:a]]]
+131ms ║║Comparison (enum) on is (string) on = true (1ms)
+133ms ║║Comparison (enum) on is (string) on = true (1ms)
+135ms ║║Cancelling statement #31's schedules...
+147ms ║║Executed physical command [Entry Light 1].off() (8ms)
+148ms ║║Executed [Entry Light 1].off (10ms)
+156ms ║║Executed physical command [Entry Light 2].off() (7ms)
+157ms ║║Executed [Entry Light 2].off (9ms)
+160ms ║╚Execution stage complete. (63ms)
+161ms ╚Event processed successfully (161ms)
12/30/2019, 7:55:28 PM +280ms
+1ms ╔Received event [Inside Garage Door Sensor].contact = closed with a delay of 109ms
+96ms ║RunTime Analysis CS > 16ms > PS > 31ms > PE > 49ms > CE
+99ms ║Runtime (52144 bytes) successfully initialized in 31ms (v0.3.110.20191009) (98ms)
+100ms ║╔Execution stage started
+104ms ║║Condition group #1 evaluated true (state did not change) (1ms)
+105ms ║║Condition group #null evaluated true (state did not change) (2ms)
+119ms ║║Comparison (enum) on is_not (string) on = false (2ms)
+121ms ║║Comparison (enum) on is_not (string) on = false (1ms)
+123ms ║║Cancelling condition #22's schedules...
+124ms ║║Condition #22 evaluated false (15ms)
+125ms ║║Cancelling condition #4's schedules...
+126ms ║║Condition group #4 evaluated false (state changed) (17ms)
+129ms ║╚Execution stage complete. (29ms)
+130ms ╚Event processed successfully (130ms)
12/30/2019, 7:55:23 PM +946ms
+1ms ╔Received event [Inside Garage Door Sensor].contact = open with a delay of 205ms
+113ms ║RunTime Analysis CS > 18ms > PS > 39ms > PE > 55ms > CE
+116ms ║Runtime (52141 bytes) successfully initialized in 39ms (v0.3.110.20191009) (114ms)
+117ms ║╔Execution stage started
+120ms ║║Condition group #1 evaluated true (state did not change) (0ms)
+121ms ║║Condition group #null evaluated true (state did not change) (2ms)
+136ms ║║Comparison (enum) off is_not (string) on = true (1ms)
+138ms ║║Cancelling condition #22's schedules...
+139ms ║║Condition #22 evaluated true (14ms)
+140ms ║║Cancelling condition #4's schedules...
+141ms ║║Condition group #4 evaluated true (state changed) (17ms)
+186ms ║║Comparison (time) 71724089 is_between (time) 1577745960000 .. (time) 1577713860000 = true (10ms)
+187ms ║║Time restriction check passed
+189ms ║║Condition #7 evaluated true (46ms)
+194ms ║║Comparison (enum) open is (string) open = true (1ms)
+195ms ║║Condition #8 evaluated true (5ms)
+196ms ║║Condition group #6 evaluated true (state did not change) (53ms)
+197ms ║║Condition group #4 evaluated true (state did not change) (55ms)
+199ms ║║Cancelling statement #23's schedules...
+203ms ║║Executed virtual command setState (0ms)
+209ms ║║Comparison (string) :ea54d0a6f35719b99744c137970d101f: is_any_of (string) :ea54d0a6f35719b99744c137970d101f:,:c655209e5ef4794becab5b7636986f0e: = true (1ms)
+210ms ║║Condition #21 evaluated true (5ms)
+211ms ║║Condition group #14 evaluated true (state did not change) (6ms)
+212ms ║║Cancelling statement #14's schedules...
+226ms ║║Executed physical command [Entry Light 1].on() (11ms)
+227ms ║║Executed [Entry Light 1].on (13ms)
+240ms ║║Executed physical command [Entry Light 2].on() (11ms)
+240ms ║║Executed [Entry Light 2].on (12ms)
+254ms ║║Executed physical command [Entry Light 1].setLevel([100]) (10ms)
+255ms ║║Executed [Entry Light 1].setLevel (12ms)
+267ms ║║Executed physical command [Entry Light 2].setLevel([100]) (10ms)
+268ms ║║Executed [Entry Light 2].setLevel (11ms)
+271ms ║║Executed virtual command [Entry Light 1, Entry Light 2].wait (1ms)
+272ms ║║Requesting a wake up for Mon, Dec 30 2019 @ 8:00:24 PM CST (in 300.0s)
+278ms ║╚Execution stage complete. (162ms)
+279ms ╚Event processed successfully (279ms)
12/30/2019, 7:55:18 PM +865ms
+1ms ╔Received event [Entryway Lights Button].button = held with a delay of 125ms
+130ms ║RunTime Analysis CS > 21ms > PS > 47ms > PE > 63ms > CE
+134ms ║Runtime (52139 bytes) successfully initialized in 47ms (v0.3.110.20191009) (131ms)
+134ms ║╔Execution stage started
+139ms ║║Condition group #1 evaluated true (state did not change) (1ms)
+140ms ║║Condition group #null evaluated true (state did not change) (3ms)
+146ms ║║Cancelling statement #65's schedules...
+149ms ║║Executed virtual command setState (0ms)
+156ms ║║Comparison (enum) held gets (string) held = true (2ms)
+157ms ║║Condition #70 evaluated true (5ms)
+158ms ║║Condition group #67 evaluated true (state did not change) (6ms)
+169ms ║║Evaluating switch with values [[i::1f48dc9f0bf95369202a96c1fe836db7::switch, v:[t:enum, v:on, d::1f48dc9f0bf95369202a96c1fe836db7:, a:switch, i:null, x:false, vt:string, p:a]], [i::34c24b0fa30ebd5ff7b5e90ad7050f23::switch, v:[t:enum, v:on, d::34c24b0fa30ebd5ff7b5e90ad7050f23:, a:switch, i:null, x:false, vt:string, p:a]]]
+172ms ║║Comparison (enum) on is (string) on = true (2ms)
+174ms ║║Comparison (enum) on is (string) on = true (1ms)
+176ms ║║Cancelling statement #31's schedules...
+193ms ║║Executed physical command [Entry Light 1].off() (14ms)
+194ms ║║Executed [Entry Light 1].off (16ms)
+209ms ║║Executed physical command [Entry Light 2].off() (13ms)
+210ms ║║Executed [Entry Light 2].off (15ms)
+213ms ║╚Execution stage complete. (78ms)
+214ms ╚Event processed successfully (213ms)
EDIT: I tried to rebuild the cache from within smart things and this did not seem to help. should I perhaps not have the piston change state at all during the door opening portion of the code and just switch it to cancelled and then back to null after the lights turn off?