Example using new SmartThings Cloud API!

Thanks, Jody. While the personal access token is great for testing a personal implementation, I’m looking for a more traditional OAuth flow where a user of the third-party app would initiate the OAuth flow directly from the third party app without having to get a manual token.

eg. The Authorization Code flow as used in the groovy Web Services SmartApp approach.


Been playing around with this new API and I have a few questions that perhaps the readers of this thread can answer. My goal is a rudimentary web version of the ST app, where everything happens on the client side (angular in the browser). Basic device info is fine, and I have pretty html per device showing name, hub-name, group-name, and how much battery is left if battery-powered etc. But the capabilities/status/actions are a bit more tricky. For example here is the capabilities list of my presence dongle:


and the corresponding status:


A good visualisation of this device would be to display “presence” as the primary value and perhaps “signalStrength” as secondary value. And there should be a “beep” button as that action is hiding behind the “tone” capability, but the similar “sensor” and “actuator” capabilities are just tags. But I don’t understand how I can get to that knowledge without hard coding lots and lots of information from the docs. There does not appear to be API calls for this at all, unless I’ve completely missed a vital part of the new docs. Trusting the order of the object inside “main” seems a bit dodgy, and it does not solve the actions.

To look for additional info, I ripped the SmartThings CLI out of the MacOS SDK blob and installed it on my Linux-box. It had quite a few additional API calls to a different Samsung web service for more OIC/OCF type info(*) but nothing that helped me with this. However the cli did have a number of files with device type asset info in a format I perhaps could import, but strangely enough not a complete set. Button was missing for example.

Bright ideas anyone?

*) Sample output:

