Jump to content

What's wrong here?


gmurch

Recommended Posts

Posted

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

Posted

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

Posted

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

Posted

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')

Posted

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

Posted

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')

Posted

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

Posted

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 !!

Posted

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

Posted

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)

Posted
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

Posted

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.

Posted

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

Posted

I get it now, I feel like a bonehead for not getting it the first time. That works perfecly -- I will use this function again -- brilliant !!! Got to love the ISY !!!

Posted
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?

Posted

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

Posted

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...