brucecampbell Posted June 9, 2020 Share Posted June 9, 2020 Hopefully I can explain the situation, so I can get some advice on ways to achieve the desired result. I have a hallway with a study nook - two light circuits. At one end I have a dimmer for the study and a 6 button keypad dimmer for the hallway At the other end of the hall, I have a 6 button keypad. I am trying to get the LED colours programmed on the 6 button keypad. The top button is linked via connections to a toggle scene called 'Hallway + Study Off' The scene has colour = black for toggle active and colour = blue for toggle inactive. This works perfect. If either or both of the hallway and study lights are on, the keypad is lit blue, if they are both off, the keypad is black. The button turns the lights off when one or both are on, and both on if both are off. Now I want to have the led red if the lights are on due to the motion sensor triggering a lighting scene. I think my only option is to use the 'Set LED Current' property When lighting scene Motion_Study is Invoked Set Hallway LED on the Study->Hallway Keypad to Red This works, but I don't think there is a way to then set it back to using the toggle options for the linked scene? Can I set it back to allow led colours to come from the toggle scene or do I need to program colours based on all the combinations? Cheers. Quote Link to comment Share on other sites More sharing options...
South Africa C4 user Posted June 19, 2020 Share Posted June 19, 2020 Apologies! I answered this in my head a week ago but see I never posted! The way I do this is: 1. make the LED programmable (I.e. don’t have it follow a light connection). 2. create a macro which sets the LED to the colour you want. In your particular case, this is slightly complex (see below for one way to get the macro to work). 3. Call the macro on every possible event that could create a colour change (e.g. when a lighting scene is activated, motion is detected a timer expires or whatever). In your use case, I would create a variable LightsOnDueToMotion. I would set this to false whenever the lighting scene is deactivated. I would set this to true immediately before activating the lighting scene when motion is detected. The macro would then check if LightsOnDueToMotion is true. If it is it would set the LED to red. If not, it would check if the scene is active and set the LED to blue and if not, it would set the LED to black. In this case, the macro only needs to be called when the lighting scene is activated or when it is deactivated (after the variable is set to false). Because your use case is fairly simple (macro only needs to be called from 2 places), you could also do it by splitting the macro code in to 2 parts and putting these in the on activate and on deactive events for the lighting scene, but that is less flexible for future additions / changes. Quote Link to comment Share on other sites More sharing options...
brucecampbell Posted June 22, 2020 Author Share Posted June 22, 2020 Thanks. I was assuming this would be the way to go. But I was hoping there would be some magic way to say follow my programming for this state, but revert to following connection for that state. I like the simplicity of having the LED follow the light connection/scene toggle colour. But given this colour is changed via programming, I'll just have to have the whole process follow programming. Cheers for the response. Quote Link to comment Share on other sites More sharing options...
pkkaiser Posted September 27, 2020 Share Posted September 27, 2020 it is crazy that no one has made a driver to make this easy. Your method is how I did it (Macros for colors I use, then one macro with if/thens to decide what colors should be) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.