Garage Door Automation - Am I missing something?


#1

1) Give a description of the problem
This is a piston for one of my garage doors. I’ve been using a rendition of this piston for about 2 years but I’ve never been able to get the “Door Check” portion of it working properly. First, let me explain my setup.
I was using this before you could get cheap z-wave garage door openers so I’m using a Z-Wave relay wired into the garage door clicker and ST Multipurpose sensors on the garage doors.

This piston works in general but the problem I’m having is that the notifications in the “Check to see if door closed properly” section are not working. When the “CloseGarageDoor” variable changes to true the door actually closes and does so successfully most of the time. The problem is that my door check isn’t working. I never get a notification telling me if the door closed or didn’t close. I suppose it’s possible that I shouldn’t be using nested IFs since the “Push” command works for the relay but it never gets pass that part to execute the nested IF.

Although I’ve been using Core/Webcore for a couple of years I’m still sort of new to coding within it so I’m guessing this entire piston should be re-written for better efficiency.

2) What is the expected behaviour?
I’m expecting to receive a notification telling me if the door closed successfully or failed.

3) What is happening/not happening?
The notification is never sent.

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

5) Attach logs after turning logging level to Full
10/30/2019, 8:57:34 AM +857ms
+2ms ╔Received event [Sheree (360)].presence = not present with a delay of 97ms
+246ms ╚Event processed successfully (246ms)
10/30/2019, 7:07:11 AM +107ms
+1ms ╔Received event [Home (Default)].time = 1572433632511 with a delay of -1404ms
+156ms ╚Event processed successfully (155ms)
10/30/2019, 6:58:19 AM +895ms
+1ms ╔Received event [Chris (360)].presence = not present with a delay of 96ms
+248ms ╚Event processed successfully (247ms)
10/30/2019, 6:57:38 AM +653ms
+1ms ╔Received event [Chris Garage Door Sensor].contact = closed with a delay of 113ms
+237ms ╚Event processed successfully (237ms)
10/30/2019, 6:57:12 AM +335ms
+2ms ╔Received event [Chris Garage Door Sensor].contact = open with a delay of 120ms
+272ms ║Setting up scheduled job for Wed, Oct 30 2019 @ 7:07:12 AM EDT (in 599.904s), with 1 more job pending
+281ms ╚Event processed successfully (280ms)
10/29/2019, 7:04:27 PM +401ms
+1ms ╔Received event [Sheree (360)].presence = present with a delay of 92ms
+242ms ╚Event processed successfully (241ms)
10/29/2019, 6:00:24 PM +417ms
+1ms ╔Received event [Home (Default)].time = 1572386425747 with a delay of -1330ms
+592ms ╚Event processed successfully (592ms)
10/29/2019, 5:51:15 PM +206ms
+1ms ╔Received event [Chris Garage Door Sensor].contact = closed with a delay of 214ms
+244ms ╚Event processed successfully (244ms)
10/29/2019, 5:50:25 PM +596ms
+1ms ╔Received event [Chris Garage Door Sensor].contact = open with a delay of 110ms
+242ms ║Setting up scheduled job for Tue, Oct 29 2019 @ 6:00:25 PM EDT (in 599.91s), with 1 more job pending
+251ms ╚Event processed successfully (251ms)
10/29/2019, 5:49:49 PM +300ms
+1ms ╔Received event [Chris (360)].presence = present with a delay of 99ms
+246ms ╚Event processed successfully (246ms)
10/29/2019, 8:45:48 AM +383ms
+1ms ╔Received event [Sheree (360)].presence = not present with a delay of 108ms
+263ms ╚Event processed successfully (264ms)
10/29/2019, 7:39:31 AM +124ms
+0ms ╔Received event [Home (Default)].time = 1572349172521 with a delay of -1398ms
+155ms ╚Event processed successfully (154ms)
10/29/2019, 7:30:32 AM +594ms
+2ms ╔Received event [Chris (360)].presence = not present with a delay of 100ms
+405ms ╚Event processed successfully (404ms)
10/29/2019, 7:29:56 AM +765ms
+1ms ╔Received event [Chris Garage Door Sensor].contact = closed with a delay of 119ms
+249ms ╚Event processed successfully (248ms)
10/29/2019, 7:29:32 AM +358ms
+1ms ╔Received event [Chris Garage Door Sensor].contact = open with a delay of 120ms
+255ms ║Setting up scheduled job for Tue, Oct 29 2019 @ 7:39:32 AM EDT (in 599.908s), with 1 more job pending
+264ms ╚Event processed successfully (263ms)
10/28/2019, 8:18:00 PM +283ms
+2ms ╔Received event [Sheree (360)].presence = present with a delay of 119ms
+258ms ╚Event processed successfully (257ms)
10/28/2019, 7:24:12 PM +345ms
+2ms ╔Received event [Sheree (360)].presence = not present with a delay of 105ms
+253ms ╚Event processed successfully (253ms)
10/28/2019, 6:56:10 PM +979ms
+2ms ╔Received event [Sheree (360)].presence = present with a delay of 99ms
+253ms ╚Event processed successfully (253ms)
10/28/2019, 5:40:51 PM +122ms
+1ms ╔Received event [Sheree (360)].presence = not present with a delay of 103ms
+253ms ╚Event processed successfully (253ms)
10/28/2019, 1:17:46 PM +144ms
+1ms ╔Received event [Home (Default)].time = 1572283067436 with a delay of -1292ms
+150ms ╚Event processed successfully (150ms)
10/28/2019, 1:09:10 PM +624ms
+1ms ╔Received event [Chris Garage Door Sensor].contact = closed with a delay of 2296ms
+235ms ╚Event processed successfully (236ms)
10/28/2019, 1:09:09 PM +449ms
+1ms ╔Received event [Chris Garage Door Sensor].contact = closed with a delay of 105ms
+260ms ╚Event processed successfully (260ms)
10/28/2019, 1:07:54 PM +663ms
+1ms ╔Received event [Chris (360)].presence = present with a delay of 101ms
+253ms ║Setting up scheduled job for Mon, Oct 28 2019 @ 1:17:47 PM EDT (in 592.52s), with 1 more job pending
+266ms ╚Event processed successfully (266ms)
10/28/2019, 1:07:47 PM +275ms
+1ms ╔Received event [Chris Garage Door Sensor].contact = open with a delay of 92ms
+255ms ║Setting up scheduled job for Mon, Oct 28 2019 @ 1:17:47 PM EDT (in 599.907s), with 1 more job pending
+264ms ╚Event processed successfully (264ms)
10/28/2019, 1:05:15 PM +613ms
+1ms ╔Received event [Sheree (360)].presence = present with a delay of 103ms
+244ms ╚Event processed successfully (244ms)
10/28/2019, 11:21:43 AM +602ms
+2ms ╔Received event [Sheree (360)].presence = not present with a delay of 100ms
+249ms ╚Event processed successfully (249ms)
10/28/2019, 10:56:05 AM +336ms
+1ms ╔Received event [Home (Default)].time = 1572274566329 with a delay of -993ms
+189ms ╚Event processed successfully (189ms)
10/28/2019, 10:47:11 AM +290ms
+1ms ╔Received event [Chris (360)].presence = not present with a delay of 98ms
+239ms ╚Event processed successfully (238ms)
10/28/2019, 10:46:44 AM +403ms
+1ms ╔Received event [Chris Garage Door Sensor].contact = closed with a delay of 198ms
+243ms ╚Event processed successfully (243ms)
10/28/2019, 10:46:06 AM +168ms
+2ms ╔Received event [Chris Garage Door Sensor].contact = open with a delay of 131ms
+253ms ║Setting up scheduled job for Mon, Oct 28 2019 @ 10:56:06 AM EDT (in 599.909s), with 1 more job pending
+265ms ╚Event processed successfully (265ms)
10/28/2019, 9:30:28 AM +187ms
+0ms ╔Received event [Home (Default)].time = 1572269429222 with a delay of -1036ms
+425ms ╚Event processed successfully (426ms)
10/28/2019, 9:25:47 AM +299ms
+2ms ╔Received event [Chris Garage Door Sensor].contact = closed with a delay of 115ms
+352ms ╚Event processed successfully (352ms)
10/28/2019, 9:25:28 AM +138ms
+1ms ╔Received event [Home (Default)].time = 1572269129214 with a delay of -1076ms
+342ms ║Setting up scheduled job for Mon, Oct 28 2019 @ 9:30:29 AM EDT (in 300.743s)
+350ms ╚Event processed successfully (350ms)
10/28/2019, 9:15:36 AM +227ms
+2ms ╔Received event [Chris (360)].presence = present with a delay of 104ms
+311ms ║Setting up scheduled job for Mon, Oct 28 2019 @ 9:25:29 AM EDT (in 592.677s), with 1 more job pending
+321ms ╚Event processed successfully (321ms)
10/28/2019, 9:15:29 AM +51ms
+2ms ╔Received event [Chris Garage Door Sensor].contact = open with a delay of 121ms
+254ms ║Setting up scheduled job for Mon, Oct 28 2019 @ 9:25:29 AM EDT (in 599.909s), with 1 more job pending
+264ms ╚Event processed successfully (263ms)
10/28/2019, 8:58:47 AM +149ms
+1ms ╔Received event [Home (Default)].time = 1572267528042 with a delay of -893ms
+215ms ╚Event processed successfully (215ms)
10/28/2019, 8:51:35 AM +617ms
+1ms ╔Received event [Chris (360)].presence = not present with a delay of 101ms
+239ms ╚Event processed successfully (238ms)
10/28/2019, 8:50:28 AM +182ms
+1ms ╔Received event [Chris Garage Door Sensor].contact = closed with a delay of 154ms
+376ms ╚Event processed successfully (376ms)
10/28/2019, 8:48:47 AM +871ms
+1ms ╔Received event [Chris Garage Door Sensor].contact = open with a delay of 122ms
+268ms ║Setting up scheduled job for Mon, Oct 28 2019 @ 8:58:48 AM EDT (in 599.904s), with 1 more job pending
+276ms ╚Event processed successfully (275ms)


