2 Networks on 1 Homebridge

Discussion in 'Third-Party Solutions' started by L-Byrom, Mar 9, 2021.

  1. L-Byrom

    L-Byrom

    Joined:
    Mar 9, 2021
    Messages:
    9
    Likes Received:
    0
    Hi all,
    recently set up homebridge and have my cbus system running through Apple Homekit.
    Homebridge seem to stop working once i added an XML file with 2 networks on it (with a cbus bridge installed with the cbus system).
    is there any way to solve this.... ?

    thanks in advance !
     
    L-Byrom, Mar 9, 2021
    #1
  2. L-Byrom

    lcrowhurst

    Joined:
    Dec 2, 2004
    Messages:
    271
    Likes Received:
    97
    Location:
    Sydney, NSW, Australia
    Do you use the same group addresses across both.
    I haven’t tried a 2 network with Homebridge, but what if you try copying the project, deleted the second network and upload that XML .

    I actually donteven upload the actual project XML, I upload a template project, that has all lighting, enable and trigger groups created in it.
     
    lcrowhurst, Mar 10, 2021
    #2
  3. L-Byrom

    JasonY00

    Joined:
    Aug 30, 2012
    Messages:
    129
    Likes Received:
    27
    Location:
    Sydney
    I have a network bridge and two networks with homebridge (253 and 254). Just make sure that you don't have the same GA's defined on both networks. Otherwise it works fine.

    You will get funny messages where the source unit is "-1". Just ignore them. Its just the data packet coming from the far side of the bridge and the homebridge-cbus plugin can't really find out what the real source GA is.

    Let me know if you run into trouble. Just make sure you define the network in each of the accessory definitions in the config.json file, or have two instances of homebridge running, one for the local network and one for the bridged network. That way you only need to define the network once in each config file.

    Cheers

    Jason
     
    JasonY00, Mar 11, 2021
    #3
  4. L-Byrom

    L-Byrom

    Joined:
    Mar 9, 2021
    Messages:
    9
    Likes Received:
    0
    Are you able to show me a functional config.json file but i can have as an example. As i am very new to Homebridge

    Thanks,

    Luke

    ..... Also, is there a limit of how many accessories you can have.. Think this may be an issue for me as i have a lot of accessories on both Cbus Networks
     
    L-Byrom, Mar 11, 2021
    #4
  5. L-Byrom

    L-Byrom

    Joined:
    Mar 9, 2021
    Messages:
    9
    Likes Received:
    0
    I uploaded XML file and it seemed it didn't like it with the Cbus bridge. Homebridge wouldnt run at all.... so I made an individual XML file which only had the CNI network, not the bridge and that worked fine.
     
    L-Byrom, Mar 11, 2021
    #5
  6. L-Byrom

    JasonY00

    Joined:
    Aug 30, 2012
    Messages:
    129
    Likes Received:
    27
    Location:
    Sydney
    Sorry about the delay. I had some work stuff to finish...

    I have two instances of homebridge running with something over 250+ accessories with a bridged c-bus network and it all works. It is, however, on a Win 10 machine as all of my c-bus config stuff and toolkit is there and its rack mounted.

    So, I got up to 149 accessories onto a single instance of homebridge. At 150 it spits the dummy and wont load. Hence a second instance. I also had to bridge because I was going to hit the 2000mA limit for a CBus network.

    My CBus platform definition in the homebridge config.json file is standard:

    "client_application": 56,
    "client_cbusname": "JYOUNG",
    "client_controlport": 20023,
    "client_debug": false,
    "client_ip_address": "127.0.0.1",
    "client_network": 254,
    "name": "CBus",
    "platform": "homebridge-cbus.CBus",
    "platform_export": "my-platform.json"

    As you can see, the network is defined as 254 (the default for the local network).

    No when I defined my accessories, I just add a "network" field for any devices on the "remote (253) CBus network. eg:

    {
    "type": "temperature",
    "id": 246,
    "network": "253",
    "application": 228,
    "channel": 1,
    "name": "Living Room Temp",
    "enabled": true
    },

    You can now see all data coming across the bridge with homebridge. Remember that your CBus bridge has to pass all application data packets and should be set up correctly so that you can see it all, including logs and manage it with toolkit.

    One final thing to remember. you can have 255 CBus GA's which should be plenty. Don't give two GA's the same number in both the local and remote network. i.e. don't have a dimmer at GA10 on the local network and a switch on GA 10 on the remote network.

    If you need more than 255 addresses then just add another Application under lighting. I used 57 for a whole lot of other things so that I now have 512 GA's. To do this simply see the following example:

    {
    "type": "contact",
    "application": 57,
    "id": 104,
    "name": "Master Ensuite Window",
    "enabled": true
    },

    This is for a contact sensor accessory that I wrote for homebridge-cbus that utilities Lighting Application 57 on the local network.

    So maybe if you are having lots of accessories, you may consider using two instances of homebridge with a network on each and a different lighting application on each. It wont work for everything in CBus, but is an option if you are really pushing it...

    Otherwise just define the network/application in each c-bus accessory instead of globally.

    Best of luck. Just plan it out first...

    Cheers

    Jason
     
    JasonY00, Mar 12, 2021
    #6
  7. L-Byrom

    L-Byrom

    Joined:
    Mar 9, 2021
    Messages:
    9
    Likes Received:
    0
    I had to go through the config.json and make sure each accessory was allocated to there own network. silly mistake but slowly still working on it....

    thanks heaps for the help ! ill still keep in touch with updates.

    Cheers,
    Luke
     
    L-Byrom, Mar 12, 2021
    #7
  8. L-Byrom

    JasonY00

    Joined:
    Aug 30, 2012
    Messages:
    129
    Likes Received:
    27
    Location:
    Sydney
    No problem Luke,

    hope it all comes together for you.

    FYI, there is a relatively new "child" bridge concept for homebridge that circumvents the 149 accessories limit. I haven't tried it as my system is established. If, however, you are still setting it all up, it may be worth a read.

    Cheers

    Jason
     
    JasonY00, Mar 12, 2021
    #8
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.