[DEPRECATED ] Automatic Connected Car- Integration with SmartThings

Created a developer support ticket. Here’s hoping.

1 Like

Samsung dev responded saying they’d try to get a dev to take a look at this thread… guess the developer ticket system is for new SDK, not the “old” one (that’s what this forum is for).

Try passing: [tlsVersion: TLSv1.2] into the request params - that should make the client use tls 1.2

2 Likes

Hi @vlad,

Which oAuth request? The authorize one or the callback?

Regards.

I’ve tried on both. Here is the request:

def oauthParams = [
	response_type: "code",
	scope: "scope:public scope:user:profile scope:location scope:vehicle:profile " +
    	"scope:vehicle:events scope:trip scope:behavior"
	tlsVersion: "TLSv1.2",        
	client_id: stcid,
	redirect_uri: "${get_ST_URI_ROOT()}/oauth/callback"

]

I tried also to set it in the headers. I get the same exception in the logs:

javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure

Regards

Could you share your code (sorry if the dth is in this thread - can’t seem to find it)? This should work, we use tls 1.2 for a number of our cloud to cloud integrations and at first glance that snippet looks right. Pulling straight out of one of those integrations:

httpPost(uri: uri, tlsVersion: "TLSv1.2" ) { resp ->
        ...
}

In regards to which request, it would be whichever one is throwing the handshake exception.

2 Likes

OK, I made some code changes, and it works now… The tlsVersion was not at the right location.

Thnx Vlad for your help.

1 Like

Great - I’ll put in a ticket to get this documented apologies for the run around. Also just a heads up these types of questions are great to ask in the community Slack, Much easier to get the attention of a developer there than the official channels (Not the greatest situation but it is what it is…)

3 Likes

OK, Support told me to use the ST forum (see their post above)…Anyway, Slack is awfully quiet those days…The developers community is getting thinner it seems…

I’ve tested the revised code with Vlad’s help and the oAuth flow works now (you need to follow all prerequisites and installation steps at my github).

You can download the new code at my store.

Regards.

1 Like

Hi, you can use your original download link from Sellfy to download the revised oAuth flow with the tlsVersion add-on.

Regards.

Thanks! Glad we got someone in here to help. =)

1 Like

Thanks. Downloaded and installed app and device (just to be sure). I pasted in my clientId and Key from previous version.

But I am not getting the Automatic authentication prompt. Error in logs is:

exception groovyx.net.http.HttpResponseException: Unauthorized while getting list of Automatic Devices

You need to follow the installation steps again (if you’ve done a reinstall, your ST app id has changed) and also please make sure to keep your public & private automatic keys at the end of the service manager.

Yea, I figured that. But I checked and the redirect URL is the same as I have in the developer portal.

Just to be clear, I am when I click the login page in the app I just get a completely blank blue page. No Automatic icon to click to enter my credentials. Basically step 5c in your instructions.

I ave double checked and the appId and Secret from the developer portal are at the end of my file as they were before.

I’m sorry, but I cannot help you without seeing any logs… Please double check that your Automatic URLs are well inputted at the Automatic portal (no spaces at the beginning or the end) and it’s the same URL as indicated in the logs.

Otherwise, I can help you under your ST account by contributing to one of my support packages.

Regards.

Thanks, yea I did double check that the URL is clean and it is.

I don’t think the instructions specify, but I assume that the client type (in the automatic app settings) should be confidential/web?

And my app is in Dev mode still.

Do either of those matter?

No, I don’t think it matters. If you don’t see the screen after the automatic login, it means that the URLs are not correct.

I don’t even get the login…

OMG. I rebooted my tablet and it works fine… Thanks!