$ /home/ok/cli/st describe device-status -i --resource-model --resource /st//capability/temperatureMeasurement/0
“rt”: [
“temperature”: 19.7,
“id”: “0”,
“units”: “C”,
“if”: [

1 Like

8 posts were merged into an existing topic: I’m perplex for the new SmartThings / SamsungConnect thing

This is my take on this whole issue:

  1. the problem … Smartthings servers often seem to become overloaded and events and other things stop working… Just look at all the outages. The current model seems unsustainable as usage keeps growing.

  2. the solution … This… New firmware, new api, require devices to offload the processing to servers other than smartthings servers to reduce the load.

  3. So If I understand correctly new device types like for ecobee, honeywell etc. will require web based processing on THEIR own servers to be compatible with smartthings in the future.

This brings up many problems… If the company is big enough they may do it. But now we have no single point of control and there will be finger pointing when there are outages.

Also, many companies are too small or I believe will not set up their own server farm and maintain it just to have smartthings compatibility. I cannot see qubino, aeon, eversource, etc settings up and maintaining servers just to support smartthings. I believe this will cause future incompatibilities with many currently supported devices.

I understand where this is coming from but don’t think it is the best solution…

On my side I do have a server or two I can use. I have a mail/dns server with public ip… I would like to see some conversion of existing devices types and smart apps going to your own server, this would be nice and would run locally instead of in the cloud and would work even if wider internet is down. At least if the server is on your local net. Probably will never see this however.

I can see a bidding war as in cable TV, where Honeywell wants hub companies to bid for access, if they say no, no service. What I see is another Pay to play system.

3 that is true for cloud connected devices that are already talking to a cloud system. But someone has to setup the integrations it may not always be the device manufacturer.

Other devices such as hub connected aren’t integrated via this api you can control them via the api but they don’t talk directly to this.

Automations smartapps etc are in the case where they need to run somewhere. Solutions like lambda will hopefully make these very approachable.

What does all of this mean for the average user? What will be changing for the general consumers?

The “average user” has never logged into the SmartThings IDE and doesn’t use any SmartApps or Device Types that are installable directly from the SmartThings App.

1 Like

And this is not new. There are already cloud-to-cloud devices in SmartThings that were integrated by users as opposed to the manufacturer. My concern is how these integrations will be converted to the new paradigm.

Ok, let me rephrase that, what does this mean for somebody like me with 200+ devices and uses the IDE to the fullest?

1 Like

It means you’d better hope the good lawd (of your preference) hears your prayers. Nothing is a sure thing with SmartThings regardless of announcements or promises.

I believe this will be very good thing “overall” in the long term. But there will be both short term pain and some serious casualties.


So (and obviously not an engineer), if the main thing needed is a place to store and run this stuff from… there’s no chance that an option for that is gonna be the USB slot on the back of the V2 hub?

From a simple end user standpoint, that would seem like a logical solution. It’d provide storage, and from what’s been said so far, the requirements for most things don’t sound like they would overtax the hub… That just seems like an obvious avenue that I haven’t seen anyone mention, so I thought I would. Please feel free to tell me all the reasons that wouldn’t work. :slightly_smiling_face:


I’m a bit late to the party in only having seen these docs yesterday. I’m a dev who has worked on IoT products and connecting products to things like Alexa. What I’ve seen in my quick browse looks really promising and much closer to how things like Google Home and Alexa work so good work there. I can see this being massively easier for third parties to integrate into than the old system.

Ironically (because I always thought smartthings was positioned to replace other hubs) there seems to be very little documentation on how to create a locally controlled device. For instance I have several wifi devices that advertise over UPNP and expose a very simple REST interface (basically following these docs). How would I write a similar device handler and smartapp in the new system?

This is not necessarily a good assumption. I started in late Jan last year working with groovy, node.js, and other apps without minimal previous SW experience (took college course in 1967). A year later, I have integrated several devices (TP-Link Plugs/Bulbs and Samsung Multiroom Speaker with presets) even though I am minimally proficient. At 69, I do not know if I am going to be able to transition to the new environment.

Additionally, I have several persons (> 1000 ) using my Service Manager and Device Handlers. Should I depreciate that thread/capability so as not to lead new users down this new rabbit hole???

Regards, Dave.

1 Like

Concur. It would be helpful to see locally controlled device examples.

Is there a way to access routines with the new api?

Hello, my name is Shin I’m trying to send POST request with postman.

All of the GET requests are working well but any POST request is malfunctioning

I send POST reqeust with postman like

“commands”: [
“component”: “main”,
“capability”: “audioVolume”,
“command”: “setVolume”,
“arguments”: [ {
“name”: “volume”,
“schema”: {
“type”: “integer”,
“minimum”: 0,
“maximum”: 100
“required”: true } ]

But I’ve got
“requestId”: “7F47FFAF-5F70-4EBA-B8~~”,
“error”: {
“code”: “ConstraintViolationError”,
“target”: null,
“message”: “The request is malformed.”,
“details”: [ {
“code”: “UnprocessableEntityError”,
“target”: “[0].arguments.[0]”,
“message”: “invalid NUMBER type”,
} ] } }

I have 2 questions.

Q1) How can I fill out the body of POST request?

Q2) If I use request module of node.js, can I just send

var options = {
method: ‘POST’,
url: ‘https://api.smartthings.com/v1/devices/“my device ID”/commands’,
headers: {
‘Authorization’ : ‘Bearer “My personal access key”’,
body: {
“commands”: [ {
“component”: “main”,
“capability”: “audioVolume”,
“command”: “volumeUp”,
}]} };

Thank you in advance

So far I’m not happy.

I have everything running so smoothly, and I’m afraid that’s all going to go down the toilet with these changes.

I’m pretty sure that most of us in this community are not ‘average users’, but some of the things being talked about is going to make setting up devices a second job.

Will we still be able to use Core Pistons in this new app environment?

This is (mostly) a discussion about developing integrations with Smartthings, for developers. I don’t see anything here that will impact users setting up devices?

Hi All.

I’ just posting a link to reach out for some advice in my current project using Open Dash API.

Thread is located here: Raspberry Pi Codesys Project

Basically I have been using the Open Dash Smart App to provide a REST API to interface with my application running on a raspberry pi. This has been great up now at the point where polling is becoming too slow for my needs. The current poll time using Open Dash is taking 5 to 6 seconds or longer. I use the allDevice endpoint.

What im looking to do now is possibly move to the new ST API to allow me get real time updates or at the very least provide a fast response to an “allDevices” type of endpoint to quickly return the current status of all devices when I ask for it. My application really need updating every second when polling or when a new event happens using web hooks possibly.

Issue is I have no experience in development of a web services smart app. Essentially the new smart app I need to develop should have all the functionality already contained in Open Dash but i just need faster return on polling or move to real time updates.

My experience and application is coming from an industrial automation/PLC background. Based on what i am already using does anyone have any advice on how I can start work with the new ST API to give me the functionality I need.

Thanks in advance all.