Page 1 of 1

Garage Door Open after "x" time script - help needed

PostPosted: Thu Feb 02, 2017 7:33 am
by guitarfreak
I'm VERY new to scripting and just trying to figure it out as I go. I followed the topic on creating a script to send me an e-mail and text if the garage door is open after "x" amount of time. However, the script is sending the notification regardless of if the door is open or not, so I'm sure I messed something up, but I'm not sure what?

I am using the newer version of the i/o linc and from the screenshot of the device, you can see it does show binary input 1 as "closed" when the door is closed.

Screenshots attached.

Thanks in advance for the help, I'm sure this will be a quick fix for someone else.

Re: Garage Door Open after "x" time script - help needed

PostPosted: Thu Feb 02, 2017 4:33 pm
by rycardo
Can you do it without scripting? Add delayed actions that sends your alerts, but then when the door closes, create a trigger that cancels the delayed actions. It's in action menu somewhere, I'm away from home so can't say for what.


Sent from my iPad using Tapatalk

Re: Garage Door Open after "x" time script - help needed

PostPosted: Fri Feb 03, 2017 6:51 am
by guitarfreak
That's a good idea and simpler than what I'm doing! I'll try it

Re: Garage Door Open after "x" time script - help needed

PostPosted: Fri Feb 03, 2017 1:02 pm
by FlyingDiver
Or you could start a timer when it goes up, then check if it's down in the timer action.

Re: Garage Door Open after "x" time script - help needed

PostPosted: Fri Jun 02, 2017 7:03 pm
by mikeL
There's an error in your python script. The line containing the function indigo.server.sendEmailTo() needs to be indented (tabbed) to make it part of the proceeding if statement. Otherwise, as you noted, email will always be sent.


Sent from my iPad using Tapatalk