Jump to content

Program question: "time from last run"


belias

Recommended Posts

Posted

Hello,

 

I'm trying to come up with a program that enables my 'OHD Alert' folder under the following conditions:

 

1. One or more garage doors are open

2. The door(s) have been open for over 5 minutes

2. It's dark outside

 

Here's what I have so far:

 

OHD Alert Folder

 

If
           Program 'OHD Open' is True
     And From Sunset
           To Sunrise (next day)
     And Time is Last Run Time for 'OHD Open' + 5 minutes

Then
     Allow the programs in this folder to run.

 

 

OHD Open (not located in a conditional folder)

 

If
           Status 'Garage / OHD-1 Sensor' is Off
     Or    Status 'Garage / OHD-2 Sensor' is Off

Then
           Set Scene 'Garage / OHD Buttons (KPL Indicators)' On

Else
  - No Actions -

 

The 'OHD Open' program works perfectly - the KPL indicators are always on when 1+ door is open, and off when all doors are closed.

 

The problem is that many times the 'OHD Alert' folder does not enable as expected. Last night was a good example and I grabbed screen shots of the Admin Console before playing around with the program. The first shows the program summary display - it shows the time is definitely between sunset and sunrise, the status of 'OHD Open' is true, and the last run time for 'OHD Open' is well over 5 minutes ago. Yet for some reason, the 'OHD Status' folder still evaluates to "False". The second is the screenshot of the 'OHD Alert' folder program (in case I'm missing something).

 

Program Summary: http://dl.dropbox.com/u/2382226/1.png

'OHD Alert' Program: http://dl.dropbox.com/u/2382226/2.png

 

Any thoughts would be great... Thanks!

 

 

-Brian

Posted

Hi Brian,

 

Last Run Time is an exact time.

 

Can you use a Wait within your program(s)?

 

I would suggest the folder conditions be limited to the schedule conditions and using the other conditions in programs.

 

Folder Conditions for 'Night'
Add conditions to limit when programs in this folder are allowed to run.



If
       From    Sunset
       To      Sunrise  (same day)

Then
  Allow the programs in this folder to run.



 

If
       Program 'OHD Open' is True 

Then
       Wait  5 minutes 
       Send Notification to 'Text to Blackberry'

Else
  - No Actions - (To add one, press 'Action')


 

Rand

Posted

Hi Rand,

 

Thanks for the quick reply - I missed that the "last run" is specifying an exact time, and not a time range...

 

I think I'll simply use the wait command with the "OHD Open" program to set a flag after 15 minutes. Then I can clear the flag with the "OHD Close" program. The folder can then simply evaluate whether this flag is true. I think this is what you're suggesting...

 

 

Thanks!

 

 

- Brian

Posted

You can use a range (From | For) with Last Run if that works for you.

 

Hi Rand,

 

Thanks for the quick reply - I missed that the "last run" is specifying an exact time, and not a time range...

 

I think I'll simply use the wait command with the "OHD Open" program to set a flag after 15 minutes. Then I can clear the flag with the "OHD Close" program. The folder can then simply evaluate whether this flag is true. I think this is what you're suggesting...

 

 

Thanks!

 

 

- Brian

Guest
This topic is now closed to further replies.

×
×
  • Create New...