Jump to content

What's wrong here?


gmurch

Recommended Posts

Here is a program that doesn't run as I would expect?

 

If

Status 'Guitar Room Center' is Off

And Control 'Guitar Room Center' is switched On

 

Then

Set 'Guitar Room' 60%

Set 'Guitar Room Center' 60%

Set 'Theatre Sconce's' 60%

Wait 3 minutes

Set 'Guitar Room Center' Off

Set Scene 'Movie' On

 

Else

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

 

What happens is the first part of "then" runs correctly but after the 3 minutes the next two items don't trigger.

 

Thanks in advance

Glenn

Link to comment

Glenn,

 

You are changing the Status of 'Guitar Room Center' to Not Off during the Then. The Program then turns False. Then will quit and Else will run.

 

You will need to break this into two programs; the first will check the If and Then will call Program2. Program2 should have all the Then commands.

 

Rand

Link to comment

I see. I have trouble understanding the order of things, my sense is that the condition would start the program and it would complete the cycle, from what you say that is not correct. So, would it work if I moved the part from "wait 3 minutes, etc to the "else section" ?? Eg:

 

If

Status 'Guitar Room Center' is Off

And Control 'Guitar Room Center' is switched On

 

Then

Set 'Guitar Room' 60%

Set 'Guitar Room Center' 60%

Set 'Theatre Sconce's' 60%

 

Else

Wait 3 minutes

Run program 'Watch Movie'

Set 'Guitar Room Center' Off

Link to comment

Here is another example that would do the same thing but it stops before the last command leaving "Guitar Room Center" on.

 

If

Status 'Stairway' is Off

And Control 'Stairway' is switched Off

 

Then

Set Scene 'Movie' On

Set 'Guitar Room Center' 50%

Wait 3 minutes

Set 'Guitar Room Center' Off

 

Else

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

Link to comment

Is 'Stairway' in your 'Movie' scene?

 

This works fine here:

 

If
       Status  'Basement Lights' is Off
   And Control 'Basement Lights' is switched Off

Then
       Set Scene 'Family Room - Dawn' On
       Set 'Family Room Swag Lamp' Fast On
       Wait  1 minute 
       Set 'Family Room Swag Lamp' Fast Off

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



 

Back to your first program:

 

If
       Status  'Basement Lights' is Off
   And Control 'Basement Lights' is switched On

Then
       Set 'Basement Lights' On
       Set 'Family Room Track Lights' 60%
       Set 'Family Room Swag Lamp' 60%
       Wait  1 minute 
       Set 'Basement Lights' Off
       Set Scene 'Family Room - Dawn' On

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


Experimental Program:

 

Two programs will make this work.

 

If
       Status  'Basement Lights' is Off
   And Control 'Basement Lights' is switched On

Then
       Run program 'Experimental Program 2'

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



 

Experimental Program 2:

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

Then
       Set 'Basement Lights' On
       Set 'Family Room Track Lights' 60%
       Set 'Family Room Swag Lamp' 60%
       Wait  1 minute 
       Set 'Basement Lights' Off
       Set Scene 'Family Room - Dawn' On

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



 

Program 1 calls Program 2 and ends. Program 2 does not have any conditions, it will run to the end even though Program 1 becomes False when the 'Basement Lights' are turned on.

 

Rand

Link to comment

You are correct, stairway is in the "Movie" scene. This works, I just don't really like using double tap (fast on) It is too easy to trigger it by mistake. What I am trying to do is have the lights in the movie room come on until I get in my chair, DVD loaded and a beer at my side before the lights dim - not an unreasonable request?

 

If

Control 'Stairway' is switched Fast On

 

Then

Set 'Guitar Room Center' 50%

Set 'Guitar Room' 70%

Set 'Theatre Sconce's' 70%

Set 'Stairway' 70%

Wait 3 minutes and 30 seconds

Set 'Guitar Room Center' Off

Set Scene 'Movie' On

 

Else

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

Link to comment

I think you've got it!

 

You could use a ControLinc or RemoteLinc or any other Insteon controller to trigger your program. It's up to you. But if you look at Status you will need two programs. Two programs can have advantages because more than one trigger can call your 'Get a beer and Watch a movie' program. Each trigger would be a separate program.

 

 

I would certainly create a Scene for all this:

 

Set 'Guitar Room Center' 50%

Set 'Guitar Room' 70%

Set 'Theatre Sconce's' 70%

Set 'Stairway' 70%

 

Levels in scenes are accurate to 1%. Ramp rates can be specified. Ramp rates with direct control are a crapshoot. Scenes can be modified without changing a program.

 

Rand

Link to comment

