Jump to content

Emulate Countdown Timer with Switchlinc Relay


rob9

Recommended Posts

Posted

I generated a set of programs to generate a countdown timer with a switchlinc relay. I know that there is a Switchlinc Relay Countdown Timer that can be purchased, but I already had a regular switchlinc relay installed and by using the ISY to program it, you have lots of control on exactly how to make the timer work.

 

The time increases each time the on paddle is pressed from 15, 30, 60, and 90 minutes. It maxes out at 90 minutes. You can add time after timer has been running by pressing the on paddle again.

 

If the timer has not already been set, a local fast on at the switch will simply turn the fan on without a timer. If a timer has been set and is running, a local fast on will not change the timer. One could program the operation of the local fast on differently if desired.

 

I use two programs (Flag 1 and Flag 2) to keep track of the state of the timer.

 

One thing that I could not do is have the LED lights indicate the amount of time left on the timer. The Switchlinc Relay by design will only display all LEDs on or all off.

 

Here are the programs.

 

First there are 4 programs for the 4 different timer states:

 

Fan Timer on 15 Min

If
       Control 'Utility Room Fan' is switched On
   And (
            Program 'Flag 1' is False
        And Program 'Flag 2' is False
       )

Then
       Run Program 'Run 15 min' (Then Path)

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

 

Fan Timer on 30 Min

If
       Control 'Utility Room Fan' is switched On
   And (
            Program 'Flag 1' is False
        And Program 'Flag 2' is True
       )

Then
       Stop program 'Run 15 min'
       Run Program 'Run 30 min' (Then Path)

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

 

Fan Timer on 60 Min

If
       Control 'Utility Room Fan' is switched On
   And (
            Program 'Flag 1' is True
        And Program 'Flag 2' is False
       )

Then
       Stop program 'Run 30 min'
       Run Program 'Run 60 min' (Then Path)

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

 

and Fan Timer on 90 Min.

If
       Control 'Utility Room Fan' is switched On
   And (
            Program 'Flag 1' is True
        And Program 'Flag 2' is True
       )

Then
       Stop program 'Run 60 min'
       Run Program 'Run 90 min' (Then Path)

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

 

The Flag 1 and Flag 2 programs are completely empty. Calling the Then path sets it to True and calling the Else path sets it to False. I used the flags as follows:

 

Flag 1 Flag 2 Timer State

False False Off

False True 15 min

True False 30 min

True True 90 min

 

Flag 1

If
  - No Conditions - (To add one, press 'Schedule' or 'Condition')

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

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

 

 

Flag 2

If
  - No Conditions - (To add one, press 'Schedule' or 'Condition')

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

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

 

 

I next have the four program timers that the previous programs call:

 

Run 15 min

If
  - No Conditions - (To add one, press 'Schedule' or 'Condition')

Then
       Run Program 'Flag 1' (Else Path)
       Run Program 'Flag 2' (Then Path)
       Wait  15 minutes 
       Run Program 'Fan Off' (Then Path)

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

 

Run 30 min

If
  - No Conditions - (To add one, press 'Schedule' or 'Condition')

Then
       Run Program 'Flag 1' (Then Path)
       Run Program 'Flag 2' (Else Path)
       Wait  15 minutes 
       Run Program 'Run 15 min' (Then Path)

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

 

Run 60 Min

If
  - No Conditions - (To add one, press 'Schedule' or 'Condition')

Then
       Run Program 'Flag 1' (Then Path)
       Run Program 'Flag 2' (Then Path)
       Wait  30 minutes 
       Run Program 'Run 30 min' (Then Path)

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

 

Run 90 Min

If
  - No Conditions - (To add one, press 'Schedule' or 'Condition')

Then
       Run Program 'Flag 1' (Then Path)
       Run Program 'Flag 2' (Then Path)
       Wait  30 minutes 
       Run Program 'Run 60 min' (Then Path)

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

 

Lastly I have the program that turns the fan off. This will terminate any timer if the switch is turned off locally or will turn off at end of timer countdown.

 

Fan Off

If
       Control 'Utility Room Fan' is switched Off
    Or Control 'Utility Room Fan' is switched Fast Off

Then
       Stop program 'Run 15 min'
       Stop program 'Run 30 min'
       Stop program 'Run 60 min'
       Stop program 'Run 90 min'
       Run Program 'Flag 1' (Else Path)
       Run Program 'Flag 2' (Else Path)
       Set 'Utility Room Fan' Off

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

 

Thanks to all those who have been posting to this forum. I've been learning a lot about how to program the ISY through this forum. Hopefully this program will be of help to someone.

 

Rob

Posted

Hello Rob,

 

Excellent tutorial on using variables, as well as a countdown timer. If you don't mind, I'll place this on our wiki as well.

 

One question: shouldn't the Wait time in each timer program match the desired countdown time (eg. 30 minutes in the 30 Minutes program, etc.)?

Posted
Rob:

 

Do you think that a SL will be strong enough for a fan on my fireplace?

 

aLf, normaly you would use a SwitchLinc Relay for a load like a fan. You should check the load rating of the fan to that of the relay. The manual on the relay should give the allowed load. I'd expect that the fireplace fan would be within the relay's rating, but it is best to verify that.

 

Rob

Posted
Hello Rob,

 

Excellent tutorial on using variables, as well as a countdown timer. If you don't mind, I'll place this on our wiki as well.

 

One question: shouldn't the Wait time in each timer program match the desired countdown time (eg. 30 minutes in the 30 Minutes program, etc.)?

 

