Vipola Posted April 27, 2011 Posted April 27, 2011 I am currently looking at the best way of having a 'all light off' button on a keypad with the button led indicating if any of the light are open.. For example in my beadroom I have a Keypad with a Button, I want the LED Turn On if any light is ON in my house (except my bedroom, and outside lights) and when I press on that button it turn All those light Off if they aren't.. I Created a Scene [Group.AllOffSaufChambre] (witch mean AllOffExceptBedRoom) and I have put all the light in my house in that group as Responder (except my bedroom light and outside light), then I have added my KeyPad Button as a Controller.. you can have more than one controller here, for example, one in the BedRoom and one in the 2nd level Passage. I first tried to do this via a Program, the advantage of program was the ability to group and re-use (Group.1stlvl, Group.2ndlevel, Group.Kitchen, Group.Sched, Group.Basement, etc) so that way you can group some program if you have some button that turn off everything and other that just turn on specific level, and you don't need to rewrite them all. Another advantage of doing it with a Program was to Control different Device on the ON and OFF event, for example you press the button to turn OFF everything, but you can click the button again to turn ON just a few main light in the house. This can't be done using scenes because from what I Understood, a keypad button cannot be controller of more than one scene, and a Scene can't send the OFF command to different list of device than the ON command. That solution worked but I had the feeling it was sending one request by device to turn everything off, so it was taking many second to accomplish and sometime some device didn't turn off properly.. To do this via a Scene instead made it quicker, more reliable and smoother. Then you can go in your KeyPad setting and set the controller button 'Toggle Off' to always send 'Off' button.. this will prevent a miss-click that would light everything ON in the middle of the night.. Then we want to get that LED ON to indicate if any of those devices are ON.. For this we are going to use a Program, but first we will need a second Scene: The Scene [Group.AllOffSaufChambre.LED] with every of your keypad button as responder (the Keypad button you want the LED to light up when any of the devices are turned on, big chance it's the same devicebutton that was 'controller' in the [Group.HouseAllOffSaufChambre] scene ), This will allow us to control the LED of the KeyPad Button from our Program. Here is a PrintScreen of what the Scenes look likes: The first Program check the status of every device, and call the LEDstatusScene accordingly, sorry for the French Naming.. Group.AllOffSaufChambre.LEDisOn: If Status '2e / Haut / Haut' is On Or Status '2e / SaleDeBainHaut / SaleDeBainHaut' is On Or Status '2e / SaleDeJeu / SaledeJeu' is On Or Status '1e / Corridor / KeyPad / Cuisine Corridor' is On Or Status '1e / Cuisine / Cuisine' is On Or Status '1e / Cuisine / Cuisine Armoir' is On Or Status '1e / Cuisine / KeyPad / Cuisine A' is On Or Status '1e / Cuisine / Cuisine Hotte Lumiere' is On Or Status '1e / Cuisine / UnderCounterL' is On Or Status '1e / SaleDeBainBas / SaleDeBainBas' is On Or Status '1e / Salon / Salon' is On Or Status '1e / Entree / KeyPad / Entree A' is On Or Status 'Ext / Sched / Sched Main' is On Or Status 'Ext / Sched / Sched Petite' is On Then Set Scene 'Group / AllExceptChambre / Group.AllOffSaufChambre.LED' On Else Set Scene 'Group / AllExceptChambre / Group.AllOffSaufChambre.LED' Off This program will update the LED of our KeyPad Button each time a device is turned on or off.. Because a KeyPad button in ToggleOff Mode will blink a few time when you press it, the action of this program won't always update sucessfully the LED of your button when you Press on them.. we will create a second program to take care of this: Group.AllOffSaufChambre.LEDisOn.Update: If Control '2e / Chambre / KeyPad / Chambre G' is switched Off Or Control '2e / Haut / KeyPad / Haut H' is switched Off Then Wait 4 seconds Run Program 'Group.AllOffSaufChambre.LEDisOn' (If) Else - No Actions - (To add one, press 'Action') This Program will wait the 'Flashing preriod' of the KeyPad button and then refresh it value. This is based on my different Try in the past few weeks.. I am really aiming at improoving this the most possible, for a convenient, smooth and reliable solution. Maybe I am still very far from the ultimate solution.. but this is where I am at right now.. Please feel free to add any Suggestion and/or Comments Thanks
oberkc Posted April 27, 2011 Posted April 27, 2011 You did this using the same approach as did I. I don't recall needing any wait statements, but this may be due to you having two controllers and I having only one. Still, I am surprised at the need for a wait statement to turn off the keypad, since this is the default (nontoggle off) condition. If you continue to need a wait statement, you could also simply add it to the first program, such as: If Status '2e / Haut / Haut' is On Or Status '2e / SaleDeBainHaut / SaleDeBainHaut' is On Or Status '2e / SaleDeJeu / SaledeJeu' is On Or Status '1e / Corridor / KeyPad / Cuisine Corridor' is On Or Status '1e / Cuisine / Cuisine' is On Or Status '1e / Cuisine / Cuisine Armoir' is On Or Status '1e / Cuisine / KeyPad / Cuisine A' is On Or Status '1e / Cuisine / Cuisine Hotte Lumiere' is On Or Status '1e / Cuisine / UnderCounterL' is On Or Status '1e / SaleDeBainBas / SaleDeBainBas' is On Or Status '1e / Salon / Salon' is On Or Status '1e / Entree / KeyPad / Entree A' is On Or Status 'Ext / Sched / Sched Main' is On Or Status 'Ext / Sched / Sched Petite' is On Then Set Scene 'Group / AllExceptChambre / Group.AllOffSaufChambre.LED' On Else Wait 4 seconds Set Scene 'Group / AllExceptChambre / Group.AllOffSaufChambre.LED' Off
Vipola Posted April 27, 2011 Author Posted April 27, 2011 Thanks for the input, this approach is interesting.. Actually that second Program purpose is not to Switch the button LED OFF, but to re-switch it back ON if needed. In the Ideal scenario, all light turn off, the keypad blink the button for 3 seconds and turn it off, everything is all right.. This ASSUME everything went as expected. But If for any reason the Program Group.AllOffSaufChambre.LEDisOn try to put the KeyPad LED back ON, good chance are it will do so during the 3 second period that the keypad flash the button LED and will be overrided by the KeyPad display routine of "flashing 3 second" and "turn off", even if the program told it to go back ON, it will be OFF. One of the main purpose of that LED is to CONFIRM you that all the lights are closed successfully.. (or at least that the way I see it) It's all about a 3 second period where if the KeyPad LED is set it won't keep the value because it's flashing and will bet set to 'OFF' after flashing even if it received a 'GO BACK ON' during that period... Not having the KeyPad Button on 'TOGGLE OFF' mode would probably avoid all this, or if it didn't had that little 'flashing display thing' either.. Here is a few scenario where this could happen: - If a Device is NOT in the [Group.AllOffSaufChambre] Scene but is in the [Group.AllOffSaufChambre.LEDisOn] Program - If Someone Turn on a light during that 3 seconds Period - If a Program turn back on a Device for a Reason during that 3 seconds Period. - If a Device don't turn OFF successfully for unknown reason. In any of theses cases, the LED of the Keypad would remain off even if all the light are not off, and it will remain that way until at least one device status change and get the program [Group.AllOffSaufChambre.LEDisOn] to be evaluated again to refresh the keypad LED display.. Good chance are when you go to BED or LEAVE your house, it will take a while before a device change and you won't know that a device is still ON. So we could avoid having two program by putting this delay of 4 second before the SET LED SCENE ON instead of the SET LED SCENE OFF, but this will introduce a 4 second delay each time a device is set to on, and could create a scenario where you set a device on, and off right after so with the 4sec delay it actually send the SET LED SCENE OFF before the SET LED SCENE ON, introducing again a glight of accuracy.. you would need a 4 second delay on both action, witch introduce unnecessary delay in LED Response. I personnaly prefer having a second program just to 'refresh' it value where it could be problematic then introducing a unneeded delay, but some could prefer to have less program to manage and do it this way. Then Wait 4 seconds Set Scene 'Group / AllExceptChambre / Group.AllOffSaufChambre.LED' On Else Wait 4 seconds Set Scene 'Group / AllExceptChambre / Group.AllOffSaufChambre.LED' Off
oberkc Posted April 27, 2011 Posted April 27, 2011 Actually that second Program purpose is not to Switch the button LED OFF, but to re-switch it back ON if needed. Interesting. Yet...it is trigger by an "off" command from either of your two buttons(?). If you needed such a pause, then you could also insert a slight wait delay into your first program "then" statement. but this will introduce a 4 second delay each time a device is set to on, and could create a scenario where you set a device on, and off right after so with the 4sec delay it actually send the SET LED SCENE OFF before the SET LED SCENE ON, introducing again a glight of accuracy I would not expect to have this problem. Any time a condition changes that forces a re-evaluation of the program's condition, "wait" (and "repeat") statements are interrupted and the program restarts based upon the results of the most recent evaluation. I personnaly prefer having a second program just to 'refresh' it value where it could be problematic then introducing a unneeded delay, but some could prefer to have less program to manage and do it this way. Fair enough. There are many ways to do many things. Best of both worlds, then, may be: If Status '2e / Haut / Haut' is On Or Status '2e / SaleDeBainHaut / SaleDeBainHaut' is On Or Status '2e / SaleDeJeu / SaledeJeu' is On Or Status '1e / Corridor / KeyPad / Cuisine Corridor' is On Or Status '1e / Cuisine / Cuisine' is On Or Status '1e / Cuisine / Cuisine Armoir' is On Or Status '1e / Cuisine / KeyPad / Cuisine A' is On Or Status '1e / Cuisine / Cuisine Hotte Lumiere' is On Or Status '1e / Cuisine / UnderCounterL' is On Or Status '1e / SaleDeBainBas / SaleDeBainBas' is On Or Status '1e / Salon / Salon' is On Or Status '1e / Entree / KeyPad / Entree A' is On Or Status 'Ext / Sched / Sched Main' is On Or Status 'Ext / Sched / Sched Petite' is On Then Set Scene 'Group / AllExceptChambre / Group.AllOffSaufChambre.LED' On wait 4 seconds Set Scene 'Group / AllExceptChambre / Group.AllOffSaufChambre.LED' On Else Set Scene 'Group / AllExceptChambre / Group.AllOffSaufChambre.LED' Off Wait 4 seconds Set Scene 'Group / AllExceptChambre / Group.AllOffSaufChambre.LED' Off
Vipola Posted April 27, 2011 Author Posted April 27, 2011 Ohh!... I like this Last Code Example, it prevent the need of a second program without introducing any bad effect. Now would this introduce more traffic on the network? Because most of the time the LED is not set by the keypad itself but by other device been turned ON and OFF all day long.. if the Scene for the LED is called two time each time, would it double the traffic.. could that have some repercussion on a big network?
oberkc Posted April 27, 2011 Posted April 27, 2011 Now would this introduce more traffic on the network? I don't expect that this would be any more traffic than had you accomplished the same thing with two programs. It is more traffic, however, than the earlier single-program example. Of course, there is no built-in delay.
Vipola Posted April 27, 2011 Author Posted April 27, 2011 the two program design only repeat it when you control directly the keypad button.. not when other device are switched on and off.. the one program design always repeat it whenever it's the local keypad that call the changes or any of the individual devices..
oberkc Posted April 28, 2011 Posted April 28, 2011 Perhaps you are correct. If you believe this to be a concern in your installation, perhaps this may be enough to justify staying with separate programs. I suspect, in the end, that these are not major considerations either way. I am still a little curious about the idea that these buttons don't respond while in the flashing mode. I use a couple of these as garage door indications and control. They are set for non-toggle off. Their status responds to garage door sensors. When I press one to open the garage door, the sensor sends out a signal while the button is flashing (at least that has been my perception). Even so, the button responds appropriately. Therefore, I am a little surprised that you are having this problem. Maybe there is someone around here that can confirm whether this is normal behaviour for these devices.
Vipola Posted April 28, 2011 Author Posted April 28, 2011 You can try it by yourself very easily by adding a new device in the 'LEDProgram' without adding it to the 'TurnOffScene'.. The keypad won't be able to turn the device off (because it's not in the scene) but it's in the program to make the LED ON, it should logically end up with the LED ON, but the KeyPad turn it OFF anyway.. If you look attentively, you see that the Program try to turn the LED ON during the flashing, the flash won't be consistent at one point.. it will flash back ON quicker than usual at one iteration.. Anyway that's what it does on mine I would be curious to compare that with other KeyPad, but I think I have one of the newest version..
Vipola Posted May 3, 2011 Author Posted May 3, 2011 Now Always thinking of Improving this "All Light Scene", The Off State of the KeyPadLinc Button not doing anything is a Waste.. What if, Once all Lights are Off, it could serve something usefull? You are more than welcome to join me in this little BrainStorm here I don't like to have a Dark House and I like to have a few light All over the house so I don't feel like the house is empty when I walk around. What if that Button could be used to Light the 'main' lights of the house when it's switched on? Maybe not EVERY light, but one light in each main area to have enough light to go around the house? the "On" state of the Scene could be set to turn 'ON' the main light here in there in the main area of the house, keeping all the other ones OFF by setting the OnLevel to 0%. By Turning the KeyPadLinc Button back to Normal On/Off mode instead of ToggleOFF mode, we eliminate the '3 second flashing period' that was an inconvenient, and we can use it when every light is closed, to open just a few of them by switching it on, witch would call the scene On.. That ON Mode of the scene could also be customized to be different depending on witch KeyPadLinc is switched on (Because Scene Parameters are defined BY controler). The Set State On would only be Invoke when every light is off because our program refresh the LED State at each change. Maybe we could also use a Program to change witch light are turned on and their OnLevel% depending of the Time of the Night? What do you Think? Any Other Ideas?
LeeG Posted May 3, 2011 Posted May 3, 2011 Vipola Remember that KeypadLinc Secondary button LEDs cannot be turned Off using a Scene On with 0 % On Level. Lee
oberkc Posted May 3, 2011 Posted May 3, 2011 The approach I have taken for this is to create a scene with the limited (you refer to them as "main") lights as responders and a few, select, keypad buttons as controllers. To this I add a program which watches for an "off" command from each of the main scene controllers. When triggered, the program simply turns off ALL interior lights (I have an ALL HOUSE INTERIOR scene, with no controller device defined), regardless of whether they are part of the main scene. Yes, this results in some devices being told twice to turn off, but I have observed no ill effects from this.
Vipola Posted May 3, 2011 Author Posted May 3, 2011 Vipola Remember that KeypadLinc Secondary button LEDs cannot be turned Off using a Scene On with 0 % On Level. Lee Good to keep in mind, in that case KeyPad Led need to be out of that Scene and only controlled via Program reflecting the device they control. The approach I have taken for this is to create a scene with the limited (you refer to them as "main") lights as responders and a few, select, keypad buttons as controllers. To this I add a program which watches for an "off" command from each of the main scene controllers. When triggered, the program simply turns off ALL interior lights (I have an ALL HOUSE INTERIOR scene, with no controller device defined), regardless of whether they are part of the main scene. Yes, this results in some devices being told twice to turn off, but I have observed no ill effects from this. This is interesting, It give pretty much the same idea, and having a ALL_HOUSE_INTERIOR scene still keep it to 1 signal, not a big lag like if you turn all device off individually with the program itself.. Beside the Ease of Setup/Manipulation, Is there any other Advantage of having two Scene for 'limited' and 'all' instead of having 1 scene with some OnStatus set to 0%? I guess you can Re-use the ALL_HOUSE_INTERIOR scene ON for other Scenario ?
oberkc Posted May 3, 2011 Posted May 3, 2011 I guess you can Re-use the ALL_HOUSE_INTERIOR scene ON for other Scenario ? Exactly. I use this scene in several programs. Also, I use this scene for troubleshooting purposes. A scene test on "all house interior" can be revealing. It is my test for when I add new electronic gadgets.
Recommended Posts