Turn on lights when I arrive home


#1

1) Give a description of the problem
I want the Kitchen lights and the Christmas tree to turn on when I arrive home, but only after the garage door opens, followed by the interior door. (The kids like to see it happen “magically”.)

2) What is the expected behavior?
2 switches turn on, after 2 doors open (in order).

3) What is happening/not happening?
The switches are not turning on.

4) Post a Green Snapshot of the pistonimage

5) Attach any logs (From ST IDE and by turning logging level to Full)
11/30/2017, 5:16:09 PM +334ms
+1ms ╔Received event [Door - Garage].contact = closed with a delay of 509ms
+210ms ║Runtime (41089 bytes) successfully initialized in 68ms (v0.2.0ff.20171129) (208ms)
+211ms ║╔Execution stage started
+290ms ║╚Execution stage complete. (79ms)
+298ms ╚Event processed successfully (299ms)
11/30/2017, 5:15:37 PM +921ms
+1ms ╔Received event [Door - Garage].contact = open with a delay of 665ms
+184ms ║Runtime (41087 bytes) successfully initialized in 46ms (v0.2.0ff.20171129) (183ms)
+185ms ║╔Execution stage started
+254ms ║╚Execution stage complete. (69ms)
+280ms ╚Event processed successfully (279ms)
11/30/2017, 5:14:07 PM +50ms
+1ms ╔Received event [Door - Garage Opener].door = open with a delay of 1033ms
+206ms ║Runtime (41091 bytes) successfully initialized in 68ms (v0.2.0ff.20171129) (204ms)
+207ms ║╔Execution stage started
+277ms ║╚Execution stage complete. (70ms)
+283ms ╚Event processed successfully (283ms)
11/30/2017, 5:13:50 PM +611ms
+2ms ╔Received event [Door - Garage Opener].door = opening with a delay of 1355ms
+238ms ║Runtime (41105 bytes) successfully initialized in 70ms (v0.2.0ff.20171129) (236ms)
+240ms ║╔Execution stage started
+310ms ║╚Execution stage complete. (71ms)
+318ms ╚Event processed successfully (318ms)


#2

If you close contact 1 before opening contact 4 then it won’t work (resets the followed by)

Maybe try:

IF contact 1 changes
followed by
contact 4 changes

(Instead of changes to open)


#3

OK. I tried it last night and contact 1 was open first, and stayed open while contact 4 opened, but it didn’t do anything.
I changed from “changes to open” to just “changes”, like you suggested, so I’ll try it again tonight and see what happens. Thanks.


#4

You could always change / pause the time restriction to enable testing any time :wink:


#5

True, but I also have to be home to test it. :grin:


#6

Next, @Robin will suggest you set up a virtual presence sensor so you don’t have to wait :wink:


#7

haha, I literally LOLed. :rofl:
now my co-worker is wondering what is so funny about the databases that I’m supposed to be working on.


#8

I’m sitting here building a piston using virtual presence, virtual contacts and virtual lights lol… so why not haha


#9

I’ve just tested your piston with 100% simulated devices (lol) and it works perfectly both as is OR with ‘changes’ instead of ‘changes to’.

The only difference I noticed is that the attribute for your contact sensor 1 is ‘door’ instead of ‘contact’… I’ve never seen a ‘door’ attribute before??? Is there a ‘contact’ option in the dropdown list that you can use instead?


#10

So “contact sensor 1” is this, an Iris automatic garage door opener from Lowes. I’m using the RG Linear GD00Z Garage Door Opener DHT.
“contact sensor 4” is this, an Iris door contact sensor.


#11

The funny thing is this piston used to work just fine until tried to get a little fancy and add more stuff to it. "Welcome Home" piston


#12

I would half expect bulb 2 to not turn on (in the second with), as when switch 3 turns on (in the first with) it will activate the restriction at the top of the piston… but that wont explain why switch 3 isn’t coming on???

Restrictions are funny things… maybe move the switch 3 restriction into the first ‘with’ instead of having it at the very top.

But in testing (I imported your piston) it works perfectly for me???


#13

Yep, I actually did that earlier when I did the “changes to open” to just “changes”. It looks more simple, but we’ll see if it actually makes a difference.


#14

Not sure exactly which change did the trick, but it’s working correctly now. Thanks!