Absolutely, Darrell, feel free to place on Wiki.

 

Regarding the duration of the wait, I have the longer timers call the next lower timer, so the wait is the difference. For example, the ninety minute timer waits 30 min and then calls the 60 minute timer. That made it easier to set it up so if you did a local on later, it would just add the next increment of time. It was also going to make it easier to display the remaining time left with the switch LEDs, but I learned that the SL Relay didn't support differing LED levels. If you prefered, you could instead have the 90 min timer have a 90 min wait and not call the lower level timers. Same for 60, 30 min.

 

Rob

Posted

Rob:

 

Thanks, I will do that. Is there a reason why you can't set this up for >90 minutes. I'd like to set it up to run, say 3-4 hours after I exit for bed. My current Leviton timer only will go 60 minutes and there is still "hours" of heat left in the heat exchanger.

 

aLf

Posted

Thanks, Rob. It is here, and linked from the Programs section of the How-To Guide.

 

Regarding the duration of the wait, I have the longer timers call the next lower timer, so the wait is the difference. For example, the ninety minute timer waits 30 min and then calls the 60 minute timer. That made it easier to set it up so if you did a local on later, it would just add the next increment of time. It was also going to make it easier to display the remaining time left with the switch LEDs, but I learned that the SL Relay didn't support differing LED levels. If you prefered, you could instead have the 90 min timer have a 90 min wait and not call the lower level timers. Same for 60, 30 min.

Yes, you are 100% correct.

  • 2 weeks later...
Posted
Rob:

 

Do you think that a SL will be strong enough for a fan on my fireplace?

 

aLf, normaly you would use a SwitchLinc Relay for a load like a fan. You should check the load rating of the fan to that of the relay. The manual on the relay should give the allowed load. I'd expect that the fireplace fan would be within the relay's rating, but it is best to verify that.

 

Rob

 

I just hooked up a SwitchLinc Relay to a winch via a secondary relay. The winch can pull about 40 amps, but typically maxes about 30 with the working wieght. To prevent any damage to my SwithLic, I simply connected an external relay to be triggered by my Insteon. That way you're not limited by the load capacity of the SwitchLinc. Just size the relay to within a 20-30 safety margin of the load of the fan and you'll be fine and make sure it's an AC relay.

Posted

Hi gang,

 

I think this thread relates to one of the difficulties that I have been having. I would like to run programs on a schedule. For example, programs that run every 5 minutes. This technique is clever, using WAIT commands to delay the setting of the values of "dummy variables", and then using these variables to determine how much time has elapsed.

 

However, this seems unnecessarily cumbersome. Is there no timer function in the current programming language for the ISY 99i?

 

Cheers!

Posted

Hi to_lighter,

 

All you need is the Wait (every 5 minutes) in the Action part of your program. Your condition could be anything you wish: i.e. from 5 AM to 5 PM. etc.

 

I am sure you do not need dummy variable just to run a program every 5 minutes.

 

With kind regards,

Michel

 

Hi gang,

 

I think this thread relates to one of the difficulties that I have been having. I would like to run programs on a schedule. For example, programs that run every 5 minutes. This technique is clever, using WAIT commands to delay the setting of the values of "dummy variables", and then using these variables to determine how much time has elapsed.

 

However, this seems unnecessarily cumbersome. Is there no timer function in the current programming language for the ISY 99i?

 

Cheers!

Posted
Hi to_lighter,

 

All you need is the Wait (every 5 minutes) in the Action part of your program. Your condition could be anything you wish: i.e. from 5 AM to 5 PM. etc.

 

I am sure you do not need dummy variable just to run a program every 5 minutes.

 

With kind regards,

Michel

 

Hi gang,

 

I think this thread relates to one of the difficulties that I have been having. I would like to run programs on a schedule. For example, programs that run every 5 minutes. This technique is clever, using WAIT commands to delay the setting of the values of "dummy variables", and then using these variables to determine how much time has elapsed.

 

However, this seems unnecessarily cumbersome. Is there no timer function in the current programming language for the ISY 99i?

 

Cheers!

 

Thanks Michel for the quick and helpful reply.

 

I hadn't thought of putting a schedule call into the condition line. Will try it now, but I'm sure that will do it.

 

Cheers!

Posted

Spoke too soon.

 

How do I set the schedule so that it runs every 5 minutes? If I put in the condition line a condition that checks if the time is between 12 AM and 11:59:59 PM then the ISY99 doesn't schedule the next run of the program until 11:59.

 

Hmmm.

 

Any ideas? How do I set the schedule condition so that it is always true?

 

Cheers!

Posted

Hi to_lighter,

 

You are right! Please go to program summary, click on that program, and have it Run If. This will jump start the program.

 

With kind regards,

Michel

 

Spoke too soon.

 

How do I set the schedule so that it runs every 5 minutes? If I put in the condition line a condition that checks if the time is between 12 AM and 11:59:59 PM then the ISY99 doesn't schedule the next run of the program until 11:59.

 

Hmmm.

 

Any ideas? How do I set the schedule condition so that it is always true?

 

Cheers!

Posted

Rob9

 

Just wanted to thank you for posting this. I used your code in one of my bathrooms on a switchlinc relay as well as two switchlinc dimmers. The dimmer code required a slight adjustment.

 

This contribution was awesome and for someone like me who doesn't understand the flags yet it was very helpful.

 

Thanks Again

 

Steve

Guest
This topic is now closed to further replies.

×
×
  • Create New...