Lights On and Then Off Triggered by Contact Sensor


#1

1) Give a description of the problem
Lights turn on when door contact opens, but won’t then turn off. I’m sure I’m doing something wrong, but not sure wht.

2) What is the expected behavior?
When garage door is opened, lights turn on. Then, when garage door opens and then closes (this is me coming back into the house), lights turn off.

3) What is happening/not happening?
When garage door is opened, lights turn on. Then, when garage door opens and then closes (this is me coming back into the house), lights DO NOT turn off.

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

5) Attach any logs (From ST IDE and by turning logging level to Full)
4/26/2019, 6:53:22 PM +269ms
+1ms ╔Received event [Garage Steps Door].contact = closed with a delay of 82ms
+113ms ║Runtime (39820 bytes) successfully initialized in 77ms (v0.3.10a.20190223) (111ms)
+115ms ║╔Execution stage started
+134ms ║╚Execution stage complete. (19ms)
+135ms ╚Event processed successfully (135ms)
4/26/2019, 6:53:14 PM +840ms
+2ms ╔Received event [Garage Steps Door].contact = open with a delay of 71ms
+112ms ║Runtime (39821 bytes) successfully initialized in 76ms (v0.3.10a.20190223) (109ms)
+113ms ║╔Execution stage started
+148ms ║╚Execution stage complete. (35ms)
+150ms ╚Event processed successfully (149ms)
4/26/2019, 6:53:00 PM +150ms
+1ms ╔Received event [Garage Steps Door].contact = closed with a delay of 132ms
+108ms ║Runtime (39817 bytes) successfully initialized in 72ms (v0.3.10a.20190223) (106ms)
+109ms ║╔Execution stage started
+129ms ║╚Execution stage complete. (20ms)
+131ms ╚Event processed successfully (130ms)
4/26/2019, 6:52:53 PM +61ms
+1ms ╔Received event [187 Montgomery Avenue].time = 1556319174698 with a delay of -1638ms
+147ms ║Runtime (39815 bytes) successfully initialized in 89ms (v0.3.10a.20190223) (145ms)
+149ms ║╔Execution stage started
+177ms ║╚Execution stage complete. (29ms)
+179ms ╚Event processed successfully (179ms)
4/26/2019, 6:52:44 PM +509ms
+1ms ╔Received event [Garage Steps Door].contact = open with a delay of 76ms
+117ms ║Runtime (39703 bytes) successfully initialized in 75ms (v0.3.10a.20190223) (114ms)
+118ms ║╔Execution stage started
+176ms ║║Executed [Garage Lights].on (27ms)
+194ms ║╚Execution stage complete. (77ms)
+196ms ║Setting up scheduled job for Fri, Apr 26 2019 @ 6:52:54 PM EDT (in 9.994s)
+205ms ╚Event processed successfully (205ms)


#2

Just so I understand correctly.

You open the door. The lights turn on. You close the door. You open the door again and, within 10 seconds, close the door (coming back into the house)…


#3

Thanks for the response @Pantheon, but I was able to rework it as below to get the desired result.


#4

Yes, that makes more sense. I have never used the followed within before and I suspect when the status of your contact sensor 1 changed, it started the piston all over from the beginning and was not getting to the turn off part. Glad you got it working!


#5

Thanks!