AlexanderBabel / homebridge-broadlink-rm

[This fork supports TV accessories] Broadlink RM Mini and Pro plugin for homebridge: https://github.com/nfarina/homebridge
Apache License 2.0
46 stars 11 forks source link

Two TVs issue #26

Closed JakobFelixJulius closed 5 years ago

JakobFelixJulius commented 5 years ago

Hello, First of all the work you put into this fork! I know this has been discussed in several other issues, but as of today I am still not able to get it working with my setup :(

I want to add two TVs to my Homebridge config, but only one shows up in the Home app on iOS, whichever one is configured first in the config.

I am using version 3.5.7 of this plugin and running docker-homebridge on version 0.4.50

I understand that @AlexanderBabel fixed the issue?

"Fortunately I found a way to solve this issue without a complete rewrite. I used the code from the original homebridge server and copied it for this use case. And... It worked! Feel free to report issues if you find any. On my system everything worked as expected."

Originally posted by @AlexanderBabel in https://github.com/AlexanderBabel/homebridge-broadlink-rm/issues/4#issuecomment-485270056

As I understand it was a limitation of homebridge to only be able to have one TV per bridge, but was fixed here https://github.com/nfarina/homebridge/issues/2184

Here is my config, maybe someone could help? Thanks!

"platforms": [
        {
            "platform": "BroadlinkRM",
            "name": "Broadlink RM",
            "hideScanFrequencyButton": false,
            "hideLearnButton": false,
            "hideWelcomeMessage": false,
            "accessories": [
                {
                    "name": "Beamer",
                    "type": "tv",
                    "data": {
                        "on": "2600d8...",
                        "off": [
                            {
                                "data": "2600d8...",
                                "sendCount": 2,
                                "interval": 0.5
                            }
                        ],
                        "remote": {
                            "select": "260090...",
                            "arrowUp": "2600d8...",
                            "arrowDown": "260090...",
                            "arrowLeft": "2600d8...",
                            "arrowRight": "260090...",
                            "back": "2600d8...",
                            "exit": "2600d8...",
                            "playPause": "2600d8...",
                            "info": "2600d8..."
                        },
                        "powerMode": {
                            "show": "2600d8..."
                        },
                        "volume": {
                            "up": [
                                {
                                    "data": "260058..."
                                },
                                {
                                    "data": "260058..."
                                }
                            ],
                            "down": [
                                {
                                    "data": "260058..."
                                },
                                {
                                    "data": "260050..."
                                }
                            ]
                        }
                    }
                },
                {
                    "name": "Sound",
                    "type": "tv",
                    "data": {
                        "on": "260090...",
                        "off": "260090...",
                        "remote": {
                           "select": "260090...",
                            "arrowUp": "2600d8...",
                            "arrowDown": "260090...",
                            "arrowLeft": "2600d8...",
                            "arrowRight": "260090...",
                            "back": "2600d8...",
                            "exit": "2600d8...",
                            "playPause": "2600d8...",
                            "info": "2600d8..."
                        },
                        "powerMode": {
                            "show": "2600d8..."
                        },
                        "volume": {
                            "up": [
                                {
                                    "data": "260058..."
                                },
                                {
                                    "data": "260058..."
                                }
                            ],
                            "down": [
                                {
                                    "data": "260058..."
                                },
                                {
                                    "data": "260050..."
                                }
                            ]
                        },
                        "inputs": [
                            {
                                "name": "PlayStation",
                                "type": "airplay",
                                "data": "260058..."
                            },
                            {
                                "name": "AudioCast",
                                "type": "airplay",
                                "data": "260058..."
                            },
                            {
                                "name": "Laptop",
                                "type": "airplay",
                                "data": "260058..."
                            },
                            {
                                "name": "Bluetooth",
                                "type": "airplay",
                                "data": "260058..."
                            }
                        ]
                    }
                }
            ]
        }
    ]
JakobFelixJulius commented 5 years ago

Managed to resolve it! What I didn't see was the log that I found in the last commit:

log('');
log(`**************************************************************************************************************`);
log(`You added more than TVs in your configuration!`);
log(`Due to a HomeKit limitation you need to add any additional TV to the Home app by using the Add Accessory function.`);
log(`There you'll find your additional TVs and you can use the same PIN as you using for this HomeBridge instance.`);
log(`**************************************************************************************************************`);
log('');

So if you want a second TV you need to add it manually in the Home app - now everything works.