CGate Open/Close network behavior?

Discussion in 'C-Bus Toolkit and C-Gate Software' started by Ingo, Sep 10, 2025.

  1. Ingo

    Ingo

    Joined:
    Dec 2, 2006
    Messages:
    296
    Likes Received:
    2
    Location:
    South Africa
    I've recently started to toy around with a MQTT/CBus interface using @DamianFynn's node.js solution as a base. I ended up using a different CGate docker image from pktechnology which seems to be maintained on docker hub.

    While running this docker container I then start a Visual Code session and run a node.js script interfacing to this remote CGate server and it all works fine. The issue that I encounter is when I also start Toolkit, and point to the same docker CGate server, and click on 'Close Network', then my Visual Studio Code instance stops sending and receiving updates. Is this normal behavior? Is the network closed for everyone?
     
    Ingo, Sep 10, 2025
    #1
  2. Ingo

    Ashley

    Joined:
    Dec 1, 2005
    Messages:
    1,596
    Likes Received:
    195
    Location:
    Adelaide, Australia
    in Toolkit EDIT/PREFERENCES, select the Behavior tag and make sure "Leave Projects Open" is checked under Shutdown Behavior.
     
    Ashley, Sep 11, 2025
    #2
  3. Ingo

    Ingo

    Joined:
    Dec 2, 2006
    Messages:
    296
    Likes Received:
    2
    Location:
    South Africa
    Excellent! Thanks.
     
    Ingo, Sep 11, 2025
    #3
  4. Ingo

    Ingo

    Joined:
    Dec 2, 2006
    Messages:
    296
    Likes Received:
    2
    Location:
    South Africa
    A follow up question. Is there some kind of event or message sent via CGate to inform other members that the network has closed? I looked at the CGate documentation and see lots of event messages, perhaps something like event '741' Network Closed? All I see is 700 (heartbeat) which I enabled for testing.
     
    Ingo, Sep 12, 2025
    #4
  5. Ingo

    Ashley

    Joined:
    Dec 1, 2005
    Messages:
    1,596
    Likes Received:
    195
    Location:
    Adelaide, Australia
    If you have a command port open you can enable these events using the EVENTS command.
    EVENTS e5s0c0 will give you events up to level 5 (which includes 741)
    EVENTS e5s1c0 will give you events and status changes.
     
    Ashley, Sep 15, 2025
    #5
  6. Ingo

    Ingo

    Joined:
    Dec 2, 2006
    Messages:
    296
    Likes Received:
    2
    Location:
    South Africa
    Thanks. I don't think 741 is used anymore as I never got any 741 messages on level 5 (even on 9) and had to up the event level to 7 for 754, 755 and 762 messages to indicate network states.
     
    Ingo, Sep 15, 2025
    #6
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.