belias Posted April 7, 2010 Share Posted April 7, 2010 As a future request...it would be great if there were a simple way to enter a condition for the amount of time a device has been at a particular status. Maybe an example is easier: If: Garage door has been open for 15 minutes Then: Perform these actions I can do this now, but it requires a separate flag program and a wait timer. If there's a simpler way and I'm missing it - that would be great too! Thanks! -Brian Link to comment
Mark Sanctuary Posted August 6, 2010 Share Posted August 6, 2010 It's a good idea. At this time there is no if argument that checks for a status long after the original event has triggered feature. The only option is the flag and delayed event check concept at this point. I think this is a good one to put on the feature list. Link to comment
Michel Kohanim Posted August 8, 2010 Share Posted August 8, 2010 Hi Brian, May I ask why you need a separate program? You can simply have a wait in part of the action and if the device status changes, the wait is interrupted and the rest of the actions are not run. With kind regards, Michel Link to comment
Mark Sanctuary Posted August 10, 2010 Share Posted August 10, 2010 Something like this will work... If Status 'Garage Door' is On Then Wait 15 minutes Set 'Garage Door' Off Link to comment
backinthelab Posted November 20, 2010 Share Posted November 20, 2010 Along these lines of acting after a "wait" period, how would I go about programming an action if a device is STILL in that status after a given amount of time? To clarify, I'd like a notification sent if my garage is still open after 30 minutes. Using the example above, wouldn't it still notify me after 30 minutes, regardless of the status at the 30-minute point? In other words, I'd like the status of ON to trigger the notification ONLY if that status does not change for 30 minutes. Any ideas how I can accomplish this? Link to comment
backinthelab Posted November 21, 2010 Share Posted November 21, 2010 Would this work? (FYI, a Sensor OFF status means my door is open.) GarageState: If Control 'Garage Door - Sensor' is switched Off Then Wait 30 minutes Run Program 'GarageState' (Else) Else - Nothing - 30MinOpenNotify If Control 'Garage Door - Sensor' is switched Off And Program 'GarageState' is True Then Notify Else - Nothing - Link to comment
TJF1960 Posted November 21, 2010 Share Posted November 21, 2010 I believe Mark's script will work fine. If Status 'Garage Door' is On Then Wait 30 minutes Send Notification As long as the status of your garage door is On the clock is ticking. If the status changes to Off the timer stops and the program turns false with no notification. Link to comment
backinthelab Posted November 21, 2010 Share Posted November 21, 2010 Thanks, I'll give that a try. It's difficult for me not to over-think this stuff! Link to comment
oberkc Posted November 24, 2010 Share Posted November 24, 2010 I believe Mark's script will work fine. Code: If Status 'Garage Door' is On Then Wait 30 minutes Send Notification As long as the status of your garage door is On the clock is ticking. If the status changes to Off the timer stops and the program turns false with no notification. Yet another example of a capability that would be lost if wait states were not interrupted by changes of conditions. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.