Jump to content

programming flags?


morreale

Recommended Posts

I have a couple fluorescent lights in my garage that are controlled by a 2476S (SwitchLinc Relay) & a 2420M (Insteon Motion Detector). My Elk M1 will also turn on the lights when either the garage doors or interior doors are opened and then turn them off after no motion is detected for 15 minutes in the garage.

 

I am sometimes working in the garage in a location that the motion detector can not see me. (in a corner, under the car lift, etc) I was wondering if there was an flags option like in the M1. My thoughts were that if I turned on the light switch (2476s) 3 times (setting a flag of some sort) that it would then tell the ISY not to turn off the lights irregardless of whether motion was detected or not. Then once I manually turned the lights off with the switch the flag would be cleared and the lights/programs would function normally.

 

 

This is the Turn off program. The turning on of the lights with the doors is handled via the Elk M1.

 

If

Status 'Motion-01-Sensor' is Off

And Status 'Interior - Garage Lights' is On

 

Then

Wait 15 minutes

Set 'Interior - Garage Lights' Off

 

Else

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

 

did this makes sense and is something like this possible?

Link to comment

Makes perfect sense. A simple approach is to use a Fast On (double tap) from the SwitchLinc to trigger a Program which sets a Variable value that blocks the turn Off process. Hard to go into detail without knowing how the ISY Program is coded which turns the lights Off.

 

It is more complex but ISY Programming can count the number of On commands within a given amount of time and set the a Variable to do the suppression.

Link to comment

I expect that this can be done via variables. Unfortunately, my understanding of variables is only conceptual, so I can offer only concepts. Perhaps others can refine this thought process or come up with their own.

 

A program such as

 

if 
light switch is turned on
then
variable = variable + 1
else

 

I also assume that one would re-initialize the variable to zero when the light is off

 

if status switch is off

then

variable = 0

else

 

I would then put all your motion programs in a folder that is active only if the variable is less than three

Link to comment

First off, I would move the control of the garage light to ISY (get rid of all the Elk rules), (this assumes you have the Elk module for ISY).

 

Write a program to turn the light on whenever either of the garage doors is opened.

 
Program "garage timer"

If
Elk zone garage overhead is violated
or
Elk zone garage regular door is violated
or 
Motion detector is triggered

Then
Set garage switch on
wait 14 minutes
Repeat 30 times
wait 2 seconds
set garage switch beep duration 14
repeat 1 time
Set garage switch off

 

The above program will reset to 15 minutes of "on" every time any of the 3 conditions occurs.

Another trick is to use the beep function on the newer switches and have them start beeping a minute before they are about to turn off to warn you if you are in there and want it to stay on.

 

The next program will deactivate the program if the lights are manually turned on and then resume the program when the light is manually turned off.

 
If 
control garage switch is switched on
Then
disable program "garage timer"

If 
constrol garage switch is switched off
Then
enable program "garage timer"

Link to comment
First off, I would move the control of the garage light to ISY (get rid of all the Elk rules), (this assumes you have the Elk module for ISY).

 

 

i have not spent the $99 for the module. I haven't really seen a reason to do so. is there something i am missing?

Link to comment
First off, I would move the control of the garage light to ISY (get rid of all the Elk rules), (this assumes you have the Elk module for ISY).

 

Write a program to turn the light on whenever either of the garage doors is opened.

 
Program "garage timer"

If
Elk zone garage overhead is violated
or
Elk zone garage regular door is violated
or 
Motion detector is triggered

Then
Set garage switch on
wait 14 minutes
Repeat 30 times
wait 2 seconds
set garage switch beep duration 14
repeat 1 time
Set garage switch off

 

The above program will reset to 15 minutes of "on" every time any of the 3 conditions occurs.

Another trick is to use the beep function on the newer switches and have them start beeping a minute before they are about to turn off to warn you if you are in there and want it to stay on.

 

The next program will deactivate the program if the lights are manually turned on and then resume the program when the light is manually turned off.

 
If 
control garage switch is switched on
Then
disable program "garage timer"

If 
constrol garage switch is switched off
Then
enable program "garage timer"

 

thanks for this. this should get me going

Link to comment
First off, I would move the control of the garage light to ISY (get rid of all the Elk rules), (this assumes you have the Elk module for ISY).

 

 

i have not spent the $99 for the module. I haven't really seen a reason to do so. is there something i am missing?

 

 

You won't be able to do those programs I wrote without the Elk module.

 

And I think you will find the Elk module to be well worth the money. ISY programs can do more with Elk than Elk rules can do with Elk. Plus it is just easier to write program in ISY. Plus you may start getting competing programs if Elk is controlling lighting and ISY is controlling the same lighting but with different triggers and conditions.

Link to comment
  • 1 year later...

I am at a loss. I finally bought the Elk module but i have never been able to get this program to work correctly. I have tried it both ways listed below. There are 4 doors & an insteon motion sensor that will all trigger the lights on but they either won't turn off or they turn off after the timeout perior no matter if the motion detector in the garage detects motion of someone in the garage working.

 

