Lighting ramp via c-gate monitor

Discussion in 'C-Gate Developers' started by broadk, Jun 20, 2015.

  1. broadk

    broadk

    Joined:
    May 3, 2010
    Messages:
    8
    Likes Received:
    0
    Location:
    London
    I'm hoping someone can help explain an interesting behaviour when monitoring a c-bus network. When a user ramps a group via a switch I see both an immediate all-on message followed by the actual ramping request when the user releases their finger from the key. For example:

    lighting ramp //139JRS/254/56/131 255 8 #sourceunit=57 OID=510dee30-22e7-1032-81b4-846f806ca6f1
    lighting ramp //139JRS/254/56/131 112 0 #sourceunit=57 OID=510dee30-22e7-1032-81b4-846f806ca6f1

    I see the same when ramping downwards as well. Is there any reason for this initial message to be sent by c-gate? The challenge, for my Indigo plugin, is that a real ramp to full produces the same initial message hence I probably need to start tracking the order and timing of messages to determine the actual behaviour of the user.

    I hope someone can explain this behaviour.

    Regards
    kieran
     
    broadk, Jun 20, 2015
    #1
  2. broadk

    jboer

    Joined:
    Apr 27, 2012
    Messages:
    458
    Likes Received:
    35
    Location:
    Sydney
    Hey Kieran,

    That is basically how ramping works on a button or key switch. To prevent the switch from sending a hundred messages and changing the level each command, it basically starts the ramp when the button is pressed and then when the button is released it stops the ramp at the current level of the GA.


    In your example:
    When you press the button the command to ramp up to 100% over 8 seconds is sent.

    When you release the button the command to set the GA to ~49% instantly is sent to halt the ramp at that level. (I believe the button calculates what the level should be based on the starting level and ramp time)

    Anything written to the C-Bus protocol should be able to handle the above flow of events.
     
    Last edited by a moderator: Jun 20, 2015
    jboer, Jun 20, 2015
    #2
  3. broadk

    broadk

    Joined:
    May 3, 2010
    Messages:
    8
    Likes Received:
    0
    Location:
    London
    Thanks, that is actually very useful. It also explains why a full ramp up or down never sends another message because the 8 second ramp completes without further user interruption.

    Now, the question is how best to handle this in my plugin.

    Thanks again
    k.
     
    broadk, Jun 20, 2015
    #3
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.