fdastoor Posted November 16, 2008 Share Posted November 16, 2008 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 level2] On 2 presses ramp to 60% intensity level3] On 3 presses go to 100% intensity4] Press and hold to turn off lamp.Is this possible -- please advise Link to comment Share on other sites More sharing options...
trippinbillies41 Posted November 16, 2008 Share Posted November 16, 2008 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 More sharing options...
neil12011 Posted November 16, 2008 Share Posted November 16, 2008 this is how mine is set up. Link to comment Share on other sites More sharing options...
slemay Posted November 17, 2008 Share Posted November 17, 2008 To Add to that I do it via delays and a "TAP" variable1st one on BUTTON PRESS2nd one on BUTTON RELEASE Link to comment Share on other sites More sharing options...
slemay Posted November 17, 2008 Share Posted November 17, 2008 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 More sharing options...
neil12011 Posted November 17, 2008 Share Posted November 17, 2008 i should note that mine is for the programmable buttons on the hand held remotes. Link to comment Share on other sites More sharing options...
fdastoor Posted November 18, 2008 Author Share Posted November 18, 2008 neil,Is there any differance in programming buttons on the remote as compared to that for a button on a keypad or a dimmer switch? Link to comment Share on other sites More sharing options...
trippinbillies41 Posted November 18, 2008 Share Posted November 18, 2008 nope! Link to comment Share on other sites More sharing options...
MetFan1 Posted November 18, 2008 Share Posted November 18, 2008 Do the number keys not work for the outlet switch just like the lights? Havent tested it yet. Link to comment Share on other sites More sharing options...
fdastoor Posted November 20, 2008 Author Share Posted November 20, 2008 Shawn,For my info, in your code:1] What is the purpose of the very first line : Variables->Tap=Variables->Tap=12] what does the 500 millisecond delay do? Link to comment Share on other sites More sharing options...
MetFan1 Posted November 20, 2008 Share Posted November 20, 2008 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 More sharing options...
fdastoor Posted November 20, 2008 Author Share Posted November 20, 2008 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 More sharing options...
MetFan1 Posted November 20, 2008 Share Posted November 20, 2008 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 More sharing options...
TurboKuake Posted November 20, 2008 Share Posted November 20, 2008 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.