mmende / homebridge-samsungtv-control2

homebridge-samsungtv-control2
MIT License
71 stars 17 forks source link

Issues running two instances of plugin #72

Open jaydisc opened 3 years ago

jaydisc commented 3 years ago

Hi, I'm trying to run two instances of this plugin, both as child bridges. There are two distinct HomeKit "Homes" on my LAN, and I'm trying to make the TV available to both Homes.

Here's what I have under platforms in config:

    {
        "platform": "SamsungTVControl",
        "name": "Samsung TV Personal",
        "remoteControlPort": 55000,
        "devices": [
            {
                "usn": "uuid:ea797de7-9d7c-03f4-806e-8ad85bba46f5",
                "name": "Samsung TV",
                "inputs": […]
            }
        ],
        "_bridge": {
            "username": "0E:B8:DB:92:1D:01",
            "port": 49864
        }
    },
    {
        "platform": "SamsungTVControl",
        "name": "Samsung TV Family",
        "remoteControlPort": 55000,
        "devices": [
            {
                "usn": "uuid:ea797de7-9d7c-03f4-806e-8ad85bba46f5",
                "name": "Samsung TV",
                "inputs": []
            }
        ],
        "_bridge": {
            "username": "0E:B8:DB:92:1D:02",
            "port": 49865
        }
    }

And here's the relevant log output on startup:

[7/5/2021, 8:58:08 PM] [Samsung TV Personal] Initializing SamsungTVControl platform...
[7/5/2021, 8:58:08 PM] [Samsung TV Personal] Initializing child bridge 0E:B8:DB:92:1D:01
[7/5/2021, 8:58:08 PM] [Samsung TV Family] Initializing SamsungTVControl platform...
[7/5/2021, 8:58:08 PM] [Samsung TV Family] Initializing child bridge 0E:B8:DB:92:1D:02
[7/5/2021, 8:58:08 PM] [Samsung TV Personal] Launched child bridge with PID 83119
[7/5/2021, 8:58:08 PM] [Samsung TV Family] Launched child bridge with PID 83120
[7/5/2021, 8:58:09 PM] [Samsung TV Personal] Loaded homebridge-samsungtv-control v2.0.2 child bridge successfully
[7/5/2021, 8:58:09 PM] [Samsung TV Family] Loaded homebridge-samsungtv-control v2.0.2 child bridge successfully
Preparing Advertiser for 'Samsung TV Personal 53C8' using ciao backend!
Starting to advertise 'Samsung TV Personal 53C8' using ciao backend!
[7/5/2021, 8:58:09 PM] Homebridge v1.3.4 (Samsung TV Personal) is running on port 49864.
Preparing Advertiser for 'Samsung TV Family 01D2' using ciao backend!
Starting to advertise 'Samsung TV Family 01D2' using ciao backend!
[7/5/2021, 8:58:09 PM] Homebridge v1.3.4 (Samsung TV Family) is running on port 49865.
[7/5/2021, 8:58:45 PM] [Samsung TV Family] Found device Samsung TV (UA40D6600), usn: uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
[7/5/2021, 8:58:45 PM] [Samsung TV Personal] Found device Samsung TV (UA40D6600), usn: uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Preparing Advertiser for 'Samsung TV CF67' using ciao backend!
Starting to advertise 'Samsung TV CF67' using ciao backend!
[7/5/2021, 8:58:45 PM] Samsung TV CF67 is running on port 63290.
[7/5/2021, 8:58:45 PM] Please add [Samsung TV CF67] manually in Home app. Setup Code: xxx-xx-xxx
Preparing Advertiser for 'Samsung TV CF67' using ciao backend!
Starting to advertise 'Samsung TV CF67' using ciao backend!
[7/5/2021, 8:58:45 PM] Samsung TV CF67 is running on port 63291.
[7/5/2021, 8:58:45 PM] Please add [Samsung TV CF67] manually in Home app. Setup Code: xxx-xx-xxx

So, it seems to be spinning up both child bridges correctly, but when it comes to creating the TV Accessory to be added, it seems to be using the same name twice, "Samsung TV CF67". Once I have added it to one Home, I am unable to add it to another. Is this because they're using the same "CF67" identifier? Can this be set/change/unique?