Long, long press

Discussion in 'C-Bus Wired Hardware' started by MJS, Jun 10, 2009.

  1. MJS

    MJS

    Joined:
    Sep 1, 2005
    Messages:
    29
    Likes Received:
    0
    Location:
    Port Elizabeth, ZA
    Hi all,

    I have a requirement to be able to switch on a group address with a normal short press and to switch it off again with a 15 second long press.
    The long press timing will only go up to 1008ms.

    Is there another method of getting this functionality?

    Thanks
    Michael
     
    MJS, Jun 10, 2009
    #1
  2. MJS

    NickD Moderator

    Joined:
    Nov 1, 2004
    Messages:
    1,427
    Likes Received:
    64
    Location:
    Adelaide
    The only way I can see is to configure the key as a bell press, and then use the logic engine to detect the length of this press and do what you want.

    Nick
     
    NickD, Jun 11, 2009
    #2
  3. MJS

    MJS

    Joined:
    Sep 1, 2005
    Messages:
    29
    Likes Received:
    0
    Location:
    Port Elizabeth, ZA
    Thanks for the suggestion Nick. I was thinking along those lines, but was hoping that there was another angle that I was missing.

    Michael
     
    MJS, Jun 12, 2009
    #3
  4. MJS

    21stcenturyelec

    Joined:
    May 25, 2009
    Messages:
    17
    Likes Received:
    0
    Location:
    Nottingham - UK
    Hi bit new to this and slowly teaching myself cbus techniques, using the logic engine what commands do you use to detect the length of the press?
     
    21stcenturyelec, Jul 14, 2010
    #4
  5. MJS

    Darren Senior Member

    Joined:
    Jul 29, 2004
    Messages:
    2,361
    Likes Received:
    0
    Location:
    Adelaide, South Australia
    Set up a key unit to control Group 1 as a "bell press", then use this logic to control Group 2:

    Code:
    once GetLightingState("Group 1") = On then
      SetLightingState("Group 2", ON);
    
    if ConditionStaysTrue(GetLightingState("Group 1"), 15) then
      SetLightingState("Group 2", Off);
     
    Darren, Jul 15, 2010
    #5
  6. MJS

    21stcenturyelec

    Joined:
    May 25, 2009
    Messages:
    17
    Likes Received:
    0
    Location:
    Nottingham - UK
    Cheers Darren, that?s great I totally get it, could I trigger a scene as a first press, then turn off one of the groups in that scene with the long press?

    I want to turn a bathroom light and extract fan on but if the button is held for say 3 seconds the fan is turned off.

    Ideally I?d like to have it that a short press brings both on and then a 3 second press only the light comes on, this saves the fan coming on for a short burst, I don't know if this would be possible, plus that one button needs to turn them both off or am I just being greedy :D
     
    21stcenturyelec, Jul 15, 2010
    #6
  7. MJS

    Newman

    Joined:
    Aug 3, 2004
    Messages:
    2,203
    Likes Received:
    0
    Location:
    Adelaide, South Australia
    This is certainly possible, but be careful of getting too carried away with the "can I do it" and neglecting to consider "should I do it". Don't overcomplicate things or you'll get complaints of people not being able to use the system. I suspect no-one is going to want to stand there for 3 seconds with their finger on the button just to turn the light on.
     
    Newman, Jul 15, 2010
    #7
  8. MJS

    Ashley W

    Joined:
    Aug 4, 2004
    Messages:
    304
    Likes Received:
    3
    Location:
    Canberra
    Your certainly right about not over complicating things. My own house is currently being rented out and two functions that seem simple and logic to me have confused the current tenant and the previous one too.

    Both are simple. To turn on the irrigation system they need to do a long press of a button on a DLT, but the whole principle is confusing to them. I made it a long press so that it couldn't get accidently turned on.

    The other one is the light in the WIR. A short press triggers a timer for 90 seconds and a long press turns it on without the timer. Yet the tenants just cannot work it out and complain. I am overseas so have told them to live with it.

    So see something really simple things are hard for some, so imagine trying to do a complex function.
     
    Last edited by a moderator: Jul 15, 2010
    Ashley W, Jul 15, 2010
    #8
  9. MJS

    Don

    Joined:
    Aug 4, 2004
    Messages:
    429
    Likes Received:
    0
    Location:
    Townsville, Australia
    extra long press and scenes

    Be careful here!
    Any standard unit ( NEO, Saturn, DLT, 30 mech, new bus coupler,etc.) that can handle scenes will be placed into 'scene setup' mode with a press of a scene key for longer than 10 seconds (a DLT will display 'recording' when in this mode, while other units will exhibit a slow flash of the associated indicator).
    Scene setup mode can be inhibited by disabling Learn mode in the unit in question, so you can still achieve what you want, but you should be aware of this potential gotcha.
     
    Don, Jul 15, 2010
    #9
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.