Jump to content

Creating a notification program using MyQ door state


JBalog

Recommended Posts

I am pretty sure I am using the wrong syntax below as the program I intended to make a notification if a garage door is open for more than 10 minutes actually alerts on open/close state change.  Alternatively, the current state duration is not updated at the same time as the open/close state, causing an alert on state change as the current state duration may actually be denoting the duration of the prior open/close state.  Would anyone correct this by using a state variable in the ISY program?

 

Program Content for 'Garage doors are open too long'

If

        'Garage / MyQ Bridge / Left Garage Door' Door State is not Closed

    And 'Garage / MyQ Bridge / Left Garage Door' Duration of Current State > 600 seconds

Or (

             'Garage / MyQ Bridge / Right Garage Door' Door State is not Closed

         And 'Garage / MyQ Bridge / Right Garage Door' Duration of Current State > 600 seconds

)

 

Then

        Send Notification to 'Text Both' content 'Garage.Doors.Open.Too.Long'

        Wait  10 minutes 

        Run Program 'Garage doors are open too long' (If)

Link to comment

First you need parentheses around the first AND clause.
 

Second, as described in the release notes for the node server, the statuses get wonky when a command is sent from the ISY due to the slow polling period. So, for example, if I send a close command, the status goes to “Closing,” but there is at least a 5 second alarming period and a 4 to 5 second closing period, in which a poll may return an “Open” status before the status finally goes to closed. So probably best to test for “status = open” instead of “not closed.” 

Third, your going to need a local variable to track the notifications, otherwise it’s just going to send them repeatedly every poll beyond 6 minutes.

Fourth the ‘Garage Doors Are Open Too Long’ program will never run, because the program restarts during the wait everytime the duration value changes, i.e., every poll.

Link to comment
Guest
This topic is now closed to further replies.

  • Recently Browsing

    • No registered users viewing this page.
  • Forum Statistics

    • Total Topics
      36.9k
    • Total Posts
      370.2k
×
×
  • Create New...