Jump to content
C4 Forums | Control4

Help needed with 6 button LED programming


Recommended Posts

Hi all, I need some help as I can't see what I am doing wrong.

I have a 6 button keypad.

It is set to managed = false

Each of the 6 button links is connected to a different dimmer toggle link

Each on colour = 0:0:88

Each off colour = 0:0:15

button 6 is linked to a dimmer which changes top and bottom led's red when off during a security alarm setting phase

So it makes sense that button 6 automatically turns red during this phase.

After the alarm is set, I change the dimmer back to the 'standard' blue when on black when off.

I then set button 6 on and off colours back to 0:0:88 and 0:0:15 but from then on the off colour is black when offand blue when on. (the same as the dimmer)

Why is the last few lines of my code not doing what I expect??

Any help would be great.

Link to comment
Share on other sites


Okay, what i see is that you do not have any conditional questions. So what is happing, is when that code starts it is going right down the list and executing each command at once. So you need to seat some commands under there IF commands;

If entry 1 is off

Set to Black

If entry 1 is on

Set to R0,G0,B88

So on and so on, See where im going with this?

Link to comment
Share on other sites

Thanks, I see what you are saying, but I am not sure that is the problem.

You see, this code is run when a timer expires, and it's purpose is to set the LED colours for both the on and off properties of the dimmer and the on and off properties of the button on a 6 button keypad.

I do want every line of code to execute and every line does except for:

"Set LED: 6 off color to Color [A=255, R=0, G=0, B=15] on Lounge ->6 Button 1"

It just appears like the 6 button is just going back to what ever is set for the dimmer it is linked to, instead of what my code says it should be.

???

Link to comment
Share on other sites

It's not clear to me exactly what you're saying is happening and I'm no expert on the button colors but I found their behavior confusing when I was trying to program a keypad's colors a few months ago.

I thought I could set the "on" and "off" colors and that's what I'd see if I changed the status programmatically. That wasn't true; it seemed the on/off color only changed if I physically pressed the button. So, I could change those colors but unless I physically touched the button, nothing ever changed. My memory from a few months ago may not be completely correct but I ended up having to set the "current" color to get it to do what I wanted.

Again, this may not be what you're trying to describe but maybe it'll point you toward a solution.

Link to comment
Share on other sites

Are the buttons "bound" to other buttons? If so, is the "follow bound color" box checked?

You can test this by changing the color the light you suspect it is bound to, and see if it changes the keypad light.

Link to comment
Share on other sites

Thanks guys

By 'bound' I take it you mean linked via the 'connections' in composer?

Then yes, the button I am having issues with is linked directly to a dimmer toggle link.

Yes - the button in question changes to red when the dimmer led's are changed to red, and back to blue when the dimmer is changed back to blue

I have not noticed the 'follow bound colour' option - will take a look at that tonight.

Cheers.

Link to comment
Share on other sites

Thanks guys

By 'bound' I take it you mean linked via the 'connections' in composer?

Then yes' date=' the button I am having issues with is linked directly to a dimmer toggle link.[/quote']

That would be the problem

Yup, that's your issue. Uncheck the "follow bound color" box, which is under the System Design tab.

Link to comment
Share on other sites

Well it looks like I may be stuck.

The only option I have on the 6 button is 'Keypad Managed'

I am running composer 1.7.1 - is the 'follow bound colour' only in a newer version??

I find it strange the other bound buttons on this keypad are holding the settings I gave them, perhaps the led's are only changed back to the bound colours when the led's are changed.....?

Link to comment
Share on other sites

I already have 'keypad managed' off

According to help, when off, this allows the led's to be set with programming

I am starting to think maybe timing is the issue.

Maybe I need to allow a delay after setting the dimmer LED's before setting the 6 button LED.

-maybe I need to allow the 6 button time to be updated with the dimmers settings before I programmatically change it back to what I want.

I will have to have another trial and error session.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...