Jump to content

Help with simple program


wlodekd

Recommended Posts

Posted

I am just starting with programs. Purpose of the program is after turning powder room light on it should gradually change brightness every 2 secs and turn off.

I can not figure out what is wrong in the syntax below:

 

If

Status 'Powder Room Light' is not Off

 

Then

Set 'Powder Room Light' On

Wait 2 seconds

Set 'Powder Room Light' 80%

Wait 2 seconds

Set 'Powder Room Light' 60%

Wait 2 seconds

Set 'Powder Room Light' 40%

Wait 2 seconds

Set 'Powder Room Light' 20%

Wait 2 seconds

Set 'Powder Room Light' Off

 

Else

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

 

Program starts but light instead gradually fading to "off" status is cycling between "on" and 80% in infinitive loop.

 

Best regrads Walter

Posted

Rather than clog up your power lines with repeated commands, why not create a scene with that light in it and a ramp rate of 10 seconds or so (you can play with the ramp rate until you get a time period you like), and then simply have the scene turn off when the light is on. Your program could be as simple as:

 

If
       Status 'Powder Room Light' is On

Then
       Set 'Scene.Powder Room Light With Long Ramp Rate' Off

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

 

I am just starting with programs. Purpose of the program is after turning powder room light on it should gradually change brightness every 2 secs and turn off.

I can not figure out what is wrong in the syntax below:

 

If

Status 'Powder Room Light' is not Off

 

Then

Set 'Powder Room Light' On

Wait 2 seconds

Set 'Powder Room Light' 80%

Wait 2 seconds

Set 'Powder Room Light' 60%

Wait 2 seconds

Set 'Powder Room Light' 40%

Wait 2 seconds

Set 'Powder Room Light' 20%

Wait 2 seconds

Set 'Powder Room Light' Off

 

Else

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

 

Program starts but light instead gradually fading to "off" status is cycling between "on" and 80% in infinitive loop.

 

Best regrads Walter

Posted

Walter, because you are keying on the Status of the device your program will loop.

 

You could use Control to begin your program when the switch is pressed.

 

If
       Control 'Powder Room Light' is switched On

Then
  - - -

 

Tim is right that you probably should use a scene to fade the light.

 

Rand

  • 1 month later...
Posted

Their suggestion is a better solution, that way you basically hand the dim command off to the local light controller.

 

From what I remember of the original X10 equipment, I tried the same thing, only in a slightly different manner, but got the same result.

 

I believe the issue you were experiencing is that when you issue your dim command, the unit turns fully on, then dims down to the level you requested. So your command 'Set Powder Room Light 80%' turns on the light then dims it down to 80%. Then a 2 second wait. The 60% command is then given, which turns the light on fully again, then starts the ramp down to 60%. But before the unit can get to 60%, the 2 second wait after that command times out, then the 40% command is issued. This continues and gives the appearance the light control unit is just changing from bright to 80% until you reach the final OFF command.

 

Just so you might understand a bit better what might have been happening!

 

James

Posted

James, the Insteon lights ramp towards a new level, at a preset rate if it is a group command, or the local rate, or the last used rate, without going to on. Switching to full on is/was an X10 limitation.

 

Notice that I highlighted last used rate, because unless you use a scene to set the ramp rate the last used rate is unknown and unpredictable.

 

Rand

Guest
This topic is now closed to further replies.

×
×
  • Create New...