Jump to content

Garage Contact Door with 2421 triggerlinc


Plau

Recommended Posts

Posted

I would like received an SMS if my door garage stayed open for more than 15 minutes and open and close a couple time my bedroom light (for wake up my wife :lol: ), so I buy a 2421 trigerlinc for perform this. Somebody can help me with the program an how manage the 2421? thank you in advance!

Posted

Maybe something like this. When the TriggerLinc turns On (when door opens) the Program Waits for 15 minutes. If the door closes before the 15 minutes completes the TriggerLinc will turn Off and the Program will run the Else so no Notify is done.

 

After the Notify the light is flashed On/Off at 1 second intervals for 5 times.

 

The Else insures the light is turned Off in case the door closes and the TriggerLinc turns Off during the Repeat loop.

If
       Status  'TriggerLinc1-Opened' is On

Then
       Wait  15 minutes 
       Send Notification to 'ALL' content 'Custom with date'
       Repeat 5 times
          Set 'ICON Dimmer 1' Fast On
          Wait  1 second
          Set 'ICON Dimmer 1' Fast Off
          Wait  1 second

Else
  Set 'ICON Dimmer 1' Fast Off

Posted

many thanks LeeG, it's exactly what I need, work fine. Question with or without else filled, if my light I control for flashing is open and the program turn on, at the end the program my light don't stay on as previously, if you have a suggestion!

Posted

The first program no longer has the Repeat loop. It invokes a second Program that checks the Status of the light to flash. If the light is currently On it will flash Off/On 5 times leaving the light On. If the light is currently Off then the Else does what the original program did, flash On/Off 5 times leaving the light Off.

If
       Status  'TriggerLinc1-Opened' is On

Then
       Wait  15 minutes 
       Send Notification to 'ALL' content 'Custom with date'
       Run Program 'XXXX' (If)

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

Program XXXX

If
       Status  'ICON Dimmer 1' is On

Then
       Repeat 5 times
          Set 'ICON Dimmer 1' Fast Off
          Wait  1 second
          Set 'ICON Dimmer 1' Fast On
          Wait  1 second

Else
       Repeat 5 times
          Set 'ICON Dimmer 1' Fast On
          Wait  1 second
          Set 'ICON Dimmer 1' Fast Off
          Wait  1 second

Posted

Building upon LeeGs suggestion, how about:

 

If
       Status  'TriggerLinc1-Opened' is On

Then
       Wait  15 minutes 
       Send Notification to 'ALL' content 'Custom with date'
       Run Program 'XXXX' (If)

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

 

Program XXX (must be disabled)

 

If

Status 'ICON Dimmer 1' is On

then

run program YYY (then path)

else

run program YYY (else path)

 

Program YYY

if
Then
       Repeat 5 times
          Set 'ICON Dimmer 1' Fast Off
          Wait  1 second
          Set 'ICON Dimmer 1' Fast On
          Wait  1 second

Else
       Repeat 5 times
          Set 'ICON Dimmer 1' Fast On
          Wait  1 second
          Set 'ICON Dimmer 1' Fast Off
          Wait  1 second

Posted
The second Program will not work as coded because it is changing the Status of light in the If.

 

Having thought about this a bit more, I am now wondering if LeeGs two-program approach would work, as coded, with the only addition being to disable the second program (ensuring it does not self-trigger). It may not be necessary to split this into three separate programs.

Posted

oberkc

 

Thanks for the additional example. I was thinking of using a variable but your approach works without that additional definition.

 

Yes, regarding Disabling my second Program. Did not think Disable would prevent reevaluation but testing this morning does show if Disabled reevaluation does not happen. That is what I like about the ISY, learn something new every day.

 

Plau

 

Either use oberkc approach of using 3 Programs or my second example using 2 Programs and mark the second Program Disabled. When a Program is using "If Status" and the Program changes the status of the device being checked in the If and the Program contains a Wait or Repeat, the Program If is reevaluated. This causes a loop in my second Program if it is not marked Disabled. The first Program will still Run the second Program even though it is marked Disabled.

 

Lee

Posted
I was thinking of using a variable

 

That was also my first instinct, but it did not appear to offer any benefit in terms of efficiency or lines of code or numbers of programs. In fact, it may have been more difficult (requiring an additional program to define a variable value based on "icondimmer1").

Posted

Thank you for your help, both programs works except if my light is dimming! During the program execution the windows system busy appear 2 times !!!

If I want add more rooms around 5x, which is the best way?

Guest
This topic is now closed to further replies.

×
×
  • Create New...