Thanks so much for the help. I see that I can have two programs with the same scene, just different levels, when the trigger is pressed, wait a bit and then run scene 2. That would work as well.

 

The part that was confusing me was the status -- I thought that the status would be checked when the trigger was pressed and then not checked again, I see now that it is a condition for the program to run and the program stops when the status changes. I think I can find some advantages to that in other ways !!

Link to comment

Glenn,

 

Don't think of that as two programs with one scene with different levels. You have created two scenes, each one called by a different program. Each scene has unique levels and rates. Go ahead and make three or four scenes for this same group of lights.

 

These scenes can be controlled using the ISY in a myriad of ways.

 

 

Yes, Status and Control are a bit confusing. Completely rational of course, but a bit difficult to distinguish at first. I am using almost all Control triggers now.

 

Rand

Link to comment

The reason I looked at status was because I like using "off" as the trigger if the light is actually "status off" --- the reason is, fast on is easy to do by mistake, on is what I want for the local load and if the load is "on" and turned "off" I don't want that action to activate the trigger. Is there a way to use "off" as a trigger when the load is part of the scene? (I suppose "fast off" would work)

Link to comment
The reason I looked at status was because I like using "off" as the trigger if the light is actually "status off"

 

Status and Control can be used together. Like this:

 

If
       Status  'Basement Stairs' is Off
   And Control 'Basement Stairs' is switched Off

Then
       Set 'Basement Stairs' 30%

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



 

FastOff would also work.

BTW, I am also using FastOn to control a scene and I don't find myself accidentally activating it.

 

Rand

Link to comment

This was the way I actually wanted it to work but the program quit as soon as the status on the stairway was true (stairway is in the "movie" scene):

 

If

Status 'Stairway' is Off

And Control 'Stairway' is switched Off

 

Then

Set Scene 'Movie' On

Set 'Guitar Room Center' 50%

Wait 3 minutes

Set 'Guitar Room Center' Off

 

Else

 

I have been using fast on and it works fine, I just like "off" as a trigger. With a slow ramp rate someone that is visiting may hit a switch twice when they don't get an immediate response. Also, the wife is used to fast on when she wants full bright, I'm sure I'll here about it if that doesn't work and she gets a trigger instead.

Link to comment

You can use Off instead of On in the first program:

 

Is 'Stairway' in your 'Movie' scene?

 

 

 

Two programs will make this work.

 

If
       Status  'Basement Lights' is Off
   And Control 'Basement Lights' is switched On

Then
       Run program 'Experimental Program 2'

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



 

Experimental Program 2:

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

Then
       Set 'Basement Lights' On
       Set 'Family Room Track Lights' 60%
       Set 'Family Room Swag Lamp' 60%
       Wait  1 minute 
       Set 'Basement Lights' Off
       Set Scene 'Family Room - Dawn' On

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



 

Program 1 calls Program 2 and ends. Program 2 does not have any conditions, it will run to the end even though Program 1 becomes False when the 'Basement Lights' are turned on.

 

Rand

Link to comment
Here is a program that doesn't run as I would expect?

 

If

Status 'Guitar Room Center' is Off

And Control 'Guitar Room Center' is switched On

 

Then

Set 'Guitar Room' 60%

Set 'Guitar Room Center' 60%

Set 'Theatre Sconce's' 60%

Wait 3 minutes

Set 'Guitar Room Center' Off

Set Scene 'Movie' On

 

Else

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

 

What happens is the first part of "then" runs correctly but after the 3 minutes the next two items don't trigger.

 

Thanks in advance

Glenn

 

Glenn, How important is the condition of 'Guitar room center' being off when you're switching it on? Do you have a different program that runs when 'guitar room center' is on and the switch is pressed. Perhaps the program might work the way you want if you leave out the condition of 'guitar room center' out of the IF conditions?

Link to comment

Glenn, that's what you said last time! You and I both learned something :)

 

Zellerman, yes the program would work fine without the Status check. A Control is always seen. The value of this exercise was to select an Action for a Control depending on a Status parameter.

 

We discovered that a change in the status of a device involved in the If will affect the path of a program while a program is running. Then we discovered that a program with no Conditions can be used to modify that behavior.

 

A light switch could react in a different way at midnight than during the evening. The same for Glenn's question depending on the Status of a device. You could have different scenarios when moving from the dining room to the living room than from the family room to the living room.

 

Rand

Link to comment

Yes, for me, the two program option actually works better, I can trigger the program from several sources very easily and I get the same result with all of the correct KPL lights -- it was easier then writing triggers for three switches.

 

Thanks a lot, I really like this. You could have two programs that are similar and run at different times of the day - a lot of possibilities !! :D

Link to comment

Archived

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


×
×
  • Create New...