Jump to content

Using 8 button KPL to control lights


stillen_i30

Recommended Posts

I have an 8-button KPL in the kitchen.

 

The "Main on/off" button controls the kitchen lights.

 

I have a scene on that same KPL on button "D" which controls other lights, along with the kitchen lights.

 

When activated, this scene will dim several lights, including the kitchen lights to 45%, while we watch TV in the adjoining room.

 

When my wife wants to enter the kitchen, she wants the kitchen lights to be on full brightness.

 

When she's done in the kitchen and we're still watching TV, she wants to have the lights dim back to 45% (for example, KPL "D" is still ON and that dimmed-lights scene is still active).

 

We want to be able to do all of this simply by using the Main On/OFF button which controls the kitchen lights anyway.

 

I used to have a regular SwitchLinc controlling the kitchen lights (with another keypad to activate that "dimmed" scene for TV watching), and this used to work out perfectly. Now that the 8-button KPL restricts ONE button (as opposed to separate on/off buttons) for control of the overhead lights, I cannot do what I want to do.

 

Any ideas of how you would solve this problem? I've tried writing a series of programs to have this work, but I cannot succeed. Shoudl I be considering variables, and if so, how do I do this?

 

Thanks

Link to comment

So...let me get this straight....you want to use the main button to turn ALL kitchen lights on full bright and use button D to dim these same lights to about 45%?

 

If that is correct, I would approach this with two steps. The first step is with scenes. I would make the primary button controller of a scene with the other lights as responder, making sure that the "on" level is set to 100%. I would make button D controller of a scene with the same lights, setting the "on" levels at the lower level.

 

The second step is to ensure I have the ability to return the lights to the lower level from the full-on condition without having to press button D twice. In order to do that, I would write a program to turn off button D when I recieve a command from the main button. Without being able to test options, I suspect the proper program would look something like:

 

if

control main button is set on

or control main button is set bright

or control main button is set dim

or control main button is set off

 

then

set button D off

 

else

 

There may be more elegant ways of programming this, but this should get some ideas coming, hopefully. I am concerned about using "status" of the main button as a condition for fear of the consequences resulting from a press of button D.

Link to comment

oberkc-

 

I don't believe you can directly turn off a secondary KPL button. Instead, include the D button in the Full Bright scene with a 0% on level.

 

-Xathros

Link to comment
I don't believe you can directly turn off a secondary KPL button. Instead, include the D button in the Full Bright scene with a 0% on level.

 

You may be correct. I never remember much of the details, reacting instead to trial-and-error. The solution could be to create a scene, with the KPL button as only device, and to turn the scene off by program.

 

I also don't recall if you can set a secondary KPL button "on" level to zero. Assuming you can (as you suggest and suspect are correct), the concern that I have is that I want the secondary keypad to go off not just in response to a primary button scene "on" command, but in response to ANY command, be it brighten, or dim. I am concerned that relying entirely on a scene approach may not be flexible enough.

Link to comment

I believe that KPLs with a firmware of V.40 and above, you can set a 0% on level for secondary buttons and activate those with a Scene On. Below V.40, you would need a separate scene containing the button(s) to turn off and issue a Scene Off command to that scene.

 

In any event, I think it will require a program or two to monitor the KPL button presses and call the appropriate scenes.

 

-Xathros

Link to comment

Sorry, this is kinda confusing, but here is a breakdown of what the situation is:

 

The "main" button controls the kitchen lights

 

The "D" button controls a scene that not only turns on/off the kitchen lights, but also several other lights in the adjoining living room.

 

When someone presses "D", the kitchen lights turn on only to 45%. Other lights also turn on only to 45%.

 

If we want to turn on the kitchen lights to 100% (and not turn on the other lights), we simply use the "main" button. When the scene linked to "D" is on, the "main" button is also on (even though that particular scene sets the kitchen lights to 45% only, the keypad lights for D and Main are on).

 

If someone wants to come into the kitchen while scene "D" (dimmed multiple lights) is already on, they press the "main" button which is also already "on" but only at 45%. When they press that "main" button, I want the kitchen lights not to turn off (which is what they would naturally do since "main" is already on but the lights in there are only 45%), but instead I want them to go to 100% brightness and the "main" button stays lit. If they are done in the kitchen and are ready to come back and watch TV, they will hit "main" again, which will still stay lit, but the lights will revert back to 45% since the remainder of the scene is on.

 

