Jump to content

Using the ON Status of a dimmer in a program


ulrick65

Recommended Posts

Posted

This is something that got me when I started programming in ISY that I think catches other folks as well, so I thought I would make a quick post to explain it.

 

When you check the status of a dimmable device in the 'If' section of a program, it is important to remember that dimmers can have a status of OFF, ON or xx% (where xx is a number that corresponds to their current level). The reason this is important is because xx% is not the same as ON.

 

Take the following program for example:

 

If
       Status  'Test.Sld.Light' is On

Then
       Set 'Test.Kpl.Button A' On

Else
       Set 'Test.Kpl.Button A' Off

 

This will turn on and off my 'Test.Kpl.Button A' when 'Test.Sld.Light' is either On or Off. However, when 'Test.Sld.Light' is set to some level other than 100%, this program will not work (at least not how I want).

 

Let's say that 'Test.Sld.Light' is turned Off, then this program will be False and the Else statement runs and turns my Kpl Button Off. Now, if I begin brightening 'Test.Sld.Light' to say 50%, the light will be on (half bright) but this program is STILL false (because 50% is not On). If I brighten it all the way to 100%, it will change to status of ON and my KPL Button will come on.

 

This is where the "Is Not" function comes in handy.

 

Take a look at this program:

 

If
       Status  'Test.Sld.Light' is not Off

Then
       Set 'Test.Kpl.Button A' On

Else
       Set 'Test.Kpl.Button A' Off

 

This works perfect now, as long as 'Test.Sld.Light' is something other than Off...my Kpl Button will be On. If 'Test.Sld.Light' IS Off, then the statement is False and it runs the Else statment and sets my Kpl button off.

 

On a last note: Always remember that ISY must see a change occur in the condition in order for the program to execute (unless it is called directly, but that is another story). So, in this case the status of 'Test.Sld.Light' must change for ISY to evaluate the condition and execute the proper Then/Else statements.

Posted

so, if I make a program that says:

if bedroom light is > 90% then turn on bathroom light,

 

what will happen if the light is "ON'? is that >90% (according to the ISY)?

 

what will happen if the light is at exactly 90%, which obviously isn't >90%?

Posted
so, if I make a program that says:

if bedroom light is > 90% then turn on bathroom light,

 

what will happen if the light is "ON'? is that >90% (according to the ISY)?

 

what will happen if the light is at exactly 90%, which obviously isn't >90%?

Yes, ON is 100% (OFF is 0%), so ON is > 90% and the condition is True.

 

90% is NOT > 90%, so the condition is False.

Posted

Darrell is 100% right...but keep in mind (because many people miss this point) that anything less than 100% is NOT on. So if you say:

 

If Bedroom light is ON then...etc. and expect that if the light is 90% that the statement is true...because it isn't. When Darrell says 100% = ON that is exactly what it means...anything less than 100% is not on.

 

Subtle point...but important.

 

so, if I make a program that says:

if bedroom light is > 90% then turn on bathroom light,

 

what will happen if the light is "ON'? is that >90% (according to the ISY)?

 

what will happen if the light is at exactly 90%, which obviously isn't >90%?

Yes, ON is 100% (OFF is 0%), so ON is > 90% and the condition is True.

 

90% is NOT > 90%, so the condition is False.

Posted
so, if I make a program that says:

if bedroom light is > 90% then turn on bathroom light,

 

what will happen if the light is "ON'? is that >90% (according to the ISY)?

 

what will happen if the light is at exactly 90%, which obviously isn't >90%?

Yes, ON is 100% (OFF is 0%), so ON is > 90% and the condition is True.

 

90% is NOT > 90%, so the condition is False.

 

I'm not completely sure that this is correct that ON is considered to be >90%.

 

I have written a program that I use for a for a dimmer that controls fixtures that have compact fluorescent bulbs in them that I don't want to dim. It says:

 

If
       Status  'Gym-1- light by TV' > 50%

Then
       Set 'Gym-1- light by TV' On

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

 

This program will run one time when I try to dim the light and will not continue to run over and over after the light gets to "ON".

Posted

 

This program will run one time when I try to dim the light and will not continue to run over and over after the light gets to "ON".

 

The program will only run when the Status changes.

 

Rand

Posted

The program will only run when the Status changes.

 

Rand

 

Rand:

 

so, you are saying that ON is considered > 90% by the ISY, but it doesn't keep running the program over and over because the status doesn't change? (I'm sorry to keep beating this up, but I was told in a previous thread that I can't find now, that ON and >(some number)% are not the same thing.)

 

thanks,

 

someguy

Posted

The program will only run when the Status changes.

 

Rand

 

Rand:

 

so, you are saying that ON is considered > 90% by the ISY, but it doesn't keep running the program over and over because the status doesn't change?

 

Correct

 

(I'm sorry to keep beating this up, but I was told in a previous thread that I can't find now, that ON and >(some number)% are not the same thing.)

 

On = 100%.

I think that post was meant to say that On is not the same as >Off. A device could be on to a dimmed level and a status check will not return On.

 

Rand

Guest
This topic is now closed to further replies.

×
×
  • Create New...