this 1st program will turn on lights with any of the triggers and the lights will turn off after 10 minutes as expected. If i am in the garage and moving around the lights will still turn off after 10 minutes and then they will turn back on if there is movement.

 

what i would like to happen is that upon movement detection in the garage the timer should reset to a new 10 minutes each time it is detected...do i need to use a variable?

 

If

Elk Zone 'Garage Interior Door' is Violated

Or Elk Zone 'Garage Door 1' is Violated

Or Elk Zone 'Garage Door 2' is Violated

Or Elk Zone 'Garage Door 3' is Violated

Or Control 'Garage Interior / Motion-01-Sensor' is switched On

 

Then

Set 'Garage Interior / Interior - Garage Lights' On

Wait 10 minutes

Set 'Garage Interior / Interior - Garage Lights' Off

 

Else

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

 

-------------------------------

 

with this program the lights turn on with any trigger but never turn off.

 

If

Elk Zone 'Garage Interior Door' is Violated

Or Elk Zone 'Garage Door 1' is Violated

Or Elk Zone 'Garage Door 2' is Violated

Or Elk Zone 'Garage Door 3' is Violated

Or Control 'Garage Interior / Motion-01-Sensor' is switched On

 

Then

Set 'Garage Interior / Interior - Garage Lights' On

Wait 9 minutes

Repeat 30 times

Wait 2 second

Set 'Garage Interior / Interior - Garage Lights' 10 (Beep Duration)

Repeat 1 times

Set 'Garage Interior / Interior - Garage Lights' Off

 

Else

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

Link to comment
what i would like to happen is that upon movement detection in the garage the timer should reset to a new 10 minutes each time it is detected...do i need to use a variable?

 

No variable is required. Your program should work as is, unless your motion sensor time-out is set higher than ten minutes. Of course, motion sensors are not 100% reliable and issues such as that can come into play, but I would first check to make sure the time-out period is not set too long.

 

Remember, from the ISY, these settings can be adjusted, but the motion sensor must be put into linking mode for the ISY to write the changes. I believe, too, that jumper 5 must be properly set for the ISY or any other controller to make changes.

Link to comment

regarding your second program never turning off the lights, I can only assume that some event happens that interrupts the wait statements and forces the program ELSE path to run. Unfortunately, I am unfamiliar with how Elk rules work in this regard to offer any specific advice.

Link to comment
regarding your second program never turning off the lights, I can only assume that some event happens that interrupts the wait statements and forces the program ELSE path to run. Unfortunately, I am unfamiliar with how Elk rules work in this regard to offer any specific advice.

 

It would be the door status. When you close the door, the door status changes, the program triggers again except now it is false. This ends the "then" clause and runs the "else" clause.

 

Here is how I solved that. The name of this program is "back door"

If
       Control 'Back Hall / Back Hall Ext Door-Breezway' is not switched On
   And (
            (
                 Elk Zone 'Back Door' is Violated
             And Status  'Garage / Third Garage-Breez L' is Off
             And Program 'Dark Outside' is True
            )
         Or (
                 Program 'back door' is True
             And Status  'Garage / Third Garage-Breez L' is not Off
            )
       )

Then
       Set Scene 'Breezway S' On
       Wait  5 minutes 
       Repeat 15 times
          Set 'Back Hall / Back Hall Ext Door-Breezway' 250 (Beep Duration)
          Wait  2 seconds
       Repeat 1 times
          Set Scene 'Breezway S' Off
          Run Program 'back door' (Else Path)

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


 

Notice the last clause

 

         Or (
                 Program 'back door' is True
             And Status  'Garage / Third Garage-Breez L' is not Off
            )

 

This tells ISY, if this program is already running and the light is on, then keep it true. So, when the door opens, the light turns on and the program starts running. When the door closes, the program triggers again and the first part is now false, but the "or" statement above is true, so the program still runs the "then" clause. It does start the timer over from scratch.

 

Please also note that you need this final line of the "then"

 

         Run Program 'back door' (Else Path)

 

This makes the program register as "false" as soon as it finishes.

 

Also notice the first clause

 Control 'Back Hall / Back Hall Ext Door-Breezway' is not switched On

 

This allows me to abort the timer by pushing the "on" paddle of that switch. Since it is a "control not switched on", it triggers with an "on" press (which aborts the wait/repeat) but the "not" causes the "else" clause to run.

Link to comment

based on the reply from apostolakisl, I would also consider the possibility that your first program may suffer similar problems as the second, if one of your elk conditions becomes unviolated. Subsequent sensing of motion would restart the timer, but if the timer is running and an elk condition retriggers the program as FALSE, then your timer will stop and the lights will remain on until another trigger (and TRUE) occurs.

Link to comment
If

Control 'Garage Interior / Interior - Garage Lights' is not switched On

