tavicu / homebridge-samsung-tizen

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

Pairing Fails - 2021 Samsung The Frame #557

Closed jtbrough closed 1 year ago

jtbrough commented 1 year ago

Hello,

I have spent the better part of the evening trying to get my Frame tv paired. Having read all of the docs, and all pairing / frame related issues - I really hoped to sort this out myself, but now I'm reaching out to the experts in the crowd.

TV API response (from host where homebridge runs): jtbrough@NAS:~$ curl http://10.0.107.101:8001/api/v2/

{
  "device": {
    "FrameTVSupport": "true",
    "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:redacted",
    "firmwareVersion": "Unknown",
    "id": "uuid:redacted",
    "ip": "10.0.107.101",
    "model": "21_NIKEM2_FRAME",
    "modelName": "QN43LS03AAFXZA",
    "name": "Samsung The Frame 43",
    "networkType": "wireless",
    "resolution": "3840x2160",
    "smartHubAgreement": "true",
    "ssid": "fa:92:bf:5e:fc:3a",
    "type": "Samsung SmartTV",
    "udn": "uuid:redacted",
    "wifiMac": "80:47:86:70:FD:1E"
  },
  "id": "uuid:redacted",
  "isSupport": "{\"DMP_DRM_PLAYREADY\":\"false\",\"DMP_DRM_WIDEVINE\":\"false\",\"DMP_available\":\"true\",\"EDEN_available\":\"true\",\"FrameTVSupport\":\"true\",\"ImeSyncedSupport\":\"true\",\"TokenAuthSupport\":\"true\",\"remote_available\":\"true\",\"remote_fourDirections\":\"true\",\"remote_touchPad\":\"true\",\"remote_voiceControl\":\"true\"}\n",
  "name": "Samsung The Frame 43",
  "remote": "1.0",
  "type": "Samsung SmartTV",
  "uri": "http://10.0.107.101:8001/api/v2/",
  "version": "2.0.25"
}

My current homebridge-samsung-tizen v5.2.4 config:

{
    "devices": [
        {
            "name": "Frame TV",
            "ip": "10.0.107.101",
            "mac": "80:47:86:70:FD:1E",
            "options": [
                "Frame.RealPowerMode"
            ],
            "inputs": [
                {
                    "type": "app"
                }
            ]
        }
    ],
    "platform": "SamsungTizen",
    "_bridge": {
        "username": "0E:9B:92:E6:85:8D",
        "port": 48352
    }
}

Log message: [8/10/2022, 8:36:36 PM] [Frame TV] Failed to pair! Make sure TV is online and you click "Allow" on the popup

Troubleshooting steps undertaken:

Happy to provide any detail or conduct any testing that might help.

Thank you in advance.

Jordan

ondrejsabrnak commented 1 year ago

Hi,

Did you manage to resolve this issue? I experienced it on two of my TVs and tried everything. I even did a factory reset and nothing helped.

Same log message.

tavicu commented 1 year ago

Hi.

Please start homebridge in debug mode so we can see the response from request.

IvanBiley commented 1 year ago

Same problem with the Frame (2022). Does not pair with TV. Same log message.

cr3ative commented 1 year ago

Ah. Glad it's not just me - my Frame (2021) won't connect to any of the many websocket based remote control APIs.

Debug logs: there are far too many, but repeatedly, I see

[8/31/2022, 6:14:12 PM] [Bedroom TV] [DEBUG] { event: 'ms.channel.timeOut' }
[8/31/2022, 6:14:13 PM] [Bedroom TV] [DEBUG] { request: 'get_artmode_status' }

Which correlates with other APIs errors, that they can't connect on 8002 - ms.channel.timeOut

cr3ative commented 1 year ago

Hi there, to follow up, this was because I had my Frame TV on a different VLAN and it will not reply across VLANs as my older Samsung TV did.

This is implemented with a Ubiquiti Dream Machine Pro.

Fixed, grudgingly, by putting it on the same trusted VLAN as the server.

Found similar here: https://github.com/home-assistant/home-assistant.io/pull/22019/files#diff-662a313f526dc988804809b1f759277b504e095f4ee93f8b7ca317a9c2a13465R97

jtbrough commented 1 year ago

@cr3ative - it seems we have frighteningly similar setups. I am also on a UDMP with my IoT devices sequestered into a VLAN/subnet.

It makes sense that without some unique router features, the WOL magic packet won't traverse the VLAN/subnet. In my case, this was resolved by giving my NAS a NIC connected to the IoT subnet.

cr3ative commented 1 year ago

Yeah, unfortunately the TV has its own ideas about security too - it actively won't respond to a different subnet. Annoying, because most devices we can "fix" the firewall rules for, but at least we know now.

jtbrough commented 1 year ago

Just in case anyone else comes along with a very similar situation, here's what I can recommend.

I am runninghomebridge on docker hosted on a Synology NAS. That NAS happens to have multiple network interfaces. The "fix" in my case was to configure my UniFi switch profile to assign an IP address to the 2nd Synology NIC for my IoT vlan. This let me keep the Samsung The Frame TV isolated on my IoT VLAN / subnet.

So:

Synology NIC 1: primary LAN Synology NIC 2: IoT VLAN

Immediately after making this change and restarting the Synology, the Samsung The Frame tv presented the permissions dialog and the homebridge plugin started working flawlessly.

tavicu commented 1 year ago

Hi.

Thank you for the follow up @jtbrough.

I'm working on a new documentation where there will be a special section of "Trubleshooting". I will try to add your solution there for those who uses multiple network interfaces :)

chalojak commented 1 year ago

This really helped me to troubleshoot the problem, I was not able to connect the TV that was on a different VLAN than Homebridge. Creating a dedicated bridge on my VM that only handles the TV and is on the same subnet was my solution.

Please add the information that the TV needs to be on the same subnet/VLAN as the bridge, otherwise, it automatically declines the connection.

HeyWatchOutDude commented 1 year ago

I also solved it that way ... but I dont like that "workaround".

jwebbstevens commented 1 year ago

I hate to re-open this but I have the same setup as everyone here on this Issue #557. UDM-Pro, Synology NAS running DSM 7, the only difference is I'm running the Homebridge Community App from onzu. I don't think I can push that to use its own dedicated NIC as it seems bound to the same bridge network as the main NAS is on (I wish I could so I have asked over on that repo Dedicated NIC?).

Can someone explain why creating Traffic/Networking rules in Unifi OS Network 7.2.95 won't work? Is it solely because of WOL?

It seems to me that I could create a network rule that says let Device A (the Samsung Frame TV) talk to/from and ONLY to Device B (the Synology NAS). FWIW I've played around with creating such rules in the Traffic Management section in Unifi OS Network but no success so far. From a security perspective I know Samsung devices are extremely chatty if you will. So having it isolated seems sensible.

cr3ative commented 1 year ago

The Samsung TV deliberately won't communicate to another subnet. Homebridge and the TV must be on the same subnet. Traffic rules can't avoid that.

jwebbstevens commented 1 year ago

@cr3ative thank you. really awesome of Samsung to engineer it that way. lol. i may move my homebridge instance back to a dockerized version. seems safer.