Cbus ,raspberry pi and cni connection issues

Discussion in 'General Discussion' started by Graemepugh, Apr 18, 2021.

  1. Graemepugh

    Graemepugh

    Joined:
    Apr 18, 2021
    Messages:
    2
    Likes Received:
    0
    Hi,

    I have a windows7 pc running the Cbus system via a cbus2 pascal automation controller and I have tried to add home bridge via a raspberry pi3 soI can use my iPhone home app to access all lights on the CBus system.

    I have found this forum really helpful and followed the instructions and have cgate on the pi installed and mapped. When I run home bridge

    I get an error message which says:
    Cbus:client C-gate socket error: Error :connect ECONNREFUSED PI IP ADDRESS:20023
    Cubs:client C-Gate connection could not be opened; exiting

    I think I have all of the config files correct. I have included the pi address in the cgate config access txt as remote “pi ip address”Operate

    in the homebridge config files

    I have the client ip. address set as the pi address not the windows pc running cbus system (is this correct)
    Control port as 20023
    Client network 254
    Client application 56

    Any ideas as to why it won’t connect? It is a big system (900 lines of code) so not sure if it is timing out before loading up. But it looks like a connection problem. Have I done something wrong in the connections or ports? How do I check?

    Any advice bearing in mind I am a newbie?
     
    Graemepugh, Apr 18, 2021
    #1
    1. Advertisements

  2. Graemepugh

    DarylMc

    Joined:
    Mar 24, 2006
    Messages:
    1,222
    Likes Received:
    37
    Location:
    Brisbane, QLD, Australia
    Hello Graeme
    Are you using the PACA as a PC interface?
    I can’t say it’s impossible but I’ve never heard of anyone using PACA as a CBus interface for CGate running on a raspberry Pi.
    If you wanted to use the PACA as an interface you would need to run CGate on a PC instead.

    Clipsal CNI PC interface is a commonly used interface for CGate on a raspberry Pi.
    CBus RS232 PC interface can also be used.
    If you use a CBus RS232 PC interface you will also need either an FTDI USB to RS232 converter or a serial device server to connect to the raspberry Pi.
    I once heard someone say they used a CBus USB PC interface directly to CGate on a raspberry Pi but I have not tried it and I have not seen any instructions how to do it.
     
    DarylMc, Apr 18, 2021
    #2
    Graemepugh likes this.
    1. Advertisements

  3. Graemepugh

    Graemepugh

    Joined:
    Apr 18, 2021
    Messages:
    2
    Likes Received:
    0
    Thanks Daryl,

    I have a pc running cgate via the pascal controller and interface. What I want to do is run Cbus on my OS devices and I thought I could do that via the raspberry pi.

    Is this the problem? I am trying to duplicate cgate on the pi as well as the pc. Should it be one or the other?

    I will try when I get home.


    Regards



    Graeme
     
    Graemepugh, Apr 20, 2021
    #3
  4. Graemepugh

    DarylMc

    Joined:
    Mar 24, 2006
    Messages:
    1,222
    Likes Received:
    37
    Location:
    Brisbane, QLD, Australia
    Ideally you want a different CBus interface but if you want to try with what you’ve got I’d disable CGate on the raspberry Pi and use the CGate on your PC.
    In the Homebridge config file set client_IP_address to the IP address of the windows PC.
    On the Windows PC edit the CGate access file to include the IP address of the raspberry Pi.
    This will allow connections to CGate from the raspberry Pi.
    Also on the Windows PC set the CGate config file project.default and project.start to your project name.
    This will load and start your project when CGate starts.
    Toolkit can install CGate to run in a window or as a service.
    I find a window much simpler to manage.
    If you haven’t set CGate to run in a Window you can fix by reinstalling CBus Toolkit.
     
    DarylMc, Apr 20, 2021
    #4
  5. Graemepugh

    DarylMc

    Joined:
    Mar 24, 2006
    Messages:
    1,222
    Likes Received:
    37
    Location:
    Brisbane, QLD, Australia
    and
    and selecting "run CGate in a window" during install
     
    DarylMc, Apr 21, 2021
    #5
    1. Advertisements

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.