Jump to content

How to... Multiple triggers, one program


deeepdish

Recommended Posts

I'd like to implement the following for a bathroom fan / hallway light.

 

This program would effectively mimic the Insteon timer switch, except with an ISY and a Switchlinc dimmer or relay.

 

When I press the dimmer / relay on multiple times, the countdown timer would increment by a set interval.

 

eg. pressing the on button would set the timer at say 10 minutes. pressing it twice would set it at 20 mins, etc..

 

In reading this section I see that the programming capabilities of the ISY are quite flexible, I was wondering if something like this could be implemented.

 

Thanks.

Link to comment
  • 4 months later...

Illusion,

 

The UDI guys have been foretelling of a new firmware version that they refer to as "triggers 2". This may also include variables. Using a variable you could conceivably count switch presses within a predefined period. That would be the ultimate solution to your problem.

 

I did manage to come up with a brute force method (such is my way - if it ain't broke take it apart and see what makes it tick).

 

I initially tried using a trigger "xx seconds after program yy last run". This didn't function at all the way that I expected.

 

The following will count three consecutive presses (three timer values) and will flash the light to confirm which timer is active. You will need to be careful not to "double press" (fast on) as the routines aren't setup to register this.

 

Program Press1

If
       Control 'Test Switch' is switched On
   And Program 'Timer1' is False
   And Program 'Timer2' is False
   And Program 'Timer3' is False

Then
       Run Program 'Timer1'

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

 

Program Press2 - Will interrupt program Press1 and shut down timer1

 
If
       Control 'Test Switch' is switched On
   And Program 'Timer1' is True
   And Program 'Timer2' is False
   And Program 'Timer3' is False

Then
       Run Program 'Timer2'
       Run Program 'Timer1' (Else Path)

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

Program Press3 - Will interrupt program Press2 and shut down timer2

If
       Control 'Test Switch' is switched On
   And Program 'Timer1' is False
   And Program 'Timer2' is True
   And Program 'Timer3' is False

Then
       Run Program 'Timer3'
       Run Program 'Timer2' (Else Path)

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

Program Timer1 - Single press timer - Control trigger used to shut down program prior to normal timeout. 2 second delay included to allow timer3 program to interrupt execution and take control.

If
       Control 'Test Switch' is not switched Off

Then
       Wait  2 seconds
       Set 'Test Switch' Off
       Set 'Test Switch' On
       Wait  20 seconds
       Set 'Test Switch' Off
       Run Program 'Timer1' (Else Path)

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

Program Timer2 - Double press timer - Control trigger used to shut down program prior to normal timeout. 2 second delay included to allow timer3 program to interrupt execution and take control.

If
       Control 'Test Switch' is not switched Off

Then
       Wait  2 seconds
       Set 'Test Switch' Off
       Set 'Test Switch' On
       Set 'Test Switch' Off
       Set 'Test Switch' On
       Wait  40 seconds
       Set 'Test Switch' Off
       Run Program 'Timer2' (Else Path)

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

Program Timer3 - Triple press timer - Control trigger used to shut down program prior to normal timeout. Flashes the load 3 times to confirm activation

If
       Control 'Test Switch' is not switched Off

Then
       Set 'Test Switch' Off
       Set 'Test Switch' On
       Set 'Test Switch' Off
       Set 'Test Switch' On
       Set 'Test Switch' Off
       Set 'Test Switch' On
       Wait  1 minute and 20 seconds
       Set 'Test Switch' Off
       Run Program 'Timer3' (Else Path)

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

 

Not pretty, but it seems to work reasonably. I was using direct ON/Off commands to a relay module. Using scenes or ramp-rates (not fast on/fast off) may cause problems with the confirmation (flash) timing.

 

IM

Link to comment

Archived

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


×
×
  • Create New...