CGate Commands

Discussion in 'C-Gate Developers' started by kcampbell, Dec 7, 2005.

  1. kcampbell

    kcampbell

    Joined:
    May 13, 2005
    Messages:
    16
    Likes Received:
    0
    Location:
    Wellington, New Zealand
    Hi,

    we need to interact with CGate. The old version allowed us to Telnet into it and issue commands (like "get cbus networks" and "on 254/49/1").

    The latest one on my machine is 2.2.4, and I can Telnet into it, but the commands that worked on the old version don't work on this version!

    Are there new commands, or has the Telnet function been removed?

    We would use the old version, but it shuts down after about 5 minutes and then you have to run it again! (License issue??)
     
    kcampbell, Dec 7, 2005
    #1
  2. kcampbell

    Richo

    Joined:
    Jul 26, 2004
    Messages:
    1,257
    Likes Received:
    0
    Location:
    Adelaide
    Richo, Dec 7, 2005
    #2
  3. kcampbell

    kcampbell

    Joined:
    May 13, 2005
    Messages:
    16
    Likes Received:
    0
    Location:
    Wellington, New Zealand
    Thanks - tried it and it works!

    Is there any documentation for the new commands and how they are to be used?

    Or is it only the "project" stuff that has changed and all the old commands are just the same once you have the "project" running...???
     
    kcampbell, Dec 7, 2005
    #3
  4. kcampbell

    kcampbell

    Joined:
    May 13, 2005
    Messages:
    16
    Likes Received:
    0
    Location:
    Wellington, New Zealand
    Ok - another question...

    Can I get CGate to send CBus messages to my Telnet connection?

    I can connect, switch things and query their state, but rather than spend my life in an endless loop polling all the groups I'm interested in, can I get it to spit out the raw CBus messages (we already know how to decode those).

    I could use the DLL, but that's a bit limited in size...

    (Or is there another way to connect to CGate - DDE or sockets etc...)
     
    kcampbell, Dec 7, 2005
    #4
  5. kcampbell

    Duncan

    Joined:
    Jul 23, 2004
    Messages:
    925
    Likes Received:
    0
    Location:
    Salinas de Garci Mendoza, Bolivia
    Hi, if you telnet into C-Gates "load change" port at 20025 you will get load change messages, not quite "raw c-bus" but it should give you what you need.
     
    Duncan, Dec 7, 2005
    #5
  6. kcampbell

    kcampbell

    Joined:
    May 13, 2005
    Messages:
    16
    Likes Received:
    0
    Location:
    Wellington, New Zealand
    Thanks - seems to be what I need... :D
     
    kcampbell, Dec 7, 2005
    #6
  7. kcampbell

    kcampbell

    Joined:
    May 13, 2005
    Messages:
    16
    Likes Received:
    0
    Location:
    Wellington, New Zealand
    Still banging away at this, so a new question...

    (Not sure how to broach this - it's a dirty subject - the temperature sensor...)

    I know all about C-Bus temperature sensors, we have used hundreds (note the past tense).

    I know how to get readings from them using the PCI and a raw command string. Is there any way to do it via CGate?

    i.e. can I send and recieve the required raw data via any of the CGate ports?
    I have tried "get p/xxx/xxx temperature" and the "ci x get 13 xxx" with no luck - "get ... temperature" returned a temperature of 0.0 and the "ci..." just gave me an error!

    On the plus side, the telnet sessions to the two ports (event and command) seem to do almost everything you could wish for!
     
    kcampbell, Dec 8, 2005
    #7
  8. kcampbell

    znelbok

    Joined:
    Aug 3, 2004
    Messages:
    1,151
    Likes Received:
    17
    do a search on this as there was a thread outlining how to poll the sensor. It may be a sticky somewhere.
     
    znelbok, Dec 8, 2005
    #8
  9. kcampbell

    kcampbell

    Joined:
    May 13, 2005
    Messages:
    16
    Likes Received:
    0
    Location:
    Wellington, New Zealand
    Polling with CGate running?

    I know how to get the temperature using polling, the question is how do I do this with CGate running and thus grabbing the COM port...

    Is there a way to inject the poll string via a telnet port etc.
     
    kcampbell, Dec 11, 2005
    #9
  10. kcampbell

    Beerygaz

    Joined:
    Dec 25, 2005
    Messages:
    52
    Likes Received:
    0
    Location:
    Johannesburg, South Africa
    As a complete newbie, is there a command reference for CGate somewhere? I've found "ramp" and "on/off" as well as querying parameters, but I wondered where I can find a copy of a complete reference to work from?

    TIA.
    Gaz
     
    Beerygaz, Dec 25, 2005
    #10
  11. kcampbell

    Richo

    Joined:
    Jul 26, 2004
    Messages:
    1,257
    Likes Received:
    0
    Location:
    Adelaide
    The command reference is in the "pipe line" so to speak, nothing available at the moment sorry. Downloading an old version of C-Gate (1.x) from the webiste does have a lot of info that is still relevant to the current version (2.x)
     
    Richo, Dec 28, 2005
    #11
  12. kcampbell

    rhamer

    Joined:
    Aug 3, 2004
    Messages:
    673
    Likes Received:
    3
    Location:
    Melbourne, Australia
    Please, Please Richo can you look into getting this documentation done. It has been promised for many months.

    I just don't want to start using the V1 documentation and keep tripping over the subtle differences.

    Is there a Beta version of the documentation that I could use as a start?
     
    rhamer, Dec 28, 2005
    #12
  13. kcampbell

    Beerygaz

    Joined:
    Dec 25, 2005
    Messages:
    52
    Likes Received:
    0
    Location:
    Johannesburg, South Africa
    Thanks Richo. So if I wanted to start manipulating my C-Bus sytem progamatically from another application (perl, php, etc) that talked to C-Gate, then my only reference for a command set would be the 1.x docs?

    Or is it not best practice to connect to C-Gate's command port and start issuing commands? Is there a preferred method?

    Cheers
    Gaz.
     
    Beerygaz, Dec 29, 2005
    #13
  14. kcampbell

    Richo

    Joined:
    Jul 26, 2004
    Messages:
    1,257
    Likes Received:
    0
    Location:
    Adelaide
    Using the command port is the preferred method. Using the C-Bus Driver (DLL) is also a supported option as well. (available from website)
     
    Richo, Dec 30, 2005
    #14
  15. kcampbell

    Richo

    Joined:
    Jul 26, 2004
    Messages:
    1,257
    Likes Received:
    0
    Location:
    Adelaide
    Just checked on the updated C-Gate documentation and it is being worked on at the moment. Hopefully available in a matter of just weeks now.
     
    Richo, Jan 9, 2006
    #15
  16. kcampbell

    rhamer

    Joined:
    Aug 3, 2004
    Messages:
    673
    Likes Received:
    3
    Location:
    Melbourne, Australia
    Woo Hoo!!! Great News.
     
    rhamer, Jan 9, 2006
    #16
  17. kcampbell

    Mr Mark

    Joined:
    Jan 27, 2006
    Messages:
    322
    Likes Received:
    5
    Location:
    FNQ
    Temperature via c-gate

    Hello all. I've been using search to find an answer for this one. How do we poll c-gate to get temperature?
     
    Mr Mark, Jun 20, 2012
    #17
  18. kcampbell

    Mr Mark

    Joined:
    Jan 27, 2006
    Messages:
    322
    Likes Received:
    5
    Location:
    FNQ
    Rtfm??

    From the c-gate manual:
    TEMPERATURE BROADCAST temp-group-address celsius-temperature ["force"]
    temp-group-address = the address of the temperature group to send the
    temperature for as a C-Gate address, for example //proj/net1/$19/1
    celsius-temperature = temperature in degrees celsius with a maximum of one
    decimal place, with no units given

    Will try when I'm on-site tomorrow and see if it works.

    Regards,

    Mark
     
    Mr Mark, Jun 20, 2012
    #18
  19. kcampbell

    daniel C-Busser Moderator

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

    TEMPERATURE BROADCAST as the name implies will apply the temperature value you specify to that group on the network.

    Other devices on the network may also broadcast a value for that group in the same manner.

    To retrieve the last temperature value C-Gate observed for a group you can query it:

    get //proj/net1/$19/1 Temperature
     
    daniel, Jun 20, 2012
    #19
  20. kcampbell

    Mr Mark

    Joined:
    Jan 27, 2006
    Messages:
    322
    Likes Received:
    5
    Location:
    FNQ
    Thanks Daniel, will give it a go.
     
    Mr Mark, Jun 21, 2012
    #20
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.