Jump to content

How do I get a program to run every hour


bdw72

Recommended Posts

I want to shut my garage door at sunset, which it does just fine. Now I want to check that garage door every hour to see if it's open and if it is, close it. I am new to ISY-99, so any help would be appreciated. I setup a night_time variable and I use it to shut my door at night, just a fyi. Don't know what to do from here. :?

Link to comment

I made an arbitrary choice of 10 hours for this to run. Adjust as needed. Also assumed the I/O Linc Sensor is On when door is open. Adjust as needed. Also assumed the I/O Linc Relay is operating in one of the Momentary modes which is normal for a garage application.

 

Program CloseGarage1

If
       From    Sunset 
       For      10 hours 

Then
       Repeat Every  1 hour 
          Run Program 'CloseGarage2' (If)

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

Program CloseGarage2

If
       Status  'IO Linc1-Sensor' is On

Then
       Set 'IO Linc1-Sensor / IO Linc1-Relay' On

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

Link to comment

Disable the second Program.

 

It will still close if the door happens to be opened on the hour but Program 2 will not trigger on its own when it is Disabled.

 

EDIT: actually depending on how close to the hour the door is commanded to open, Program 2 driven on the hour could stop the door movement in the middle of the open movement. Most openers will stop door movement as a safety feature if a second button press is done while the door is moving.

Link to comment

If I disable Program2 then the door will not close at all, since there are no commands in Program1 to handle that. I understand that the door will stop if I open the door at the same time the hourly program is running. The hard part is handling the part where I open the garage door after dark. Right now Program2 stops the door operation becasue the criteria is being met.

Link to comment

Program 1 calls Program 2 to close the door. Program 2 being Disabled does not stop that. Program 2 being Disabled only stops it from being triggered independently by a change in Sensor status. A Disabled Program can still be called by another Program. Program 1 will still call Program 2 every hour even with Program 2 Disabled.

Link to comment

The UDI Wiki has some excellent material on Programs and Programming. The following is an excerpt from the Wiki…

 

The 'Run program' command causes the specified program to begin execution. The target program's state will become True or False as the program's Then or Else clause is executed. All normal conditions and restrictions apply; i.e. the target program will begin execution regardless of the state of its Enabled checkbox, and the target program will not begin execution if it resides within a folder tree any of whose folder's conditions are false.

Link to comment

bdw72

 

There is another approach that would not have the potential conflict of the door moving open at the same time the every hour Program is trying to close.

 

During the night time hours trigger a Program when the I/O Linc Sensor turns On and Wait for 1 hour. If the door is closed within that hour the program will trigger again, effectively cancelling the Wait and subsequent close request. If the door remains open for an hour the Wait completes and issues an I/O Linc Relay On to close the door.

If
       From    Sunset 
       For      10 hours 
   And Status  'IO Linc1-Sensor' is On

Then
       Wait  1 hour 
       Set 'IO Linc1-Sensor / IO Linc1-Relay' On

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

Link to comment

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...