Jump to content
C4 Forums | Control4

Help with Programming wireless Dimmer outlet


fdastoor

Recommended Posts

I would appreciate help with the following:

I have a table lamp plugged into outlet 1 of a wireless dimmer.

I would like to leave the outlet on at all times. But then I would like to use the programmable button on the remote to do the following:

1] On one press ramp lamp to 30% intensity level

2] On 2 presses ramp to 60% intensity level

3] On 3 presses go to 100% intensity

4] Press and hold to turn off lamp.

Is this possible -- please advise

Link to comment
Share on other sites


You would create a variable first, name it something like "lamp level". every time you press the programmable button, add 1 to the variable. Then program the variable levels. It will look like "if lamp level = 1, set light level to xx" "if lamp level = 2, set light level to xx." Eventually you'll do if lamp level = x, set lamp level to 0" that way it resets for you after so many presses.

press and holds on top of that could be fun... For a press and hold, you create a true/false variable. When button is pressed, set variable to false, wait xx seconds, set variable to true. When button is released, if variable = false (aka you didn't hold it down long enough to trigger the "press and hold" feature) do the normal event (in this case, add 1 to the other variable we already discussed.) If variable = true, then set the light level to 0 and the other variable to 0. You can also have fun and change the LED color on the button (if it's a keypad) when the press-and-hold time has been reached.

Hope that helps!

Link to comment
Share on other sites

Oh - the little extra code on one button tap...

Basically toggles another variable that if the LIGHT is already on - turn it off. This is the "rest of world" factor... meaning if the light is already on and they want to turn it off - one button press is what people are used to (this is a 6 button keypad).

Link to comment
Share on other sites

1)The first line is telling the variable to add 1. You need to have a value to be able to ask the question "If there has been 1 press do this, if there is two presses do this" If there were no value, there would be no way of telling how many times you pressed the button.

2) Your telling the programming script to wait 500 milliseconds before it continues to ask the questions. You want to be able to press the button to create a value before the script asks questions. The dely is to allow you to press the button how ever many times within 500 milliseconds before it starts to ask the question "If button was pressed x amount of times, do this"

Notive that that first line you refer to is on the press of the button and that the rest of the script is on the realese of the button.

Link to comment
Share on other sites

Thanks for the info and now I understand why Shawn's script does not work for me since I am using the 'C' button of the system remote to run it, I do not believe these buttons have a Press and Release ability. Do they?

If they do not, is there a work around so that I can use the remote to accomplish what I want. I do not have any keypads.

Link to comment
Share on other sites

Yes there is a press and release option for buttons on the remote. You have to use custom buttons. Heres a couple pics of how my sleep timer is set up. Notice that my programming is backwards from slemays in respect to the press and release of the button. Both do the same thing tho.

Link to comment
Share on other sites

Thanks for the info and now I understand why Shawn's script does not work for me since I am using the 'C' button of the system remote to run it, I do not believe these buttons have a Press and Release ability. Do they?

If they do not, is there a work around so that I can use the remote to accomplish what I want. I do not have any keypads.

There is no press and release for the remote control. You can still do it, but there will be no press and release to turn off, it will simply loop around. See code below.

You can change the last line to be your default value, but it is there incase your lights are dimmed to some random number other than 0, 30, 60 or 100 percent, say 42% or something.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.