mantorok1 / homebridge-omnilink-platform

Homebridge Plugin for HAI/Leviton Omni series Security & Home Automation Systems

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

When creating Child Bridges, GUI only displays first bridge.

kristiandg opened this issue · comments

Describe The Bug:
Creating multiple child bridges via JSON config's "Add Platform" function, allows the manual creation of multiple children, but when you try to access SETTINGS for this plugin, only the first child bridge is displayed (forcing you to configure via text, or configure one at a time to get the JSON syntax, so you can then paste it into the subsequent children).

To Reproduce:
Go into JSON Config and select "Add Platform". Paste in a legitimate config in this newly-created platform, then save. When back on the Plugins page, select SETTINGS, and you'll only see the first child.

Expected behavior:
When visiting settings and multiple children/platforms created, each one should be displayed.

Logs:

Show the Homebridge logs here, remove any sensitive information.

PLATFORM 1:
{
    "name": "Omni - Security",
    "address": "",
    "port": 4369,
    "key1": "",
    "key2": "",
    "includeAreas": true,
    "includeZones": true,
    "includeBypassZones": false,
    "includeButtons": false,
    "includeUnits": false,
    "includeThermostats": false,
    "includeEmergencyAlarms": false,
    "includeAccessControls": false,
    "includeAuxiliarySensors": false,
    "setHomeToAway": false,
    "setNightToAway": false,
    "securityCode": "",
    "includeHumidityControls": false,
    "targetHumiditySetPointType": 1,
    "targetHumidityDifference": 0,
    "minTemperature": 0,
    "maxTemperature": 40,
    "defaultAccessoryMappings": {
        "zone": "contact",
        "zoneFireEmergency": "smoke",
        "unit": "lightbulb"
    },
    "map": {
        "zones": {
            "motion": "12,14,15",
            "smoke": "1,2,3,4,55,56",
            "contact": "5,6,7,9,10,11,13,17,18,19,20,21,22,23,24,25,26,27,28,49,50,51,52,53",
            "leak": "8"
        },
        "units": {
            "switch": "1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199",
            "lightbulb": "1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199"
        }
    },
    "exclude": {
        "zones": "16,29,30,31,32,54,58,58,59,60,61,62,63,64"
    },
    "garageDoors": [
        {
            "openTime": 10
        }
    ],
    "pushover": {
        "alarms": {
            "burglary": false,
            "fire": false,
            "gas": false,
            "auxiliary": false,
            "freeze": false,
            "water": false,
            "duress": false,
            "temperature": false
        },
        "troubles": {
            "freeze": false,
            "batterylow": false,
            "acpower": false,
            "phoneline": false,
            "digitalcommunicator": false,
            "fuse": false
        }
    },
    "mqtt": {
        "showMqttEvents": false
    },
    "syncTime": true,
    "showHomebridgeEvents": false,
    "showOmniEvents": false,
    "showRequestResponse": false,
    "clearCache": false,
    "forceAutoDiscovery": false,
    "platform": "OmniLinkPlatform",
    "_bridge": {
        "username": "",
        "port": 53248
    }
}

