Samsung TV integration Question -- Driver info starting post 127

It is slow. Mine is 2015 model. Will get my 2020 model on Saturday - so real fun begins Sunday. Looking for suggestions on desired controls. I want to include both remote and UPNP controls (UPNP can provide explicit volume and source control that may be useful). Looking for a Wake On Lan implementation to integrate also - but that is after I get my new TV.

I'd like to be able to set the source HDMI input. Maybe a couple controls to launch specific apps. Sling, Netflix, CBS, AmazonPrime, YouTube

It's working great to get the TV name and convert it, but obtain the Token is still failing. Setting to port 8002 seems to get further than 8001, but it still has the error below

As another test, I entered the token that I already had for the previous connection manually and saved it into preferences. The URL syntax in the logs is completely correct which is awesome, but still getting connection errors:

webSocketStatus: failure: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

Did you look at your Network setting in the TV. Looking for another device name that is connected to the TV with relevant service name. Want to see if that works vice the TV's name.

Yes, here is where those settings are in 2019/2020
Settings > General > External Device Manager > Device Connect Manager

There are smart devices listed from previous testing, but I've deleted them all before re-testing.

There is no pop-up on the TV like usually happens when you are trying to connect and obtain the token (Usually it will say Allow, Decline, Cancel).

Error message in the logs is still:
PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

Think the code might still need to ignore the self signed cert with a IgnoreSSLIssues: True as in the example Release 2.1.8 ignore SSL certificate

I copied the token into preferences, saved, open device, send mute key; TV didn't mute
dev:21352020-10-12 05:59:52.934 pm infoTV Test || webSocketStatus: status: closing

dev:21352020-10-12 05:59:49.797 pm infoTV Test || parse: {"event":"ms.error","data":{"message":"unrecognized method value : ms.remote.control"}}

dev:21352020-10-12 05:59:49.728 pm infoTV Test || parse: {"event":"ms.channel.connect","data":{"id":"cfbcf1d0-23d4-11b2-9f26-31ddfd4a529d","clients":[{"id":"cfbcf1d0-23d4-11b2-9f26-31ddfd4a529d","connectTime":660881773,"attributes":{"name":"null","token":"W1RWXVNhbXN1bmcgTEVENjU="},"isHost":false}]}}

dev:21352020-10-12 05:59:49.715 pm infoTV Test || webSocketStatus: status: open

dev:21352020-10-12 05:59:49.564 pm traceTV Test || sendKey: uri = http://192.168.1.153:8001/api/v2/channels/samsung.remote.control?name=null&token=W1RWXVNhbXN1bmcgTEVENjU=

dev:21352020-10-12 05:59:49.559 pm traceTV Test || sendKey: key = KEY_MUTE, token = W1RWXVNhbXN1bmcgTEVENjU=

The Websocket comms do not do that and HTTP post does not work

Still working. This is test code and we are trying to light the fire. Also, try using port 8002. I know the 8001 has issues. Dave

Added. Rethinking approach to more automated test-only. Will get code tomorrow. It will go through various command sets logging set and results. I want to find volunteers to run it against 2016, 17, 18, 19, and 20 Samsung TVs.

I am seeing JS and Python code on GitHub that I have used to create this and some of this disagrees with the specific implementation. I am (basically) confused.

1 Like

@djgutheinz willing to help I think mine is an 18.

1 Like

Tried 8002..
2020-10-13 07:48:14.295 am infoTV Test || webSocketStatus: failure: Failed to connect to /192.168.1.153:8002

dev:21352020-10-13 07:48:14.282 am traceTV Test || sendKey: uri = https://192.168.1.153:8002/api/v2/channels/samsung.remote.control?token=W1RWXVNhbXN1bmcgTEVENjU=

dev:21352020-10-13 07:48:14.277 am traceTV Test || sendKey: key = KEY_MUTE, token = W1RWXVNhbXN1bmcgTEVENjU=

1 Like

Here's the log output from the latest test. Did not a receive a pop-up prompt on the TV to allow the connection. Thanks!

Cal,
I can not get the SSL Ignore to work with WebSocket (and WebSocket is the only known methods to control). Can with standard httpPut. I am looking at WSCAT Source and installing WSCAT. Will wireshark transmission to see what in headers may solve issue.

Dave

Not surprised it didn't work, port55000 on my TV is not available. But any data is good data
dev:21382020-10-14 04:57:25.067 pm warnConnection refused (Connection refused)

dev:21382020-10-14 04:57:25.027 pm infotvAction KEY_MUTE

dev:21382020-10-14 04:57:25.023 pm tracee8932bfb-994a-4710-a92d-a51eb7c64f07

Thanks

No go unfortunately. Also, I checked out the certificate installed on the TV but it's issued by SamsungSDK and there is no way to change to another cert. Also, Hubitat does not have a way to import SSL certs as some of the other automation hubs have that do have working SamsungTV driver. I'm trying to figure out how the other automation hubs were able to get around this in their websocket implementation.

Lots of great things happening here. Just to add, that ST appears to have removed all TVs prior to 2018 from ST. If you've added it already then you're ok for now, but don't remove it or it won't come back. There doesn't appear to be any good reason for this

If Hubitat could integrate TVs that Samsung has removed, it may persuade a lot of people to get onboard, myself included. It would also be a bit of an own goal for them!

If you able to select Samsung OCF TV device handler that should work.

Which platform do you mean? ST will no longer detect the TVs in the first place, so it's not possible to assign a dh.

Here‘s my log

Doesn’t work for me:(