App Design Question - Need catching up on Samsung Transition

2 years ago I built a middleware web app using smartthings as part of it. My python app, made some calls to groovy in the smartthings IDE. I had used link to manually get my Oauth access key. https://iotdb.org/playground/oauthorize (its broken now)

My web has been working greeat for 2 years. Now I have to make changes and I’m totally stuck because that above link is broken so I can’t add new hubs to my system.

It looks like I’m faced with two options:

  1. Figure out interfacing with new Samsung platform, and update all my old groovy code
  2. Go back and figure out how to programatically create the OAuth access key fro the old system.

If 2 is a lot less time than 1, then I’d rather delay more work.

QUESTION:

  • does the new platform allow Groovy code?
  • Is there a designated date when the old groovy IDE stuff is going to turn off?

AND most importantly, whats the easiest fastest way to obtain an OAuth access code to make calls into the old Groovy IDE?

Tagging @jody.albritton :slight_smile:

1 Like

You can still run groovy SmartApps. We have not announced a sunset date, but from the sounds of it, you only need API access and the new public API has stuff you won’t get by rolling your own in groovy.

You should be able to generate a new key with your endpoints. Hard to say without knowing how your app was written.

Docs for tokens and new API are here. You don’t need a groovy endpoint app.
https://smartthings.developer.samsung.com/docs/api-ref/st-api.html

2 Likes

@jody.albritton @jkp Thanks for the info.

1 Like

Followup question:

I have been using this python server code to make calls to my custom groovy app which passes commands to my devices:

Is any of this code useful or still apply to the new api platform?

My plan is to take your advice and update all my code to use the api spec outline here (which you linked to). https://smartthings.developer.samsung.com/docs/api-ref/st-api.html#
I am confused why they still call it v1.0, if this is newer than before.

Are you aware of, or have an idea where I could look for sample python (or php) code which makes these calls?

we don’t have a python version, but we are releasing a TypesScript SDK in March. We also have a Java example.

ah ok. another dumb question.

I figured out how to setup the Oauth for the classic app, but when i try to actually authorize my app, i get error:
" Client is not associated with a SmartApp in location … ."

I can’t remember how I solved this. The documentation that addresses this error isn’t too helpful:
" If it is the same account, and you are trying to install into a different Location, ensure the SmartApp is published on that Location as well ("

In attachment below, I can see far right, there is a location area that it SHOULD be assigned to, but not sure how.

SEE ERROR IN NEXT POST

© 2019 SmartThings, Inc. All Rights Reserved. Terms of Use | Privacy Policy

SmartThings; SmartApps®; Physical Graph; Hello, Home; and Hello, Smart Home are all trademarks of the SmartThings, Inc.