PLATFORM 2:
{
    "name": "Omni - Lighting",
    "address": "",
    "port": 4369,
    "key1": "",
    "key2": "",
    "includeAreas": false,
    "includeZones": false,
    "includeBypassZones": false,
    "includeButtons": false,
    "includeUnits": true,
    "includeThermostats": false,
    "includeEmergencyAlarms": false,
    "includeAccessControls": false,
    "includeAuxiliarySensors": false,
    "setHomeToAway": false,
    "setNightToAway": false,
    "securityCode": "",
    "includeHumidityControls": false,
    "targetHumiditySetPointType": 1,
    "targetHumidityDifference": 0,
    "minTemperature": 0,
    "maxTemperature": 40,
    "defaultAccessoryMappings": {
        "zone": "contact",
        "zoneFireEmergency": "smoke",
        "unit": "lightbulb"
    },
    "map": {
        "units": {
            "switch": "1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199",
            "lightbulb": "1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199"
        }
    },
    "exclude": {
        "zones": "16,29,30,31,32,54,58,58,59,60,61,62,63,64"
    },
    "garageDoors": [
        {
            "openTime": 10
        }
    ],
    "pushover": {
        "alarms": {
            "burglary": false,
            "fire": false,
            "gas": false,
            "auxiliary": false,
            "freeze": false,
            "water": false,
            "duress": false,
            "temperature": false
        },
        "troubles": {
            "freeze": false,
            "batterylow": false,
            "acpower": false,
            "phoneline": false,
            "digitalcommunicator": false,
            "fuse": false
        }
    },
    "mqtt": {
        "showMqttEvents": false
    },
    "syncTime": true,
    "showHomebridgeEvents": false,
    "showOmniEvents": false,
    "showRequestResponse": false,
    "clearCache": false,
    "forceAutoDiscovery": false,
    "platform": "OmniLinkPlatform",
    "_bridge": {
        "username": "",
        "port": 30177
    }
}

Show your Homebridge config.json here, remove any sensitive information.
{
    "bridge": {
        "name": "Homebridge EBD9",
        "username": "",
        "port": 51309,
        "pin": "945-84-954",
        "advertiser": "avahi"
    },
    "accessories": [],
    "platforms": [
        {
            "name": "Config",
            "port": 8581,
            "platform": "config"
        },
}
Screenshots:
Screenshot 2023-01-26 at 11 36 27 AM

Environment:: Raspberry Pi 4B (8gb RAM)

  • Plugin Version: 1.5.9
  • Homebridge Version: 1.6.0
  • Node.js Version: v18.12.1
  • NPM Version: 4.50.2
  • Operating System: Raspbian

Hi @kristiandg, this is a limitation of the Homebridge Config UI, not the plugin. You could trying creating an issue on https://github.com/oznu/homebridge-config-ui-x to get them to enhance it.

@mantorok1, not to dispute you on this, as you clearly know more about this stuff than I (I couldn't write a plug-in if someone paid me to) :), but I have that very functionality on an Elk M1 plugin, which is why I knew it should be visible here as well. See in the attached pics, I was able to add 2 additional ELKs from directly into the GUI (on that plugin), and that I have an ADD PLATFORM button in the plugin's SETTINGS GUI:
ElkImage1
ElkImage2

Interesting. I know when child bridges were first introduced it wasn't well supported by the Config UI. Maybe it's improved since. I'll do some investigation and see what I can do

Cool. Thank you. I worked around it for now by creating the lighting config, then pasting that JSON into a second child, then building out the security config (and leaving it in the first position), but would be good to have in the roadmap…. Thanks.

I've had a quick look at the ELKM1 plugin and one thing I noticed that was different was in the config.schema.json it has the singular key set to false but the OmniLink plugin has this set to true. If you have time and you are comfortable editing this file you could try changing it to true and see if it solves the problem.

I don't mind SSH'ing into it and trying that, but you'd have to tell me the path to edit - I know just enough to be dangerous. ;)

UPDATE:
Nevermind. found it, and changed. And that did the trick! I now see both modules. So, I guess you can incorporate that into future builds...

FYI, I'm sure you know this, but this was in the logs and looks like is going away soon:
"The dynamic platform OmniLinkPlatform from the plugin homebridge-omnilink-platform seems to be configured multiple times in your config.json. This behaviour was deprecated in homebridge v1.0.0 and will be removed in"

Thanks!

Thanks for trying it out for me. I'll add it to the next version of the plugin.

I've not seen that log message before but then I only use a single config for my Omni (which runs in a child bridge). It doesn't make a lot of sense since you need multiple configs in your case and Homebridge is supposed to support it. When I get some time I'll try to replicate the issue.

It could be some sort of glitch. I found the same sort of issue mentioned for another plugin here. It was suggested to remove the plugin, clear the accessory cache and delete it completely from HomeKit then try adding it all again. Make sure you backup your configs first though.

This had been fixed in version 1.5.10