Modifying my Garage Door alerts

Posted on
Thu Jul 11, 2019 5:54 am
midd offline
Posts: 372
Joined: Apr 18, 2010

Modifying my Garage Door alerts

I've been using the garage door alert ( found here https://wiki.indigodomo.com/doku.php?id=iolinc_garage_door_alert) for years. It's been awhile so I still have the Applescript version instead of the Python script that was recently added.

Since moving to a VPN, I can no longer send emails out without disconnecting from the VPN. My workaround in this case to use Pushover to send my notifications.

Can the script be modified to use Pushover?
Code: Select all
dev = indigo.devices[IOLINCID] # "IO Linc"
if not dev.states["binaryInput1"]:
    indigo.server.sendEmailTo("ADDRESSHERE", subject="The garage door is OPEN!!")


Or do I use the conditions tab of the trigger to check what the status of the binary input of the I/OLinc is?

Indigo 7, Monterey (12.1) on a 2009 Mac Pro..

Posted on
Thu Jul 11, 2019 6:27 am
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Modifying my Garage Door alerts

This should work:

Code: Select all
dev = indigo.devices[IOLINCID] # "IO Linc"
if not dev.states["binaryInput1"]:
    pushPlugin = indigo.server.getPlugin("io.thechad.indigoplugin.pushover")
    props = {   
        'msgTitle': "Indigo Alert",
        'msgBody': "The garage door is OPEN!!",
    }
    if pushPlugin.isEnabled():
        pushPlugin.executeAction("send", props=props)

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Thu Jul 11, 2019 6:28 am
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Modifying my Garage Door alerts

midd wrote:
Or do I use the conditions tab of the trigger to check what the status of the binary input of the I/OLinc is?


That would probably be easier. Use conditions to check the state, then you could send the notification without any scripting.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Thu Jul 11, 2019 8:33 am
jay (support) offline
Site Admin
User avatar
Posts: 18200
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Modifying my Garage Door alerts

FlyingDiver wrote:
midd wrote:
Or do I use the conditions tab of the trigger to check what the status of the binary input of the I/OLinc is?


That would probably be easier. Use conditions to check the state, then you could send the notification without any scripting.


+1

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Thu Jul 11, 2019 9:12 am
midd offline
Posts: 372
Joined: Apr 18, 2010

Re: Modifying my Garage Door alerts

Thanks. I’ll try this out when I get home.

FlyingDiver wrote:
This should work:

Code: Select all
dev = indigo.devices[IOLINCID] # "IO Linc"
if not dev.states["binaryInput1"]:
    pushPlugin = indigo.server.getPlugin("io.thechad.indigoplugin.pushover")
    props = {   
        'msgTitle': "Indigo Alert",
        'msgBody': "The garage door is OPEN!!",
    }
    if pushPlugin.isEnabled():
        pushPlugin.executeAction("send", props=props)

Indigo 7, Monterey (12.1) on a 2009 Mac Pro..

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 6 guests