tavicu / homebridge-samsung-tizen

Homebridge plugin for Samsung TV's with Tizen OS
MIT License
646 stars 88 forks source link

"Unable to add accessory Accessory is not reachable" error in Home App #330

Closed mflannery closed 3 years ago

mflannery commented 3 years ago

I have been trying to add my Samsung TV to the home add on my iphone and consistently get the error: Unable to Add Accessory Accessory is not reachable

I am running:

Node.js Version | v14.16.0 Npm Version | v6.14.11 homebridge-samsung-tizen v4.4.1

I have paired the TV to HomeBridge and when I click on the TV in the Accessories page I can turn off and back on the TV.

The TV portion of the config.json: { "app_list": true, "devices": [ { "name": "Family Room TV", "ip": "correct IP Address", "mac": "correct MAC", "uuid": "A1" } ], "platform": "SamsungTizen" } In the logs I see: Preparing Advertiser for 'Family Room TV 077B' using bonjour-hap backend! Starting to advertise 'Family Room TV 077B' using bonjour-hap backend! [3/22/2021, 10:40:12 AM] Family Room TV 077B is running on port 46067. [3/22/2021, 10:40:12 AM] Please add [Family Room TV 077B] manually in Home app. Setup Code: Setup Code

I have noticed that the setup code listed in the "Please add ..." line is the same setup code as for my HomeBridge.

I have many other devices working successfully in this homebridge and, as I stated above, from the accessories page in the HomeBridge web app I can turn the TV off and on so the connection from the homebridge to the TV seems to be working. Its just getting the TV added to the Home App that is the problem. I have reviewed all of the closed issues concerning being unable to add the TV to the Home App but they mostly seem to hinge on adding "UUID": "A1" to the config but as you can see I already have that. Any other ideas as to what's going on here? Do I need to open a port in my firewall for the TV plugin? I see it's running on 46067 and I have not had to open any other ports specifically for plugins but that port is definitely not open in my firewall.

I have also checked my Samsung TV and I am up to date on firmware and I also turned on the ability to control the TV via IP and Power On with Mobile is also enabled.

Thanks in advance for your time and help here!

tavicu commented 3 years ago

Hi. Since you can control the TV from the Accessories it's not a problem from the plugin.

You could try to change the "A1" to something else, whatever you want and try again.

The port should not be opened to public (from the router to exterior), so as long as you don't block it from your server it should be good. If you block it with a firewall on your server then yes, you should open. Just like you did with the Homebridge instance.

The TV acts as a bridge, just like a Homebridge server. Everything you opened for main Homebridge instance should be open for the TV.

You can also define other interval for external accessories and then create in the firewall an exception for this interval like this:

{
    "bridge": {
        ...
    },
    "ports": {
        "start": 51510,
        "end": 51519
    },
    "accessories": [
        ...
    ],
    "platforms": [
        ...
    ]    
}
mflannery commented 3 years ago

It was the port. I had to open it on the server. This step is not listed in the docs. It could be added as the first thing in step 6 of the installation wiki.

"If you are running a firewall on the server which is hosting HomeBridge, you will need to open the port specified in the logs so that you can add your TV to the Home app on your iPhone/iPad/..." or something like that. :-)