question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Child bridge, same plugin confuses homebridge

See original GitHub issue

Describe The Bug:

I was previously using two homebridge instances with different names.

One of them was linked to IOS. The other was linked to another home automation system.

There was no problem with this setup. After I moved to 1.3.1, I decided to do away with the second instance of hb since the new child bridge feature was perfect for it. In the second instance, only 1 plug-in was running (People x plus), so it was easy to transfer. However, the same plugin was also running in the main instance. It was using “platform” but the names of the entries were different so there should not be any conflict.

Anyway, I added the child bridge to my main configuration. configuration is below.

The result is unstable system: Homebridge works fine on the console. However, on the accessories page of the homebridge-ui, “people” plug-in sensors doesn’t show up at all. There should be 4 sensors coming from main instance There should be another 4 sensors coming from child bridge. But none of them show up. On homekit, those 4 sensors coming from main instance is unresponsive. And another unrelated device is unresponsive

So, this didn’t exactly work.

To Reproduce: Add a plugin using platform. Add the same plug-in again with child bridge config pair your child bridge to another system. pair your main bridge to your homekit. wait, restart etc

Expected behavior: Not sure, exposing the same plugin to different bridges is supported. Since this feature was mostly aimed at isolating unstable plug-ins.

Homebridge Config:

"platforms": [
        {
            "platform": "config",
            "name": "Homebridge",
            "port": 8581,
            "auth": "none",
            "theme": "dark-mode",
            "tempUnits": "c",
            "lang": "en"
        },
        {
            "platform": "PeopleXPlus",
            "threshold": 5,
            "anyoneSensor": false,
            "nooneSensor": false,
            "guestSensor": false,
            "anyoneSensorName": "Present",
            "nooneSensorName": "None",
            "guestSensorName": "Guests",
            "webhookEnabled": false,
            "webhookPort": 51828,
            "cacheDirectory": "./persistent",
            "checkInterval": 10000,
            "ignoreReEnterExitSeconds": 10,
            "people": [
                {
                    "name": "John",
                    "target": "JP1",
                    "macAddress": "**:**:**:**:**:**",
                    "threshold": 5,
                    "checkInterval": 10000,
                    "useArp": true,
                    "ignoreReEnterExitSeconds": 10
                },
                {
                    "name": "Amanda",
                    "target": "A2",
                    "macAddress": "**:**:**:**:**:**",
                    "threshold": 5,
                    "checkInterval": 10000,
                    "useArp": true,
                    "statusOnly": true,
                    "ignoreReEnterExitSeconds": 0
                },
                {
                    "name": "Nicole",
                    "target": "Nii3",
                    "macAddress": "**:**:**:**:**:**",
                    "threshold": 5,
                    "checkInterval": 10000,
                    "useArp": true,
                    "isGuest": true,
                    "ignoreReEnterExitSeconds": 0
                },
                {
                    "name": "Penny",
                    "target": "P5",
                    "macAddress":  "**:**:**:**:**:**",
                    "threshold": 5,
                    "checkInterval": 10000,
                    "useArp": true,
                    "statusOnly": true,
                    "ignoreReEnterExitSeconds": 0
                }
            ]
        },
        {
            "platform": "PeopleXPlus",
            "threshold": 5,
            "anyoneSensor": false,
            "nooneSensor": false,
            "guestSensor": false,
            "anyoneSensorName": "Present",
            "nooneSensorName": "None",
            "guestSensorName": "Guests",
            "webhookEnabled": false,
            "webhookPort": 51828,
            "cacheDirectory": "./persistent",
            "checkInterval": 10000,
            "ignoreReEnterExitSeconds": 10,
            "_bridge": {
                "username":  "**:**:**:**:**:**",
                "name": "Homebridge-HA"
            },
            "people": [
                {
                    "name": "John_hb",
                    "target": "JP1",
                    "macAddress":  "**:**:**:**:**:**",
                    "threshold": 5,
                    "checkInterval": 10000,
                    "useArp": true,
                    "ignoreReEnterExitSeconds": 10
                },
                {
                    "name": "Amanda_hb",
                    "target": "A2",
                    "macAddress":  "**:**:**:**:**:**",
                    "threshold": 5,
                    "checkInterval": 10000,
                    "useArp": true,
                    "statusOnly": true,
                    "ignoreReEnterExitSeconds": 0
                },
                {
                    "name": "Nicole_hb",
                    "target": "Nii3",
                    "macAddress":  "**:**:**:**:**:**",
                    "threshold": 5,
                    "checkInterval": 10000,
                    "useArp": true,
                    "isGuest": true,
                    "ignoreReEnterExitSeconds": 0
                },
                {
                    "name": "Penny_hb",
                    "target": "P5",
                    "macAddress":  "**:**:**:**:**:**",
                    "threshold": 5,
                    "checkInterval": 10000,
                    "useArp": true,
                    "statusOnly": true,
                    "ignoreReEnterExitSeconds": 0
                }
            ]
        },

Screenshots:

Environment:

  • Node.js Version: v14.16.0
  • NPM Version: v7.5.6
  • Homebridge Version: 1.3.1
  • Operating System:Raspberry Pi OS
  • Process Supervisor: hb-service

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
donavanbeckercommented, Feb 24, 2021

@Salvora why not setup both plugins as child bridges? I have did this for the same plugin and they both work so just add:

"_bridge": {
                "username": "A1:B2:C3:D4:E5:F6",
                "port": 42150
            }

you can change the port and username to whatever you want that is different then the other plugin.

0reactions
github-actions[bot]commented, Mar 29, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Migrating from HOOBS separate bridges to Homebridge child ...
I want to exclusively use child bridges in HB, with zero accessories on the 'main' bridge. But I'm confused about Child Bridges in...
Read more >
Homebridge after groovy - Connected Things
This is a plugin to Homebridge to connect your Smartthings network into Apple Home Kit. - GitHub - iklein99/homebridge-smartthings: This is ...
Read more >
homebridge-harmony - HOOBS
This plugin is publishing harmony hub activities and devices as switches, with some advanced option (see below) for custom needs like macros, ...
Read more >
New Homebridge Plug-in via MakerAPI - Developers - Hubitat
This new plugin does not rely on the "Homebridge App" in Hubitat and utilizes ... I have not set any child instances yet...
Read more >
homebridge-deconz - npm Package Health Analysis - Snyk
Homebridge plugin for deCONZ For more information about how to use this ... with the Homebridge UI as only other plugin, or in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found