View Full Version : C-Gate2 command interface
gbclark
06 Dec 04, 01:05 PM
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
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
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.
gbclark
06 Dec 04, 03:16 PM
Thanks Richo. That's got me sorted.
vBulletin® v3.7.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.