Garage Door Light Control Help


#1

Thank you for taking the time to help me out. I have been using webcore with great success on my ST platform for 3+ years but recently made the move to Hubitat. I am trying to do some more intricate things and learn some more webcore since I lost some “easy mode” buttons in the move to Hubitat. I am sure it is something easily changed in my logic, or a setting. Thanks for your time!

1) Give a description of the problem
I have tried of few iterations of this piston, I can get the timer part to work, but I can’t get any of the cancel timer triggers to cancel it. Either I set the TCP to never then it shuts off the light timed or I set it to default/cancel on condition and it never shuts off.

2) What is the expected behaviour?
I want the light to be on a timer unless the switch is physically pushed on or the contact sensor opens.

3) What is happening/not happening?
The light stays on.

**4) Post a Green Snapshot of the piston!

5) Attach logs after turning logging level to Full
10/17/2020, 11:40:51 AM +52ms
+3ms ╔Received event [Main Garage Light].switch = on with a delay of 41ms, canQueue: true, calledMyself: false
+27ms ║RunTime initialize > 26 LockT > 2ms > rtDT > 2ms > pistonT > 1ms (first state access 22 5 21)
+30ms ║Runtime (7621 bytes) successfully initialized in 2ms (v0.3.110.20200916_HE)
+31ms ║╔Execution stage started
+42ms ║║Comparison (enum) on is (string) off = false (2ms)
+43ms ║║Cancelling condition #6’s schedules…
+45ms ║║Condition #6 evaluated false (8ms)
+48ms ║║Cancelling condition #5’s schedules…
+49ms ║║Condition group #5 evaluated false (state changed) (14ms)
+54ms ║╚Execution stage complete. (23ms)
+83ms ╚Event processed successfully (81ms)
10/17/2020, 11:40:50 AM +548ms
+7ms ╔Received event [Garage Door Physical].contact = open with a delay of 57ms, canQueue: true, calledMyself: false
+30ms ║RunTime initialize > 29 LockT > 2ms > rtDT > 2ms > pistonT > 1ms (first state access 25 9 20)
+37ms ║Runtime (7580 bytes) successfully initialized in 2ms (v0.3.110.20200916_HE)
+38ms ║╔Execution stage started
+52ms ║║Comparison (enum) off is (string) off = true (1ms)
+55ms ║║Condition #6 evaluated true (11ms)
+61ms ║║Comparison (enum) open changes_to (string) open = true (1ms)
+63ms ║║Cancelling condition #7’s schedules…
+66ms ║║Condition #7 evaluated true (9ms)
+74ms ║║Comparison (enum) closed is (string) closed = true (1ms)
+75ms ║║Condition #8 evaluated true (9ms)
+77ms ║║Cancelling condition #5’s schedules…
+78ms ║║Condition group #5 evaluated true (state changed) (34ms)
+84ms ║║Condition #25 evaluated false (3ms)
+89ms ║║Condition #26 evaluated false (4ms)
+94ms ║║Comparison (enum) open changes_to (string) closed = false (1ms)
+96ms ║║Condition #30 evaluated false (7ms)
+98ms ║║Condition group #24 evaluated false (state did not change) (18ms)
+102ms ║║Cancelling statement #27’s schedules…
+186ms ║║Executed physical command [Main Garage Light].on() (76ms)
+187ms ║║Executed [Main Garage Light].on (79ms)
+194ms ║║Executed virtual command [Main Garage Light].wait (0ms)
+224ms ║║Requesting a wake up for Sat, Oct 17 2020 @ 11:40:55 AM CDT (in 5s)
+246ms ║╚Execution stage complete. (207ms)
+309ms ║Setting up scheduled job for Sat, Oct 17 2020 @ 11:40:55 AM CDT (in 5s)
+313ms ╚Event processed successfully (310ms)


#2

Hi there,
a couple of things…
Switch places of line 23 and 25.
Trigger first, conditions later.

And I believe the reason it’s not firing up because, device 5 and other 3 devices (switch 22, device 2, device 5) must be changing at the same time.

I don’t know if this was your intention but you are using a nested IF with multiple triggers. Which is nearly impossible to trigger.