Buttons to trigger "other" stuff

Discussion in 'General Discussion' started by ievolve, Jan 29, 2012.

  1. ievolve

    ievolve

    Joined:
    Mar 20, 2010
    Messages:
    112
    Likes Received:
    1
    Location:
    Idaho
    I am connected to c-gate and watching the event and status logs for changes on my network. I can see every time a key is pressed AS LONG AS that button is tied to a lighting load.

    I am trying to get my head around how to make a button on one of my units do something else. For instance, say I wanted my system to send an SMS when I pressed a key.

    Since the key isnt tied to a lighting load, nothing is hitting the event or the status logs, is there some way to get those keypresses to trigger a press in my logs (so I can fire off the SMS?)

    I thought about just tying them to some bogus load just so I can see the keypress, but this feels like a hack, is there a better way?

    Thanks,
    Anthony
     
    ievolve, Jan 29, 2012
    #1
  2. ievolve

    ievolve

    Joined:
    Mar 20, 2010
    Messages:
    112
    Likes Received:
    1
    Location:
    Idaho
    A good example of this would be using buttons to control my sonos audio system. The way I did this was to create a "group" called "music" and assign it to the button on my DLT. Is this the way you would recommend to do this?

    Here is a video of it in action:
     
    ievolve, Jan 29, 2012
    #2
  3. ievolve

    Ingo

    Joined:
    Dec 2, 2006
    Messages:
    290
    Likes Received:
    1
    Location:
    South Africa
    Anthony,

    Assign a group to a spare key and it will send events like any other key, it doesn't have to be assigned to an Output unit.

    Alternatively, you could use something called 'Phantom' groups. The only trick is to initialise the group BEFORE you try and use it.

    Here is an example of group 15 that is not initialised and once initialised it responds like any other group.

    Code:
    get 254/56/15 level
    401 Bad object or device ID.
    
    on 254/56/15
    200 OK: //MIDSTRM/254/56/15
    
    get 254/56/15 level
    300 //MIDSTRM/254/56/15: level=255
    
    off 254/56/15      
    200 OK: //MIDSTRM/254/56/15
    
    get 254/56/15 level
    300 //MIDSTRM/254/56/15: level=0
    Ingo
     
    Ingo, Jan 29, 2012
    #3
  4. ievolve

    ievolve

    Joined:
    Mar 20, 2010
    Messages:
    112
    Likes Received:
    1
    Location:
    Idaho
    Thanks Ingo. I was wondering what "phantom" groups were. I am assuming those are transient too, meaning they go away when C-Gate resets?

    Also, there is a max of 255 groups on a single network right? I'm sure I'll have more dumb questions as I go, thanks for dealing with the newb :)
     
    ievolve, Jan 29, 2012
    #4
  5. ievolve

    Ingo

    Joined:
    Dec 2, 2006
    Messages:
    290
    Likes Received:
    1
    Location:
    South Africa
    Correct.
     
    Ingo, Jan 29, 2012
    #5
  6. ievolve

    Newman

    Joined:
    Aug 3, 2004
    Messages:
    2,203
    Likes Received:
    0
    Location:
    Adelaide, South Australia
    There are 255 groups within a single Lighting Application. There are 48 separate lighting applications in the (hex) range $30 to $5F. Other Applications have different message structures, although some are allocated as free for use.

    It would be worth your time to learn what the different applications are as there are some much cleverer message types than just turning things on and off.
     
    Newman, Jan 29, 2012
    #6
  7. ievolve

    Don

    Joined:
    Aug 4, 2004
    Messages:
    429
    Likes Received:
    0
    Location:
    Townsville, Australia
    If you are using a C-Bus key unit to issue a command (to do something other than control lighting), you might want the key to do the same thing each time you press it.

    If the key is configured as a toggle, you will get alternate on / off commands. If you configure it as "Onkey", it will work only once. If you configure it as "Offkey", it will work only once.

    If you configure it using a Recall (recall 1 or recall2), you will always get the same message, and the recall level can be used if you want to convey some information that might be useful to the (non-lighting) application.
     
    Don, Jan 29, 2012
    #7
  8. ievolve

    ievolve

    Joined:
    Mar 20, 2010
    Messages:
    112
    Likes Received:
    1
    Location:
    Idaho
    Thanks for the feedback! Seems like the sky is the limit with this stuff, nice.
     
    ievolve, Jan 29, 2012
    #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.