How can I achieve this?

Link to comment
How can I achieve this?

 

This problem may not be solvable, given that your KPL actually powers some of the lights in a scene.

 

I think, too, that you may run into additional use cases issues. If the kitchen lights are full on, including KPL-main, how do you intend to turn them off (or do you not intend to)? If you create a set of programs that reverts the scene back to 45% when you turn KPL-main off, what means do you intend to use to turn them fully off? Fast off? Button D?

 

You may need to consider a different approach. Do you have an unused button on the keypad? Could you use this extra button as controller of the same scene as button D, but with "on" levels at 100%. The main button would have to be redefined as responder only.

Link to comment
If someone wants to come into the kitchen while scene "D" (dimmed multiple lights) is already on, they press the "main" button which is also already "on" but only at 45%. When they press that "main" button, I want the kitchen lights not to turn off (which is what they would naturally do since "main" is already on but the lights in there are only 45%), but instead I want them to go to 100% brightness and the "main" button stays lit. If they are done in the kitchen and are ready to come back and watch TV, they will hit "main" again, which will still stay lit, but the lights will revert back to 45% since the remainder of the scene is on.

 

How can I achieve this?

 

First, let's handle the Main not switching Off... Essentially you want it to switch On instead of Off. We can do that with a program, but there will be a delay. The light will switch off, and then the program will switch it on. That's confusing and undesirable, so we'll fake it by adjusting the ramp rate while "Scene D" is active.

If
  Control 'KPL - D' is switched On
  And Control 'KPL - D' is not switched Off
Then
  In Scene 'KPL - Main' Adjust 'KPL - Main' to 'Ramp Rate 9 Minutes'
  $SceneD_IsOn = 1
  $KPL_Main = 0
Else
  In Scene 'KPL - Main' Adjust 'KPL - Main' to 'Ramp Rate 2.0 Seconds'
  $SceneD_IsOn = 0

So this program will adjust the ramp rate to the maximum when you turn D on, and then will set it back to normal whenever you turn D off. We also set a variable while D is turned on that will be used in our later programs.

 

Now that the lights will be turning off very slowly, we can use a program to interrupt that and switch them On full.

If
  $SceneD_IsOn = 1
  And Control 'KPL - Main' is switched Off
  And $KPL_Main = 0
Then
  $KPL_Main = 1
  Set 'KPL - Main' Fast On
Else
  - No Actions - (To add one, press 'Action')   

We use Fast On to turn on the main lights since the ramp rate is set to max. (We could toggle it shorter and then back to longer if you really really want a ramp here...) We also set a variable to indicate "Main turned on while D is on" so that the next press goes back to 45%...

 

Now we just need to restore the lights back to Scene D setting when you hit the button again...

If
  $SceneD_IsOn = 1
  And Control 'KPL - Main' is switched Off
  And $KPL_Main = 1
Then
  $KPL_Main = 0
  Set Scene 'Scene D' On
Else
  - No Actions - (To add one, press 'Action')   

Simply setting the scene on again should dim the lights back to the scene's settings. Setting the variable back to 0 ensures the next press will run the previous program to return to full brightness.

 

The second and third programs basically override the "Off" of the main button to perform the toggling between 45% and 100% that you desire. By setting the maximum ramp rate on Main while D is on, the natural Off from pressing the button will be very slow and so easily interrupted by the programs.

 

This is all a shot in the dark written from memory and untested, so please forgive any typos or small syntax errors...but I do believe the basic concept will work.

Link to comment
That's confusing and undesirable, so we'll fake it by adjusting the ramp rate while "Scene D" is active.

 

This is an interesting concept. I don't believe I would have thought to adjust ramp rate to avoid the "undesirable" off>on transition. Unfortunately, there are no conditions which test for "scene" status, so you may need to find another condition which accomplishes a similar goal.

 

My suspicion is that the OP may want to take a lot of time to consider what he wants to happen under a variety of conditions. Examples include:

 

- If button D is on, and he presses button A, what should happen to button D?

- If button D is off and he presses button A, what should happen to button D.

- if the lights are on, is it necessary to be able to turn them off? If so, what button would do that?

-if button A and D are both on, and the lights are full on, what should happen when one presses button D?

 

There are a lot of combinations here and I still think the entire control scheme needs to further thought out.

Link to comment
That's confusing and undesirable, so we'll fake it by adjusting the ramp rate while "Scene D" is active.

 

