C-Gate commands for remote network

Discussion in 'General Discussion' started by znelbok, Apr 24, 2017.

  1. znelbok

    znelbok

    Joined:
    Aug 3, 2004
    Messages:
    1,151
    Likes Received:
    17
    I am trying to learn bit more about C-Gate and have it running at the moment with commands to the local network working fine.

    I have a network bridge in the network and I want to send commands to the remote network. Send to adjacent network is turned off because I ran out of group addresses and started getting duplicates on both networks which did not go down to well.

    Can I send an On/Off/Ramp command to a group on the remote network and if so what is the syntax for the command.

    Thanks
     
    znelbok, Apr 24, 2017
    #1
  2. znelbok

    Ashley

    Joined:
    Dec 1, 2005
    Messages:
    1,554
    Likes Received:
    180
    Location:
    Adelaide, Australia
    Do you have a problem when you just change the network number to that of the other network?

    eg. ON 254/56/43 turns on lighting group 43 on network 254 (normally Local)
    and ON 253/56/43 turns lighting group 43 on for network 253 etc.
     
    Ashley, Apr 24, 2017
    #2
  3. znelbok

    znelbok

    Joined:
    Aug 3, 2004
    Messages:
    1,151
    Likes Received:
    17
    yes, trying to turn on a group on the remote network fails with an error.

    on network 254 "on /254/56/78" works fine

    om the remote network "on /253/56/211" fails with

    408 Operation failed //<Project name>/253/56/211

    Mick
     
    znelbok, Apr 24, 2017
    #3
  4. znelbok

    Ashley

    Joined:
    Dec 1, 2005
    Messages:
    1,554
    Likes Received:
    180
    Location:
    Adelaide, Australia
    The syntax if fine, so there must be an issue with that network.

    Try:

    NET LIST will give you a list of all the networks in the project and their state. See if network 253 is running

    TREE 253 will list all the applications and groups on that network and give their state also.

    GET 253/56/211 * will give you the current status of that group

    Try those and see what you get.
     
    Ashley, Apr 24, 2017
    #4
  5. znelbok

    znelbok

    Joined:
    Aug 3, 2004
    Messages:
    1,151
    Likes Received:
    17
    net list

    131-network=254 State=ok InterfaceState=running
    131-network=253 State=new InterfaceState=running

    TREE 253 returns information with no errors

    GET /253/56/211 * returns the specific information for the group.

    So it all appears to working fine just cant turn control the groups.

    Is it because the State=new and not OK, or because the bridge is not set for send to adjacent networks which means I cant control the remote network at all.
     
    znelbok, Apr 26, 2017
    #5
  6. znelbok

    rhamer

    Joined:
    Aug 3, 2004
    Messages:
    673
    Likes Received:
    3
    Location:
    Melbourne, Australia
    Just a thought.

    Wasn't there some issue with a license being required to access multiple networks?

    I think it was to stop free direct competition with Homegate etc.

    I vaguely remember it was originally a single network only, but when the wireless stuff came out it was increased to two, or something like that.

    Can't really remember, so I might have it wrong.

    Cheers

    Rohan
     
    rhamer, Apr 26, 2017
    #6
  7. znelbok

    Ashley

    Joined:
    Dec 1, 2005
    Messages:
    1,554
    Likes Received:
    180
    Location:
    Adelaide, Australia
    C-Gate licenses were removed back in 2007. See here:

    http://www.cbusforums.com/forums/showthread.php?t=11571

    I have 3 networks (2 wired, 1 wireless). The second wired network is independent (i.e. no Send To Adjacent Network) and it works fine from C-Gate.

    I assume you can scan the second network from Toolkit? Have you tried accessing any of the groups on the second network directly from say a Touchscreen?
     
    Ashley, Apr 26, 2017
    #7
  8. znelbok

    znelbok

    Joined:
    Aug 3, 2004
    Messages:
    1,151
    Likes Received:
    17
    Thanks guys

    I don't have a touchscreen to try with.

    As a sanity check I tried the same commands from my laptop running toolkit and c-gate (have been testing C-Gate on a Pi). Same results.

    Toolkit turns on groups on the remote network and the event (telnet on port 20025) shows the command as being sent when toolkit is used and the syntax is as expected. Using telnet to the local C-Gate gives me the same errors.
     
    znelbok, Apr 26, 2017
    #8
  9. znelbok

    Ashley

    Joined:
    Dec 1, 2005
    Messages:
    1,554
    Likes Received:
    180
    Location:
    Adelaide, Australia
    I tried to reproduce that error by introducing all sorts of problems on the network, but I just get network errors and never the error you get. I think you need the guy who wrote C-Gate to tell you where that error originates from. :confused:

    Have you tried looking through the log files?

    You could also try getting more detailed events from the command by setting a higher event level. i.e. events e9s0c0
     
    Last edited by a moderator: Apr 27, 2017
    Ashley, Apr 27, 2017
    #9
  10. znelbok

    Mr Mark

    Joined:
    Jan 27, 2006
    Messages:
    323
    Likes Received:
    5
    Location:
    FNQ
    Hello Mick.

    Maybe try "net open 253" to open the network first or send
    "on 253/56/211 force" to send/force the instruction through.
     
    Mr Mark, Apr 27, 2017
    #10
  11. znelbok

    znelbok

    Joined:
    Aug 3, 2004
    Messages:
    1,151
    Likes Received:
    17
    adding force to the end work.

    Two different instsances of C-Gate giving the same result - it must be something simple.

    At least force is allowing me to move forward. I'll check the log a little later

    Thanks all
     
    znelbok, Apr 27, 2017
    #11
  12. znelbok

    Ashley

    Joined:
    Dec 1, 2005
    Messages:
    1,554
    Likes Received:
    180
    Location:
    Adelaide, Australia
    I actually managed to get it to fail by restarting cgate and issuing commands immediately. Issuing a NET SYNC 252 solved the problem, so it's something to try.
     
    Ashley, Apr 27, 2017
    #12
  13. znelbok

    znelbok

    Joined:
    Aug 3, 2004
    Messages:
    1,151
    Likes Received:
    17
    Thanks Ashley

    From what I saw, C-Gate starts an autosync not long after startup and does it periodically. But I'll give it a go.

    I was watching it syn the networks and thought that it may be the cause so I let it go and came back a while later. Still no joy.

    Can someone tell me what the State=New means when I do a net list?

    Nothings making sense really, especially when toolkit has no issues. I still need to find out to up the logging and then find the log file - thats next on the list.
     
    znelbok, Apr 28, 2017
    #13
  14. znelbok

    NickD Moderator

    Joined:
    Nov 1, 2004
    Messages:
    1,427
    Likes Received:
    64
    Location:
    Adelaide
    In my CGate install directory there is a file called "CGateManual.pdf"... according to this, "new" means it hasn't done a sync yet.

    Nick
     
    NickD, Apr 28, 2017
    #14
  15. znelbok

    daniel C-Busser Moderator

    Joined:
    Jul 26, 2004
    Messages:
    770
    Likes Received:
    21
    Location:
    Adelaide
    The ON / OFF / RAMP / TERMINATERAMP commands are by default validated against C-Gate's model of the networks. If C-Gate hasn't synced a network (State=new) or the group doesn't exist in the model, it won't send the command. Appending FORCE to the command causes it to be sent to C-Bus without any validation.
     
    daniel, May 1, 2017
    #15
  16. znelbok

    simonhac

    Joined:
    Jan 8, 2017
    Messages:
    51
    Likes Received:
    0
    Location:
    Melbourne
    thanks daniel -- quick question: when does C-Gate kick off a sync? does it do it automatically upon opening the connection? how frequently?

    thanks,
    simon
     
    simonhac, May 1, 2017
    #16
  17. znelbok

    znelbok

    Joined:
    Aug 3, 2004
    Messages:
    1,151
    Likes Received:
    17
    From what I read a snyc should happen not long after initial connection but I dont know how often it happens after that.

    Thanks daniel for answering the issue of what State=new means. I'll try initiating a sync and see if that improves anything.
     
    znelbok, May 2, 2017
    #17
  18. znelbok

    daniel C-Busser Moderator

    Joined:
    Jul 26, 2004
    Messages:
    770
    Likes Received:
    21
    Location:
    Adelaide
    In general it should start as soon as the network is open.

    C-Gate Manual > Quick Start Guide > 3.11 Starting a Project or Network

    But the sync may be delayed depending on the config and topology.

    C-Gate Manual > Reference > 4.9.4 Network Syncing
     
    daniel, May 5, 2017
    #18
  19. znelbok

    simonhac

    Joined:
    Jan 8, 2017
    Messages:
    51
    Likes Received:
    0
    Location:
    Melbourne
    thanks daniel -- much appreciated.
    -s
     
    simonhac, May 7, 2017
    #19
  20. znelbok

    znelbok

    Joined:
    Aug 3, 2004
    Messages:
    1,151
    Likes Received:
    17
    I have been digging a little more into this and so far all I can work out is that the network is always at a status of new because it is not sync'd

    I tried a manual sync and it runs through the list and then retrieves the data from the remote units and then gets to the bridge, appears to sync ok and then it reports a failure and is unable to sync.

    From what I can tell there is nothing wrong on the remote network - it is all working fine. It could be the bridge I suppose - its about 15 years old now.

    Are there any other reasons why a network won't sync in C-Gate?
     
    znelbok, May 9, 2017
    #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.