C-Gate2 command interface

Discussion in 'C-Bus Toolkit and C-Gate Software' started by gbclark, Dec 6, 2004.

  1. gbclark

    gbclark

    Joined:
    Aug 3, 2004
    Messages:
    5
    Likes Received:
    0
    Location:
    Dunedin, NZ
    I am trying to access my network via the command interface but keep getting a "401 Bad Object or Device" when I issue "get cbus networks". Has the command interface changed in v2.1.0? Also, I notice there is no Networks.txt file in the config folder. Is this no longer needed? Any idea when documentation for this version will be available?
    Thanks,
    Glen
     
    gbclark, Dec 6, 2004
    #1
  2. gbclark

    Richo

    Joined:
    Jul 26, 2004
    Messages:
    1,257
    Likes Received:
    0
    Location:
    Adelaide
    C-Gate 2 is backwards compatiable with C-Gate 1.5, but you have to instruct it what to do as new concepts exist. Now Networks exist as part of a project and you need to have one or more project "started" to use the "get cbus networks" command.

    This can be done from Toolkit or via the command interface.

    Here is an example of creating a new project via command interface:

    Tx : project dir
    Rx : 123 project=CLIPSAL
    Tx : project new MYPROJ
    Rx : 200 OK.
    Tx : project start MYPROJ
    Rx : 200 OK.
    Tx : project use MYPROJ
    Rx : 200 OK.
    Tx : net create LocalNetwork serial COM7
    Rx : 200 OK.
    Tx : get LocalNetwork state
    Rx : 300 //MYPROJ/LocalNetwork: state=new
    Tx : get cbus networks
    Rx : 300 //MYPROJ/cbus: networks=LocalNetwork

    Now save the project for later use:
    Tx : net save db
    Rx : 200 OK.
    Tx : project save MYPROJECT
    Rx : 200 OK.

    On restart you can use the following to start the (now) created project.

    Tx : project dir
    Rx : 123-project=CLIPSAL
    Rx : 123 project=MYPROJ
    Tx : project load MYPROJ
    Rx : 200 OK.
    Tx : Project use MYPROJ
    Rx : 200 OK.
    Tx : project start MYPROJ
    Rx : 200 OK.
    Tx : get LocalNetwork state
    Rx : 300 //MYPROJ/LocalNetwork: state=new
    Tx : get cbus networks
    Rx : 300 //MYPROJ/cbus: networks=LocalNetwork

    The process of loading and setting the default project can be automated by setting the following paramters in the "C-GateConfig.txt" file.

    project.default=MYPROJ
    project.start=MYPROJ

    Now when restarting CGate the project MYPROJ gets loaded, set as the default and the network is opened.

    NOTE: Currently you should limit project names to 8 characters or less!!!! and project names are CASE-SENSATIVE so ensure you use the same case.
     
    Last edited by a moderator: Dec 6, 2004
    Richo, Dec 6, 2004
    #2
  3. gbclark

    gbclark

    Joined:
    Aug 3, 2004
    Messages:
    5
    Likes Received:
    0
    Location:
    Dunedin, NZ
    Thanks Richo. That's got me sorted.
     
    gbclark, Dec 6, 2004
    #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.