Page 1 of 1

Creating an email alert for garage door open more than xx

PostPosted: Mon Jun 19, 2017 3:01 pm
by qcvictor
Hi Guys
I'm looking for get one script like in the wiki http://wiki.indigodomo.com/doku.php?id=iolinc_garage_door_alert working with DSC alarm plugin for get an alert by mail or prowl if garage door stay open for more than xx minutes?
In the wiki the script look like that :
Code: Select all
dev = indigo.devices[IOLINCID] # "IO Linc"
if not dev.states["binaryInput1"]:
    indigo.server.sendEmailTo("ADDRESSHERE", subject="The garage door is OPEN!!")

No need to explain you I'm a noob in phyton script :)

Re: Creating an email alert for garage door open more than x

PostPosted: Fri Jun 23, 2017 6:38 pm
by Monstergerm
Not quite sure I understand what you want to accomplish. If your garage door is a DSC zone, you need no special script to be notified if it has been open too long.

Create a trigger event for "Device state changed". Select the garage door. Select "Last Changed Timer (mins.) Changed. Select "Becomes Greater Than x minutes.

As Action you specify whatever you want, e.g. Notification Action to Send email.

Re: Creating an email alert for garage door open more than x

PostPosted: Sun Jun 25, 2017 12:10 am
by howartp
Well you learn something new every day - I never knew that option was there!

I was helping victor on this in the Insteon thread but didn't know that state timer existed or I'd have mentioned it; it will help some of my scripts as well!


Sent from my iPhone using Tapatalk Pro

Re: Creating an email alert for garage door open more than x

PostPosted: Sun Jun 25, 2017 12:22 pm
by jay (support)
I think that's a DSC-specific state.

Re: Creating an email alert for garage door open more than x

PostPosted: Thu Jun 29, 2017 3:25 pm
by qcvictor
Awesome, Exactly what a I'm looking for ! however he sent notification even if sensor is come back at initial state !
Something is missing ?
Code: Select all
29 juin 2017 17:17:43
   DSC Alarm                       Alarm Zone 'Door Garage-House' Opened.
   
29 juin 2017 17:19:05
   DSC Alarm                       Alarm Zone 'Door Garage-House' Closed.
29 juin 2017 17:23:03
   Trigger                         Door garage Trigger Test

Re: Creating an email alert for garage door open more than x

PostPosted: Thu Jun 29, 2017 3:47 pm
by howartp
Add a condition to the trigger.

Something like Zone status = Open.

Then it will trigger when the timer status is > 5 minutes but only if it's currently open.


Sent from my iPhone using Tapatalk Pro

Re: Creating an email alert for garage door open more than x

PostPosted: Thu Jun 29, 2017 3:57 pm
by Monstergerm
Yes, as howartp is explaining. This will fix it.
Condition: if device 'Garage Door' 'State is Open' 'is true'