Multiple Key Sets?

Discussion in 'C-Bus Toolkit and C-Gate Software' started by muppets, Dec 3, 2008.

  1. muppets

    muppets

    Joined:
    Oct 26, 2007
    Messages:
    98
    Likes Received:
    0
    Hi all,

    Just wondering if and how I can get a single input from a saturn switch to :

    Operate as a timer on the lights with a short press;
    Toggle an enable control when operated as a long press.

    From the help file it looks like I should be able to do something like this, though the unit depicted in help is a wireless and has a lot of different tabs etc.

    Obviously I could use logic to sort it out but it always seems a lot neater if I let the units do the work.
     
    muppets, Dec 3, 2008
    #1
  2. muppets

    ashleigh Moderator

    Joined:
    Aug 4, 2004
    Messages:
    2,397
    Likes Received:
    26
    Location:
    Adelaide, South Australia
    You can't do this on a single button.

    A button can be in one of the two possible applications, but different events off the same button are always in the same application.
     
    ashleigh, Dec 3, 2008
    #2
  3. muppets

    pbelectrical

    Joined:
    Aug 16, 2004
    Messages:
    121
    Likes Received:
    0
    Location:
    hobart
    Scenes maybe?

    If you have a unit which supports scenes, PAC, touchscreen, could you not set the button up to trigger scenes and have these scenes set the desired actions.

    eg

    Group - saturn key 1

    short press- idle
    short release- preset 1, 50%
    long press- toggle
    long release- idle

    Scene 1
    Trigger-Lighting-saturn key 1, 50%
    Action- set light abc to 100% for 5 minute

    Scene 2
    Trigger- lighting-saturn key 1, 100%
    Action- set enable control group to 100%

    Scene 3
    Trigger- lighting-saturn key 1, 0%
    Action- set enable control group to 0%

    With this set up a short press would bring your desired light on for 5 minutes. A long press would alternatively toggle your enable control group. Not sure what you would do about the LED indicator, perhaps get it to follow a dummy group that is set at the end of the scenes.

    I have not tried to use this across applications but it is basically the same method that I use to get up, down, stop for blind control off a single button.
     
    pbelectrical, Dec 3, 2008
    #3
  4. muppets

    muppets

    Joined:
    Oct 26, 2007
    Messages:
    98
    Likes Received:
    0
    That is a great system for multiple key functions, however, using the system like that I couldn't find any combo to get short press to also turn off the light. Like a standard toggle/timer set up.

    However, using the system as you described with scenes set from the c-touch I have managed to use 4 scenes - 1st to set lights on, 2nd to set enable off (trig 0%), 3rd to set enable on (trg 100%) and the 4th to turn the lights back off. Lights on and off no trigger used.

    The following logic is used to play with the trigger to decide whether or not short press means on or off.

    once GetTriggerLevel(002) = 127 then {trigger 50%}
    begin
    if GetCBusLevel(254, "Lighting", 8) = 0 then {if the lights are off}
    begin
    SetScene(7); {lights turn on by scene}
    SetTriggerLevel(002,200); {move trigger to nuetral value}
    end
    else {if the lights are on}
    begin
    SetScene(10); {lights turn off by scene}
    SetTriggerLevel(002,200); {move trigger to neutral value}
    end
    end;

    Note I set the trigger back to a neutral value of 200 after using the 50% value.

    Enable is obviously used in other code or within the PIR's to enable disable as required.

    Thanks for the guidance pb
     
    muppets, Jan 3, 2009
    #4
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.