And (

(

(

Elk Zone 'Garage Door' is Violated

Or Elk Zone 'Garage Door 1' is Violated

Or Elk Zone 'Garage Door 2' is Violated

Or Elk Zone 'Garage Door 3' is Violated

Or Control 'Garage Interior / Motion-01-Sensor' is switched On

)

And Status 'Garage Interior / Interior - Garage Lights' is Off

Or (

Program 'Garage Lights Timer Copy' is True

And Status 'Garage Interior / Interior - Garage Lights' is not Off

)

)

)

 

Then

Set 'Garage Interior / Interior - Garage Lights' On

Wait 15 seconds

Repeat 15 times

Set 'Garage Interior / Interior - Garage Lights' 250 (Beep Duration)

Wait 1 second

Repeat 1 times

Set 'Garage Interior / Interior - Garage Lights' Off

Run Program 'Garage Lights Timer Copy' (Else Path)

 

Else

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

 

 

 

 

time lengths are short for testing purposes. kind of lost track with all of the parentheses. it is sorta working.

 

when i open (and close) the interior door to enter the garage the lights comes on and stay ons for the programmed time period (about 30 secs)

but if i leave the door open and walk into the garage the light comes on and starts the timer and once the timer expires the lights turn off but back on immediately and the timer restarts over and over again (lights going off and on)

the motion is not resetting the timer.

if a door is open and i try to manually turn off the lights the come back on instantly.

Link to comment

Perhaps I am loosing track of what you are trying to accomplish, but I am not sure why you have all those STATUS conditions in there. Specifically:

 

And Status 'Garage Interior / Interior - Garage Lights' is Off

 

I suspect it is this condition that is keeping your motion sensor from retriggering the countdown.

Link to comment
Perhaps I am loosing track of what you are trying to accomplish, but I am not sure why you have all those STATUS conditions in there. Specifically:

 

And Status 'Garage Interior / Interior - Garage Lights' is Off

 

I suspect it is this condition that is keeping your motion sensor from retriggering the countdown.

 

good catch. that may have been a left over piece

Link to comment
Perhaps I am loosing track of what you are trying to accomplish, but I am not sure why you have all those STATUS conditions in there. Specifically:

 

And Status 'Garage Interior / Interior - Garage Lights' is Off

 

I suspect it is this condition that is keeping your motion sensor from retriggering the countdown.

 

good catch. that may have been a left over piece

 

 

actually to make things simple i think i will try to just have the motion detector keep the lights on in the garage with movement (without cutting off in between). does anyone have a program that accomplishes that?

Link to comment
actually to make things simple i think i will try to just have the motion detector keep the lights on in the garage with movement (without cutting off in between). does anyone have a program that accomplishes that?

 

if

control motion sensor is on <<

then

turn on light

wait x minutes

turn off light

else

nothing

Link to comment
If

Control 'Garage Interior / Interior - Garage Lights' is not switched On

And (

(

(

Elk Zone 'Garage Door' is Violated

Or Elk Zone 'Garage Door 1' is Violated

Or Elk Zone 'Garage Door 2' is Violated

Or Elk Zone 'Garage Door 3' is Violated

Or Control 'Garage Interior / Motion-01-Sensor' is switched On

)

And Status 'Garage Interior / Interior - Garage Lights' is Off

Or (

Program 'Garage Lights Timer Copy' is True

And Status 'Garage Interior / Interior - Garage Lights' is not Off

)

)

)

 

Then

Set 'Garage Interior / Interior - Garage Lights' On

Wait 15 seconds

Repeat 15 times

Set 'Garage Interior / Interior - Garage Lights' 250 (Beep Duration)

Wait 1 second

Repeat 1 times

Set 'Garage Interior / Interior - Garage Lights' Off

Run Program 'Garage Lights Timer Copy' (Else Path)

 

Else

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

 

 

 

 

time lengths are short for testing purposes. kind of lost track with all of the parentheses. it is sorta working.

 

when i open (and close) the interior door to enter the garage the lights comes on and stay ons for the programmed time period (about 30 secs)

but if i leave the door open and walk into the garage the light comes on and starts the timer and once the timer expires the lights turn off but back on immediately and the timer restarts over and over again (lights going off and on)

the motion is not resetting the timer.

if a door is open and i try to manually turn off the lights the come back on instantly.

 

Yes, I meant for it to keep the light on if the door was open. In other words, if you were standing there with the door open saying goodbye to someone or whatever, it would not turn off on you.

 

The timer keeps resetting, but the light never actually shuts off on me. Probably because I have it on a 2 second dim rate and by the time it start dimming down, it just goes back up without a noticeable change.

 

Also, when you post "code" use the "code" button at the top. It keeps all the tabs and spacing in place. Helps a lot with following parentheses.

Link to comment

Archived

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


  • Recently Browsing

    • No registered users viewing this page.
  • Forum Statistics

    • Total Topics
      36.9k
    • Total Posts
      370.2k
×
×
  • Create New...