#2

line 31 and 32 are both triggers and both cant become true at the same exact time, you should change one to a condition.


#3

Thanks. So should I change it to “…was inactive for at least 10 minutes” instead?


#4

Bump. Any ideas on the notification issue?


#5

I would start with changing line 33 into a condition such as “was” inactive and see where it goes from there.

edit. also on your next piston post with log please turn on trace so its easier to follow the piston versus log.


#6

I did change that even though that block was working with no issues. My issue lies in the code near line 69


#7

I’m thinking i should just create a doorcheck Boolean the same way did for “closedoor”. That way i can get those IF statements out of the other IF. I know i could use a separate piston but I’d prefer keeping it all in this one if at all possible.


#8

Hi, I’m not sure if my piston below helps. I think its the same setup as yours. A ST sensor indicates if the door is open or closed. A relay activates for 0.5 secs(programmed on a fibaro relay - it stays on for 0.5 secs when activated, then turns off) there is only one switch to operate the door - pressing when closed opens the door, and closes when open.
The piston uses a virtual switch to open/close the door and indicate the current status. It also allows ST/webcore or the original remote to be used interchangeably with no issues. e.g if remote is used, the virtual switch displays the correct status.


#9

I ended up re-writing it using only conditions for the door check instead of a trigger mixed with a condition. Everything works now.