This is an interesting concept. I don't believe I would have thought to adjust ramp rate to avoid the "undesirable" off>on transition. Unfortunately, there are no conditions which test for "scene" status, so you may need to find another condition which accomplishes a similar goal.

Easily resolved. We already have a program that is trigger on D being turned On and Off...just have it set a variable $Scene_D_Is_On to 1 in the Then and 0 in the Else... Then use $Scene_D_Is_On = 1 in the later programs.

 

EDIT: I edited the above post to reflect this change.

Link to comment
Easily resolved. We already have a program that is trigger on D being turned On and Off...just have it set a variable $Scene_D_Is_On to 1 in the Then and 0 in the Else... Then use $Scene_D_Is_On = 1 in the later programs.

 

Yes, a variable could work. Alternatively, one could use one of the scene responders as a surrogate indicator of scene status.

 

This is one of those cases, I believe, where the requirements are not fully examined and will result in unexpected complications.

 

On the other hand, this would be a good excuse to improve one's ISY programming skills.

Link to comment
There are a lot of combinations here and I still think the entire control scheme needs to further thought out.
This is one of those cases, I believe, where the requirements are not fully examined and will result in unexpected complications.

I agree...this is not necessarily the greatest control scheme. Essentially activating D is like locking in to D's scene...the Main is then changed to toggle between 100% and D's setting. You have to then deactivate D to return to normal operation. If ANYTHING ELSE controls these lights, there will need to be additional logic to integrate with this setup.

 

My suspicion is that the OP may want to take a lot of time to consider what he wants to happen under a variety of conditions. Examples include:

 

- If button D is on, and he presses button A, what should happen to button D?

- If button D is off and he presses button A, what should happen to button D.

- if the lights are on, is it necessary to be able to turn them off? If so, what button would do that?

-if button A and D are both on, and the lights are full on, what should happen when one presses button D?

I would guess answers are:

- D would remain on, since we're in "locked in to D" mode...all the other lights stay at D's levels.

- It would respond normally controlling the kitchen lights

- Hitting D again would Off the D scene and turn off all the lights and release the "locked in to D" mode.

- How would that happen? Regardless of the states of any of the lights, when D is turned on, all the lights will move to D's levels.

 

On the other hand, this would be a good excuse to improve one's ISY programming skills.

Always true!

Link to comment

Thanks for the detailed response...I will try this tonight and report back. I have a similar situation with the hallway lights, so if I can get this to work this would be great..

the undesirable off, then on situation is definitely "undesirable," I almost thought there wouldn't be a solution for that.

Link to comment
D would remain on, since we're in "locked in to D" mode...all the other lights stay at D's levels.

I believe that this fails to meet the requirement of his initially-stated desire to be able to go from 45% to full on when his wife enters the room.

How would that happen?

I thought we were setting up a scheme where, if the wife enters the room with the 45% scene (and button D) on and presses the main button, the lights go to full bright?

 

Maybe I misunderstand.

Link to comment

I thought we were setting up a scheme where, if the wife enters the room with the 45% scene (and button D) on and presses the main button, the lights go to full bright?

 

Maybe I misunderstand.

I thought he wanted just the kitchen lights (the actual load on the main button) to go to full....all the other lights in D's scene will remain the same...only the kitchen lights should go to full. That is what the programs accomplish.

Link to comment

Yes, that is what I want to accomplish...I want the remainder of the lights (all part of the scene that is controlled by button "D") to remain at their scene-dimmed levels. The "main" KPL button light is also on, but the kitchen lights are only 45%. When the wife walks into the kitchen, she will press "main" again (already lit on KPL), and the kitchen lights should go to 100%. When she's done in the kitchen, she will press "main" again and the kitchen lights will dim back to 45% (and I don't want any of the other lights to change with anything the wife does). I still haven't had a chance to try this since I had to work an extra shift in the same day...I'm gonna look to do this tomorrow night and report back on how things work...but the question I have is for the variables, do I have to set up any variables under the "variables" tab and if so, how do I do that?

 

Thanks

Link to comment
  • 2 weeks later...
but the question I have is for the variables, do I have to set up any variables under the "variables" tab and if so, how do I do that?

 

The method suggested by vyrolan used variables. Yes, I understand these need to be set up in the variables tab. Unfortunately, I am not a user of variables and cannot offer any hands-on advice.

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.3k
×
×
  • Create New...