Up late button

Discussion in 'General Discussion' started by dave240t, Oct 25, 2008.

  1. dave240t

    dave240t

    Joined:
    Apr 10, 2008
    Messages:
    26
    Likes Received:
    0
    I would like to peform the following i have a bathroom light which i want to come on to 100% between sunrise and 1030pm and to 30% between 1030pm and sunrise. I also want the key input to also still work as a normal dimmer function. I have written some code up in a pac at home and this function works fine as i have series 1 c-bus dimmers with slow start time but when i use the series 2 dimmers they ramp to fast and the the pac is to slow and the light goes to 100% then go back to 30%.

    My code is fairly simple it reads something like "when bath = on and time is greater than 1030pm set bath to 30% " is there a way i can achive this function without the light bouncing to on and back to 30%
     
    dave240t, Oct 25, 2008
    #1
  2. dave240t

    filpee

    Joined:
    May 31, 2006
    Messages:
    204
    Likes Received:
    0
    Location:
    Western Australia
    Use schedules in the PAC to set an after hours GA to the two levels you require.

    Use this after hours GA in the output logic of your dimmer and set it to AND logic.

    Your key input will still work as a dimmer but the logic will prevent the light from going any brighter then 30% (or whatever you set it in the schedule)
     
    filpee, Oct 26, 2008
    #2
  3. dave240t

    dave240t

    Joined:
    Apr 10, 2008
    Messages:
    26
    Likes Received:
    0
    but what if i want to ramp the GA above 30%??
     
    dave240t, Oct 28, 2008
    #3
  4. dave240t

    filpee

    Joined:
    May 31, 2006
    Messages:
    204
    Likes Received:
    0
    Location:
    Western Australia
    Well that then makes things complicated.

    Unless there is a better way of doing it you will need to separate your GA's from the Key Input and the Output devices.

    Things get a bit delayed doing it like this so if anyone has a better way please post your procedure.

    Code:
    {Initial turn on}
    once (GetLightingState("Key Input") > 0)then
    begin
      if (GetTriggerLevel("Day Mode") = DayTime) then
      begin
        SetLightingLevel("Output", 100%, "0s");
      end
      else if (GetTriggerLevel("Day Mode") = NightTime) then
      begin
        SetLightingLevel("Output", 30%, "0s");
        SetLightingLevel("Key Input", 30%, "0s");
      end;
    end;
    
    {turn off}
    once (GetLightingState("Key Input") = OFF)then
    begin
      SetLightingLevel("Output", 0%, "0s");
    end;
    
    {Dimming}
    if (GetLightingLevel("Key Input")> 0) then
    begin
      TrackGroup("Wired Network", "Lighting", "Key Input", "Output");
    end;
    
     
    filpee, Oct 29, 2008
    #4
  5. dave240t

    dave240t

    Joined:
    Apr 10, 2008
    Messages:
    26
    Likes Received:
    0
    thanks that works great but i don't like using the track group as i find the dimming curve not very smooth. One thing i liked about the black box dimmers the curve was slow.

    the universal dimmers are designed to be slower with start up ramp but they are faster than normal dimmers
     
    dave240t, Oct 29, 2008
    #5
  6. dave240t

    ICS-GS

    Joined:
    Nov 1, 2004
    Messages:
    347
    Likes Received:
    0
    Location:
    SE Melbourne
    Not discounting filpee's code, but what if the key input was a toggle dimmer. And instead of testing for "key input > 0" what about if key input > 254.

    then in the logic if key input <= 254 then set the lighting level of 'output' to the key input level.

    The only issue with this is at night time you will see a quick ramp from 30% up to almost 100% as you dim down.

    HTH

    Grant
     
    ICS-GS, Oct 30, 2008
    #6
  7. dave240t

    Mr Mark

    Joined:
    Jan 27, 2006
    Messages:
    322
    Likes Received:
    5
    Location:
    FNQ
    Up late

    Dave240t

    Have a look here for some code I used once before. Hope it helps.

    Mark
     
    Mr Mark, Oct 30, 2008
    #7
  8. dave240t

    Lucky555

    Joined:
    Aug 13, 2007
    Messages:
    229
    Likes Received:
    0
    Dave240t

    Basically you are trying to do two distinct operations. The guys above have provided several options - some don't suit and others are a bit convoluted because you are trying to do opposing functions.

    Here is another solution coming from a different angle which I have working in a bathroom at my place.

    One set of dimmable lights + 2 button key input unit. Button 1 is a standard toggle dimmer. Button 2 (on/off not bell press) sends a trigger message. The trigger message increments a counter in a PAC. Depending on time the counter values are linked to dimmed presets. The standard dimmer button can be used to adjust a dim (which I never do - the presets are quick and easy) and importantly turn the channel back off and reset the counter.

    Simple, functional and easy. If you try this I bet you won't ever bother to manually dim once you have worked out your presets...
     
    Lucky555, Nov 1, 2008
    #8
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.