What does force do?

Discussion in 'C-Gate Developers' started by countach, Dec 23, 2014.

  1. countach

    countach

    Joined:
    Dec 22, 2005
    Messages:
    35
    Likes Received:
    0
    I was getting very frustrated that the cbus command line interface that seems to be intermittently working and not working, but if I use the toolkit to turn lights on, it always seems to work. Like

    on !b1

    Works, then doesn't work. With some observation of the logs and trying things, I noticed that this always works, even when the above doesn't:

    on !b1 force
    off !b1 force

    what is this "force" thing that causes it to work, when it otherwise doesn't? And why do I need to use it to make things work?
     
    countach, Dec 23, 2014
    #1
    1. Advertisements

  2. countach

    daniel C-Busser Moderator

    Joined:
    Jul 26, 2004
    Messages:
    761
    Likes Received:
    14
    Location:
    Adelaide
    Hi countach,

    C-Gate maintains a model that keeps track of whether a network is connected, its error state and what units and groups there are. By default the application commands (such as ON) are validated against this model before they're sent.

    The C-Gate Manual explains:

    Essentially it just instructs C-Gate to ignore the model and push it onto the physical wire.
     
    daniel, Jan 15, 2015
    #2
    1. Advertisements

  3. countach

    countach

    Joined:
    Dec 22, 2005
    Messages:
    35
    Likes Received:
    0
    force

    So... what does it mean when I have to use force to make it happen? Does it mean my physical network is dodgy?
     
    countach, Feb 28, 2015
    #3
  4. countach

    daniel C-Busser Moderator

    Joined:
    Jul 26, 2004
    Messages:
    761
    Likes Received:
    14
    Location:
    Adelaide
    Not necessarily - C-Gate may not have synced the network yet. The syncing process can take several minutes. The "force" parameter allows a control system that already knows the addresses to execute level changes without waiting on the sync to finish.
     
    daniel, Mar 5, 2015
    #4
    1. Advertisements

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.