tavicu / homebridge-samsung-tizen

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

Failed to pair! Make sure TV is online and you click "Allow" on the popup #530

Closed scsh4 closed 2 years ago

scsh4 commented 2 years ago

I know this issue, for some, is related to an old version of Tizen, but I don't think that's my issue. I am running Homebridge v1.4.1 on Docker. Installed Homebridge Samsung Tizen v5.2.3 plugin, configuring it as follows:

{
    "devices": [
        {
            "name": "Samsung QN85AA 85 TV",
            "ip": "192.168.86.43",
            "mac": "80:47:86:d6:66:9c",
            "inputs": [
                {
                    "type": "app"
                }
            ]
        }
    ],
    "platform": "SamsungTizen"
}

My QN85A is a 2021 model running Tizen version 1904. I can access the API via the TV's IP address which returns the following response:

{"device":{"FrameTVSupport":"false","GamePadSupport":"true","ImeSyncedSupport":"true","Language":"en_US","OS":"Tizen","PowerState":"on","TokenAuthSupport":"true","VoiceSupport":"true","WallScreenRatio":"-1","WallService":"false","countryCode":"US","description":"Samsung DTV RCR","developerIP":"0.0.0.0","developerMode":"0","duid":"uuid:f69fa590-37e4-4717-9915-bcd105b62b4b","firmwareVersion":"Unknown","id":"uuid:f69fa590-37e4-4717-9915-bcd105b62b4b","ip":"192.168.86.43","model":"21_NIKEM2_QTV","modelName":"QN85QN85AAFXZA","name":"Samsung QN85AA 85 TV","networkType":"wireless","resolution":"3840x2160","smartHubAgreement":"true","ssid":"08:b4:b1:2f:79:61","type":"Samsung SmartTV","udn":"uuid:f69fa590-37e4-4717-9915-bcd105b62b4b","wifiMac":"80:47:86:D6:66:9C"},"id":"uuid:f69fa590-37e4-4717-9915-bcd105b62b4b","isSupport":"{\"DMP_DRM_PLAYREADY\":\"false\",\"DMP_DRM_WIDEVINE\":\"false\",\"DMP_available\":\"true\",\"EDEN_available\":\"true\",\"FrameTVSupport\":\"false\",\"ImeSyncedSupport\":\"true\",\"TokenAuthSupport\":\"true\",\"remote_available\":\"true\",\"remote_fourDirections\":\"true\",\"remote_touchPad\":\"true\",\"remote_voiceControl\":\"true\"}\n","name":"Samsung QN85AA 85 TV","remote":"1.0","type":"Samsung SmartTV","uri":"http://192.168.86.43:8001/api/v2/","version":"2.0.25"}

Despite all of that, I receive the following error in Homebridge:

[6/7/2022, 8:40:23 AM] [Samsung QN85AA 85 TV] [DEBUG] Opening handshake has timed out
[6/7/2022, 8:40:28 AM] [Samsung QN85AA 85 TV] [DEBUG] Opening handshake has timed out
[6/7/2022, 8:40:33 AM] [Samsung QN85AA 85 TV] [DEBUG] Opening handshake has timed out
[6/7/2022, 8:40:33 AM] [Samsung QN85AA 85 TV] Failed to pair! Make sure TV is online and you click "Allow" on the popup
[6/7/2022, 8:40:33 AM] [Samsung QN85AA 85 TV] [DEBUG] PairFailedError: Failed to pair! Make sure TV is online and you click "Allow" on the popup
    at WebSocketSecure.pair (/homebridge/node_modules/homebridge-samsung-tizen/lib/methods/wss.js:38:19)

There is never a popup to click "Allow" on.

tavicu commented 2 years ago

Hi @scsh4,

As you can see the plugin tries 3 times to pair the TV but it can't reach it.

This means that the machine you are runing homebridge on can't access the TV.

And indeed, your TV is supported.

scsh4 commented 2 years ago

I am able to ping the TV at the address specified above:

Reply from 192.168.86.43: bytes=32 time=9ms TTL=64
Reply from 192.168.86.43: bytes=32 time=8ms TTL=64
Reply from 192.168.86.43: bytes=32 time=11ms TTL=64
Reply from 192.168.86.43: bytes=32 time=8ms TTL=64

I am also accessing the REST interface via the same machine, for which I posted the response above.

scsh4 commented 2 years ago

Also, an ICMP response directly from the Homebridge Terminal.

root@homebridge-vm:/homebridge# ping 192.168.86.43
PING 192.168.86.43 (192.168.86.43) 56(84) bytes of data.
64 bytes from 192.168.86.43: icmp_seq=1 ttl=64 time=13.9 ms
64 bytes from 192.168.86.43: icmp_seq=2 ttl=64 time=11.3 ms
64 bytes from 192.168.86.43: icmp_seq=3 ttl=64 time=9.51 ms
64 bytes from 192.168.86.43: icmp_seq=4 ttl=64 time=8.96 ms
64 bytes from 192.168.86.43: icmp_seq=5 ttl=64 time=8.78 ms
64 bytes from 192.168.86.43: icmp_seq=6 ttl=64 time=4.79 ms
64 bytes from 192.168.86.43: icmp_seq=7 ttl=64 time=8.99 ms
64 bytes from 192.168.86.43: icmp_seq=8 ttl=64 time=5.04 ms
64 bytes from 192.168.86.43: icmp_seq=9 ttl=64 time=8.90 ms
64 bytes from 192.168.86.43: icmp_seq=10 ttl=64 time=8.53 ms
tavicu commented 2 years ago

Try to hard restart your TV by holding the power button pressed until the Samsung logo appears.

Maybe your router blocking connections? Blocked ports from docker? Try to run it with network_mode: host

scsh4 commented 2 years ago

I have other plugins installed (FFmpeg, Homebridge Printer, etc.) installed for local devices and they work fine. For the sake of troubleshooting, I disabled all firewalls and ensured that host mode is active. I hard restarted my TV but still get the same error.

tavicu commented 2 years ago

I'm sorry but I don't know what else to recommend you. Something is blocking the connection because the server can't reach the TV on that IP address ...