Example using new SmartThings Cloud API!

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.

4 Likes

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:

2 Likes

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”,
“details”:
} ] } }

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”,
“arguments”:
}]} };

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.

Got any solution for this @joshua_lyon ? I’m also searching for the solution for the same. Stuck at the same point. If you can help me with me correct documentation to Initiate OAuth flow from web it would be very helpful and @Jim In my webhook CONFIGURATION life cycle is never getting called. Please help me with this as soon as possible.

Endpoint SmartApps are not designed to handle incoming OAuth requests. If you want to build an OAuth app, please submit a request here:
https://smartthings.developer.samsung.com/oauth-request

1 Like

I second that. Is a webhook used in the new system to connect to a local RPI? Does the RPI just make REST calls to smarthings? I could easily do this via functions with Groovy previously. I don’t see anything in the new API to do this.

© 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.