looking for help with CBUS on linux

Discussion in 'General Discussion' started by jhickner, Sep 2, 2010.

  1. jhickner

    jhickner

    Joined:
    Sep 1, 2010
    Messages:
    2
    Likes Received:
    0
    Location:
    Seattle, WA
    Hi all,

    I'm trying to get CBUS up and running from linux. So far this post has been very helpful:

    http://www.cbusforums.com/forums/showthread.php?t=6137&highlight=linux

    I have a few additional questions I'd like to toss out to the group here.

    The first step was to get my unit addresses set, since they all come from the factory set to $FF. It seems like the only way to do this is via the windows-based CBUS Toolkit software. I've been looking for a simpler, non-GUI way to do this, but I haven't found one yet.

    I did get C-Gate running on linux, and the toolkit seems to use C-Gate for communication, so that leads one to believe that there should be a way to set unit addresses directly from C-Gate. The docs don't give any clue as to how that would be done, though, so any help there would be appreciated.

    The first device I set up was a 4-channel relay, which leads me to my next question: Is there no way to access the terminals directly, without first assigning each one to a group? Group assignment is another manual step in the CBUS Toolkit that I'd rather avoid. I'm hoping to find a way to do that either through C-Gate or directly through the serial protocol if possible.

    So after going ahead and using the toolkit to set up the groups for the relay, I'm now to the point where I can open a socket connection to the CNI and send simple commands like this:

    \\0538007900\r

    ...to turn on Group 0, which turns on relay 1. So far so good.

    The next step is to be able to retrieve the state of the relay terminals. There doesn't seem to be a way to query the state of a group, and that probably doesn't make any sense anyway since a group could reference any number of switches that may be in different states. But is there a way to query the relay unit directly to get the terminal state? This is where I'm stuck at the moment.

    Any help would be greatly appreciated! Thanks for reading.

    - Jason
     
    jhickner, Sep 2, 2010
    #1
  2. jhickner

    NickD Moderator

    Joined:
    Nov 1, 2004
    Messages:
    1,420
    Likes Received:
    62
    Location:
    Adelaide
    Hi.. and welcome.

    Some of what you're trying to do here is not possible. Parts of the protocol and C-Gate commands relating to commissioning are not publically available. This is because if used incorrectly, these commands have the capability to render a device/network inoperable, and it's us that gets the tech-support call.

    If you give us a better idea of what your end goal is there are plenty of people here who will be more than happy to steer you in the right direction.

    Nick
     
    NickD, Sep 2, 2010
    #2
  3. jhickner

    daniel C-Busser Moderator

    Joined:
    Jul 26, 2004
    Messages:
    766
    Likes Received:
    20
    Location:
    Adelaide
    Hi jhickner,

    You will really struggle to configure a network solely using C-Gate. We certainly recommend using Toolkit for this (it runs quite well on WINE) as it will save you many headaches. In Toolkit, when you "Scan" a network the units will be given unique addresses. You can then edit each unit to set up Group addresses on each key or channel.

    The non-software alternative is to use "Learn Mode" on the units. This too will set up unique unit and group addresses, however this is a simplistic method of programming and you will miss out on the more advanced features of the units.

    The concept of Groups to bind inputs to outputs is pivotal in C-Bus and it's not possible to control terminals directly. A group actually does have a state - in the Lighting Application it's called a Level. This is between 0 (OFF) and 255 (fully ON). C-Bus will reconcile all the inputs and outputs using that Group, so you just control Groups directly and the units will follow.

    Once you have the network configured correctly you do not need Toolkit so much, and you can just send operational commands to C-Gate or the CNI.

    To turn on a group via C-Gate:

    on 254/56/1
    200 OK: //NET/254/56/1

    This will work if the network is in an OK state. If you just want to force the command onto the network regardless of state, append the 'force' parameter:

    off 254/56/1 force
    200 OK: //NET/254/56/1

    To ramp the load to 50% over 4 seconds:

    ramp 254/56/1 128 4
    200 OK: //NET/254/56/1

    You can query the level of a group:

    get 254/56/1 Level
    300 //NET/254/56/1: Level=128
     
    daniel, Sep 2, 2010
    #3
  4. jhickner

    jhickner

    Joined:
    Sep 1, 2010
    Messages:
    2
    Likes Received:
    0
    Location:
    Seattle, WA
    Hi Daniel,

    Thanks for the info on controlling groups from C-Gate, that was very helpful. I'd been leaning toward using the serial protocol, but maybe a C-Gate client would be easier.

    About the toolkit, my goal is just to simplify the installation process. All we need for our application is to assign sequential addresses to each unit, then assign sequential group IDs to each channel. So the rest of the toolkit functionality wouldn't be used. It would be great to be able to automate that assignment instead of needing to do it by hand for each installation.

    UPDATE:
    It looks like it is possible to do the unraveling from C-Gate after all! There's an unravel command on network objects:

    do 254 unravel

    There's also an AutoUnravel setting you can turn on that will do an unravel if there's a sync error.

    Now if there was just a way to assign groups from inside C-Gate!


    - Jason
     
    Last edited by a moderator: Sep 2, 2010
    jhickner, Sep 2, 2010
    #4
  5. jhickner

    daniel C-Busser Moderator

    Joined:
    Jul 26, 2004
    Messages:
    766
    Likes Received:
    20
    Location:
    Adelaide
    That's a reasonable request though technically involved. Also, say you can automatically assign new groups to each of the output channels. You would still have to manually select those groups on the input units. And there are so many other features that can be configured on the units themselves. So again, it's difficult to get away from Toolkit entirely.

    I'll certainly put it on the wish list.
     
    Last edited by a moderator: Sep 3, 2010
    daniel, Sep 3, 2010
    #5
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.