Jump to content
C4 Forums | Control4

Dimmer Firmware Programming


AS2

Recommended Posts

Ok guys, I've been struggling with this one:

in a bathroom: I've set a C4 dimmer firmware to ramp up to 80%. (100% was too bright).

All is good. But in the middle of the night, when you stumble into the bathroom and tap the top button on the dimmer, 80% sure seems bright.

I'd like to set a conditional that between the hours of 2am-7am, the top ramp level for that dimmer is 25%. Can anyone think of a good way of programming that?

AS2

Link to comment
Share on other sites


I've got a couple of different ways that I have done this... I'm sure everyone has there own method as well. One option is to step it, with each button press it goes up a specific amount. Or a conditional for top button pushed/released that says "if time is between 2 am and 7 am" then a variable that says ramp to level 25 on bathroom ---> dimmer. Something to that effect. I set this up for a while then modified it and added in button presses so that when my little girls go into the bathroom at night they don't get blinded when they walk in the door. Seems to work well, so well that most of my house is setup this way now. Only I start it at about 11 pm so when they kids wake up they never have to adjust to really bright lights from the hall, bathroom or whatever else...

Blake

Link to comment
Share on other sites

Another method:

1) Create two scheduler events at the desired times: call one something like "slow ramp rate enabled" and the other "normal ramp rate enabled"

2) In programming, when the scheduler events trigger set the CLICK_RAMP_RATE_UP on each dimmer you want to adjust. You can expose these variables under the switch/dimmer by clicking on the "+"

3) You can also adjust the PRESET_LEVEL while you are at it. Might as well do both for a very nice difference!

Remeber that the CLICK_RAMP_RATE_UP is measured in milliseconds. Therefore to set ramp rate to 20 seconds, set CLICK_RAMP_RATE_UP to 20,000. I guess you could repeat the same for the CLICK_RAMP_RATE_DOWN. Obviously you should use the second scheduler events to reset the ramp rates back to normal. You can also integrate a double click programming routine to give it even more functionality. For example, one click starts you ramping to PRESET_LEVEL at a very slow rate, and then a double click will give you instant on in case of emergencies.

Link to comment
Share on other sites

In programming, for the light in question, select "Top Button Pressed", then go to the bottom of the upper section on the right and select "Scheduler". At the bottom select the Conditionals tab and there is the ability to create conditionals based most calendar options. ?IF TIME IS BETWEEN 11:00PM AND 6:AM. Then drop a 'ramp to x%' command on top of the "?" and if it is TRUE, the light should go to the desired setting.

One of the things I did that helped me better understand the programming was to start at the upper left with different types of devices loaded into a project and worked my way down the left one line at a time and explored all options presented to the right, top down, line by line, tab by tab and found there are more options than they could ever cover in two weeks of tech training.

Link to comment
Share on other sites

Oh wait, this morning the light preset level didn't come back up to PRESET_LEVEL 80 at the scheduled time. No idea why.

I first tried doing a 'between --:-- & --:--' set PRESET_LEVEL to x command, but the light wouldn'treturn to the original preset level after that. Then I set it up using Samer's solution. I tested it last night, essentially making a 'window' between 10:00pm-10:05pm when the PRESET_LEVEL for the light would be 20, then bump back up to 80 after 10:05pm. It all went great. Then I set it for midnight, went to bed, got up at night, and confirmed that the PRESET_LEVEL had changed. But this morning, the light was programmed to return to PRESET_LEVEL 80 at 8:00am and it just stayed at 20.

This morning, in programming I went to the event I named '8AM DAYTIME PRESET LEVEL CHANGE' and confirmed it was set to put the PRESET_LEVEL back to 80. I even executed the command manually, but it didn't change the lightswitch preset level. I had to go into the System Design and change it myself.

Any ideas why this isn't working? I'm stumped but it might be something really simply.

Link to comment
Share on other sites

I am on an install today, but I will post screen shots shortly.

I played more with it yesterday and found that if I executed the events manually, the PRESET_LEVEL for the dimmer in question would adjust about half the time. Then I toyed with adding the command twice when each event triggered, but it didn't change the outcome.

It might just be a bug in the software.

Link to comment
Share on other sites

  • 4 weeks later...

To all:

I figured it out. For each event (in my case 1AM and 8AM) you must repeat the "set BATHROOM LIGHT preset_level to ??%" THREE (3) times in the event field. Additionally, I make the final command set to the actual desired percentage level, and the first two are random numbers (not sure if this matters, but this way works)

It's a silly work around and but it seems to be stable thus far. I'm sure it'll be fixed in the future, I've sent in the bug report.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...